/* ============ Controle de Estudos · Plataforma da Mica ============ */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Tema (acento) — padrão "Ameixa" */
  --ac-1: #6d3fc0;   /* acento principal */
  --ac-2: #9a5fe0;   /* gradiente */
  --ac-3: #f1e9fd;   /* fundo suave do acento */
  --ac-ink: #4b2590; /* texto sobre fundo suave */
  --side-1: #5a2fa8; --side-2: #8e4fd6;

  --bg: #f7f4fb;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #efe6fb 0%, transparent 60%);
  --card: #ffffff;
  --card-2: #faf8fd;
  --line: #ece7f3;
  --ink: #1f1a2b;
  --ink-2: #5b5470;
  --ink-3: #8b849c;
  --shadow: 0 1px 2px rgba(40,20,70,.05), 0 6px 20px rgba(40,20,70,.06);
  --radius: 18px;

  /* Gráficos (paleta validada) */
  --surface-1: #fcfcfb;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --grid: #e1e0d9; --axis: #c3c2b7; --muted: #898781;
  --q0: #eeedf2; --q1: #cde2fb; --q2: #9ec5f4; --q3: #5598e7; --q4: #256abf; --q5: #104281;
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b;
  --good-ink: #006300;
  color-scheme: light;
}
:root[data-tema="luna"] { --ac-1:#b45f1c; --ac-2:#df8f45; --ac-3:#fbeddc; --ac-ink:#83420f; --side-1:#2c2522; --side-2:#9a5a28; --bg:#fbf7f2; --bg-grad: radial-gradient(1200px 600px at 100% -10%, #f6e6d3 0%, transparent 60%); }
:root[data-tema="oceano"] { --ac-1:#0f7a72; --ac-2:#1aa39a; --ac-3:#e3f5f3; --ac-ink:#0b5a54; --side-1:#0c615b; --side-2:#16988f; --bg:#f3f8f8; --bg-grad: radial-gradient(1200px 600px at 100% -10%, #dff1ef 0%, transparent 60%); }
:root[data-tema="coral"]  { --ac-1:#d4485a; --ac-2:#f07a7f; --ac-3:#fdeced; --ac-ink:#9c2637; --side-1:#c23a50; --side-2:#ef7a7c; --bg:#fcf6f6; --bg-grad: radial-gradient(1200px 600px at 100% -10%, #fbe4e5 0%, transparent 60%); }
:root[data-tema="noite"]  { --ac-1:#3d5bd9; --ac-2:#6b86f0; --ac-3:#e8edfd; --ac-ink:#2a3f9e; --side-1:#26347d; --side-2:#4d64d4; --bg:#f4f6fc; --bg-grad: radial-gradient(1200px 600px at 100% -10%, #e2e8fb 0%, transparent 60%); }

@media (prefers-color-scheme: dark) {
  :root:not([data-modo="claro"]) {
    --bg: #121017; --bg-grad: radial-gradient(1200px 600px at 100% -10%, #221a33 0%, transparent 60%);
    --card: #1c1924; --card-2: #221f2b; --line: #2e2a39;
    --ink: #f3f0f8; --ink-2: #c3bdd1; --ink-3: #8f889f;
    --ac-3: #2a2140; --ac-ink: #d6c4fb;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --surface-1: #1a1a19;
    --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#008300; --s7:#9085e9; --s8:#e66767;
    --grid: #2c2c2a; --axis: #383835;
    --q0:#26232f; --q1:#104281; --q2:#1c5cab; --q3:#2a78d6; --q4:#5598e7; --q5:#9ec5f4;
    --good-ink: #0ca30c;
    color-scheme: dark;
  }
}
:root[data-modo="escuro"] {
  --bg: #121017; --bg-grad: radial-gradient(1200px 600px at 100% -10%, #221a33 0%, transparent 60%);
  --card: #1c1924; --card-2: #221f2b; --line: #2e2a39;
  --ink: #f3f0f8; --ink-2: #c3bdd1; --ink-3: #8f889f;
  --ac-3: #2a2140; --ac-ink: #d6c4fb;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  --surface-1: #1a1a19;
  --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#008300; --s7:#9085e9; --s8:#e66767;
  --grid: #2c2c2a; --axis: #383835;
  --q0:#26232f; --q1:#104281; --q2:#1c5cab; --q3:#2a78d6; --q4:#5598e7; --q5:#9ec5f4;
  --good-ink: #0ca30c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg-grad), var(--bg); background-attachment: fixed; color: var(--ink); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ac-1); }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.sm { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; padding: 30px; }
.login .logo { width: 72px; height: 72px; border-radius: 22px; background: var(--ac-3); display: grid; place-items: center; margin-bottom: 14px; }
.login h1 { margin: 0; font-size: 22px; }
.login p { margin: 4px 0 18px; color: var(--ink-2); }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, var(--side-1), var(--side-2)); color: #fff; padding: 18px 14px 24px; display: flex; flex-direction: column; gap: 14px; border-radius: 0 26px 26px 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; }
.brand .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 18px; }
.brand b { display: block; font-size: 14.5px; line-height: 1.1; }
.brand span { font-size: 11.5px; opacity: .8; }
.hero { text-align: center; padding: 6px 4px 0; }
.avatar svg { display:block; }
.avatar { overflow: hidden; width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 8px; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.55); display: grid; place-items: center; font-size: 34px; }
.hero .nome { font-weight: 800; font-size: 16px; }
.hero .sub { font-size: 12px; opacity: .8; }
.lvl { background: rgba(255,255,255,.14); border-radius: 14px; padding: 10px 10px 9px; cursor: pointer; border: 0; color: inherit; width: 100%; text-align: center; }
.lvl .t { font-weight: 800; font-size: 13px; letter-spacing: .04em; }
.lvl .t big { font-size: 20px; margin-right: 4px; }
.lvl .titulo { font-size: 11.5px; opacity: .85; margin-bottom: 6px; }
.lvl .bar { height: 6px; background: rgba(255,255,255,.22); border-radius: 99px; overflow: hidden; }
.lvl .bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.lvl .attrs { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; }
.lvl .attrs span { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 26px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .grp { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; padding: 10px 10px 4px; font-weight: 700; }
.nav button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: #fff; padding: 9px 12px; border-radius: 12px; cursor: pointer; font-weight: 600; text-align: left; font-size: 14px; }
.nav button .ico { width: 20px; text-align: center; }
.nav button:hover { background: rgba(255,255,255,.12); }
.nav button.on { background: var(--card); color: var(--ac-1); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.nav .badge { margin-left: auto; background: rgba(255,255,255,.25); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.nav button.on .badge { background: var(--ac-3); color: var(--ac-ink); }
.side .foot { margin-top: auto; display: flex; gap: 6px; }
.side .foot button { flex: 1; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; padding: 8px; cursor: pointer; font-size: 12.5px; }

.main { padding: 22px 28px 90px; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.top h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.top .spacer { flex: 1; }
.sync { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; }
.sync.pend i { background: var(--warn); }
.sync.err i { background: var(--crit); }
.menu-btn { display: none; }

/* ---------- Cards & grid ---------- */
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.dash { grid-template-columns: 1.15fr 1fr 1fr; }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; border: 1px solid var(--line); }
.card h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.card h3 .r { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.card .desc { margin: -6px 0 12px; color: var(--ink-3); font-size: 13px; }
.stat { border-radius: var(--radius); padding: 16px 18px; color: #fff; position: relative; overflow: hidden; }
.stat .l { font-size: 13px; font-weight: 600; opacity: .92; }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat .x { font-size: 12px; opacity: .85; }
.stat .ico { position: absolute; right: 14px; top: 14px; font-size: 22px; opacity: .85; }
.st-a { background: linear-gradient(135deg, #2a78d6, #62a4ee); }
.st-b { background: linear-gradient(135deg, #0f8f5f, #3cc28c); }
.st-c { background: linear-gradient(135deg, #e0572a, #f39461); }
.st-d { background: linear-gradient(135deg, #b77c00, #eab53c); }
.st-e { background: linear-gradient(135deg, var(--side-1), var(--side-2)); }

.clock { text-align: center; padding: 22px 12px; }
.clock .h { font-size: 56px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.clock .d { color: var(--ac-1); font-weight: 700; margin-top: 6px; }
.clock .d2 { color: var(--ink-3); font-size: 12.5px; }

.prog { height: 9px; border-radius: 99px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ac-1), var(--ac-2)); }
.prog.alt i { background: linear-gradient(90deg, #f3a35b, #e87ba4, #9a5fe0); }
.prog.ok i { background: var(--s3); }
.pline { display: flex; justify-content: space-between; font-size: 12.5px; margin: 10px 0 5px; }
.pline b { font-weight: 700; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.late { border-color: rgba(208,59,59,.35); background: color-mix(in srgb, var(--crit) 6%, var(--card-2)); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: var(--ac-3); color: var(--ac-ink); white-space: nowrap; }
.chip.g { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.chip.w { background: color-mix(in srgb, var(--warn) 22%, transparent); color: #7a5200; }
.chip.c { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit); }
.chip.n { background: var(--line); color: var(--ink-2); }
.empty { color: var(--ink-3); text-align: center; padding: 18px 8px; font-size: 13.5px; }

/* ---------- Buttons & forms ---------- */
.btn { border: 0; border-radius: 11px; padding: 9px 14px; font-weight: 650; cursor: pointer; background: var(--ac-3); color: var(--ac-ink); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { filter: brightness(.97); }
.btn.p { background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); color: #fff; }
.btn.g { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn.d { background: color-mix(in srgb, var(--crit) 12%, transparent); color: var(--crit); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: default; }
.fab.rodando { animation: pulso 2.4s ease-in-out infinite; }
.fab.pausa { background: linear-gradient(135deg, #0f8f5f, #3cc28c); }
.fab .fab-mat { font-weight: 600; opacity: .85; font-size: 13px; max-width: 34vw; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@keyframes pulso { 0%,100% { box-shadow: 0 10px 26px rgba(60,20,110,.35); } 50% { box-shadow: 0 10px 34px rgba(60,20,110,.6), 0 0 0 6px color-mix(in srgb, var(--ac-1) 18%, transparent); } }
@media (prefers-reduced-motion: reduce) { .fab.rodando { animation: none; } }
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; border: 0; border-radius: 99px; padding: 14px 20px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); box-shadow: 0 10px 26px rgba(60,20,110,.35); cursor: pointer; font-size: 15px; }
label.f { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin: 0 0 5px; }
.in, select.in, textarea.in { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); outline: none; }
.in:focus { border-color: var(--ac-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-1) 18%, transparent); }
textarea.in { min-height: 70px; resize: vertical; }
.fr { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 12px; }
.fr.c2 { grid-template-columns: 1fr 1fr; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.seg button.on { background: var(--card); color: var(--ac-1); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ac-1); }
.motgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 10px 0 6px; }
.motgrid label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.motgrid label span { flex: 1; }
.motgrid input { width: 64px; padding: 6px 8px; text-align: center; }
@media (max-width: 520px) { .motgrid { grid-template-columns: 1fr; } }
.box { border: 1px dashed var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; background: var(--card-2); }

/* ---------- Tables ---------- */
.tw { overflow-x: auto; margin: 0 -4px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
table.t tfoot td { font-weight: 800; border-top: 2px solid var(--line); }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--card-2); }

/* ---------- Modal & toast ---------- */
.ov { position: fixed; inset: 0; background: rgba(20,12,35,.45); backdrop-filter: blur(3px); z-index: 70; display: grid; place-items: center; padding: 16px; overscroll-behavior: contain; }
.modal { background: var(--card); border-radius: 20px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal .mb { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.modal .mh, .modal .mf { flex: none; }
body.modal-aberto { overflow: hidden; }
.modal .mh { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal .mh h2 { margin: 0; font-size: 17px; flex: 1; }
.modal .mb { padding: 18px 20px; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); flex-wrap: wrap; }
.xbtn { border: 0; background: var(--card-2); border-radius: 10px; width: 34px; height: 34px; cursor: pointer; font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #231b33; color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 80; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.timer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ac-3); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.timer .tv { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ac-ink); min-width: 124px; }

/* ---------- Charts ---------- */
.viz { width: 100%; display: block; overflow: visible; }
.viz text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.viz .lbl { fill: var(--ink-2); font-weight: 600; }
.viz .val { fill: var(--ink); font-weight: 700; }
.viz .gl { stroke: var(--grid); stroke-width: 1; }
.viz .ax { stroke: var(--axis); stroke-width: 1; }
.viz [data-tip] { cursor: default; }
.viz .hit { fill: transparent; }
.viz .hit:hover + .mk, .viz .mk:hover { opacity: .85; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.16); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; max-width: 260px; }
.tip b { display: block; margin-bottom: 2px; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dn { text-align: center; font-size: 11.5px; color: var(--ink-3); font-weight: 700; }
.cal .c { aspect-ratio: 1.3; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; background: var(--q0); color: var(--ink-2); }
.cal .c.o { opacity: .35; }
.cal .c.hj { outline: 2px solid var(--ac-1); outline-offset: 1px; }
.cal .c.l1 { background: var(--q1); color: #0d366b; }
.cal .c.l2 { background: var(--q2); color: #0d366b; }
.cal .c.l3 { background: var(--q3); color: #fff; }
.cal .c.l4 { background: var(--q5); color: #fff; }
:root[data-modo="escuro"] .cal .c.l1, :root[data-modo="escuro"] .cal .c.l2 { color: #fff; }
.wk { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.wk div { aspect-ratio: 1.15; border-radius: 9px; display: grid; place-items: center; font-weight: 750; font-size: 12.5px; background: var(--q0); color: var(--ink-3); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi .l { font-size: 12px; color: var(--ink-3); }
.kpi .v { font-size: 18px; font-weight: 800; }

/* attributes */
.attr { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.attr .h { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.attr .h .lv { margin-left: auto; font-size: 20px; font-weight: 800; color: var(--ac-1); }
.attr .s { font-size: 12px; color: var(--ink-3); margin: 2px 0 8px; }

/* quick links */
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.qcol h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.qcol h4 i { width: 8px; height: 8px; border-radius: 50%; background: var(--ac-1); display: inline-block; }
.qlink { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 550; }
.qlink:hover { background: var(--card-2); }
.qlink img, .qlink .fav { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; font-size: 11px; background: var(--ac-3); color: var(--ac-ink); font-weight: 800; flex: none; }
.cola { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .02em; word-spacing: 4px; color: var(--ac-ink); background: var(--ac-3); border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.7; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .dash { grid-template-columns: 1fr 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; width: 272px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 10px 0 40px rgba(0,0,0,.25); }
  .side.open { transform: none; }
  .side { height: 100vh; height: 100dvh; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .side > * { flex-shrink: 0; }
  body.menu-aberto { overflow: hidden; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .main { padding: 14px 16px 100px; }
  .menu-btn { display: inline-grid; place-items: center; border: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-size: 18px; cursor: pointer; }
  .top h1 { font-size: 20px; }
  .dash, .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .span2 { grid-column: auto; }
  .kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .clock .h { font-size: 44px; }
  .fab { right: 16px; bottom: 16px; }
  .fr.c2 { grid-template-columns: 1fr; }
  .modal { border-radius: 18px; }
  .ov { padding: 0; place-items: end stretch; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: calc(100vh - 12px); max-height: calc(100dvh - env(safe-area-inset-top) - 8px); }
  .modal .mf { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal .mf .btn { flex: 1; justify-content: center; padding: 12px; }
  .top { padding-top: env(safe-area-inset-top); }
}
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr !important; } }
@media (max-width: 420px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 22px; }
  .stat { padding: 13px 14px; }
}

/* níveis */
.niveis { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.nivel { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); opacity: .6; }
.nivel.ok { opacity: 1; }
.nivel.at { border-color: var(--ac-1); background: var(--ac-3); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-1) 15%, transparent); }
.nivel .nv-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--card); flex: none; }
.nivel .t { font-weight: 700; }
.nivel .s { font-size: 12px; color: var(--ink-3); }
.nivel .nv-h { font-weight: 800; color: var(--ac-ink); white-space: nowrap; }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* ---------- ciclo e semana ---------- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex: none; }
.drag { cursor: grab; color: var(--ink-3); user-select: none; }
.ciclo-it[draggable] { cursor: grab; }
.pool { display: flex; flex-wrap: wrap; gap: 6px; min-height: 44px; padding: 8px; border-radius: 12px; border: 1px dashed var(--line); background: var(--card-2); }
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.dia { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 200px; box-shadow: var(--shadow); }
.dia.hj { border-color: var(--ac-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-1) 15%, transparent); }
.dia.passado { opacity: .72; }
.dia-h { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.dia-h span { color: var(--ink-3); font-size: 12px; }
.dia-h .dia-t { margin-left: auto; font-weight: 700; color: var(--ac-ink); }
.dia-b { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.dia-vazio { flex: 1; display: grid; place-items: center; color: var(--ink-3); font-size: 12px; border: 1px dashed var(--line); border-radius: 10px; min-height: 60px; }
.dia-add { width: 100%; justify-content: center; font-size: 12px; }
.sess { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, var(--card)); border-left: 4px solid var(--c); cursor: grab; font-size: 12.5px; font-weight: 600; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.pool .sess { max-width: 220px; }
.sess-n { font-weight: 800; color: var(--c); font-size: 11px; min-width: 14px; }
.sess-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-x { cursor: pointer; color: var(--ink-3); font-size: 15px; line-height: 1; padding: 0 2px; }
.sess-x:hover { color: var(--crit); }
.sess.sel { outline: 2px solid var(--ac-1); outline-offset: 1px; }
.sess.feita { opacity: .42; }
.sess.feita .sess-t::before { content: '✓ '; color: var(--good-ink); }
.sess.arrastando { opacity: .4; }
[data-drop].alvo { background: var(--ac-3); border-color: var(--ac-1); }
@media (max-width: 1180px) { .semana { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .semana { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dia { min-height: 140px; } }
@media (max-width: 400px) { .semana { grid-template-columns: 1fr; } }

/* ---------- assuntos / edital ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip button { border: 0; background: transparent; cursor: pointer; color: inherit; opacity: .6; padding: 0 0 0 2px; font-size: 11px; }
.chip button:hover { opacity: 1; }
.chip.ass { white-space: normal; text-align: left; }
button.chip { border: 0; cursor: pointer; font-family: inherit; }
.chip.sug { background: transparent; border: 1px dashed var(--ac-1); color: var(--ac-ink); white-space: normal; text-align: left; }
.chip.sug:hover { background: var(--ac-3); }
.ass-busca { position: relative; margin-top: 6px; }
.ass-res { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-height: 300px; overflow: auto; padding: 4px; }
.ass-res button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); font: inherit; }
.ass-res button:hover, .ass-res button:focus { background: var(--ac-3); }
.ass-res small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 1px; }
.ass-res .novo { color: var(--ac-ink); font-weight: 700; }
.tec-it .t, .eit .t { white-space: normal; }
.tec-it .s { white-space: normal; }
details.edisc { margin-bottom: 12px; }
details.edisc > summary { cursor: pointer; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; list-style: none; }
details.edisc > summary::-webkit-details-marker { display: none; }
details.edisc > summary::before { content: '▸'; color: var(--ac-1); transition: transform .15s; }
details.edisc[open] > summary::before { transform: rotate(90deg); }
.eit { align-items: flex-start; }
.eit input[type=checkbox] { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ac-1); flex: none; }
.eit.ok { background: color-mix(in srgb, var(--good) 7%, var(--card-2)); }
tr.click { cursor: pointer; }
.sim-t td { padding: 4px; }
.sim-t .in { padding: 6px 8px; }

/* ---------- conquistas ---------- */
.medalhas { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.medalha { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; font: inherit; color: var(--ink); text-align: center; transition: transform .12s; }
.medalha:hover { transform: translateY(-2px); }
.medalha b { font-size: 12.5px; line-height: 1.25; }
.medalha small { font-size: 11px; font-weight: 700; }
.medalha.ok { background: var(--card); box-shadow: var(--shadow); }
.celebra { text-align: center; position: relative; overflow: hidden; padding-top: 4px; }
.cel-luna { position: absolute; left: 6px; top: 10px; animation: pulo 1.2s ease-in-out infinite; }
.cel-med { animation: surgir .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes surgir { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulo { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.confete { position: absolute; inset: 0; pointer-events: none; }
.confete i { position: absolute; top: -12px; left: calc(var(--i) * 5.5%); width: 8px; height: 12px; border-radius: 2px; background: hsl(calc(var(--i) * 40), 85%, 62%); animation: cair 2.4s calc(var(--i) * .08s) ease-in forwards; }
@keyframes cair { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cel-luna, .cel-med, .confete i { animation: none; } .confete { display: none; } }

/* ---------- Hoje: frase, termômetro, hábitos ---------- */
.frase { display: flex; align-items: center; gap: 14px; background: linear-gradient(120deg, var(--ac-3), var(--card)); }
.frase-l { flex: none; }
.frase .grow { flex: 1; min-width: 0; }
.frase-t { font-size: 16px; font-weight: 650; line-height: 1.4; }
.frase-a { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.termo-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 12px 0 6px; }
.termo-bar span { height: 8px; border-radius: 99px; background: var(--line); }
.termo-bar span:nth-child(1).on { background: #2fa36b; } .termo-bar span:nth-child(2).on { background: #7cbf3a; }
.termo-bar span:nth-child(3).on { background: #e3b23c; } .termo-bar span:nth-child(4).on { background: #e7843c; } .termo-bar span:nth-child(5).on { background: #8e7cc3; }
.termo-esc { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; margin-top: 12px; font-size: 12px; font-weight: 650; }
.termo-esc div { padding: 8px 6px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); text-align: center; opacity: .55; }
.termo-esc div.on { opacity: 1; border-color: var(--ac-1); background: var(--ac-3); }
.termo-esc small { display: block; font-weight: 500; color: var(--ink-3); font-size: 10.5px; margin-top: 2px; }

.hdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--q0); }
.hdot.on { background: var(--s3); }
.hab-b { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--ac-1); background: transparent; color: #fff; font-weight: 800; cursor: pointer; flex: none; display: grid; place-items: center; }
.item.hab.on .hab-b { background: var(--ac-1); }
.item.hab.on .t { color: var(--good-ink); }
.item.feito { opacity: .7; }
.item.check { display: flex; }

/* ---------- Hoje (nova ordem) ---------- */
.hoje { display: flex; flex-direction: column; gap: 16px; }
.hoje .frase { margin: 0; }
button.stat { border: 0; text-align: left; font: inherit; cursor: pointer; width: 100%; }
.kpi-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hoje-cols { columns: 3 330px; column-gap: 16px; }
.hoje-cols > .card { break-inside: avoid; margin: 0 0 16px; display: block; width: 100%; }
.hoje-cols > .card.contagem { display: flex; }
.contagem { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, var(--ac-3), var(--card)); }
.contagem .grow { flex: 1; min-width: 0; }
.cont-n { text-align: center; background: var(--ac-1); color: #fff; border-radius: 14px; padding: 8px 14px; min-width: 84px; }
.cont-n b { display: block; font-size: 28px; line-height: 1.05; }
.cont-n small { display: block; font-size: 11px; opacity: .9; }
.const7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.const7 i { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; font-style: normal; font-weight: 800; color: #fff; font-size: 14px; }
.const7 .on i { background: var(--s3); }
.const7 .off i { background: color-mix(in srgb, var(--crit) 75%, transparent); }
.const7 .hj i { background: transparent; border: 2.5px dashed var(--ac-1); }
.const7 small { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
.sess-it { border-left: 4px solid var(--c, var(--ac-1)); }
.sess-it.atual { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ac-1) 35%, transparent); }
button.sess-it { font: inherit; color: inherit; cursor: pointer; }
.prog.fino { height: 5px; margin-top: 5px; }
.tempo-mat { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tempo-mat .grow { flex: 1; min-width: 180px; }
.rosca { max-width: 100%; height: auto; }
.lm { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.lm i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lm span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-mat { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; margin-top: 12px; font-size: 12px; }
.leg-mat i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; }
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.disc-grid .card { margin: 0; }
tr.pausada td { opacity: .55; }
.mchk { width: 18px; height: 18px; accent-color: var(--ac-1); }

/* ---------- Estudar ---------- */
.estudar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cron { text-align: center; }
.cron-t { font-size: 54px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 14px; }
.cron-play { width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; font-size: 30px; color: #fff; background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); box-shadow: 0 10px 24px color-mix(in srgb, var(--ac-1) 40%, transparent); }
.cron-play.on { background: var(--ink-2); }

/* ---------- Barra inferior (celular) ---------- */
.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
  .tabbar button { border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: 10.5px; font-weight: 650; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; cursor: pointer; }
  .tabbar button span { font-size: 19px; line-height: 1.2; filter: grayscale(.6); }
  .tabbar button.on { color: var(--ac-1); }
  .tabbar button.on span { filter: none; }
  .tabbar .tb-centro { margin-top: -22px; }
  .tabbar .tb-bola { width: 54px; height: 54px; border-radius: 50%; display: grid !important; place-items: center; color: #fff; font-size: 20px !important; filter: none !important; background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); box-shadow: 0 6px 16px color-mix(in srgb, var(--ac-1) 45%, transparent); border: 3px solid var(--card); }
  .tabbar .tb-bola.rodando { animation: pulsa 1.6s ease-in-out infinite; }
  .tabbar .tb-centro b { font-variant-numeric: tabular-nums; color: var(--ac-ink); }
  .fab { display: none !important; }
  .menu-btn { display: none !important; }
  .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  .kpi-rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .kpi-rail::-webkit-scrollbar { display: none; }
  .kpi-rail .stat { flex: 0 0 62%; scroll-snap-align: start; }
  .hoje-cols { columns: 1; }
  .estudar { grid-template-columns: 1fr; }
  .toast { margin-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@keyframes pulsa { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .tabbar .tb-bola.rodando { animation: none; } }
.aviso-incl { display: flex; gap: 12px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 8%, var(--card)); }
.aviso-incl .grow { flex: 1; min-width: 0; }
.hdot.antes { opacity: .3; background: transparent; border: 1px dashed var(--ink-3); }

/* ---------- v12: meta semanal, caderno de erros, pontos fracos, cartões simples ---------- */
.ativ-lista { display: flex; flex-direction: column; gap: 10px; }
.ativ { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); border-left: 5px solid var(--c); }
.ativ.feito { opacity: .72; }
.ativ-n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--ink); }
.ativ.feito .ativ-n { background: var(--s3); color: #fff; }
.ativ-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ativ-c { margin: 4px 0 2px; font-size: 14px; line-height: 1.45; }
.ativ-s { font-size: 12px; color: var(--ink-3); }
.ativ > .grow { flex: 1; min-width: 0; }
.ativ-b { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; flex: none; }
.ativ-aj { margin-top: 8px; gap: 6px; }
@media (max-width: 640px) { .ativ { flex-wrap: wrap; } .ativ-b { width: 100%; padding-left: 42px; justify-content: flex-start; } }
.err-h { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; font-size: 14px; }
.err-c { font-weight: 800; text-decoration: none; color: var(--ac-ink); min-width: 84px; }
.err-it .s { white-space: normal; }
.ok-b { color: var(--good-ink); font-weight: 800; }
.err-b { color: var(--crit); font-weight: 800; }
.xmini { border: 0; background: transparent; cursor: pointer; color: inherit; padding: 0 0 0 4px; font-size: 11px; }
.share-prev { border-radius: 14px; overflow: hidden; background: repeating-conic-gradient(#d9d4cf 0% 25%, #f3efeb 0% 50%) 50% / 22px 22px; }
.share-prev img { width: 100%; display: block; -webkit-touch-callout: default; }
.tabbar #tbplan { font-weight: inherit; }
/* v14: cadernos */
.cad-it { align-items: flex-start; }
.cad-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cad-links .chip { text-decoration: none; font-size: 12px; padding: 4px 10px; }
.cad-o { margin-top: 4px; white-space: normal; }
/* cores de grifo */
.grifos-side { margin: 10px 4px 4px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; font-size: 12px; }
.grifos-side .gr-t { font-weight: 800; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; opacity: .9; margin-bottom: 6px; }
.gr-l { display: flex; gap: 8px; align-items: flex-start; margin: 5px 0; line-height: 1.3; }
.gr-l i { flex: none; width: 22px; height: 12px; border-radius: 4px; margin-top: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.gr-l b { display: block; font-size: 12px; }
.gr-l span { opacity: .85; }
.gr-e { font-size: 11px; color: inherit; opacity: .75; }
.grifo-btn { display: inline-flex; gap: 3px; align-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 9px; cursor: pointer; margin-right: 8px; }
.grifo-btn i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.grifo-pop { position: fixed; z-index: 80; top: calc(56px + env(safe-area-inset-top)); right: 12px; width: min(340px, calc(100vw - 24px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 14px; font-size: 13px; max-height: 70vh; overflow: auto; }
.grifo-pop .gr-t { font-weight: 800; font-size: 12px; margin-bottom: 6px; }
.grifo-pop .gr-l span { color: var(--ink-2); }
.grifo-pop .gr-e { color: var(--ac-ink); }
/* v17: sessões do ciclo já feitas ficam apagadinhas (voltam ao normal na volta nova) */
.sess-feita, .sess-it.feito { opacity: .42; }
.sess-feita:hover, .sess-it.feito:hover { opacity: .7; }
.esc-cal .esc-d { aspect-ratio: 1; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; font: inherit; color: var(--ink); padding: 2px; min-width: 0; }
.esc-cal .esc-d.fora { opacity: .35; }
.esc-cal .esc-d.hj { outline: 2px solid var(--ac-1); outline-offset: 1px; }
.esc-cal .esc-d .n { font-weight: 800; font-size: 13px; }
.esc-cal .esc-d .t { font-weight: 800; font-size: 11px; }
.esc-cal .esc-d .m { font-size: 9.5px; color: var(--ink-3); }
/* v17: flashcards no modelo visual da Mica (deck Projeto Auditora Fiscal) */
.ak-wrap { background: #f1f4f8; border-radius: 16px; padding: 10px; max-height: 62vh; overflow: auto; }
.ak { font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 17px; color: #1f2937; text-align: left; }
.ak .card-box { background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 18px 18px 20px; max-width: 760px; margin: 0 auto; }
.ak .disc { font-weight: 700; font-size: 15px; color: #111827; }
.ak .assunto { font-style: italic; font-size: 13px; color: #4b5563; margin-top: 2px; }
.ak .frente { margin-top: 14px; line-height: 1.6; }
.ak img { max-width: 100%; height: auto; }
.ak .frente div, .ak .sec-b div, .ak .resp-b div { text-align: left !important; }
.ak .cloze { font-weight: 700; color: #1d4ed8; background: #dbeafe; border-radius: 4px; padding: 0 4px; }
.ak hr.sep { border: none; border-top: 2px solid #3b82f6; opacity: .6; margin: 18px 0; }
.ak .gab { border-radius: 12px; padding: 14px; text-align: center; font-weight: 800; font-size: 20px; letter-spacing: .5px; box-shadow: 0 2px 6px rgba(0,0,0,.08); margin-bottom: 16px; }
.ak .gab-CERTA { background: #dcfce7; color: #166534; }
.ak .gab-CERTA .gab-ico::before { content: "✅ "; }
.ak .gab-ERRADA { background: #fee2e2; color: #991b1b; }
.ak .gab-ERRADA .gab-ico::before { content: "❌ "; }
.ak .resp { border-radius: 12px; background: #ecfdf5; border-left: 5px solid #10b981; margin-bottom: 16px; box-shadow: 0 1px 5px rgba(0,0,0,.06); }
.ak .resp-h { font-weight: 700; font-size: 13px; color: #065f46; padding: 10px 14px 0; text-transform: uppercase; letter-spacing: .4px; }
.ak .resp-b { padding: 6px 14px 12px; font-size: 16px; line-height: 1.6; font-weight: 500; }
.ak .sec { background: #fff; border-radius: 12px; box-shadow: 0 1px 5px rgba(0,0,0,.08); margin-bottom: 14px; overflow: hidden; }
.ak .sec-h { background: linear-gradient(90deg, #dbeafe, #bfdbfe); color: #1e3a8a; font-weight: 700; font-size: 14px; padding: 9px 14px; text-align: center; }
.ak .lei .sec-h { background: linear-gradient(90deg, #fef3c7, #fde68a); color: #78350f; }
.ak details.sec > summary { cursor: pointer; list-style: none; }
.ak details.sec > summary::-webkit-details-marker { display: none; }
.ak details.sec > summary::after { content: " ▶"; font-size: 12px; }
.ak details.sec[open] > summary::after { content: " ▼"; }
.ak .sec-b { padding: 12px 16px 14px; font-size: 15px; line-height: 1.6; }
.ak table { border-collapse: collapse; max-width: 100%; } .ak td, .ak th { border: 1px solid #d1d5db; padding: 4px 6px; }
:root[data-modo="escuro"] .ak-wrap { background: #111827; }
:root[data-modo="escuro"] .ak { color: #e5e7eb; }
:root[data-modo="escuro"] .ak .card-box, :root[data-modo="escuro"] .ak .sec { background: #1f2937; }
:root[data-modo="escuro"] .ak .disc { color: #f9fafb; }
:root[data-modo="escuro"] .ak .assunto { color: #9ca3af; }
:root[data-modo="escuro"] .ak .sec-h { background: linear-gradient(90deg, #1e3a8a, #1e40af); color: #dbeafe; }
:root[data-modo="escuro"] .ak .lei .sec-h { background: linear-gradient(90deg, #78350f, #92400e); color: #fef3c7; }
:root[data-modo="escuro"] .ak .resp { background: #064e3b; }
:root[data-modo="escuro"] .ak .resp-h { color: #a7f3d0; }
:root[data-modo="escuro"] .ak .gab-CERTA { background: #14532d; color: #bbf7d0; }
:root[data-modo="escuro"] .ak .gab-ERRADA { background: #7f1d1d; color: #fecaca; }
:root[data-modo="escuro"] .ak .cloze { background: #1e3a8a; color: #dbeafe; }
.seg.seg-col { flex-wrap: wrap; }
.seg.seg-col button { white-space: normal; text-align: center; }
.chip.ass.sug { background: transparent; border: 1px dashed var(--line-2, #c9bfe6); color: var(--ink-2); }
.sum-it .s { white-space: normal; }
.sum-it .btn { white-space: nowrap; }
#sconfall, #scop { max-width: 100%; white-space: normal; }
@media (max-width: 560px) { .sum-it { flex-wrap: wrap; } .sum-it > .row { width: 100%; justify-content: flex-end; } }
.mot-sel { width: auto; max-width: 100%; margin-top: 6px; padding: 3px 8px; font-size: 12.5px; color: var(--ink-3); }
.mot-sel.on { color: var(--ink); border-color: var(--ac-1); }
.rmais { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--card-2); }
.rmais > summary { cursor: pointer; padding: 2px 0; list-style-position: inside; }
.rmais[open] > summary { margin-bottom: 4px; }
@media (max-width: 560px) { #hrev .item { flex-wrap: wrap; } #hrev .item .grow { flex-basis: calc(100% - 40px); } #hrev .item .chip { margin-left: 34px; } }
@media (max-width: 560px) {
  .err-it { flex-wrap: wrap; }
  .err-it .grow { flex: 1 1 calc(100% - 110px); }
  .err-it .mot-sel { width: 100%; }
  .err-it > .btn:first-of-type { margin-left: auto; }
}
.sess-de { font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: var(--card); border-radius: 6px; padding: 0 4px; white-space: nowrap; }

/* ---------- v26: constância 30 dias, números gerais, reforçar, mapa de estudos, Mapa do Fisco ---------- */
.const30 { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 6px 4px; text-align: center; }
.const30 i { display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto; border-radius: 50%; font-style: normal; font-weight: 800; color: #fff; font-size: 12px; }
.const30 .on i { background: var(--s3); }
.const30 .off i { background: color-mix(in srgb, var(--crit) 22%, transparent); }
.const30 .hj i { background: transparent; border: 2.5px dashed var(--ac-1); }
.const30 small { display: block; font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.const30 .hj small { color: var(--ac-1); font-weight: 800; }
.kpi2 .stat .v { font-size: 26px; }
.rf-it { display: block; }
.rf-it > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.rf-it > summary::-webkit-details-marker { display: none; }
.rf-it .grow { min-width: 0; }
/* mapa de estudos */
.mg-tw { overflow-x: auto; }
table.mg { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.mg th { font-weight: 600; color: var(--ink-3); padding: 4px 2px; text-align: center; min-width: 30px; }
table.mg th b { display: block; color: var(--ink); font-size: 12.5px; }
table.mg th small { display: block; font-size: 10px; }
table.mg th.fs { background: color-mix(in srgb, var(--ink-3) 8%, transparent); }
table.mg th.hj { background: color-mix(in srgb, var(--ac-1) 16%, transparent); border-radius: 8px 8px 0 0; }
table.mg th.hj b { color: var(--ac-1); }
.mg-n { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 190px; max-width: 240px; text-align: left !important; padding-right: 8px !important; }
.mg-g td { background: color-mix(in srgb, var(--ac-1) 9%, transparent); font-weight: 800; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ac-1); padding: 6px 10px; }
.mg-mat { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 6px 2px; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.mg-mat .grow { min-width: 0; font-weight: 600; line-height: 1.2; }
.mg-mat small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-num { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c, var(--ac-1)); color: #fff; font-size: 11px; font-weight: 800; }
.mg-c { text-align: center; padding: 3px 1px; border-bottom: 1px solid var(--line); }
.mg-c i { display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto; border-radius: 7px; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; border: 1.5px solid var(--line); }
.mg-c.on i { border-color: transparent; }
.mg-c.pl i { border: 2px dashed var(--ac-1); background: transparent; }
.mg-c.hj i { border-color: var(--ac-1); border-width: 2px; }
.mg-c b { font-size: 15px; }
/* Mapa do Fisco */
.fs-it { display: block; }
.fs-it > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.fs-it > summary::-webkit-details-marker { display: none; }
.fs-it .grow { min-width: 0; }
.fs-det { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.fs-eds { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.fq { flex: none; width: 70px; height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.fq i { display: block; height: 100%; background: linear-gradient(90deg, var(--ac-1), var(--ac-2, var(--ac-1))); }
.cad-tec { display: block; }
.cad-tec > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.cad-tec > summary::-webkit-details-marker { display: none; }
.rec-g { border-left: 3px solid var(--ac-1); padding: 4px 0 4px 10px; margin: 6px 0; }
.rec-l { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; }
.rec-l > span { flex: none; width: 92px; font-size: 12px; }
.ed-bib { margin: 0; }
@media (max-width: 640px) {
  .const30 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .mg-n { min-width: 140px; max-width: 160px; }
  .rec-l { flex-direction: column; gap: 2px; }
  .fq { width: 44px; }
}
