/* ═══════════════════════════════════════════════════════
   MÉTODO APROVA DENTISTAS — Design System
   Tokens extraídos dos mockups: dark default + light toggle
   ═══════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  /* Brand */
  --orange:        #E5903E;
  --orange-alt:    #F5A056;
  --cta:           #FF9437;
  --green:         #5AA17E;
  --green-dk:      #478965;
  --green-light:   #6fc494;
  --danger:        #e05555;
  --charcoal:      #2D2D2D;

  /* Warn/risk */
  --warn-color:    #E0A93E;
  --risk-color:    #D0604A;

  /* Warn bg */
  --warn-bg:       rgba(229,144,62,.13);
  --warn-border:   rgba(229,144,62,.45);

  /* Dark (default) */
  --bg:            #0e0e10;
  --surface:       #1a1a1d;
  --surface2:      #222226;
  --border:        #2b2b30;
  --border2:       #35353c;
  --text:          #ededed;
  --body:          #c6c6c6;
  --muted:         #8f8f8f;
  --input-bg:      #111114;

  /* Shared */
  --header-bg:     #2D2D2D;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(0,0,0,.45);
  --shadow-card:   0 4px 18px rgba(0,0,0,.5);
}

[data-theme="light"] {
  --bg:       #f4f4f6;
  --surface:  #ffffff;
  --surface2: #f0f0f2;
  --border:   #ddd;
  --border2:  #ccc;
  --text:     #1a1a1d;
  --body:     #3a3a3d;
  --muted:    #777;
  --input-bg: #f9f9fb;
  --shadow:   0 2px 12px rgba(0,0,0,.10);
  --shadow-card: 0 4px 18px rgba(0,0,0,.12);
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 40px;
  transition: background .25s, color .25s;
}
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
ul { list-style: none; }
h1, h2, h3, h4, h5 { font-family: 'Lato', sans-serif; color: var(--text); }
a { color: inherit; text-decoration: none; }
input, select, textarea {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
}

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.topbar-logo {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 17px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar-logo .check-icon {
  width: 30px; height: 30px;
  background: var(--orange);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-badge {
  background: rgba(229,144,62,.18);
  color: var(--orange-alt);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(229,144,62,.3);
  text-transform: uppercase;
}
.theme-toggle {
  background: rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 15px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  transition: background .2s;
  user-select: none;
  cursor: pointer;
}
.theme-toggle:hover { background: rgba(255,255,255,.18); }
.avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--orange), var(--orange-alt));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}
.avatar-menu {
  position: absolute;
  top: 42px; right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
  display: none;
}
.avatar-menu.open { display: block; }
.avatar-menu-item {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--body);
  cursor: pointer;
  transition: background .15s;
  font-weight: 600;
}
.avatar-menu-item:hover { background: var(--surface2); color: var(--text); }
.avatar-menu-item.danger { color: var(--danger); }
.avatar-menu-item.danger:hover { background: rgba(224,85,85,.1); }
.nav-pills { display: flex; gap: 2px; }
.nav-pill {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Open Sans', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.nav-pill:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-pill.active { color: var(--orange-alt); background: rgba(229,144,62,.12); }

/* ── STEPPER (progress bar) ─────────────────────────── */
.progress-bar-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 780px;
  margin: 0 auto;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  font-family: 'Lato', sans-serif;
  flex: 1;
  min-width: 0;
}
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .25s;
}
.step.done .step-num  { background: var(--green); border-color: var(--green); color: #fff; }
.step.active .step-num { background: var(--orange); border-color: var(--orange); color: #fff; }
.step.active { color: var(--orange); }
.step.done   { color: var(--green); }
.step-connector {
  height: 2px;
  background: var(--border2);
  flex: 1;
  max-width: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}
.step-connector.done-line { background: var(--green); }
.step-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── LAYOUT ─────────────────────────────────────────── */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 20px;
}
.container-wide {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}
.container-outer {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ── PAGE HEADER ─────────────────────────────────────── */
.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-family: 'Lato', sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.page-header p {
  font-size: 14.5px;
  color: var(--body);
  max-width: 620px;
  line-height: 1.65;
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  border: none;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cta), var(--orange));
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,148,55,.35);
}
.btn-primary:hover  { opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,148,55,.42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(90,161,126,.35);
}
.btn-green:hover { background: var(--green-dk); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { border-color: var(--orange); }
.btn-ghost:disabled { opacity: .4; cursor: not-allowed; }
.btn-danger {
  background: rgba(224,85,85,.15);
  color: var(--danger);
  border: 1px solid rgba(224,85,85,.3);
}
.btn-danger:hover { background: rgba(224,85,85,.25); }
.btn-lg { font-size: 16px; padding: 14px 28px; border-radius: 12px; }
.btn-sm { font-size: 12px; padding: 6px 12px; border-radius: 7px; }

/* ── CARD ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 15px; font-weight: 900; }
.card-header .tag {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.card-body { padding: 22px; }

/* ── FORM ────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select, textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(229,144,62,.15);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--surface); }

/* ── TOGGLE SWITCH ───────────────────────────────────── */
.toggle-switch {
  position: relative;
  width: 42px; height: 24px;
  display: inline-block;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border2);
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(18px); }

/* ── STEPPER WIDGET ──────────────────────────────────── */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.stepper-btn {
  width: 32px; height: 32px;
  background: transparent;
  color: var(--body);
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}
.stepper-btn:hover { background: var(--border2); color: var(--orange); }
.stepper-btn:disabled { opacity: .3; cursor: not-allowed; }
.stepper-val {
  min-width: 42px;
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  border-left: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
  height: 32px;
  line-height: 32px;
  padding: 0 4px;
}

/* ── CHIPS ───────────────────────────────────────────── */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
  cursor: pointer;
  transition: all .18s;
  user-select: none;
}
.chip:hover { border-color: var(--orange); color: var(--orange); background: rgba(229,144,62,.08); }
.chip.selected { background: rgba(229,144,62,.16); border-color: var(--orange); color: var(--orange); }
.chip.selected-green { background: rgba(90,161,126,.15); border-color: var(--green); color: var(--green); }

/* Day chip */
.day-chip {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s;
  user-select: none;
}
.day-chip:hover  { border-color: var(--orange); color: var(--orange); }
.day-chip.on     { background: rgba(229,144,62,.16); border-color: var(--orange); color: var(--orange); }
.day-chip.strong { background: rgba(90,161,126,.14); border-color: var(--green); color: var(--green); }

/* ── YES/NO WIDGET ───────────────────────────────────── */
.yn-wrap { display: flex; gap: 10px; }
.yn-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}
.yn-btn:hover { border-color: var(--orange); color: var(--orange); }
.yn-btn.active-yes { background: rgba(90,161,126,.15); border-color: var(--green); color: var(--green); }
.yn-btn.active-no  { background: rgba(229,144,62,.13); border-color: var(--orange); color: var(--orange); }

/* ── SECTION TITLE ───────────────────────────────────── */
.section-title {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .count-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 9px;
  font-size: 11px;
  color: var(--body);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* ── DIVIDER ─────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 18px;
}
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-text {
  font-family: 'Lato', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* ── TAGS ────────────────────────────────────────────── */
.tag-small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}
.tag-orange { background: rgba(229,144,62,.14); color: var(--orange); border: 1px solid rgba(229,144,62,.25); }
.tag-green  { background: rgba(90,161,126,.13); color: var(--green);  border: 1px solid rgba(90,161,126,.25); }
.tag-blue   { background: rgba(88,140,210,.13); color: #7aa8e8;       border: 1px solid rgba(88,140,210,.25); }
.tag-muted  { background: var(--surface2); color: var(--muted);       border: 1px solid var(--border); }
.tag-red    { background: rgba(224,85,85,.14);  color: var(--danger);  border: 1px solid rgba(224,85,85,.25); }

.route-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(229,144,62,.12);
  border: 1px solid rgba(229,144,62,.35);
  color: var(--orange-alt);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-top: 14px;
  letter-spacing: .02em;
}

/* ── WARN BANNER ─────────────────────────────────────── */
.warn-banner {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--orange-alt);
  font-weight: 600;
}
.warn-banner.visible { display: flex; }

/* ── NOTE BOX ────────────────────────────────────────── */
.note-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(90,161,126,.1);
  border: 1px solid rgba(90,161,126,.25);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.note-box .ni { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.note-box p { font-size: 12.5px; color: var(--green); line-height: 1.55; }
.note-box p strong { font-weight: 700; }

/* ── TOAST ───────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 72px; right: 20px;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-size: 13.5px;
  color: var(--body);
  box-shadow: var(--shadow-card);
  max-width: 320px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(0); pointer-events: auto; }
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast-title {
  font-weight: 700;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  margin-bottom: 3px;
}

/* ── LOADING SPINNER ─────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}
.empty-state .ico { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 360px; margin: 0 auto 20px; }

/* ── METRIC ROW ──────────────────────────────────────── */
.metric-row { display: flex; gap: 12px; flex-wrap: wrap; }
.metric {
  flex: 1;
  min-width: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.metric .n {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--cta);
  line-height: 1;
}
.metric .l { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .03em; }

/* ── PROGRESS BAR ────────────────────────────────────── */
.prog-track { height: 9px; background: var(--border); border-radius: 8px; overflow: hidden; }
.prog-fill  { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--orange-alt), var(--cta)); transition: width .5s ease; }
.prog-fill.green { background: var(--green); }

/* ── STICKY FOOTER ───────────────────────────────────── */
.sticky-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background .25s;
}
.footer-stats { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; }
.stat-value {
  font-family: 'Lato', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.stat-value .unit { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.stat-sep { width: 1px; height: 32px; background: var(--border2); }

/* ── HERO (onboarding) ───────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a1210 0%, #1a1a1d 60%, #0e1a15 100%);
  border-bottom: 1px solid var(--border);
  padding: 36px 24px 32px;
  text-align: center;
}
[data-theme="light"] .hero { background: linear-gradient(135deg, #fff5ee 0%, #f4f4f6 60%, #edf6f1 100%); }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229,144,62,.12);
  border: 1px solid rgba(229,144,62,.28);
  color: var(--orange-alt);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 12px;
}
.hero h1 span { color: var(--orange); }
.hero p { color: var(--muted); font-size: 14px; max-width: 540px; margin: 0 auto; line-height: 1.65; }

/* ── AI BAR ──────────────────────────────────────────── */
.ai-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: linear-gradient(135deg, rgba(229,144,62,.09), rgba(90,161,126,.07));
  border: 1px solid rgba(229,144,62,.22);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
}
.ai-bar-text {
  flex: 1;
  min-width: 160px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-icon-pulse {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--orange), var(--cta));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  animation: aipulse 2.4s ease-in-out infinite;
}
@keyframes aipulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,148,55,.0); }
  50% { box-shadow: 0 0 0 7px rgba(255,148,55,.18); }
}
.ai-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--body);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  white-space: nowrap;
}
.ai-btn:hover { background: rgba(229,144,62,.14); border-color: var(--orange); color: var(--orange); transform: translateY(-1px); }
.ai-btn.loading { opacity: .6; cursor: wait; }

/* ── STEP CARDS (onboarding) ─────────────────────────── */
.step-panel { display: none; }
.step-panel.active { display: block; }
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow .3s;
}
.step-card:focus-within, .step-card:hover { box-shadow: 0 6px 32px rgba(0,0,0,.28); }
.step-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.card-num {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 16px;
  flex-shrink: 0;
}
.card-num.orange { background: rgba(229,144,62,.18); color: var(--orange); }
.card-num.green  { background: rgba(90,161,126,.14); color: var(--green); }
.card-title-wrap { flex: 1; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.card-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.step-card-body { padding: 24px; }

/* Nav row (onboarding) */
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  gap: 12px;
}
.btn-back {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}
.btn-back:hover { border-color: var(--muted); color: var(--text); }
.btn-back:disabled { opacity: .3; cursor: not-allowed; }

/* Range input */
input[type="range"] {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 99px;
  background: var(--border);
  outline: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex: 1;
  box-shadow: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(229,144,62,.4);
}
.hour-row { display: flex; align-items: center; gap: 12px; }
.hour-value {
  min-width: 54px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-align: center;
  padding: 7px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  font-family: 'Lato', sans-serif;
}

/* ── ROUTE CARDS ─────────────────────────────────────── */
.route-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.route-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface2);
}
.route-card:hover { border-color: var(--orange); }
.route-card.selected { border-color: var(--orange); background: rgba(229,144,62,.1); }
.route-letter { font-family: 'Lato'; font-weight: 900; font-size: 24px; color: var(--orange); display: block; margin-bottom: 4px; }
.route-name   { font-size: 12px; font-weight: 700; color: var(--text); display: block; margin-bottom: 4px; }
.route-desc   { font-size: 11px; color: var(--muted); line-height: 1.45; }

/* ── SOURCE CARDS ────────────────────────────────────── */
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.source-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  background: var(--surface2);
  transition: all .2s;
}
.source-card:hover { border-color: var(--orange); }
.source-card.selected { border-color: var(--orange); background: rgba(229,144,62,.1); }
.source-icon { font-size: 22px; margin-bottom: 6px; display: block; }
.source-name { font-size: 12px; font-weight: 700; color: var(--text); }
.source-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── POMO CARDS ──────────────────────────────────────── */
.pomo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pomo-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  background: var(--surface2);
  transition: all .2s;
  position: relative;
}
.pomo-card:hover { border-color: var(--orange); }
.pomo-card.selected { border-color: var(--orange); background: rgba(229,144,62,.1); }
.pomo-time  { font-family: 'Lato'; font-weight: 900; font-size: 20px; color: var(--orange); margin-bottom: 4px; }
.pomo-label { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pomo-desc  { font-size: 11px; color: var(--muted); line-height: 1.4; }
.pomo-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ── DISC CARDS (disciplinas) ────────────────────────── */
.disc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.disc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color .2s, transform .15s, opacity .2s;
  position: relative;
}
.disc-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.disc-card.disabled { opacity: .45; transform: none; }
.disc-card.disabled:hover { transform: none; }
.disc-info { flex: 1; min-width: 0; }
.disc-name {
  font-family: 'Lato', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.why-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(90,161,126,.12);
  border: 1px solid rgba(90,161,126,.3);
  color: var(--green-light);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
  font-family: 'Lato', sans-serif;
  white-space: nowrap;
}
.disc-reason { font-size: 13px; color: var(--muted); }
.delete-btn {
  width: 32px; height: 32px;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}
.delete-btn:hover { background: rgba(224,85,85,.15); color: var(--danger); }

/* Reserve cards */
.reserve-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.reserve-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color .2s;
}
.reserve-card:hover { border-color: var(--border2); }
.reserve-name {
  font-family: 'Lato', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--body);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reserve-rank { font-size: 12px; color: var(--muted); font-weight: 400; }
.activate-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(229,144,62,.1);
  border: 1px solid rgba(229,144,62,.3);
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 7px;
  font-family: 'Lato', sans-serif;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.activate-btn:hover { background: rgba(229,144,62,.2); border-color: rgba(229,144,62,.55); }

/* Add discipline button */
.add-disc-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  width: 100%;
  transition: border-color .2s, color .2s, background .2s;
  cursor: pointer;
}
.add-disc-btn:hover { border-color: var(--orange); color: var(--orange); background: rgba(229,144,62,.05); }

/* ── NIVELAMENTO QUESTION ────────────────────────────── */
.question-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 20px;
}
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.disc-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,148,55,.14);
  color: var(--cta);
}
.q-counter { margin-left: auto; font-size: 13px; color: var(--muted); font-family: 'Lato'; font-weight: 700; }
.q-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.q-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 11px;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--surface2);
  transition: border-color .15s, background .15s;
  font-size: 14px;
  color: var(--body);
}
.q-opt:hover    { border-color: var(--orange-alt); background: rgba(245,160,86,.08); }
.q-opt.selected { border-color: var(--cta); background: rgba(255,148,55,.1); color: var(--text); font-weight: 600; }
.q-opt.correct  { border-color: var(--green); background: rgba(90,161,126,.12); color: var(--green); }
.q-opt.wrong    { border-color: var(--danger); background: rgba(224,85,85,.08); color: var(--danger); }
.q-opt-letter {
  width: 26px; height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lato'; font-weight: 900; font-size: 13px;
  background: var(--border);
  color: var(--muted);
  transition: .15s;
}
.q-opt.selected .q-opt-letter { background: var(--cta); color: #fff; }
.q-opt.correct  .q-opt-letter { background: var(--green); color: #fff; }
.q-opt.wrong    .q-opt-letter { background: var(--danger); color: #fff; }

/* Confidence block */
.confidence-block { border-top: 1px solid var(--border); padding-top: 22px; }
.confidence-block h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.confidence-block p  { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.conf-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.conf-btn {
  flex: 1; min-width: 90px;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 11px;
  background: var(--surface2);
  padding: 12px 8px;
  text-align: center;
  transition: .15s;
}
.conf-btn:hover   { border-color: var(--orange-alt); background: rgba(245,160,86,.08); }
.conf-btn.selected { border-color: var(--cta); background: rgba(255,148,55,.1); }
.conf-num   { font-family: 'Lato'; font-size: 20px; font-weight: 900; color: var(--cta); display: block; }
.conf-label { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.conf-btn.selected .conf-label { color: var(--text); }

/* ── CRONOGRAMA TABLE ────────────────────────────────── */
.grid-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 78px; }
.cal-scroll { overflow-x: auto; }
table.cal { border-collapse: collapse; width: 100%; min-width: 500px; font-size: 12px; }
table.cal th {
  background: var(--surface);
  color: var(--text);
  font-family: 'Lato'; font-weight: 700;
  padding: 9px 4px;
  border-bottom: 2px solid var(--border2);
  font-size: 12px;
  text-align: center;
}
table.cal th.hcol { width: 74px; text-align: left; padding-left: 12px; }
.disc-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
}
.disc-item-row:hover { background: var(--bg); }
.disc-item-row .bar { width: 5px; align-self: stretch; border-radius: 3px; background: var(--orange-alt); flex-shrink: 0; }
.disc-item-row .nm { flex: 1; }
.disc-item-row .nm b { font-family: 'Lato'; color: var(--text); font-size: 13.5px; display: block; }
.disc-item-row .nm small { font-size: 11px; color: var(--muted); }
.disc-item-row .hrs { font-family: 'Lato'; font-weight: 900; color: var(--text); font-size: 14px; }
.disc-item-row .hrs small { font-weight: 400; color: var(--muted); font-size: 11px; }

/* Day blocks */
.day-section { margin-bottom: 20px; }
.day-label {
  font-family: 'Lato'; font-weight: 700; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.bloco-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.bloco-item:hover { border-color: var(--orange); }
.bloco-item.cumprido { border-color: var(--green); background: rgba(90,161,126,.06); }
.bloco-item .bloco-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: .15s;
}
.bloco-item.cumprido .bloco-check { background: var(--green); border-color: var(--green); color: #fff; }
.bloco-item.proxima { background: rgba(229,144,62,.06); border-color: rgba(229,144,62,.4); }
.bloco-nome { font-family: 'Lato'; font-weight: 700; font-size: 14px; color: var(--text); }
.bloco-horas { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bloco-cumprir-btn { margin-left: auto; }

/* ── DIAGNOSTICO / MONITORAMENTO EIXOS ───────────────── */
.diag-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
}
.diag-header {
  background: linear-gradient(135deg, rgba(245,160,86,.12), rgba(90,161,126,.12));
  border-bottom: 1px solid var(--border);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.diag-header-text h2 { font-size: 22px; font-weight: 900; line-height: 1.2; }
.diag-header-text p  { font-size: 14px; color: var(--muted); margin-top: 4px; }
.autonomia-seal {
  margin-left: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  min-width: 148px;
}
.seal-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: block; margin-bottom: 6px; }
.seal-val   { font-family: 'Lato'; font-size: 16px; font-weight: 900; color: var(--cta); }
.seal-ico   { font-size: 24px; display: block; margin-bottom: 4px; }
.diag-eixos { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.eixo {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 18px 20px;
}
.eixo-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.eixo-ico  { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.eixo-title h3 { font-size: 14px; font-weight: 900; }
.eixo-title p  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.eixo-summary  { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; font-family: 'Lato'; }
.eixo-bar-wrap { margin-top: 12px; }
.eixo-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.eixo-bar      { height: 8px; background: var(--border); border-radius: 6px; overflow: hidden; }
.eixo-bar-fill { height: 100%; border-radius: 6px; transition: width .6s ease; }
.fill-orange { background: linear-gradient(90deg, var(--orange-alt), var(--cta)); }
.fill-green  { background: var(--green); }
.fill-warn   { background: var(--warn-color); }
.fill-risk   { background: var(--risk-color); }

/* Stat row */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat-item-box {
  flex: 1; min-width: 120px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px 16px;
  text-align: center;
}
.stat-val { font-family: 'Lato'; font-size: 22px; font-weight: 900; color: var(--text); display: block; }
.stat-lbl { font-size: 12px; color: var(--muted); display: block; margin-top: 3px; }

/* ── HEALTH SCORE RING ───────────────────────────────── */
.health-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.health-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: var(--green);
  border-radius: 4px 0 0 4px;
}
.ring-container { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ring-svg { transform: rotate(-90deg); display: block; }
.ring-bg   { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--green); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s ease; }
.ring-center { position: absolute; text-align: center; }
.ring-score { font-family: 'Lato'; font-size: 1.7rem; font-weight: 900; color: var(--green); line-height: 1; }
.ring-label-inner { font-size: .65rem; color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.health-info { flex: 1; }
.health-info h2 { font-size: 1.25rem; font-weight: 900; margin-bottom: 4px; }
.health-info .classif { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.health-info .classif.saudavel { color: var(--green); }
.health-info .classif.atencao  { color: var(--warn-color); }
.health-info .classif.risco    { color: var(--risk-color); }

/* Eixos mini grid */
.eixos-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 28px; }
.eixo-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}
.eixo-mini .em-ico   { font-size: 20px; margin-bottom: 6px; }
.eixo-mini .em-val   { font-family: 'Lato'; font-size: 1.3rem; font-weight: 900; }
.eixo-mini .em-label { font-size: 11px; color: var(--muted); margin-top: 3px; }
.em-good { color: var(--green); }
.em-warn { color: var(--warn-color); }
.em-risk { color: var(--risk-color); }

/* Alerts */
.alert-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.alert-item.warn { border-left: 3px solid var(--warn-color); }
.alert-item.risk { border-left: 3px solid var(--risk-color); }
.alert-item.info { border-left: 3px solid var(--orange-alt); }

/* ── TABS (auth) ─────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  flex: 1;
  padding: 12px;
  text-align: center;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .2s;
}
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── SEPARATOR ───────────────────────────────────────── */
.sep { height: 1px; background: var(--border); margin: 20px 0; }
.mini-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mini-header::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── DISC SEALS ──────────────────────────────────────── */
.disc-seals { display: flex; flex-wrap: wrap; gap: 8px; }
.disc-seal {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 5px 12px 5px 8px;
  font-size: 12px;
}
.seal-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.seal-dot.verde   { background: var(--green); }
.seal-dot.amarelo { background: #f0b429; }
.seal-dot.laranja { background: var(--orange-alt); }
.seal-dot.vermelho { background: var(--danger); }
.disc-seal span   { color: var(--text); font-weight: 600; }
.disc-seal small  { color: var(--muted); }

/* ── PHASE BADGE ─────────────────────────────────────── */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(245,160,86,.14);
  color: var(--cta);
  margin-bottom: 12px;
}

/* ── NIVELAMENTO DISC LIST ───────────────────────────── */
.disc-niv-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s;
  margin-bottom: 8px;
}
.disc-niv-item.is-active  { border-color: var(--cta); box-shadow: 0 0 0 3px rgba(255,148,55,.12); }
.disc-niv-item.is-done    { border-color: var(--green); opacity: .85; }
.disc-niv-item.is-pending { opacity: .6; }
.disc-icon-wrap { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.disc-icon-wrap.done-icon    { background: rgba(90,161,126,.14); }
.disc-icon-wrap.active-icon  { background: rgba(255,148,55,.14); }
.disc-icon-wrap.pending-icon { background: var(--border); }
.disc-niv-info { flex: 1; }
.disc-niv-info h4    { font-size: 14px; font-weight: 700; }
.disc-niv-info small { font-size: 12px; color: var(--muted); }
.disc-badge-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
}
.badge-done    { background: rgba(90,161,126,.14);  color: var(--green); }
.badge-active  { background: rgba(255,148,55,.14);  color: var(--cta); }
.badge-pending { background: var(--border);          color: var(--muted); }

/* ── REVISAO SEMANAL ─────────────────────────────────── */
.revisao-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.revisao-header {
  background: linear-gradient(135deg, rgba(90,161,126,.12), rgba(229,144,62,.08));
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.revisao-header h3 { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.revisao-header p  { font-size: 13px; color: var(--muted); }
.revisao-body { padding: 20px 24px; }
.revisao-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.revisao-item {
  flex: 1; min-width: 140px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.revisao-item .ri-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.revisao-item .ri-val   { font-family: 'Lato'; font-size: 16px; font-weight: 900; }
.ajuste-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.ajuste-item:last-child { border-bottom: none; }
.ajuste-item .ai { font-size: 16px; flex-shrink: 0; }

/* ── MOBILE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .eixos-mini { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .topbar-logo span { display: none; }
  .container { padding: 20px 14px 16px; }
  .page-header h1 { font-size: 21px; }
  .sticky-footer { flex-direction: column; gap: 10px; }
  .sticky-footer .btn-primary { width: 100%; justify-content: center; }
  .footer-stats { width: 100%; justify-content: space-around; }
  .conf-btns { gap: 6px; }
  .conf-btn  { min-width: 70px; }
  .nav-pills { display: none; }
  .route-grid { grid-template-columns: 1fr; }
  .eixos-mini { grid-template-columns: repeat(2, 1fr); }
  .progress-steps .step-label { display: none; }
  .progress-steps .step-num { margin: 0 auto; }
}

/* ── NIVELAMENTO — questão rica (texto-base, imagem, certo/errado, procedência) ── */
.q-texto-base {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--body);
}
.q-texto-base strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 14px; }
.q-texto-base p { margin: 0 0 8px; }
.q-texto-base img { max-width: 100%; border-radius: 8px; margin-bottom: 8px; display: block; }
.q-fonte { display: block; font-style: italic; color: var(--muted); font-size: 11.5px; }

.q-img-wrap { margin-bottom: 16px; }
.q-img-wrap img { border-radius: 10px; }

.q-comando { font-size: 14.5px; color: var(--text); font-weight: 600; line-height: 1.6; margin-bottom: 16px; }

.q-procedencia { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }

.q-opt-content { display: flex; flex-direction: column; gap: 8px; }
.q-alt-img { max-width: 100%; border-radius: 8px; display: block; }

.q-opt-letter-wide { width: auto; padding: 0 10px; }

/* ── NIVELAMENTO — resultado final por disciplina ────── */
.resultado-niv-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.resultado-niv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

/* ══════════════════════════════════════════════════════════════════════════
   RADAR DOS CONCURSOS (assinante) — sem muro de cadastro.
   O Radar público mostra 3 e cobra o cadastro pra liberar o resto: é o funil de lead.
   Aqui o aluno já paga; tratá-lo como visitante desconhecido seria constrangedor.
   ══════════════════════════════════════════════════════════════════════════ */
.radar-head h1 { margin: 0 0 6px; font-size: 1.6rem; }
.radar-head p { margin: 0 0 20px; color: var(--muted); font-size: .9rem; line-height: 1.6; max-width: 62ch; }

.radar-filtros { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.radar-filtros label { display: flex; flex-direction: column; gap: 5px; }
.radar-filtros span { font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.radar-filtros select { background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 13px; font-size: .88rem; min-width: 170px; }

.radar-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

.radar-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.radar-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.radar-card h3 { margin: 0 0 3px; font-size: 1.02rem; color: var(--orange); line-height: 1.3; }
.radar-inst { margin: 0; font-size: .84rem; color: var(--text); }
.radar-local { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }

.radar-selo { font-size: .68rem; font-weight: 800; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.radar-selo.urgente   { color: var(--risk-color); background: rgba(208,96,74,.14); border: 1px solid rgba(208,96,74,.4); }
.radar-selo.atencao   { color: var(--warn-color); background: var(--warn-bg); border: 1px solid var(--warn-border); }
.radar-selo.ok        { color: var(--green); background: rgba(90,161,126,.12); border: 1px solid rgba(90,161,126,.35); }
.radar-selo.encerrado { color: var(--muted); background: var(--surface2); border: 1px solid var(--border); }

.radar-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; }
.radar-dados dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
.radar-dados dd { margin: 1px 0 0; font-size: .88rem; color: var(--text); font-weight: 600; }

/* Vários cargos no mesmo concurso: o CD 40h e o CD Endodontista ganham diferente.
   Mostrar um salário só esconderia justamente o que o aluno usa pra decidir. */
.radar-cargos { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.radar-cargo-linha { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; }
.radar-cargo-linha span:first-child { color: var(--text); }
.radar-cargo-linha span:last-child { color: var(--muted); white-space: nowrap; }
.radar-cargo-mais { font-size: .75rem; color: var(--muted); font-style: italic; }

.radar-card-acoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.radar-btn-edital, .radar-btn-plano { font-size: .8rem; font-weight: 700; padding: 8px 15px; border-radius: 8px; text-decoration: none; }
.radar-btn-edital { color: var(--green); border: 1px solid var(--green); }
.radar-btn-plano  { background: var(--orange); color: #fff; }
.radar-sem-edital { font-size: .75rem; color: var(--muted); font-style: italic; }

.radar-rodape { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 22px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.radar-paginacao { display: flex; gap: 8px; }
.radar-paginacao button { background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px; font-size: .82rem; cursor: pointer; }
.radar-paginacao button:disabled { opacity: .4; cursor: not-allowed; }

.radar-carregando, .radar-vazio, .radar-erro { padding: 30px; text-align: center; color: var(--muted); font-size: .9rem; }
.radar-erro { color: var(--risk-color); }

/* Conteúdo programático POR CARGO — recolhido. É texto longo; aberto por padrão viraria um
   paredão e enterraria o prazo, que é o dado mais acionável do card. */
.radar-cargo { display: flex; flex-direction: column; gap: 4px; }
.radar-programa summary { list-style: none; cursor: pointer; font-size: .74rem; font-weight: 700;
  color: var(--orange); padding: 2px 0; }
.radar-programa summary::-webkit-details-marker { display: none; }
.radar-programa summary::before { content: "📚 "; }
.radar-programa[open] summary::before { content: "📖 "; }
.radar-programa p { margin: 6px 0 4px; font-size: .78rem; line-height: 1.6; color: var(--muted);
  background: var(--surface2); border-radius: 8px; padding: 10px 12px; }

/* Bloco COMUM da prova (pontuação + matérias iguais pra todos os cargos).
   Separado do específico porque são coisas diferentes: o específico decide QUAL cargo
   disputar; o comum decide COMO dividir o tempo de estudo. */
.radar-comum { border-top: 1px solid var(--border); padding-top: 10px; }
.radar-comum summary { list-style: none; cursor: pointer; font-size: .74rem; font-weight: 700;
  color: var(--green); }
.radar-comum summary::-webkit-details-marker { display: none; }
.radar-comum summary::before { content: "📊 "; }
.radar-comum p { margin: 8px 0 0; font-size: .78rem; line-height: 1.6; color: var(--muted);
  background: var(--surface2); border-radius: 8px; padding: 10px 12px; }
.radar-comum p.radar-estrutura { color: var(--text); font-weight: 600;
  border-left: 3px solid var(--green); }

/* ── Revisão do nivelamento (Bloco A) ── */
.btn-sm { padding: 6px 12px; font-size: 13px; }
.revisao-list { display: flex; flex-direction: column; gap: 16px; }
.revisao-questao {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; background: var(--surface2);
  border-left: 4px solid var(--muted);
}
.revisao-questao.acertou { border-left-color: var(--green); }
.revisao-questao.errou   { border-left-color: var(--danger); }
.revisao-q-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.revisao-q-num { font-weight: 700; font-size: 13px; color: var(--muted); }
.revisao-q-status { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.revisao-q-status.ok  { background: rgba(90,161,126,.18); color: var(--green-light); }
.revisao-q-status.err { background: rgba(224,85,85,.18); color: var(--danger); }
.revisao-proc { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.revisao-enunciado { font-size: 15px; line-height: 1.5; color: var(--text); margin-bottom: 6px; }
.revisao-comando { font-size: 14px; color: var(--body); margin: 6px 0; font-style: italic; }
.revisao-alts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.revisao-alt {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--body);
}
.revisao-alt-correta { border-color: var(--green); background: rgba(90,161,126,.10); color: var(--text); }
.revisao-alt-errada  { border-color: var(--danger); background: rgba(224,85,85,.10); }
.revisao-tag { font-size: 11px; font-weight: 700; margin-left: 6px; }
.revisao-tag.ok  { color: var(--green-light); }
.revisao-tag.err { color: var(--danger); }
.revisao-comentario {
  margin-top: 10px; padding: 12px; border-radius: var(--radius-sm);
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  font-size: 14px; line-height: 1.5; color: var(--body);
}
.revisao-comentario.vazio { background: transparent; border: 1px dashed var(--border); color: var(--muted); font-style: italic; }
