/* ===================================================
   APEJ - Sistema Web - Estilos Globais
   Cores: Laranja #F7941D | Vermelho #D81B60 |
          Azul #1565C0 | Roxo #6A1B9A | Verde #00897B
=================================================== */

:root {
  --orange:  #F7941D;
  --red:     #D81B60;
  --blue:    #1565C0;
  --purple:  #6A1B9A;
  --teal:    #00897B;
  --dark:    #1A1A2E;
  --light:   #F5F7FA;
  --white:   #FFFFFF;
  --gray:    #6C757D;
  --border:  #DEE2E6;
  --shadow:  0 2px 15px rgba(0,0,0,.10);
  --radius:  8px;
  --font:    'Segoe UI', Arial, sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: var(--font);
  background: var(--light);
  color: var(--dark);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 4px; }

/* ===================== TOPBAR ===================== */
.topbar {
  background: var(--dark);
  color: #aaa;
  font-size: 12px;
  padding: 5px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: #ccc; }
.topbar a:hover { color: var(--orange); }

/* ===================== HEADER ===================== */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 20px;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-wrap img {
  height: 64px;
  width: auto;
  object-fit: contain;
}
.logo-text h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}
.logo-text span {
  font-size: 12px;
  color: var(--orange);
  font-style: italic;
}

/* -- NAV -- */
nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}
nav ul li a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  transition: all .2s;
}
nav ul li a:hover,
nav ul li a.active {
  background: var(--orange);
  color: var(--white);
}
.btn-login {
  background: var(--blue);
  color: var(--white) !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
}
.btn-login:hover { background: var(--purple) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--dark);
  border-radius: 2px;
  transition: all .3s;
}

/* ===================== HERO ===================== */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 40%, var(--orange) 100%);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero .container { position: relative; }
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.hero-text h2 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero-text p {
  font-size: 16px;
  opacity: .9;
  margin-bottom: 30px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: #e07e10; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--blue); }

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.2);
}
.stat-card .num {
  font-size: 32px;
  font-weight: 800;
  display: block;
}
.stat-card .lbl {
  font-size: 13px;
  opacity: .85;
}

/* ===================== QUICK BTNS ===================== */
.quick-actions {
  background: var(--white);
  padding: 30px 0;
  border-bottom: 3px solid var(--orange);
}
.quick-actions .container {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.quick-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all .25s;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.quick-btn-1 { background: var(--orange); color: var(--white); }
.quick-btn-1:hover { background: #d97f10; }
.quick-btn-2 { background: var(--teal); color: var(--white); }
.quick-btn-2:hover { background: #00786b; }
.quick-btn-3 { background: var(--purple); color: var(--white); }
.quick-btn-3:hover { background: #5a1785; }
.quick-btn-4 { background: var(--red); color: var(--white); }
.quick-btn-4:hover { background: #bf1654; }
.quick-btn .icon { font-size: 20px; }

/* ===================== SECTIONS ===================== */
.section { padding: 60px 0; }
.section-alt { background: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: 42px;
}
.section-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.section-header p { color: var(--gray); max-width: 580px; margin: 0 auto; }
.section-line {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  margin: 12px auto 0;
}
.line-orange { background: var(--orange); }
.line-blue { background: var(--blue); }
.line-teal { background: var(--teal); }

/* ===================== CONTAINER ===================== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================== ABOUT ===================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.about-img {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.about-img-placeholder {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  height: 340px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 80px;
}
.about-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--orange);
  color: var(--white);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
}
.about-badge .big { font-size: 28px; display: block; }
.about-text h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--dark);
}
.about-text h2 span { color: var(--orange); }
.about-text p { color: var(--gray); margin-bottom: 16px; }
.about-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--gray);
  font-size: 14px;
}
.about-list li::before {
  content: '✓';
  background: var(--orange);
  color: var(--white);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===================== PROGRAMS ===================== */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.prog-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s;
}
.prog-card:hover { transform: translateY(-6px); }
.prog-card-top {
  height: 8px;
}
.prog-card-body { padding: 26px 22px; }
.prog-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.prog-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}
.prog-card p { color: var(--gray); font-size: 14px; margin-bottom: 16px; }
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ===================== EVENTS ===================== */
.events-list { display: flex; flex-direction: column; gap: 16px; }
.event-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--white);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.event-item:hover { transform: translateX(4px); }
.event-date {
  background: var(--blue);
  color: var(--white);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 58px;
  flex-shrink: 0;
}
.event-date .day { font-size: 24px; font-weight: 800; line-height: 1; }
.event-date .mon { font-size: 12px; text-transform: uppercase; }
.event-info h4 { font-weight: 700; margin-bottom: 5px; color: var(--dark); }
.event-info p { color: var(--gray); font-size: 13px; }
.event-tag {
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
}

/* ===================== NEWS ===================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s;
}
.news-card:hover { transform: translateY(-5px); }
.news-thumb {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: var(--white);
}
.news-body { padding: 18px 16px; }
.news-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 8px;
}
.news-body h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
  line-height: 1.4;
}
.news-body p { color: var(--gray); font-size: 13px; margin-bottom: 14px; }
.read-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}
.read-more:hover { text-decoration: underline; }

/* ===================== PARTNERS ===================== */
.partners-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.partner-logo {
  background: var(--white);
  border-radius: 10px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 14px;
  color: var(--gray);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all .2s;
}
.partner-logo:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--dark);
  color: #ccc;
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { color: #999; font-size: 14px; margin: 12px 0 18px; }
.footer-socials {
  display: flex;
  gap: 10px;
}
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  transition: opacity .2s;
}
.social-btn:hover { opacity: .8; }
footer h4 { color: var(--white); font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #999; font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--orange); }
.footer-contact li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #999;
  font-size: 14px;
  margin-bottom: 10px;
}
.footer-contact li .ico { flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid #333;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
}

/* ===================== LOGIN PAGE ===================== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 60%, var(--orange) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}
.login-box {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo img { height: 70px; margin-bottom: 10px; }
.login-logo h2 { font-size: 20px; color: var(--dark); font-weight: 800; }
.login-logo p { color: var(--gray); font-size: 13px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color .2s;
  background: var(--white);
}
.form-control:focus {
  outline: none;
  border-color: var(--orange);
}
.form-control.error { border-color: var(--red); }
.form-hint { font-size: 12px; color: var(--gray); margin-top: 4px; }
.form-hint.error-msg { color: var(--red); }
.btn-full {
  width: 100%;
  padding: 13px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
  transition: opacity .2s, transform .2s;
}
.btn-full:hover { opacity: .9; transform: translateY(-1px); }
.login-footer-links {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 13px;
}
.login-footer-links a { color: var(--blue); }
.login-footer-links a:hover { text-decoration: underline; }
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--gray);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===================== REGISTO MULTI-STEP ===================== */
.registo-page {
  min-height: 100vh;
  background: var(--light);
  padding: 30px 20px;
}
.registo-header {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
  padding: 22px 28px;
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.registo-header h2 { font-size: 20px; font-weight: 800; }
.registo-header p { opacity: .85; font-size: 14px; }
.steps-nav {
  display: flex;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
}
.step-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s;
}
.step-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.step-tab.done { color: var(--teal); }
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.step-tab.active .step-num { background: var(--orange); color: var(--white); }
.step-tab.done .step-num { background: var(--teal); color: var(--white); }
.registo-body {
  background: var(--white);
  padding: 32px 36px;
  border-radius: 0 0 14px 14px;
}
.step-content { display: none; }
.step-content.active { display: block; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.btn-back {
  padding: 11px 24px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray);
}
.btn-next {
  padding: 11px 28px;
  border: none;
  border-radius: 8px;
  background: var(--orange);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.btn-next:hover { background: #d97f10; }
.btn-submit {
  padding: 11px 28px;
  border: none;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.btn-submit:hover { background: #00786b; }
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange);
  display: flex;
  align-items: center;
  gap: 8px;
}
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  color: var(--gray);
  cursor: pointer;
  transition: all .2s;
}
.upload-area:hover { border-color: var(--orange); color: var(--orange); }
.upload-area .upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-area p { font-size: 13px; }
select.form-control { cursor: pointer; }

/* ===================== PRIVATE AREA ===================== */
.private-layout {
  display: flex;
  min-height: 100vh;
  background: var(--light);
}
.sidebar {
  width: 250px;
  background: var(--dark);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 900;
  transition: transform .3s;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 18px;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo img { height: 42px; }
.sidebar-logo-text h3 { color: var(--white); font-size: 13px; font-weight: 700; line-height: 1.3; }
.sidebar-logo-text span { color: var(--orange); font-size: 11px; }

.sidebar-user {
  padding: 16px 18px;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-user-info h4 { color: var(--white); font-size: 13px; font-weight: 600; }
.sidebar-user-info span { color: #888; font-size: 11px; }
.member-badge {
  background: var(--teal);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 3px;
}

.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-section-title {
  color: #555;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 18px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  color: #aaa;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-item.active {
  color: var(--orange);
  background: rgba(247,148,29,.1);
  border-left-color: var(--orange);
}
.nav-item .nav-ico { font-size: 16px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.main-content {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topnav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 800;
}
.topnav-title h3 { font-size: 18px; font-weight: 700; color: var(--dark); }
.topnav-title span { font-size: 13px; color: var(--gray); }
.topnav-right { display: flex; align-items: center; gap: 14px; }
.notif-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray);
}
.notif-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topnav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.topnav-user .avatar { width: 36px; height: 36px; font-size: 14px; }
.topnav-user span { font-size: 14px; font-weight: 600; color: var(--dark); }

.page-content { padding: 28px; flex: 1; }

/* ---- DASHBOARD CARDS ---- */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.dash-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.dash-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.dash-card-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
}
.trend-up { background: #e8f5e9; color: #2e7d32; }
.trend-down { background: #fce4ec; color: #c62828; }
.dash-card h3 { font-size: 26px; font-weight: 800; color: var(--dark); }
.dash-card p { font-size: 13px; color: var(--gray); }

/* ---- DASHBOARD GRID ---- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h4 { font-size: 15px; font-weight: 700; color: var(--dark); }
.card-body { padding: 18px 20px; }
.card-link { font-size: 13px; color: var(--orange); font-weight: 600; }
.card-link:hover { text-decoration: underline; }

/* ---- QUOTA TABLE ---- */
.quota-table { width: 100%; border-collapse: collapse; }
.quota-table th, .quota-table td {
  padding: 11px 14px;
  text-align: left;
  font-size: 13.5px;
}
.quota-table th { background: var(--light); color: var(--gray); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.quota-table tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
.quota-table tbody tr:hover td { background: #fafafa; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-pago { background: #e8f5e9; color: #2e7d32; }
.status-pendente { background: #fff8e1; color: #e65100; }
.status-vencido { background: #fce4ec; color: #c62828; }

/* ---- NOTIFICATIONS ---- */
.notif-list { display: flex; flex-direction: column; gap: 12px; }
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--light);
  transition: background .2s;
}
.notif-item:hover { background: #eef2f7; }
.notif-item.unread { background: #fff8f0; border-left: 3px solid var(--orange); }
.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-text h5 { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 3px; }
.notif-text p { font-size: 12px; color: var(--gray); }
.notif-time { font-size: 11px; color: var(--gray); margin-left: auto; white-space: nowrap; }

/* ---- FORUM TOPICS ---- */
.topic-list { display: flex; flex-direction: column; gap: 0; }
.topic-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.topic-item:last-child { border-bottom: none; }
.topic-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.topic-info h5 { font-size: 13.5px; font-weight: 600; color: var(--dark); margin-bottom: 4px; cursor: pointer; }
.topic-info h5:hover { color: var(--orange); }
.topic-meta { font-size: 12px; color: var(--gray); display: flex; gap: 10px; }
.topic-counts { margin-left: auto; text-align: right; font-size: 12px; color: var(--gray); }
.topic-counts strong { display: block; font-size: 15px; font-weight: 700; color: var(--dark); }

/* ---- PROFILE PAGE ---- */
.profile-header {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 14px;
  padding: 30px 28px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.profile-avatar-big {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.profile-info h3 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.profile-info p { opacity: .85; font-size: 14px; margin-bottom: 8px; }
.profile-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-tag {
  background: rgba(255,255,255,.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--gray); font-weight: 500; }
.info-value { font-weight: 600; color: var(--dark); }

/* ---- FORMATIONS PAGE ---- */
.formations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.formation-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s;
}
.formation-card:hover { transform: translateY(-4px); }
.formation-thumb {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: var(--white);
}
.formation-body { padding: 16px 14px; }
.formation-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--dark); }
.formation-body p { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.formation-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.formation-meta strong { color: var(--dark); }
.enroll-btn {
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  border: none;
  border-radius: 8px;
  background: var(--orange);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.enroll-btn:hover { background: #d97f10; }
.enroll-btn.inscrito { background: var(--teal); cursor: default; }

/* ---- SUCCESS OVERLAY ---- */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.success-overlay.show { display: flex; }
.success-box {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: popIn .4s ease-out;
}
@keyframes popIn {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-box h3 { font-size: 22px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.success-box p { color: var(--gray); margin-bottom: 24px; font-size: 15px; }

/* ===================== BOLSA DE EMPREGO ===================== */
.vaga-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 14px;
}
.vaga-card:hover { transform: translateX(4px); box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.vaga-logo {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--light); display: flex; align-items: center;
  justify-content: center; font-size: 24px; flex-shrink: 0;
}
.vaga-info { flex: 1; }
.vaga-info h4 { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.vaga-info .empresa { font-size: 13px; color: var(--orange); font-weight: 600; margin-bottom: 6px; }
.vaga-info p { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.vaga-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.vaga-tag {
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.vaga-side { text-align: right; flex-shrink: 0; }
.vaga-prazo { font-size: 11px; color: var(--gray); margin-bottom: 10px; }
.btn-candidatar {
  padding: 8px 16px; border: none; border-radius: 20px;
  background: var(--orange); color: var(--white);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.btn-candidatar:hover { background: #d97f10; }
.btn-candidatar.candidatado { background: var(--teal); cursor: default; }
.vaga-filters {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.filter-btn {
  padding: 7px 16px; border: 2px solid var(--border); border-radius: 20px;
  background: none; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--gray); transition: all .2s;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--orange); color: var(--orange); background: #fff3e0;
}
.vaga-search {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.vaga-search input {
  flex: 1; padding: 10px 14px; border: 2px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: var(--font);
}
.vaga-search input:focus { outline: none; border-color: var(--orange); }
.vaga-count { font-size: 13px; color: var(--gray); margin-bottom: 16px; }
.vaga-count strong { color: var(--dark); }

/* ===================== RECURSOS ===================== */
.recurso-card {
  background: var(--white); border-radius: 12px; padding: 18px 20px;
  box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center;
  transition: transform .2s; margin-bottom: 12px;
}
.recurso-card:hover { transform: translateX(4px); }
.recurso-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.recurso-info { flex: 1; }
.recurso-info h4 { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.recurso-info p { font-size: 12px; color: var(--gray); }
.recurso-meta { font-size: 11px; color: var(--gray); margin-top: 4px; display: flex; gap: 10px; }
.btn-rec-dl {
  padding: 7px 14px; border: 2px solid var(--orange); border-radius: 20px;
  background: none; color: var(--orange); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.btn-rec-dl:hover { background: var(--orange); color: var(--white); }

/* ===================== COMUNICADOS ===================== */
.comunicado-item {
  background: var(--white); border-radius: 12px; padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 14px;
  border-left: 4px solid var(--blue);
}
.comunicado-item.urgente { border-left-color: var(--red); }
.comunicado-item.info { border-left-color: var(--teal); }
.comunicado-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.comunicado-header h4 { font-size: 15px; font-weight: 700; color: var(--dark); }
.comunicado-date { font-size: 12px; color: var(--gray); white-space: nowrap; margin-left: 12px; }
.comunicado-body { font-size: 13.5px; color: var(--gray); line-height: 1.6; }
.comunicado-footer { margin-top: 12px; display: flex; gap: 10px; align-items: center; }
.tipo-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.tipo-circular { background: #e3f2fd; color: var(--blue); }
.tipo-urgente { background: #fce4ec; color: var(--red); }
.tipo-info { background: #e0f2f1; color: var(--teal); }
.tipo-convocatoria { background: #f3e5f5; color: var(--purple); }

/* ===================== PERCURSO ===================== */
.percurso-timeline { position: relative; padding-left: 36px; }
.percurso-timeline::before {
  content: ''; position: absolute; left: 16px; top: 0; bottom: 0;
  width: 3px; background: linear-gradient(to bottom, var(--orange), var(--blue));
  border-radius: 2px;
}
.percurso-item { position: relative; margin-bottom: 24px; }
.percurso-dot {
  position: absolute; left: -24px; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--white); box-shadow: 0 0 0 2px currentColor;
}
.percurso-card {
  background: var(--white); border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow);
}
.percurso-card h5 { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.percurso-card p { font-size: 13px; color: var(--gray); }
.percurso-card .p-meta { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--gray); }
.percurso-card .p-meta span { display: flex; align-items: center; gap: 4px; }
.conquista-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 22px; }
.conquista-card {
  background: var(--white); border-radius: 12px; padding: 16px;
  box-shadow: var(--shadow); text-align: center;
}
.conquista-icon { font-size: 32px; margin-bottom: 6px; }
.conquista-card h5 { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.conquista-card p { font-size: 12px; color: var(--gray); }
.conquista-card.bloqueada { opacity: .4; }

/* ===================== CARTAO MEMBRO ===================== */
.cartao-membro {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 50%, var(--orange) 100%);
  border-radius: 18px; padding: 28px 26px; color: var(--white);
  max-width: 400px; position: relative; overflow: hidden;
  box-shadow: 0 12px 40px rgba(21,101,192,.4);
}
.cartao-membro::after {
  content: 'APEJ'; position: absolute; right: -12px; bottom: -22px;
  font-size: 90px; font-weight: 900; opacity: .07;
}
.cartao-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.cartao-org { font-size: 12px; opacity: .8; line-height: 1.4; }
.cartao-org strong { font-size: 15px; opacity: 1; display: block; }
.cartao-photo {
  width: 72px; height: 72px; border-radius: 12px;
  background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; float: right; margin-left: 18px;
}
.cartao-nome { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.cartao-tipo { font-size: 13px; opacity: .85; margin-bottom: 16px; }
.cartao-details { font-size: 12px; opacity: .8; line-height: 2.1; }
.cartao-qr {
  width: 58px; height: 58px; background: var(--white); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-top: 14px; float: right;
}
.cartao-footer { font-size: 11px; opacity: .55; margin-top: 10px; clear: both; }
.chip-nfc {
  width: 44px; height: 34px; background: rgba(255,215,0,.6);
  border-radius: 6px; float: right; margin-top: -10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .dashboard-cards { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .programs-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .formations-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 30px; }
  .hero-text h2 { font-size: 26px; }
  .hero-stats { grid-template-columns: repeat(2,1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .programs-grid, .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 16px; box-shadow: var(--shadow); gap: 4px; }
  nav ul.open { display: flex; }
  .hamburger { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .dashboard-cards { grid-template-columns: 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .formations-grid { grid-template-columns: 1fr; }
  .registo-body { padding: 22px 16px; }
  .quick-btn { padding: 11px 16px; font-size: 13px; }
}

@media (max-width: 480px) {
  .dashboard-cards { grid-template-columns: 1fr; }
  .login-box { padding: 32px 22px; }
}
