:root {
  --teal: #0D6E6E;
  --teal-light: #14A8A8;
  --teal-pale: #E8F5F5;
  --sand: #F5F0E8;
  --ink: #0E1E1E;
  --ink-60: #5A7070;
  --ink-30: #B0C4C4;
  --white: #FAFCFC;
  --accent: #E8732A;
  --accent-soft: #FDF0E8;
  --success: #2A9D6A;
  --warning: #E8A82A;
  --sidebar-w: 260px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--ink);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  padding: 0 0 24px;
}

.sidebar-logo {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
}

.logo-badge {
  width: 40px; height: 40px;
  background: var(--teal-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: white;
  margin-bottom: 12px;
}

.logo-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: white;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.logo-sub {
  font-size: 11px;
  color: var(--ink-30);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.nav-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-30);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 1px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.nav-item.active {
  background: var(--teal);
  color: white;
  font-weight: 500;
}

.nav-icon {
  width: 18px; height: 18px;
  opacity: 0.8;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 16px 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.user-card:hover { background: rgba(255,255,255,0.06); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-light), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--ink-30); margin-top: 1px; }

/* ── MAIN ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid #E8EFEF;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.btn-notif {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid #E0EAEA;
  background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s;
}

.btn-notif:hover { border-color: var(--teal-light); }

.notif-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 7px; right: 7px;
  border: 1.5px solid white;
}

.btn-primary {
  padding: 8px 16px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex; align-items: center; gap: 6px;
}

.btn-primary:hover { background: var(--teal-light); }
.btn-primary:active { transform: scale(0.98); }

/* ── CONTENT ── */
.content { padding: 32px; flex: 1; }

/* ── WELCOME BANNER ── */
.welcome-banner {
  background: linear-gradient(135deg, var(--ink) 0%, #1A3535 100%);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(20,168,168,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 120px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(232,115,42,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-text { position: relative; z-index: 1; }
.welcome-greeting { font-size: 13px; color: var(--ink-30); margin-bottom: 6px; }

.welcome-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: white;
  margin-bottom: 6px;
}

.welcome-name span { color: var(--teal-light); }

.welcome-meta { font-size: 13px; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 16px; }
.welcome-meta-item { display: flex; align-items: center; gap: 5px; }

.cedula-badge {
  background: rgba(20,168,168,0.15);
  border: 1px solid rgba(20,168,168,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-light);
  letter-spacing: 0.05em;
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 6px;
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border: 1px solid #E8EFEF;
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.stat-card:hover {
  border-color: var(--teal-light);
  box-shadow: 0 4px 20px rgba(13,110,110,0.08);
}

.stat-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}

.stat-label { font-size: 12px; color: var(--ink-60); font-weight: 500; }

.stat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 4px;
}

.stat-sub { font-size: 12px; color: var(--ink-60); }

.stat-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 6px;
}

.pill-green { background: #E8F8F0; color: var(--success); }
.pill-orange { background: var(--accent-soft); color: var(--accent); }
.pill-teal { background: var(--teal-pale); color: var(--teal); }
.pill-warn { background: #FFF8E8; color: var(--warning); }

/* ── TWO COLUMN ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.three-col { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; margin-bottom: 28px; }

/* ── CARD ── */
.card {
  background: white;
  border: 1px solid #E8EFEF;
  border-radius: 14px;
  padding: 22px;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.card-action {
  font-size: 12px;
  color: var(--teal);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
}

.card-action:hover { color: var(--teal-light); }

/* ── CEDULA SECTION ── */
.cedula-card {
  background: linear-gradient(135deg, var(--teal) 0%, #0A4F4F 100%);
  border-radius: 14px;
  padding: 22px;
  color: white;
  position: relative;
  overflow: hidden;
}

.cedula-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.cedula-card::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 30px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.cedula-num {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 10px 0 6px;
  position: relative; z-index: 1;
}

.cedula-name {
  font-size: 14px;
  opacity: 0.8;
  position: relative; z-index: 1;
}

.cedula-status {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(42,157,106,0.25);
  border: 1px solid rgba(42,157,106,0.4);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #7EFFC0;
  margin-top: 14px;
  position: relative; z-index: 1;
}

.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #7EFFC0; }

/* ── QUOTAS ── */
.quota-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F0F5F5;
}

.quota-row:last-child { border-bottom: none; }

.quota-period { font-size: 13px; color: var(--ink); font-weight: 500; }
.quota-date { font-size: 12px; color: var(--ink-60); margin-top: 2px; }

.quota-amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-paid { background: #E8F8F0; color: var(--success); }
.badge-pending { background: var(--accent-soft); color: var(--accent); }
.badge-late { background: #FFF0F0; color: #D94040; }

/* ── FORMAÇÕES ── */
.formacao-item {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #F0F5F5;
  cursor: pointer;
  transition: background 0.1s;
}

.formacao-item:last-child { border-bottom: none; }
.formacao-item:hover { margin: 0 -22px; padding: 14px 22px; background: var(--teal-pale); }

.formacao-thumb {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.formacao-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; line-height: 1.3; }
.formacao-meta { font-size: 12px; color: var(--ink-60); display: flex; gap: 10px; align-items: center; }

.cpd-bar-wrap {
  background: #F0F5F5;
  border-radius: 20px;
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.cpd-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-light), var(--teal));
  border-radius: 20px;
  transition: width 1s ease;
}

/* ── EMPREGOS ── */
.emprego-item {
  padding: 14px 0;
  border-bottom: 1px solid #F0F5F5;
  cursor: pointer;
  transition: background 0.1s;
}

.emprego-item:last-child { border-bottom: none; }
.emprego-item:hover { margin: 0 -22px; padding: 14px 22px; background: var(--teal-pale); }

.emprego-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.emprego-org { font-size: 12px; color: var(--teal); font-weight: 500; margin-bottom: 6px; }
.emprego-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tag {
  font-size: 11px; font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  background: #F0F5F5;
  color: var(--ink-60);
}

.tag-hot { background: var(--accent-soft); color: var(--accent); }

/* ── NOTICIAS ── */
.noticia-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F0F5F5;
  cursor: pointer;
}

.noticia-item:last-child { border-bottom: none; }

.noticia-date {
  font-size: 10px; font-weight: 700;
  color: var(--ink-30);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  padding-top: 2px;
  line-height: 1.4;
}

.noticia-text { font-size: 13px; color: var(--ink); line-height: 1.5; }

/* ── CPD TRACKER ── */
.cpd-ring-wrap {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0;
}

.cpd-ring {
  width: 80px; height: 80px;
  position: relative;
  flex-shrink: 0;
}

.cpd-ring svg { transform: rotate(-90deg); }

.cpd-ring-center {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

.cpd-pct {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  line-height: 1;
}

.cpd-pct-lbl { font-size: 10px; color: var(--ink-60); }

.cpd-detail-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cpd-detail-sub { font-size: 12px; color: var(--ink-60); line-height: 1.5; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate { animation: fadeUp 0.4s ease both; }
.a1 { animation-delay: 0.05s; }
.a2 { animation-delay: 0.10s; }
.a3 { animation-delay: 0.15s; }
.a4 { animation-delay: 0.20s; }
.a5 { animation-delay: 0.25s; }
.a6 { animation-delay: 0.30s; }

/* ── PROGRESS ── */
.progress-wrap { margin-top: 6px; }
.progress-bg { background: #F0F5F5; border-radius: 20px; height: 5px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--teal-light), var(--teal)); }

/* ── RESPONSIVE TABS ── */
.tabs {
  display: flex; gap: 4px;
  background: #F0F5F5;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
}

.tab {
  flex: 1; text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  color: var(--ink-60);
  transition: background 0.15s, color 0.15s;
}

.tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* section pages */
.page { display: none; }
.page.active { display: block; }

/* Nav active switching */
.nav-item[data-page] { cursor: pointer; }

/* ── LOGIN PAGE ── */
.login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  margin: 0;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--ink) 0%, #1A3535 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(20,168,168,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(232,115,42,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.login-branding {
  position: relative;
  z-index: 1;
  text-align: center;
}

.login-logo {
  width: 80px; height: 80px;
  background: var(--teal-light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: white;
  margin: 0 auto 24px;
}

.login-brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 42px;
  color: white;
  margin-bottom: 12px;
  letter-spacing: 0;
}

.login-brand-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: var(--white);
}

.login-form-wrap {
  width: 100%;
  max-width: 420px;
}

.login-form-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--ink);
  margin-bottom: 8px;
}

.login-form-sub {
  font-size: 14px;
  color: var(--ink-60);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #E8EFEF;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--teal-light);
}

.form-input::placeholder {
  color: var(--ink-30);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-check label {
  font-size: 13px;
  color: var(--ink-60);
  cursor: pointer;
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-login:hover {
  background: var(--teal-light);
}

.btn-login:active {
  transform: scale(0.98);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--ink-60);
}

.login-footer a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  color: var(--teal-light);
}
