/* ============================================================
   MAESTRO — Design System (redesign Notion+Spotify, DNA caderno)
   ============================================================ */

:root {
  --bg:        #dfd3b8;
  --bg-2:      #d4c7a4;
  --bg-3:      #c7b88e;
  --paper:     #e7dcc4;
  --surface:   #e3d8c0;
  --surface-2: #dacfb0;
  --surface-3: #cfc09a;
  --ink:       #18110a;
  --ink-2:     #3a2c1c;
  --ink-3:     #6a5238;
  --ink-4:     #9a8260;
  --line:      #d0c09a;
  --line-2:    #bcac80;

  --green:     #2d6624;
  --green-2:   #3d8c35;
  --green-3:   #3d8530;
  --green-4:   #c8f0d2;
  --green-ink: #143a0e;

  --amber:     #a8751c;
  --rust:      #b04a2a;
  --plum:      #7a3e62;
  --ocean:     #28567a;

  --highlight-a: rgba(77, 154, 60, 0.38);
  --highlight-b: rgba(22, 70, 14, 0.58);

  --logo-ink: #2d6624;
  --logo-hl:  #6fc55f;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(60,40,20,0.07), 0 1px 1px rgba(60,40,20,0.05);
  --shadow-md: 0 4px 16px rgba(60,40,20,0.10), 0 2px 4px rgba(60,40,20,0.06);
  --shadow-lg: 0 18px 40px rgba(40,25,10,0.16), 0 6px 14px rgba(40,25,10,0.09);

  --sidebar-w: 252px;
  --notes-w:   280px;
  --topbar-h:  64px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="caramelo"] {
  --bg:        #c9a070;
  --bg-2:      #bc9060;
  --bg-3:      #aa7e4e;
  --paper:     #dab882;
  --surface:   #d0aa74;
  --surface-2: #c49862;
  --surface-3: #b48650;
  --ink:       #180800;
  --ink-2:     #341808;
  --ink-3:     #5c3018;
  --ink-4:     #8a6040;
  --line:      #9a7040;
  --line-2:    #886030;
  --green-4:   #9a7838;
  --logo-ink: #2d6624;
  --logo-hl:  #7ad068;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.18), 0 1px 1px rgba(0,0,0,.12);
  --shadow-md: 0 4px 16px rgba(0,0,0,.28), 0 2px 4px rgba(0,0,0,.18);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.38), 0 6px 14px rgba(0,0,0,.22);
}

[data-theme="noite"] {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #161616;
  --paper: #0f0f0f;
  --surface: #141414;
  --surface-2: #1b1b1b;
  --surface-3: #232323;
  --ink: #eaeaea;
  --ink-2: #c4c4c4;
  --ink-3: #858585;
  --ink-4: #525252;
  --line: #242424;
  --line-2: #343434;
  --green: #52a846;
  --green-2: #3d8530;
  --green-3: #1e5218;
  --green-4: rgba(30,82,24,0.22);
  --green-ink: #c8eac2;
  --highlight-a: rgba(60,140,48,0.22);
  --highlight-b: rgba(20,60,14,0.65);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.7), 0 2px 4px rgba(0,0,0,0.5);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.85), 0 6px 14px rgba(0,0,0,0.6);
  --logo-ink: #52a846;
  --logo-hl:  #7bd06a;
}

[data-accent="ocre"]      { --green: #a8751c; --green-2: #c18d28; --green-3: #d8a842; --green-4: #eedcb5; --green-ink: #5a3d08; }
[data-accent="terracota"] { --green: #b04a2a; --green-2: #c45f3e; --green-3: #d87854; --green-4: #f0d9ce; --green-ink: #5e1d0d; }
[data-accent="azul"]      { --green: #28567a; --green-2: #3a6e93; --green-3: #5388ae; --green-4: #d1dfe8; --green-ink: #0f2a3e; }
[data-accent="ameixa"]    { --green: #7a3e62; --green-2: #94527a; --green-3: #b06c95; --green-4: #e4d4dd; --green-ink: #3a1a2d; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body {
  font-family: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
html, body { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* grain */
body::before {
  content: ''; position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
[data-theme="noite"] body::before { mix-blend-mode: screen; opacity: 0.4; }

/* ── Shell ── */
.shell { position: relative; z-index: 2; display: grid; grid-template-rows: var(--topbar-h) 1fr; height: 100vh; }
.main { display: grid; grid-template-columns: var(--sidebar-w) 1fr auto; overflow: hidden; min-height: 0; }
.main.no-right { grid-template-columns: var(--sidebar-w) 1fr; }

/* ── TOPBAR ── */
.topbar {
  display: grid; grid-template-columns: var(--sidebar-w) 1fr auto;
  align-items: center; padding: 0 18px 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2); position: relative; z-index: 10;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; transform: translate(6px, -5px); }
.topbar-center { display: flex; justify-content: center; }
.mode-tabs {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; position: relative;
}
.mode-tab {
  padding: 8px 18px; font-size: 13.5px; font-weight: 500;
  color: var(--ink-3); border-radius: 999px;
  transition: color 0.18s var(--ease); position: relative; z-index: 2;
  letter-spacing: -0.01em;
}
.mode-tab:hover { color: var(--ink); }
.mode-tab.active { color: var(--green-ink); font-weight: 600; }
.mode-pill {
  position: absolute; top: 4px; bottom: 4px;
  background: var(--surface); border-radius: 999px;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
  transition: transform 0.35s var(--ease-spring), width 0.35s var(--ease-spring);
  z-index: 1;
}
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-week { display: flex; align-items: center; gap: 3px; margin-right: 4px; }
.tw-dot {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; font-size: 10px; font-weight: 600;
  color: var(--ink-4); background: transparent;
  transition: all 0.18s var(--ease);
}
.tw-dot.today { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.tw-dot.done { color: var(--green-ink); background: var(--green-4); }
.tw-dot.done.today { border-color: var(--green); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; color: var(--ink-2);
  transition: all 0.16s var(--ease); position: relative;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-2); box-shadow: 0 0 0 2px var(--surface);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  display: grid; place-items: center;
  color: #fff; font-size: 12.5px; font-weight: 600;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.15s var(--ease);
}
.avatar:hover { transform: scale(1.05); }
.avatar-menu { position: relative; }
.avatar-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 220px; z-index: 200;
}
.avd-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.avd-initials {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff; font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.avd-info { min-width: 0; }
.avd-name { font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avd-plan { font-size: 11.5px; color: var(--green); font-weight: 500; margin-top: 1px; }
.avd-divider { height: 1px; background: var(--line); margin: 4px 0; }
.avd-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--ink-2); text-align: left;
  transition: background 0.12s var(--ease);
}
.avd-item:hover { background: var(--bg-2); }
.avd-item.danger { color: var(--rust, #b04a2a); }
.avd-item.danger:hover { background: rgba(176,74,42,0.08); }
.streak-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(176,74,42,0.12), rgba(168,117,28,0.14));
  border: 1px solid rgba(168,117,28,0.28);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  white-space: nowrap; transition: all 0.2s var(--ease);
}
.streak-badge:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.streak-badge .flame { font-size: 14px; }

/* ── SIDEBAR ── */
.sidebar {
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-section { padding: 18px 14px 10px; }
.sidebar-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-4); font-weight: 600; padding: 0 8px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-add-btn {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; color: var(--ink-3);
  transition: all 0.15s var(--ease);
}
.sidebar-add-btn:hover { background: var(--surface); color: var(--green); }
.sidebar-scroll {
  flex: 1; overflow-y: auto; padding: 0 10px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar-scroll::-webkit-scrollbar { width: 8px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.seg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s var(--ease);
}
.seg-item:hover { background: var(--surface-2); }
.seg-item.active { background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.seg-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.seg-name { font-size: 14px; color: var(--ink); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.seg-item.active .seg-name { font-weight: 600; }
.seg-todo-badge { flex-shrink: 0; background: var(--green); color: #fff; font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 6px; min-width: 18px; text-align: center; }
.seg-edit-btn {
  flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 3px;
  color: var(--ink-4); opacity: 0; transition: opacity 0.15s;
  display: grid; place-items: center; border-radius: 5px;
}
.seg-item:hover .seg-edit-btn { opacity: 0.6; }
.seg-edit-btn:hover { opacity: 1 !important; background: var(--bg-2); }
.seg-count { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.sidebar-footer { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
.weekly-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-4); font-weight: 600; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center; white-space: nowrap;
}
.weekly-label > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.weekly-label span.total { color: var(--green); font-size: 12px; letter-spacing: 0; text-transform: none; }
/* ── WEEK BATTERY ── */
.wb-wrap { position: relative; }
.week-battery {
  display: flex; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; padding: 4px;
  border-radius: 6px; transition: background 0.15s;
  width: 80px;
}
.week-battery:hover, .week-battery.open { background: var(--surface-2); }
.wb-body {
  position: relative;
  flex: 1; height: 22px;
  border-radius: 5px;
  border: 2px solid var(--green);
  background: var(--surface-2);
  overflow: hidden;
}
.wb-fill {
  position: absolute; inset: 0;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.wb-bolt {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  fill: #fff;
  pointer-events: none;
  filter: drop-shadow(0 0 1.5px rgba(0,0,0,0.5));
}
.wb-nub {
  width: 4px; height: 10px;
  background: var(--green);
  border-radius: 0 2px 2px 0;
  flex-shrink: 0;
}

/* wb-panel */
.wb-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 240px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px;
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.18));
  z-index: 200;
  display: flex; flex-direction: column; gap: 12px;
}
.wb-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3);
}
.wb-all-done { color: var(--green); font-size: 11px; font-weight: 700; }
.wb-missions { display: flex; flex-direction: column; gap: 8px; }
.wb-mission { display: flex; flex-direction: column; gap: 4px; }
.wb-mission-top {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink);
}
.wb-mission-icon { font-size: 13px; }
.wb-mission-label { flex: 1; }
.wb-mission-count { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.wb-mission-bar {
  height: 4px; border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.wb-mission-fill {
  height: 100%; border-radius: 99px;
  background: var(--green);
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.wb-reward {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border-radius: 8px; padding: 10px;
}
.wb-reward-icon { font-size: 20px; }
.wb-reward-title { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.wb-reward-desc  { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.wb-week-row {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--ink-4);
  border-top: 1px solid var(--line); padding-top: 10px;
}
.wb-week-count { color: var(--green); font-weight: 600; }

/* ── WEEKLY DOTS (sidebar footer) ── */
.weekly-dots { display: flex; justify-content: space-between; gap: 4px; }
.wd {
  flex: 1; aspect-ratio: 1; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 600; color: var(--ink-4);
  transition: all 0.2s var(--ease);
}
.wd.done { background: var(--green); border-color: var(--green); color: #fff; }
.wd.today { box-shadow: 0 0 0 2px var(--green), 0 0 0 4px var(--green-4); }

/* ── RIGHT SIDEBAR ── */
.right-sidebar {
  width: var(--notes-w);
  background: var(--bg-2); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
  overflow: hidden;
  transition: width 0.28s var(--ease), border-left-color 0.28s var(--ease);
}
.right-sidebar.collapsed {
  width: 0;
  border-left-color: transparent;
}
.right-header { padding: 18px 18px 12px; display: flex; align-items: center; justify-content: space-between; }
.right-title { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-style: italic; font-weight: 500; color: var(--ink); }
.right-badge { font-size: 11px; color: var(--ink-3); padding: 3px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.notes-list { flex: 1; overflow-y: auto; padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.note-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer;
  transition: all 0.18s var(--ease);
}
.note-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.note-card .note-date { font-size: 11px; color: var(--ink-4); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; line-height: 1; }
.note-card .diff-dot { width: 7px; height: 7px; border-radius: 50%; }
.diff-dot.easy { background: var(--green-2); }
.diff-dot.ok   { background: var(--amber); }
.diff-dot.hard { background: var(--rust); }
.note-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notes-add {
  margin: 0 14px 14px; padding: 10px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-3); font-size: 13px; font-weight: 500;
  transition: all 0.18s var(--ease);
}
.notes-add:hover { background: var(--green-4); color: var(--green-ink); border-color: var(--green-3); border-style: solid; }

/* ── CENTER ── */
.center { overflow: hidden; position: relative; min-height: 0; display: flex; flex-direction: column; }
.chat-layout { display: flex; flex-direction: column; height: 100%; min-height: 0; position: relative; }
.chat-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.chat-seg-header {
  padding: 18px 40px 4px;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  letter-spacing: 0.02em; text-transform: uppercase;
  max-width: 820px; margin: 0 auto; width: 100%;
}
.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* ── CHAT SELECT ── */
.chat-select {
  flex: 1; overflow-y: auto;
  padding: 48px 40px 40px;
  max-width: 700px; margin: 0 auto; width: 100%;
}
.cs-top { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.cs-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.cs-seg-name { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-style: italic; font-weight: 500; color: var(--ink); }
.cs-new-btn {
  display: flex; align-items: center; gap: 16px;
  width: 100%; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; text-align: left;
  transition: all 0.15s var(--ease);
  box-shadow: var(--shadow-sm);
}
.cs-new-btn:hover { background: var(--bg-2); }
.cs-new-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--green); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.cs-new-label { font-size: 15px; font-weight: 600; color: var(--ink); }
.cs-new-sub   { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.cs-list { margin-top: 32px; display: flex; flex-direction: column; gap: 8px; }
.cs-list-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); margin-bottom: 10px; }
.cs-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; text-align: left;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s var(--ease); color: var(--ink-3);
}
.cs-item:hover { background: var(--bg-2); }
.cs-item-body { flex: 1; min-width: 0; }
.cs-item-title { font-size: 14px; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-item-meta  { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.cs-loading { padding: 24px; text-align: center; font-size: 13px; color: var(--ink-4); }
.cs-empty   { padding: 32px 0; text-align: center; font-size: 14px; color: var(--ink-4); }

/* ── CHAT BACK BAR ── */
.chat-back-btn {
  position: absolute; top: 10px; left: 16px; z-index: 10;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  color: var(--ink-3); transition: all 0.12s var(--ease);
}
.chat-back-btn:hover { color: var(--ink); background: var(--line); }

/* ── CHAT ── */
.chat-hero { padding: 56px 40px 28px; max-width: 820px; margin: 0 auto; text-align: center; }
.chat-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 38px; font-weight: 400; font-style: italic;
  letter-spacing: -0.02em; color: var(--ink); margin-bottom: 12px; line-height: 1.15;
}
.chat-hero h1 em { font-weight: 600; font-style: italic; color: var(--green); }
.chat-hero p { font-size: 16px; color: var(--ink-3); max-width: 560px; margin: 0 auto; }
.prompt-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 820px; margin: 28px auto 0; padding: 0 40px; }
.prompt-chip {
  text-align: left; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; transition: all 0.2s var(--ease);
  display: flex; align-items: flex-start; gap: 12px;
}
.prompt-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--green-3); background: var(--paper); }
.prompt-chip .chip-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--green-4); color: var(--green); display: grid; place-items: center; flex-shrink: 0; }
.prompt-chip .chip-body strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; font-weight: 600; }
.prompt-chip .chip-body span { font-size: 12.5px; color: var(--ink-3); }

.messages { max-width: 820px; margin: 0 auto; padding: 24px 40px 20px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.msg { display: flex; gap: 12px; animation: msg-in 0.4s var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 600; font-size: 16px;
}
.msg.ai .msg-avatar { background: var(--green); color: #fff; }
.msg.user .msg-avatar { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-family: 'Inter Tight', sans-serif; font-style: normal; }
.msg-body { flex: 1; padding-top: 4px; }
.msg-who { font-size: 12px; color: var(--ink-4); margin-bottom: 2px; font-weight: 500; }
.msg-text { font-size: 15px; color: var(--ink); line-height: 1.6; }
.msg-text p + p { margin-top: 10px; }
.msg-text mark { background: var(--highlight-a); color: var(--green-ink); padding: 0 3px; border-radius: 2px; font-weight: 500; }
.msg-text strong { font-weight: 600; }
.msg-text ul, .msg-text ol { padding-left: 20px; margin: 8px 0; }
.msg-text li { margin: 4px 0; }
.msg-text code { font-family: 'JetBrains Mono', monospace; font-size: 13px; background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }
.msg-text pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 10px 0; overflow-x: auto; }
.msg-text pre code { background: none; padding: 0; }
.msg-streaming::after { content: '▋'; animation: blink 0.8s infinite; color: var(--green); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.input-area { background: transparent; padding: 16px 40px 20px; max-width: 820px; margin: 0 auto; width: 100%; }
.input-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-md); overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input-wrap:focus-within { border-color: var(--green-3); box-shadow: var(--shadow-md); }
.input-textarea {
  width: 100%; padding: 16px 18px 8px;
  background: transparent; border: none; outline: none; resize: none;
  font-size: 15px; line-height: 1.5; min-height: 28px; max-height: 180px; color: var(--ink);
}
.input-textarea::-webkit-scrollbar { width: 5px; }
.input-textarea::-webkit-scrollbar-track { background: transparent; }
.input-textarea::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.input-textarea::placeholder { color: var(--ink-4); }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
.icon-attach { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-3); transition: all 0.15s var(--ease); }
.icon-attach:hover { background: var(--bg-2); color: var(--ink); }
/* Model picker (Claude-style) */
.model-picker { position: relative; }
.model-picker-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  transition: all 0.15s var(--ease);
}
.model-picker-btn:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line-2, var(--line)); }
.model-picker-dropdown {
  position: absolute; bottom: calc(100% + 8px); left: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 220px; z-index: 200;
}
.mpd-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px; border-radius: 9px;
  text-align: left; transition: background 0.12s var(--ease);
}
.mpd-item:hover { background: var(--bg-2); }
.mpd-item.active { background: var(--bg-2); }
.mpd-info { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.mpd-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.mpd-desc  { font-size: 11.5px; color: var(--ink-3); }
.mpd-item svg { color: var(--green); flex-shrink: 0; }
.input-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 14px; }
.input-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.send-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--green); color: #fff;
  transition: all 0.18s var(--ease);
  box-shadow: 0 2px 0 0 var(--green-ink), var(--shadow-sm);
}
.send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 3px 0 0 var(--green-ink), var(--shadow-md); }
.send-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 0 var(--green-ink); }
.send-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.input-footer { text-align: center; font-size: 11.5px; color: var(--ink-4); margin-top: 10px; }

/* ── Attachment previews (input area) ── */
.attach-previews { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.attach-chip {
  display: flex; align-items: center; gap: 6px; max-width: 200px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 8px 4px 5px;
  font-size: 12px; color: var(--ink-2);
}
.attach-thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.attach-file-ico {
  width: 28px; height: 28px; display: grid; place-items: center;
  background: var(--paper); border-radius: 4px; flex-shrink: 0; color: var(--ink-3);
}
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.attach-remove { color: var(--ink-3); font-size: 16px; line-height: 1; padding: 0 2px; flex-shrink: 0; transition: color 0.12s var(--ease); }
.attach-remove:hover { color: var(--ink); }

/* ── Attachments inside messages ── */
.msg-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.msg-img { max-width: 280px; max-height: 220px; object-fit: contain; border-radius: 10px; display: block; border: 1px solid var(--line); }
.msg-file {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 10px;
  font-size: 12.5px; color: var(--ink-2);
}

/* ── FOCUS ── */
.focus-view { width: 100%; max-width: 860px; margin: auto; padding: 32px; box-sizing: border-box; }
.focus-view--wide { max-width: 860px; padding-left: 0; padding-right: 0; }
.focus-card { width: 100%; box-sizing: border-box; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 36px 32px; box-shadow: var(--shadow-md); text-align: center; }
.focus-title { font-family: 'Fraunces', Georgia, serif; font-size: 32px; font-weight: 500; font-style: italic; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 8px; }
.focus-sub { font-size: 14px; color: var(--ink-3); margin-bottom: 28px; }
.name-input { width: 100%; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; font-size: 16px; text-align: center; outline: none; transition: all 0.18s var(--ease); }
.name-input:focus { border-color: var(--line-2); }
.focus-min-input { width: 52px; padding: 6px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; font-style: normal; text-align: center; outline: none; transition: border-color 0.15s var(--ease); color: var(--ink); }
.focus-min-input:focus { border-color: var(--line-2); }
.focus-min-input::-webkit-inner-spin-button, .focus-min-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.chip-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: all 0.15s var(--ease); }
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--green-3); color: #fff; border-color: var(--green-2); }
.type-toggle { display: flex; gap: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 18px auto 20px; width: fit-content; }
.type-toggle button { padding: 10px 20px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); transition: all 0.18s var(--ease); }
.type-toggle button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.big-start { margin-top: 18px; width: 100%; padding: 16px; background: linear-gradient(180deg, var(--green-2), var(--green)); color: #fff; border-radius: 14px; font-size: 15px; font-weight: 600; box-shadow: 0 2px 0 0 var(--green-ink), var(--shadow-md); transition: transform 0.15s var(--ease); }
.big-start:hover { transform: translateY(-1px); }
.timer-display { margin: 40px auto 20px; width: 280px; height: 280px; position: relative; display: grid; place-items: center; }
.timer-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle.bg { fill: none; stroke: var(--line); stroke-width: 4; }
.timer-ring circle.fg { fill: none; stroke: url(#ringGrad); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-inner { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.timer-num { font-family: 'Fraunces', Georgia, serif; font-size: 68px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.timer-state { font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-4); font-weight: 600; margin-top: 8px; }
.timer-controls { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.tc-btn { padding: 12px 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink-2); transition: all 0.15s var(--ease); }
.tc-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.tc-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); padding: 12px 32px; }
.tc-btn.primary:hover { background: var(--ink-2); }

/* ── PRONTO OVERLAY ── */
.pronto-overlay { position: fixed; inset: 0; z-index: 9999; background: #162e0a; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.pronto-overlay.visible { opacity: 1; pointer-events: all; }
.pronto-svg { width: min(82vw, 580px); height: auto; }

/* ── FOCUS REVIEW SHEET ── */
.sheet-ta { width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; color: var(--ink); font-family: inherit; font-size: 14px; resize: none; height: 80px; outline: none; margin-bottom: 14px; transition: border-color 0.15s var(--ease); box-sizing: border-box; }
.sheet-ta:focus { border-color: var(--line-2); }
.sheet-ta::placeholder { color: var(--ink-4); }
.diff-row { display: flex; gap: 8px; margin-bottom: 16px; }
.d-btn { flex: 1; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 6px; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--ink-3); transition: all 0.14s var(--ease); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.d-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.d-btn.active.hard { border-color: var(--rust); background: color-mix(in srgb, var(--rust) 10%, var(--surface)); color: var(--ink); }
.d-btn.active.ok   { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--surface)); color: var(--ink); }
.d-btn.active.easy { border-color: var(--green-2); background: color-mix(in srgb, var(--green-2) 10%, var(--surface)); color: var(--ink); }
.d-btn-dot { width: 18px; height: 18px; border-radius: 5px; display: block; }
.sheet-save { width: 100%; padding: 14px; background: linear-gradient(180deg, var(--green-2), var(--green)); color: #fff; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 2px 0 0 var(--green-ink), var(--shadow-md); transition: transform 0.15s var(--ease); }
.sheet-save:hover { transform: translateY(-1px); }

/* ── MODAL GENÉRICO ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
  display: flex; flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.modal-close { background: none; border: none; font-size: 16px; color: var(--ink-4); cursor: pointer; padding: 4px; border-radius: 6px; }
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.modal-body { padding: 18px 20px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}
.form-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.form-input {
  padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 15px; font-family: inherit;
  transition: border-color 0.15s; outline: none;
}
.form-input:focus { border-color: var(--green); }
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233c2418' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.qty-stepper {
  display: flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); overflow: hidden;
  height: 42px;
}
.qty-btn {
  width: 42px; height: 100%;
  background: none; border: none;
  font-size: 18px; font-weight: 500; color: var(--ink-3);
  cursor: pointer; transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--surface-2); color: var(--ink); }
.qty-val {
  flex: 1; text-align: center;
  font-size: 16px; font-weight: 600; color: var(--ink);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}

/* ── TODOS ── */
.todo-view { width: 100%; padding: 20px 40px 60px; box-sizing: border-box; }
.page-head { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 18px; gap: 20px; }
.page-sub { font-size: 16px; color: var(--ink-3); margin-top: 6px; }
.btn-primary { white-space: nowrap; padding: 13px 22px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600; transition: all 0.15s var(--ease); display: flex; align-items: center; gap: 7px; }
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); }
.todo-filters { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-item { display: flex; align-items: center; gap: 14px; padding: 13px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: all 0.18s var(--ease); }
.todo-item:hover { border-color: var(--line-2); transform: translateX(2px); box-shadow: var(--shadow-sm); }
.todo-check { width: 22px; height: 22px; border-radius: 7px; border: 1.8px solid var(--line-2); display: grid; place-items: center; flex-shrink: 0; transition: all 0.15s var(--ease); }
.todo-check:hover { border-color: var(--green); }
.todo-check.done { background: var(--green); border-color: var(--green); color: #fff; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--ink-4); }
.todo-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.todo-text { font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-desc { font-size: 13px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.todo-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); flex-shrink: 0; margin-left: auto; }
.todo-edit-btn { flex-shrink: 0; background: none; border: none; color: var(--ink-4); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s; }
.todo-item:hover .todo-edit-btn { opacity: 1; }
.todo-edit-btn:hover { background: var(--bg-2); color: var(--ink); }
.urg-dot { width: 8px; height: 8px; border-radius: 50%; }
.urg-dot.baixa { background: var(--green-3); }
.urg-dot.media { background: var(--amber); }
.urg-dot.alta  { background: var(--rust); }
.seg-tag { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }

/* ── MINI CALENDAR ── */
.mini-cal-wrap { position: relative; display: inline-block; margin-bottom: 16px; }
.mini-cal-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; transition: all 0.15s var(--ease); }
.mini-cal-btn:hover, .mini-cal-btn.open { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.mini-cal-badge { background: var(--green); color: #fff; font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 6px; margin-left: 2px; }
.mini-cal-popup { position: absolute; top: calc(100% + 6px); left: 0; z-index: 200; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px 14px; box-shadow: var(--shadow-lg); width: 230px; }
.mini-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mini-cal-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.mini-cal-nav { background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 6px; border-radius: 7px; transition: background 0.12s, color 0.12s; }
.mini-cal-nav:hover:not(:disabled) { background: var(--bg-2); color: var(--ink); }
.mini-cal-nav:disabled { opacity: 0.25; cursor: default; }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-cal-dow { font-size: 9.5px; font-weight: 600; color: var(--ink-4); text-align: center; padding-bottom: 4px; }
.mini-cal-day { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mini-cal-day.today { font-weight: 700; color: var(--ink); outline: 2px solid var(--green); outline-offset: -2px; }
/* Todo urgency colors */
.mini-cal-day.cal-urg-baixa { background: #3d8530; color: #fff; }
.mini-cal-day.cal-urg-media { background: #b07a10; color: #fff; }
.mini-cal-day.cal-urg-alta  { background: #b84030; color: #fff; }
/* Cards performance colors */
.mini-cal-day.cal-perf-high { background: #3d8530; color: #fff; }
.mini-cal-day.cal-perf-mid  { background: #b07a10; color: #fff; }
.mini-cal-day.cal-perf-low  { background: #b84030; color: #fff; }
/* Focus session color */
.mini-cal-day.cal-focus { background: #3d8530; color: #fff; }
/* Date picker */
.dpc-day { cursor: pointer; }
.dpc-day:hover:not(.dpc-selected) { background: var(--bg-2); color: var(--ink); }
.dpc-day.dpc-selected { background: var(--green); color: #fff; font-weight: 700; }
.dpc-trigger { color: var(--ink-3); }
.dpc-trigger.has-val { color: var(--ink); }
.dpc-clear { margin-left: auto; font-size: 15px; line-height: 0; color: var(--ink-2); padding: 0 2px; cursor: pointer; display: flex; align-items: center; }
.dpc-clear:hover { color: var(--rust); }

/* ── CARDS ── */
.cards-view { padding: 28px 52px 60px; max-width: 1200px; margin: 0 auto; width: 100%; }
.cv-topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.cv-sort { padding: 10px 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-family: inherit; cursor: pointer; flex-shrink: 0; }
.cv-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cv-filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-search-wrap { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; flex: 1; min-width: 180px; transition: border-color 0.15s var(--ease); }
.cv-search-wrap:focus-within { border-color: var(--line-2); }
.cv-search-wrap svg { flex-shrink: 0; color: var(--ink-3); }
.cv-search-wrap input { flex: 1; background: none; border: none; outline: none; font-size: 14.5px; color: var(--ink); font-family: inherit; }
.cv-search-wrap input::placeholder { color: var(--ink-4); }
.deck-rows { display: flex; flex-direction: column; gap: 14px; }
.deck-row-card { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: all 0.18s var(--ease); }
.deck-row-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.deck-row-cover { width: 88px; min-height: 88px; align-self: stretch; flex-shrink: 0; }
.deck-row-body { flex: 1; padding: 16px 18px; min-width: 0; }
.deck-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 14px 18px 14px 0; flex-shrink: 0; }
.deck-row-total { font-size: 13px; color: var(--ink-4); }
.deck-list { display: flex; flex-direction: column; gap: 8px; }
.deck-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; cursor: pointer; transition: all 0.18s var(--ease); }
.deck-row:hover { background: var(--surface-2); border-color: var(--line-2); }
.deck-row-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.deck-row-name { font-size: 15px; font-weight: 600; color: var(--ink); flex: 1; }
.deck-row-seg { font-size: 13px; color: var(--ink-3); }
.deck-row-count { font-size: 13px; color: var(--ink-4); flex-shrink: 0; }
.cards-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.cards-grid .deck-card  { width: 300px; flex-shrink: 0; }
.cards-grid .prova-card { width: 270px; flex-shrink: 0; }
.deck-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; transition: all 0.22s var(--ease); display: flex; flex-direction: column; min-height: 280px; }
.deck-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.deck-cover { height: 148px; position: relative; overflow: hidden; display: grid; place-items: center; }
.deck-cover::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.2), transparent 50%), radial-gradient(circle at 80% 70%, rgba(0,0,0,0.08), transparent 50%); }
.deck-cover .deck-initial { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500; font-size: 64px; color: rgba(255,255,255,0.92); mix-blend-mode: overlay; letter-spacing: -0.04em; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); position: relative; z-index: 1; }
.deck-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.deck-title { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.deck-desc { font-size: 13px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deck-meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-4); }
.deck-acc { padding: 3px 8px; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.deck-acc.high { background: var(--green-4); color: var(--green-ink); }
.deck-acc.mid  { background: rgba(168,117,28,0.18); color: #6e4812; }
.deck-acc.low  { background: rgba(176,74,42,0.18); color: #6a2312; }

/* ── DECK DETAIL ── */
.dd-overlay { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: flex; flex-direction: column; animation: ddFadeIn 0.18s ease; }
.dd-panel { width: 100%; max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; height: 100%; position: relative; }
@keyframes ddFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.dd-header { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.dd-back { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background 0.15s; flex-shrink: 0; }
.dd-back:hover { background: var(--surface-2); }
.dd-title { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 20px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.dd-seg { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.dd-badge { margin-left: auto; flex-shrink: 0; padding: 5px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.dd-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.dd-body::-webkit-scrollbar { width: 5px; }
.dd-body::-webkit-scrollbar-track { background: transparent; }
.dd-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
.dd-body::-webkit-scrollbar-thumb:hover { background: var(--line-2); }
.dd-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-pill { padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.dd-pill.correct { background: #3d8530; color: #fff; }
.dd-pill.wrong   { background: #b84030; color: #fff; }
.dd-pill.pct     { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.dd-section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.dd-section-title { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 12px; }
.dd-collapse-btn { background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; color: var(--ink-4); font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 12px; }
.dd-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dd-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dd-has-sess { background: rgba(61,133,48,0.18); color: var(--green) !important; font-weight: 700; }
.dd-has-sess:hover { background: rgba(61,133,48,0.30) !important; }
.dd-sel-day { background: #3d8530 !important; color: #fff !important; font-weight: 700; }
/* ── dd-hist: uma box só ── */
.dd-hist-box { padding: 0; }
.dd-hist-layout { display: flex; gap: 0; align-items: stretch; }
.dd-hist-cal { flex-shrink: 0; width: 234px; padding: 12px 16px 14px; border-right: 1px solid var(--line); }
.dd-hist-bars { flex: 1; display: flex; align-items: flex-end; padding: 14px 16px 14px; }
.dd-hist-report { border-top: 1px solid var(--line); padding: 0; }
.dd-resolve-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: none; border: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--green); transition: background 0.15s; border-radius: 0 0 13px 13px; }
.dd-resolve-btn:hover { background: var(--bg-2); }
.dd-resolve-arrow { font-size: 10px; color: var(--ink-3); }
.dd-hist-report-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
/* ── Bars chart ── */
.dd-bars-chart { display: flex; gap: 6px; align-items: flex-end; flex: 1; }
/* Eixo Y — fixo, alinhado à base das barras, respeitando labels abaixo */
.dd-bars-yaxis { flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding-right: 6px; width: 40px; height: 130px; margin-bottom: 40px; }
.dd-bars-yaxis span { font-size: 11px; font-weight: 600; color: var(--ink-3); line-height: 1; transform: translateY(-50%); }
/* Scroll horizontal */
.dd-bars-scroll { flex: 1; overflow-x: auto; overflow-y: visible; scrollbar-width: thin; scrollbar-color: var(--line) transparent; position: relative; }
.dd-bars-gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); pointer-events: none; z-index: 0; opacity: 0.6; }
.dd-bars-inner { position: relative; z-index: 1; }
.dd-bars-scroll::-webkit-scrollbar { height: 4px; }
.dd-bars-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.dd-bars-inner { display: flex; align-items: flex-end; gap: 10px; min-width: 100%; padding: 6px 4px 4px; box-sizing: border-box; }
/* Cada coluna */
.dd-bar-col { display: flex; flex-direction: column; align-items: center; cursor: pointer; flex-shrink: 0; transition: opacity 0.15s; }
.dd-bar-col:hover { opacity: 0.78; }
/* A barra em si — align-self:stretch garante que preenche a largura da coluna */
.dd-bar-stack { align-self: stretch; border-radius: 0; overflow: hidden; display: flex; flex-direction: column; flex-shrink: 0; }
.dd-bar-col.active .dd-bar-stack { outline: 2.5px solid var(--green); outline-offset: 2px; }
.dd-bar-wrong   { background: #b84030; flex-shrink: 0; }
.dd-bar-correct { background: #3d8530; flex-shrink: 0; }
/* Labels */
.dd-bar-date { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; text-align: center; margin-top: 7px; line-height: 14px; }
.dd-bar-sess { font-size: 10px; color: var(--ink-4); text-align: center; margin-top: 2px; min-height: 13px; line-height: 13px; }
.dd-bar-col.active .dd-bar-date { color: var(--green); font-weight: 700; }
.dd-bar-col.active .dd-bar-sess { color: var(--green); }
.dd-hint { font-size: 12.5px; color: var(--ink-4); text-align: center; padding: 4px 0; }
.dd-session-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.dd-session-group:last-child { margin-bottom: 0; }
.dd-session-header { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dd-session-num { font-size: 12px; font-weight: 700; color: var(--green); flex-shrink: 0; }
.dd-session-date { font-size: 12px; color: var(--ink-3); flex: 1; }
.dd-session-score { font-size: 11.5px; color: var(--ink-3); flex-shrink: 0; }
.dd-session-score.perfect { color: var(--green); font-weight: 700; }
.dd-attempt { display: flex; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.dd-attempt:last-child { border-bottom: none; }
.dd-attempt-ind { font-size: 13px; font-weight: 700; flex-shrink: 0; width: 16px; text-align: center; margin-top: 1px; }
.dd-attempt.correct .dd-attempt-ind { color: var(--green); }
.dd-attempt.wrong   .dd-attempt-ind { color: #b84030; }
.dd-attempt-q   { font-size: 13px; color: var(--ink); line-height: 1.4; }
.dd-attempt-ans { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.dd-attempt-chevron { font-size: 10px; color: var(--text2); opacity: 0.5; flex-shrink: 0; margin-left: 6px; transition: var(--transition); }
.dd-attempt.expanded { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.dd-expand { background: var(--bg); border: 1px solid var(--border); border-top: none; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.dd-expand-options { display: flex; flex-direction: column; gap: 5px; }
.dd-opt { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: 6px; background: var(--bg-2); font-size: 13px; color: var(--text2); border: 1.5px solid transparent; }
.dd-opt-letter { font-weight: 700; flex-shrink: 0; width: 14px; color: var(--text2); opacity: 0.6; }
.dd-opt-text { flex: 1; }
.dd-opt.dd-opt-correct { background: rgba(40,167,70,0.12); border-color: var(--green); color: var(--green); }
.dd-opt.dd-opt-correct .dd-opt-letter { color: var(--green); opacity: 1; }
.dd-opt.dd-opt-wrong { background: rgba(184,64,48,0.10); border-color: #b84030; color: #b84030; }
.dd-opt.dd-opt-wrong .dd-opt-letter { color: #b84030; opacity: 1; }
.dd-expand-answers { display: flex; flex-direction: column; gap: 5px; }
.dd-expand-ans { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 6px; font-size: 13px; border: 1.5px solid transparent; }
.dd-expand-ans.correct { background: rgba(40,167,70,0.12); border-color: var(--green); color: var(--green); }
.dd-expand-ans.wrong { background: rgba(184,64,48,0.10); border-color: #b84030; color: #b84030; }
.dd-expand-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
.dd-maestro-btn { align-self: flex-end; background: var(--green); color: #fff; border: none; border-radius: 6px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: var(--transition); opacity: 0.92; }
.dd-maestro-btn:hover { opacity: 1; }

/* ── QUIZ ── */
@keyframes qz-hint-wave {
  0%   { background-position: -300% center; }
  100% { background-position: 300% center; }
}
.qz-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: var(--green); padding: 16px; }
.qz-panel { background: var(--surface); border-radius: 24px; width: 100%; max-width: 100%; height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.4); }
/* LOADER — texto branco diretamente no verde, sem caixa */
.qz-loader { width: 100%; max-width: 560px; padding: 0 24px; text-align: center; }
.qz-loader-name { font-size: 44px; font-weight: 700; color: #fff; margin-bottom: 10px; font-family: 'Fraunces', serif; font-style: italic; line-height: 1.2; }
.qz-loader-seg { font-size: 16px; color: rgba(255,255,255,0.65); margin-bottom: 36px; }
.qz-loader-bar-wrap { height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; }
.qz-loader-bar { height: 100%; background: rgba(255,255,255,0.85); border-radius: 2px; width: 0%; }
.qz-loader-hint { font-size: 13px; margin-top: 22px; min-height: 18px; opacity: 0; transition: opacity 0.8s ease;
  background: linear-gradient(90deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.25) 100%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; }
.qz-loader-hint.visible { opacity: 1; animation: qz-hint-wave 2.4s linear infinite; }
/* TOPBAR */
.qz-topbar { display: flex; align-items: center; gap: 14px; padding: 20px 28px 14px; flex-shrink: 0; }
.qz-close-btn { background: none; border: none; cursor: pointer; color: var(--ink-3); font-size: 16px; padding: 4px 8px; border-radius: 6px; transition: color 0.15s; flex-shrink: 0; }
.qz-close-btn:hover { color: var(--ink); background: var(--bg-2); }
.qz-prog-wrap { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.qz-prog-bar { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.3s ease; }
.qz-counter { font-size: 15px; font-weight: 600; color: var(--ink-3); flex-shrink: 0; min-width: 56px; text-align: right; }
.qz-counter span { font-weight: 400; color: var(--ink-4); }
.qz-body { flex: 1; overflow-y: auto; padding: 16px 32px 24px; display: flex; flex-direction: column; gap: 24px; }
.qz-question { font-size: 22px; color: var(--ink); line-height: 1.55; font-weight: 500; }
.qz-opts { display: flex; flex-direction: column; gap: 10px; }
.qz-opt { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; transition: border-color 0.15s, background 0.15s; background: var(--bg); }
.qz-opt:hover:not(.correct):not(.wrong):not(.disabled) { border-color: var(--green-3); background: var(--surface-2); }
.qz-opt.correct { border-color: var(--green); background: rgba(40,167,70,0.1); cursor: default; }
.qz-opt.wrong { border-color: #b84030; background: rgba(184,64,48,0.08); cursor: default; }
.qz-opt.disabled { opacity: 0.45; cursor: default; }
.qz-opt-letter { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--ink-3); flex-shrink: 0; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.qz-opt.correct .qz-opt-letter { background: var(--green); border-color: var(--green); color: #fff; }
.qz-opt.wrong .qz-opt-letter { background: #b84030; border-color: #b84030; color: #fff; }
.qz-opt-text { font-size: 16px; color: var(--ink); line-height: 1.45; }
.qz-essay-wrap { display: flex; flex-direction: column; gap: 10px; }
.qz-essay { width: 100%; padding: 14px 16px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--ink); resize: none; font-family: inherit; line-height: 1.5; transition: border-color 0.15s; box-sizing: border-box; }
.qz-essay:focus { outline: none; border-color: var(--green-3); }
.qz-essay:disabled { opacity: 0.7; }
.qz-essay-btn { align-self: flex-end; background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 10px 22px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: opacity 0.15s; }
.qz-essay-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Shared word-box (drag + match) ── */
.qz-box { padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: grab; transition: transform 0.15s, border-color 0.15s, background 0.15s, opacity 0.15s; font-family: inherit; text-align: center; user-select: none; }
.qz-box:hover:not(.correct):not(.wrong):not(.distractor) { border-color: var(--green-3); background: var(--surface-2); transform: translateY(-1px); }
.qz-box.dragging   { opacity: 0.35; cursor: grabbing; }
.qz-box.drag-target { transform: translateY(4px); border-color: var(--green-2); }
.qz-box.correct    { border-color: var(--green) !important; background: rgba(40,167,70,0.12) !important; color: var(--green) !important; cursor: default; }
.qz-box.wrong      { border-color: #b84030 !important; background: rgba(184,64,48,0.08) !important; color: #b84030 !important; cursor: default; }
.qz-box.distractor { opacity: 0.45; cursor: default; border-style: dashed; }

/* ── Drag-fill ── */
.qz-drag-sentence { font-size: 18px; color: var(--ink); line-height: 2.8; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qz-blank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 90px; padding: 4px 10px;
  border-radius: 10px; border: 2px dashed var(--line-2);
  background: var(--bg); font-size: 15px; transition: all 0.15s;
}
.qz-blank.ready   { border-color: var(--green-2); border-style: solid; background: var(--green-4); }
.qz-blank.filled  { border-style: solid; border-color: var(--line-2); }
.qz-blank.correct { border-color: var(--green) !important; background: rgba(40,167,70,0.1) !important; }
.qz-blank.wrong   { border-color: #b84030 !important; background: rgba(184,64,48,0.08) !important; }
.qz-blank-word {
  padding: 4px 10px; border-radius: 7px; font-size: 15px; font-weight: 500;
  color: var(--ink); cursor: grab; user-select: none;
}
.qz-blank.correct .qz-blank-word { color: var(--green); }
.qz-blank.wrong   .qz-blank-word { color: #b84030; }
.qz-blank-ph { color: var(--ink-4); font-size: 13px; }
.qz-bank {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 20px; padding: 12px 14px;
  background: var(--bg-2); border-radius: 12px; border: 1px solid var(--line);
  min-height: 52px; transition: border-color 0.15s, background 0.15s;
}
.qz-bank.drop-active { border-color: var(--green-2); background: var(--green-4); }
.qz-bank.revealed    { border-style: dashed; }
.qz-bank-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); width: 100%; margin-bottom: 2px; }
.qz-bank-empty { font-size: 13px; color: var(--ink-4); }

/* ── Match ordering ── */
.qz-match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.qz-match-col  { display: flex; flex-direction: column; gap: 8px; }
.qz-match-col .qz-box,
.qz-match-def  { min-height: 48px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.qz-match-def  { padding: 10px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); line-height: 1.45; transition: border-color 0.15s, background 0.15s; }
.qz-match-def.correct { border-color: var(--green); background: rgba(40,167,70,0.07); }
.qz-match-def.wrong   { border-color: #b84030; background: rgba(184,64,48,0.06); }

.qz-correction { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 15px; color: var(--ink); line-height: 1.6; }
.qz-correction-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green); margin-bottom: 6px; }
.qz-loading-text { color: var(--ink-4); }

/* ── Drag correction ── */
.qzc-drag { display: flex; flex-direction: column; gap: 8px; }
.qzc-drag-item { display: flex; align-items: baseline; gap: 10px; }
.qzc-drag-word { flex-shrink: 0; padding: 3px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; background: rgba(184,64,48,0.1); color: #b84030; border: 1px solid rgba(184,64,48,0.25); }
.qzc-drag-why { font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ── Match correction ── */
.qzc-match { display: flex; flex-direction: column; gap: 12px; }
.qzc-match-item { display: flex; flex-direction: column; gap: 4px; }
.qzc-match-term { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.qzc-match-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qzc-wrong-def { padding: 3px 10px; border-radius: 7px; font-size: 13px; background: rgba(184,64,48,0.1); color: #b84030; border: 1px solid rgba(184,64,48,0.25); text-decoration: line-through; }
.qzc-arrow { color: var(--ink-4); font-size: 13px; }
.qzc-correct-def { padding: 3px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; background: rgba(40,167,70,0.1); color: var(--green); border: 1px solid rgba(40,167,70,0.25); }
.qzc-match-why { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.qz-score { font-weight: 700; margin-right: 4px; }
.qz-score.great { color: var(--green); }
.qz-score.ok { color: #c8860a; }
.qz-score.bad { color: #b84030; }
.qz-footer { padding: 14px 32px 24px; flex-shrink: 0; }
.qz-btn-pri { width: 100%; background: var(--green); color: #fff; border: none; border-radius: 12px; padding: 16px; font-size: 17px; font-weight: 600; cursor: pointer; font-family: inherit; transition: opacity 0.15s; }
.qz-btn-pri:hover { opacity: 0.9; }
.qz-btn-pri:disabled { opacity: 0.4; cursor: default; }
.qz-end-header { padding: 32px 32px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.qz-end-title { font-size: 24px; font-weight: 700; color: var(--ink); font-family: 'Fraunces', serif; font-style: italic; margin-bottom: 4px; }
.qz-end-stats { font-size: 14px; color: var(--ink-4); }
.qz-end-list { flex: 1; overflow-y: auto; padding: 18px 32px; display: flex; flex-direction: column; gap: 8px; }
.qze-item { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--ink); line-height: 1.4; }
.qze-ind { flex-shrink: 0; font-weight: 700; margin-top: 1px; }
.qze-item.correct .qze-ind { color: var(--green); }
.qze-item.wrong .qze-ind { color: #b84030; }
.qze-q { flex: 1; }
.qz-end-footer { display: flex; gap: 10px; padding: 18px 32px 28px; flex-shrink: 0; border-top: 1px solid var(--line); }
.qz-btn-sec { flex: 1; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.qz-btn-sec:hover { background: var(--surface-2); }
.dd-focus { width: 100%; box-sizing: border-box; resize: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 13.5px; color: var(--ink); line-height: 1.5; transition: border-color 0.15s; }
.dd-focus:focus { outline: none; border-color: var(--green); }
.dd-footer { padding: 16px 24px; border-top: 1px solid var(--line); flex-shrink: 0; }

/* Drag overlay */
.dd-drag-overlay { position: absolute; inset: 0; z-index: 500; background: rgba(12,28,8,0.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; border-radius: 18px; animation: ddFadeIn 0.12s ease; pointer-events: none; }
.dd-drag-zone { display: flex; flex-direction: column; align-items: center; gap: 14px; border: 2px dashed rgba(255,255,255,0.45); border-radius: 18px; padding: 52px 72px; color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.dd-drag-zone svg { opacity: 0.75; }

/* Docs section */
.dd-section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dd-add-doc-btn { display: flex; align-items: center; gap: 5px; background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; font-family: inherit; }
.dd-add-doc-btn:hover { opacity: 0.85; }
.dd-add-doc-btn:disabled { opacity: 0.5; cursor: wait; }
.dd-doc-hint { font-size: 12px; color: var(--ink-4); line-height: 1.5; margin: 0; }
.dd-doc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.dd-doc-item { display: flex; align-items: center; gap: 9px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; }
.dd-doc-thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.dd-doc-icon { font-size: 22px; line-height: 1; flex-shrink: 0; width: 32px; text-align: center; }
.dd-doc-name { flex: 1; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-doc-remove { flex-shrink: 0; background: none; border: none; padding: 4px; cursor: pointer; color: var(--ink-4); display: grid; place-items: center; border-radius: 5px; transition: background 0.12s, color 0.12s; }
.dd-doc-remove:hover { background: rgba(176,64,48,0.12); color: #b84030; }

/* ── PROVAS ── */
.sim-view { padding: 28px 52px 60px; max-width: 1100px; margin: 0 auto; width: 100%; }
.pv-head { margin-bottom: 18px; }
.pv-head-top { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-bottom: 14px; }
.sim-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.sim-tab { padding: 14px 22px; font-size: 15px; font-weight: 500; color: var(--ink-3); white-space: nowrap; border-bottom: 2px solid transparent; transition: all 0.18s var(--ease); margin-bottom: -1px; }
.sim-tab:hover { color: var(--ink); }
.sim-tab.active { color: var(--ink); border-bottom-color: var(--green); font-weight: 600; }
.sim-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 28px; }
.sim-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; position: relative; overflow: hidden; transition: all 0.2s var(--ease); }
.sim-stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--accent-fill, var(--green-4)), transparent 70%); opacity: 0.6; pointer-events: none; }
.sim-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ss-area { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); font-weight: 600; margin-bottom: 8px; position: relative; z-index: 1; }
.ss-pct { font-family: 'Fraunces', serif; font-size: 40px; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); line-height: 1; position: relative; z-index: 1; }
.ss-pct small { font-size: 16px; color: var(--ink-3); margin-left: 2px; }
.ss-bar { height: 6px; background: var(--bg-2); border-radius: 3px; margin: 14px 0 10px; overflow: hidden; position: relative; z-index: 1; }
.ss-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s var(--ease); }
.ss-detail { font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; position: relative; z-index: 1; }
.ss-detail .ok { color: var(--green); font-weight: 600; }
.ss-detail .err { color: var(--rust); font-weight: 600; }
.prova-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 4px; }

/* ── ENEM Dashboard ── */
.enem-layout { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.enem-main-grid { display: grid; grid-template-columns: 250px 1fr; gap: 18px; min-height: 520px; }
.enem-areas { display: flex; flex-direction: column; gap: 8px; }
.enem-area-card { flex: 1; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: all 0.18s var(--ease); text-align: left; width: 100%; }
.enem-area-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.enem-area-card.active { background: var(--surface); border-color: var(--area-color, var(--green)); }
.enem-area-name { font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 5px; }
.enem-area-pct { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 400; color: var(--ink); line-height: 1; }
.enem-area-bar { height: 4px; background: var(--bg-2); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.enem-area-bar-fill { height: 100%; border-radius: 2px; transition: width 0.7s var(--ease); }
.enem-start-btn { width: 100%; justify-content: center; font-size: 15px; padding: 16px; }
.enem-detail { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; overflow-y: auto; }
.enem-detail-header { margin-bottom: 20px; }
.enem-detail-bar-row { display: flex; align-items: center; gap: 10px; }
.enem-detail-bar { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.enem-detail-bar-fill { height: 100%; border-radius: 3px; background: var(--ink); transition: width 0.7s var(--ease); }
.enem-detail-bar-pct { font-size: 12px; font-weight: 700; color: var(--ink); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.enem-subjects-heading { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 12px; }
.enem-subject { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.enem-subject:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.enem-zero { color: var(--ink-4); font-size: 14px; line-height: 1.7; padding: 16px 0; }
.enem-subj-list { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.enem-subj-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.enem-subj-name { font-size: 14px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.enem-subj-pct { font-size: 14px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.enem-subj-bar { height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.enem-subj-bar-fill { height: 100%; border-radius: 3px; transition: width 0.7s var(--ease); }
.enem-topic-list { display: flex; flex-direction: column; gap: 4px; }
.enem-topic-item { display: flex; align-items: flex-start; justify-content: space-between; padding: 5px 8px; border-radius: 7px; background: var(--surface); }
.enem-topic-item.weak { background: rgba(180,64,48,0.07); }
.enem-topic-item.strong { background: rgba(40,167,70,0.07); }
.enem-topic-name { font-size: 12.5px; color: var(--ink-3); flex: 1; margin-right: 8px; }
.enem-topic-pct { font-size: 12px; font-weight: 700; color: var(--ink-4); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.enem-topic-item.weak .enem-topic-pct { color: #b44030; }
.enem-topic-item.strong .enem-topic-pct { color: var(--green); }

/* ── ENEM Session ── */
.es-overlay { position: fixed; inset: 0; z-index: 200; background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; }
.es-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px 60px; flex: 1; display: flex; flex-direction: column; }
.es-topbar { display: flex; align-items: center; gap: 16px; padding: 18px 0 24px; flex-shrink: 0; }
.es-progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.es-progress-bar { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.es-progress-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.3s var(--ease); }
.es-progress-label { font-size: 13px; color: var(--ink-4); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.es-question { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.es-context { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.7; white-space: pre-wrap; margin-bottom: 4px; }
.es-intro { font-size: 15px; color: var(--ink); line-height: 1.6; font-weight: 500; }
.es-alts { display: flex; flex-direction: column; gap: 8px; }
.es-alt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; transition: all 0.15s var(--ease); text-align: left; width: 100%; }
.es-alt:hover { border-color: var(--line-2); background: var(--surface-2); }
.es-alt.selected { border-color: var(--green); background: rgba(40,167,70,0.18); }
.es-alt-letter { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.es-alt.selected .es-alt-letter { background: var(--green); border-color: var(--green); color: #fff; }
.es-alt-text { font-size: 14px; color: var(--ink); line-height: 1.55; flex: 1; }
.es-nav { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; margin-top: auto; flex-shrink: 0; }
.es-nav-btn { padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 600; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: all 0.15s; }
.es-nav-btn:hover:not(:disabled) { border-color: var(--line-2); color: var(--ink); }
.es-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.es-nav-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.es-nav-btn.primary:hover:not(:disabled) { background: var(--ink-2); }
.es-result-wrap { max-width: 520px; margin: 60px auto; padding: 0 24px 60px; width: 100%; }
.es-result-title { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-style: italic; font-weight: 500; color: var(--ink); margin-bottom: 20px; }
.es-result-score { font-family: 'Fraunces', Georgia, serif; font-size: 72px; font-weight: 400; color: var(--green); line-height: 1; }
.es-result-total { font-size: 32px; color: var(--ink-4); }
.es-result-sub { font-size: 15px; color: var(--ink-3); margin-bottom: 28px; }
.es-result-list { display: flex; flex-direction: column; gap: 6px; }
.es-result-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); }
.es-result-item.correct { border-color: var(--green-3); background: var(--green-4); }
.es-result-item.wrong { border-color: rgba(180,64,48,0.25); background: rgba(180,64,48,0.07); }
.es-ri-num { font-size: 11px; color: var(--ink-4); flex-shrink: 0; width: 18px; font-variant-numeric: tabular-nums; }
.es-ri-icon { font-weight: 700; flex-shrink: 0; }
.es-result-item.correct .es-ri-icon { color: var(--green); }
.es-result-item.wrong .es-ri-icon { color: #b44030; }
.es-ri-detail { font-size: 13px; color: var(--ink-2); }
/* Session: timer + feedback */
.es-timer { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); margin-left: auto; padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.es-timer.urgent { color: #b44030; border-color: rgba(180,64,48,0.35); background: rgba(180,64,48,0.07); }
.es-feedback { margin-top: 14px; padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.es-feedback.correct { background: var(--green-4); color: var(--green); border: 1px solid var(--green-3); }
.es-alt.correct-alt  { border-color: var(--green) !important; background: rgba(61,140,53,0.35) !important; }
.es-alt.wrong-alt    { border-color: #b44030 !important; background: rgba(180,64,48,0.35) !important; }

/* Balão de correção */
.es-correction { margin-top: 16px; border-radius: 12px; overflow: hidden; border: 1.5px solid #b44030; }
.es-correction-header { background: #b44030; color: #fff; padding: 11px 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.01em; }
.es-correction-body { display: flex; flex-direction: column; }
.es-ca { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.es-ca:first-child { border-top: none; }
.es-ca-letter { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-top: 1px; }
.es-ca-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.es-ca-wrong  { background: rgba(180,64,48,0.05); }
.es-ca-wrong .es-ca-letter  { background: rgba(180,64,48,0.15); color: #b44030; border: 1.5px solid rgba(180,64,48,0.4); }
.es-ca-wrong .es-ca-text    { color: var(--ink); font-weight: 500; }
.es-ca-correct { background: rgba(40,167,70,0.04); }
.es-ca-correct .es-ca-letter { background: var(--green-4); color: var(--green); border: 1.5px solid var(--green-3); }
.es-ca-correct .es-ca-text   { color: var(--ink); font-weight: 500; }
.es-ca-other .es-ca-letter  { background: var(--bg-2); color: var(--ink-3); border: 1px solid var(--line); }

/* Loading da correção */
.es-correction-loading { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); font-weight: 500; }
.es-correction-spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--green); border-radius: 50%; flex-shrink: 0; animation: spin 0.7s linear infinite; }
.es-q-img { display: block; max-width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; margin-bottom: 4px; }
.es-q-source { display: block; font-size: 11px; color: var(--ink-4); margin-top: 10px; line-height: 1.4; }
.es-q-meta { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 4px; }
.es-alt-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.es-alt-img { max-width: 100%; border-radius: 6px; }

/* ENEM highlight button */
.es-qhead-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: -4px; }
.es-hl-btn {
  flex-shrink: 0; width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--ink-4);
  transition: color 0.15s, transform 0.12s;
}
.es-hl-btn:hover:not(:disabled) { color: var(--ink-2); transform: scale(1.12); }
.es-hl-btn.active { color: #b08800; }
.es-hl-btn.active .hl-bulb-fill { fill: #f5c83a; }
.es-hl-btn:disabled { opacity: 0.45; cursor: default; }

@keyframes bulb-flicker {
  0%         { color: var(--ink-4); opacity: 0.35; }
  8%         { color: #d4a800;      opacity: 1;    }
  11%        { color: var(--ink-4); opacity: 0.2;  }
  22%        { color: #b08800;      opacity: 0.85; }
  25%        { color: var(--ink-4); opacity: 0.25; }
  50%        { color: #d4a800;      opacity: 1;    }
  53%        { color: var(--ink-4); opacity: 0.2;  }
  70%        { color: #b08800;      opacity: 0.9;  }
  73%        { color: var(--ink-4); opacity: 0.3;  }
  88%        { color: #d4a800;      opacity: 1;    }
  100%       { color: var(--ink-4); opacity: 0.35; }
}
@keyframes bulb-fill-flicker {
  0%         { fill: transparent; }
  8%         { fill: #f5e090;     }
  11%        { fill: transparent; }
  22%        { fill: #f5c83a;     }
  25%        { fill: transparent; }
  50%        { fill: #f5e090;     }
  53%        { fill: transparent; }
  70%        { fill: #f5c83a;     }
  73%        { fill: transparent; }
  88%        { fill: #f5e090;     }
  100%       { fill: transparent; }
}
.hl-bulb-loading { animation: bulb-flicker 2s ease-in-out infinite; }
.hl-bulb-loading .hl-bulb-fill { animation: bulb-fill-flicker 2s ease-in-out infinite; }

/* Bloco de imagem + balão */
.es-img-block { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.es-img-block .es-q-img { flex-shrink: 1; max-width: 100%; margin-bottom: 0; }
.es-img-hint {
  position: relative;
  background: var(--green);
  color: #fff;
  border-radius: 12px;
  padding: 28px 14px 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 500;
  min-width: 150px;
  max-width: 220px;
  flex-shrink: 0;
}
.es-img-hint::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--green);
}
.es-img-hint-close {
  position: absolute;
  top: 7px; right: 9px;
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  font-size: 16px; font-weight: 700;
  cursor: pointer; padding: 2px 5px;
  border-radius: 4px; line-height: 1;
  transition: color 0.12s, background 0.12s;
}
.es-img-hint-close:hover { color: #fff; background: rgba(255,255,255,0.15); }

/* ── REDAÇÃO ─────────────────────────────────────────────────── */
.rd-view { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 28px 32px; overflow: hidden; }

/* Toggle Padrão / ENEM */
.rd-header { display: flex; align-items: center; gap: 16px; flex-shrink: 0; width: 100%; max-width: 640px; }
.rd-toggle { display: inline-flex; position: relative; background: var(--bg-3); border-radius: 20px; padding: 3px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.08); }
.rd-toggle-pill { position: absolute; top: 3px; left: 3px; width: 72px; bottom: 3px; background: var(--green); border-radius: 16px; transition: transform 0.22s var(--ease); pointer-events: none; }
.rd-toggle-btn { position: relative; z-index: 1; width: 72px; padding: 6px 0; border: none; background: none; font-size: 12px; font-weight: 700; letter-spacing: 0.01em; color: var(--ink-3); cursor: pointer; border-radius: 16px; transition: color 0.2s; text-align: center; }
.rd-toggle-btn.active { color: #fff; }
.rd-stats { display: flex; gap: 14px; font-size: 12px; color: var(--ink-4); font-weight: 500; margin-left: auto; }

/* Sub-escolha ENEM */
.rd-sub-choice { flex: 1; display: flex; flex-direction: column; gap: 10px; max-width: 460px; width: 100%; justify-content: center; }
.rd-sub-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 20px 22px; cursor: pointer; text-align: left; transition: box-shadow 0.18s, border-color 0.18s; display: flex; flex-direction: column; gap: 5px; }
.rd-sub-card:hover { border-color: var(--green-3); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.rd-sub-card-label { font-size: 15px; font-weight: 700; color: var(--ink); }
.rd-sub-card-desc { font-size: 13px; color: var(--ink-3); line-height: 1.6; }

/* Body do editor */
.rd-body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; width: 100%; max-width: 640px; }
.rd-view.enem .rd-header,
.rd-view.enem .rd-body { max-width: 964px; }
.rd-submode-tabs { display: flex; gap: 4px; }
.rd-submode-tab { padding: 5px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: none; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; transition: border-color 0.18s, color 0.18s, background 0.18s; }
.rd-submode-tab.active { border-color: var(--green); color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.rd-submode-tab:hover:not(.active) { border-color: var(--ink-3); color: var(--ink); }

/* Barra de tema (Treinar) */
.rd-tema-bar { flex-shrink: 0; background: var(--green); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.rd-tema-bar-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.65); flex-shrink: 0; }
.rd-tema-bar-titulo { font-size: 13.5px; font-weight: 600; color: #fff; flex: 1; }
.rd-slot { flex: 1; overflow: hidden; }
.rd-slot-text { font-size: 13px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rd-slot.spinning .rd-slot-text { animation: slot-blur 0.08s linear infinite; }
@keyframes slot-blur { 0%,100%{opacity:1} 50%{opacity:0.25} }
@keyframes rd-idle-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.rd-slot-btn { padding: 7px 14px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.15); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background 0.15s; flex-shrink: 0; }
.rd-slot-btn:hover:not(:disabled) { background: rgba(255,255,255,0.25); }
.rd-slot-btn:disabled { opacity: 0.5; cursor: default; }
.rd-slot-btn-sm { padding: 5px 12px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.15); color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background 0.15s; }
.rd-slot-btn-sm:hover { background: rgba(255,255,255,0.25); }

/* Campo de tema (Corrigir) */
.rd-theme-input { width: 100%; padding: 0 14px; height: 52px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.15s; box-sizing: border-box; flex-shrink: 0; }
.rd-theme-input:focus { border-color: var(--green); }

/* Layout principal editor + painel */
.rd-main-row { flex: 1; display: flex; gap: 14px; min-height: 0; }

/* Paper editor */
.rd-paper-wrap { flex: 1; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05); }
.rd-textarea { flex: 1; background: transparent; border: none; padding: 20px 20px; font-family: inherit; font-size: 15px; color: var(--ink); line-height: 1.85; resize: none; outline: none; }
.rd-photo-preview-wrap { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.rd-photo-preview { width: 100%; height: 100%; object-fit: cover; }
.rd-photo-remove { background: none; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; transition: all 0.15s; }
.rd-photo-remove:hover { border-color: #c0392b; color: #c0392b; }
.rd-paper-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); flex-shrink: 0; gap: 10px; }
.rd-photo-btn { display: flex; align-items: center; gap: 6px; background: none; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.rd-photo-btn:hover { border-color: var(--ink-4); color: var(--ink-2); }
.rd-editor-area { position: relative; flex: 1; display: flex; flex-direction: column; }
.rd-textarea.rd-blurred { filter: blur(4px); pointer-events: none; user-select: none; opacity: 0.7; }
.rd-idle-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; backdrop-filter: blur(1px); animation: rd-idle-in 0.28s var(--transition) both; }
.rd-idle-btn { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 24px; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: border-color 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s; box-shadow: 0 4px 18px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.06); letter-spacing: 0.01em; }
.rd-idle-btn:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.rd-idle-btn--photo { background: var(--surface-2); }
.rd-idle-btn--photo:hover { border-color: var(--ink-3); color: var(--ink); transform: translateY(-2px); }
.rd-idle-or { font-size: 11px; color: var(--ink-4); font-style: italic; letter-spacing: 0.03em; }
.rd-submit-btn { padding: 9px 24px; border-radius: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; background: var(--green); color: #fff; border: none; cursor: pointer; transition: background 0.15s, opacity 0.15s, box-shadow 0.15s, transform 0.15s; white-space: nowrap; box-shadow: 0 2px 10px color-mix(in srgb, var(--green) 35%, transparent); }
.rd-submit-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.rd-submit-btn:hover:not(:disabled) { background: var(--green-2); transform: translateY(-1px); box-shadow: 0 5px 18px color-mix(in srgb, var(--green) 45%, transparent); }
.rd-err-msg { font-size: 12px; color: #c0392b; font-weight: 500; flex: 1; }
.rd-back-btn { background: none; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 5px 11px; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.rd-back-corner { position: absolute; top: 12px; left: 8px; background: none; border: none; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--line-2); padding: 4px 8px; line-height: 1; transition: color 0.15s; z-index: 2; }
.rd-back-corner:hover { color: var(--ink-3); }
.rd-header--result { max-width: 1200px; }
.rd-back-btn:hover { background: var(--surface); color: var(--ink); }

/* Painel de competências */
.rd-comp-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.rd-comp-stack { display: flex; flex-direction: column; gap: 5px; width: 310px; flex-shrink: 0; align-self: stretch; min-height: 0; }
.rd-nota-total { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.rd-suggestion { background: var(--surface); border: 1.5px solid var(--green); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; animation: rd-idle-in 0.22s var(--transition) both; }
.rd-suggestion-titulo { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.rd-suggestion-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.rd-suggestion-actions { display: flex; gap: 8px; }
.rd-suggestion-accept { padding: 7px 14px; border-radius: 8px; background: var(--green); color: #fff; border: none; font-size: 12px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.rd-suggestion-accept:hover { background: var(--green-2); }
.rd-suggestion-dismiss { padding: 7px 14px; border-radius: 8px; background: none; border: 1.5px solid var(--line); color: var(--ink-3); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.rd-suggestion-dismiss:hover { border-color: var(--ink-3); color: var(--ink); }
.rd-nota-total-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); }
.rd-nota-total-score { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 30px; font-weight: 400; color: var(--ink-4); line-height: 1; margin: 2px 0 4px; }
.rd-nota-total-hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.55; }
.rd-comp-card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 10px 12px 10px 11px; display: flex; flex-direction: column; gap: 4px; transition: border-left-color 0.3s; flex-shrink: 0; }
.rd-comp-card-head { display: flex; align-items: center; gap: 6px; }
.rd-comp-card-comment { flex: 1; font-size: 11px; color: var(--ink-4); line-height: 1.5; overflow: hidden; font-style: italic; }
.rd-comp-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-4); }
.rd-comp-item-write { display: flex; flex-direction: column; gap: 3px; }
.rd-comp-item-head { display: flex; align-items: baseline; gap: 6px; }
.rd-comp-item-desc { font-size: 11px; color: var(--ink-4); }
.rd-comp-label { font-size: 11px; font-weight: 700; font-family: 'Fraunces', Georgia, serif; font-style: italic; color: var(--ink-3); flex-shrink: 0; letter-spacing: 0.02em; }
.rd-comp-bar-wrap { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.rd-comp-bar { height: 100%; border-radius: 3px; transition: width 0.6s var(--ease); }
.rd-comp-score { font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; font-family: 'Fraunces', Georgia, serif; }
.rd-comp-hint { font-size: 11px; color: var(--ink-4); line-height: 1.5; margin-top: 2px; }
.rd-comp-row { display: flex; align-items: center; gap: 8px; }
.rd-comp-row.total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.rd-comp-score.total { font-size: 14px; color: var(--ink); }
.rd-comp-divider { height: 1px; background: var(--line); }
/* Card expansível */
.rd-comp-expand-icon { font-size: 14px; color: var(--ink-3); margin-left: 4px; flex-shrink: 0; }
.rd-comp-expanded { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); max-height: 180px; overflow-y: auto; scrollbar-width: none; }
.rd-comp-expanded::-webkit-scrollbar { display: none; }
.rd-comp-errors { display: flex; flex-direction: column; gap: 5px; }
.rd-comp-err-item { display: flex; align-items: flex-start; gap: 7px; }
.rd-comp-err-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.rd-comp-err-text { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
/* Pins no fundo do card expandido */
.rd-comp-pins { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.rd-comp-pin-btn { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; cursor: pointer; transition: background 0.12s; border: 1px solid var(--line); background: var(--surface-2); }
.rd-comp-pin-btn:hover { background: var(--line); transform: translateY(-1px); }

/* Loading */
.rd-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.rd-loading-spinner { width: 36px; height: 36px; border: 3px solid var(--line-2); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rd-loading-text { font-size: 15px; font-weight: 600; color: var(--ink); }
.rd-loading-sub { font-size: 13px; color: var(--ink-4); }

/* Resultado */
.rd-legend { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.rd-legend--header { margin-left: auto; }
.rd-legend-chip { display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; border: 1.5px solid; font-size: 12px; font-weight: 500; }
.rd-legend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
/* Layout 3 colunas do resultado */
.rd-result-layout { flex: 1; display: flex; gap: 14px; min-height: 0; width: 100%; max-width: 1200px; overflow: hidden; }
.rd-result-left { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.rd-result-left::-webkit-scrollbar { display: none; }
.rd-result-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rd-result-center .rd-paper-wrap { flex: 1; }
.rd-result-right { width: 264px; flex-shrink: 0; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; scrollbar-width: none; }
.rd-result-right::-webkit-scrollbar { display: none; }
/* texto grifado — versão standalone e versão embedded no paper */
.rd-result-text { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 22px 34px; flex: 1; overflow-y: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.07); scrollbar-width: none; }
.rd-result-text::-webkit-scrollbar { display: none; }
.rd-result-text--embedded { background: none; border: none; border-radius: 0; box-shadow: none; padding: 20px 22px 20px 34px; flex: 1; overflow-y: auto; overflow-x: clip; scrollbar-width: none; }
.rd-result-text--embedded::-webkit-scrollbar { display: none; }
.rd-result-content { font-size: 13.5px; color: var(--ink); line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.rd-mark { border-radius: 2px; cursor: pointer; transition: filter 0.12s; }
.rd-mark:hover { filter: brightness(0.82); }
.rd-mark--active { filter: brightness(0.55) saturate(2) !important; outline: 2px solid; outline-offset: 1px; transition: none; }
.rd-pin { display: inline-block; cursor: pointer; margin: 0 2px; transition: transform 0.12s var(--ease); }
.rd-pin:hover { transform: translateY(-2px); }
.rd-tooltip { position: absolute; z-index: 100; border: 1.5px solid; border-radius: 10px; padding: 10px 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.22); max-width: 260px; min-width: 160px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; margin-top: 6px; }
.rd-tooltip--pinned { pointer-events: auto; }
.rd-tooltip-cat { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.rd-tooltip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.rd-tooltip-exp { font-size: 12.5px; line-height: 1.5; }
.rd-tooltip-corr { font-size: 12px; font-weight: 600; }
.rd-feedback { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; flex-shrink: 0; }
.rd-feedback-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-4); margin-bottom: 8px; }
.rd-feedback-text { font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.rd-feedback-errs { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rd-feedback-err-item { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; padding: 3px 0; border-radius: 6px; transition: background 0.12s; }
.rd-feedback-err-item:hover { background: rgba(0,0,0,0.04); }
.rd-feedback-err-pin { flex-shrink: 0; margin-top: 2px; }
.rd-feedback-err-text { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
/* Painel de urgência */
.rd-urgency-panel { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.rd-urgency-group { border: 1.5px solid; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.rd-urgency-label { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.rd-urgency-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.rd-urgency-item { display: flex; align-items: baseline; gap: 8px; cursor: pointer; padding: 2px 0; border-radius: 6px; transition: background 0.12s; }
.rd-urgency-item:hover { background: rgba(0,0,0,0.04); }
.rd-urgency-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 20px; border: 1px solid; flex-shrink: 0; }
.rd-urgency-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* Dashboard Redação */
.rd-dash-topbar { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 1200px; flex-shrink: 0; }
.rd-btn-new { padding: 8px 18px; border-radius: 10px; background: var(--green); color: #fff; border: none; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.rd-btn-new:hover { background: var(--green-2); }
.rd-dash-filters { display: flex; gap: 4px; margin-left: auto; }
.rd-dash-filter-btn { padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: none; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; transition: all 0.15s; }
.rd-dash-filter-btn.active { background: var(--green-3); color: #fff; border-color: var(--green-3); }
.rd-dash-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; width: 100%; max-width: 1200px; flex: 1; min-height: 0; overflow: hidden; }
.rd-dash-summary { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: none; }
.rd-dash-summary::-webkit-scrollbar { display: none; }
.rd-dash-card-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.rd-dash-metric-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); }
.rd-dash-metric-score { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 34px; font-weight: 400; line-height: 1; margin: 2px 0 4px; }
.rd-dash-metric-hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
/* Comp bars */
.rd-dash-comp-list { display: flex; flex-direction: column; gap: 7px; }
.rd-dash-comp-row { display: flex; align-items: center; gap: 6px; }
.rd-dash-comp-label { font-size: 11px; font-weight: 700; font-family: 'Fraunces', Georgia, serif; font-style: italic; color: var(--ink-3); width: 20px; flex-shrink: 0; }
.rd-dash-comp-name { font-size: 11px; color: var(--ink-4); width: 80px; flex-shrink: 0; }
.rd-dash-comp-bar-wrap { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.rd-dash-comp-bar { height: 100%; border-radius: 3px; transition: width 0.6s var(--ease); }
.rd-dash-comp-val { font-size: 12px; font-weight: 700; font-family: 'Fraunces', Georgia, serif; width: 30px; text-align: right; flex-shrink: 0; }
/* Freq erros */
.rd-dash-freq-list { display: flex; flex-direction: column; gap: 5px; }
.rd-dash-freq-item { display: flex; align-items: center; gap: 8px; }
.rd-dash-freq-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.rd-dash-freq-name { font-size: 12px; color: var(--ink-3); flex: 1; }
.rd-dash-freq-count { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* Lista de redações */
.rd-dash-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: none; }
.rd-dash-list::-webkit-scrollbar { display: none; }
.rd-dash-empty { font-size: 13px; color: var(--ink-4); padding: 20px 0; text-align: center; }
.rd-dash-right { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.rd-dash-search { width: 100%; padding: 9px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); outline: none; transition: border-color 0.15s; flex-shrink: 0; }
.rd-dash-search:focus { border-color: var(--green); }
.rd-dash-search::placeholder { color: var(--ink-4); }
.rd-dash-item { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: background 0.15s, border-color 0.15s; }
.rd-dash-item:hover { background: var(--bg-2); }
.rd-dash-item-top { display: flex; align-items: center; gap: 10px; }
.rd-dash-item-date { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.rd-dash-item-mode { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-4); }
.rd-dash-item-mode.enem { color: var(--green); }
.rd-dash-item-score { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 18px; font-weight: 400; margin-left: auto; }
.rd-dash-item-tema { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.rd-dash-item-preview { font-size: 12px; color: var(--ink-4); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rd-dash-item-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rd-dash-chip { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; border: 1px solid; font-variant-numeric: tabular-nums; }
.rd-dash-item-errs { font-size: 11px; color: var(--ink-4); }

/* ENEM Mode Screen */
.enem-ms { display: flex; flex-direction: column; gap: 28px; }
.enem-ms-header { display: flex; align-items: flex-start; gap: 16px; }
.enem-ms-back { background: none; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 7px 14px; transition: background 0.15s, color 0.15s; white-space: nowrap; flex-shrink: 0; margin-top: 3px; }
.enem-ms-back:hover { background: var(--surface); color: var(--ink); }
.enem-ms-heading { display: flex; flex-direction: column; gap: 4px; }
.enem-ms-title { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0; }
.enem-ms-sub { font-size: 14px; color: var(--ink-3); margin: 0; }
.enem-ms-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.enem-ms-card { display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; text-align: left; transition: box-shadow 0.2s, transform 0.18s; }
.enem-ms-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,0.1); transform: translateY(-3px); border-color: var(--mc); }
.enem-ms-card-accent { height: 5px; background: var(--mc); flex-shrink: 0; }
.enem-ms-card-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 14px; flex: 1; }
.enem-ms-card-sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mc); }
.enem-ms-card-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.enem-ms-card-desc { font-size: 13px; color: var(--ink-3); line-height: 1.6; flex: 1; }
.enem-ms-card-cta { padding: 14px 20px; font-size: 13px; font-weight: 700; color: var(--mc); border-top: 1px solid var(--line); }
/* Mode screen: setup steps */
.enem-ms-setup { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; max-width: 520px; display: flex; flex-direction: column; gap: 20px; margin: 0 auto; }
.enem-setup-group { display: flex; flex-direction: column; gap: 8px; }
.enem-setup-label { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.enem-setup-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.enem-setup-chip { background: var(--bg); border: 1.5px solid var(--line); border-radius: 20px; padding: 7px 16px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: border-color 0.18s, color 0.18s; }
.enem-setup-chip:hover { border-color: var(--green-2); color: var(--green); }
.enem-setup-chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.enem-setup-intro { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin: 0; }
.enem-setup-note { font-size: 13px; color: var(--ink-3); margin: 0; }
.enem-guiado-list { display: flex; flex-direction: column; gap: 8px; }
.enem-guiado-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.enem-guiado-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.enem-guiado-text { flex: 1; font-size: 13px; color: var(--ink-2); }
.enem-guiado-pct { font-size: 13px; font-weight: 700; color: #b44030; }
.enem-sim-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  outline: none; cursor: pointer; border: none;
}
.enem-sim-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--green); cursor: pointer;
  border: 2.5px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.15s var(--ease);
}
.enem-sim-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.enem-sim-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--green); cursor: pointer;
  border: 2.5px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.enem-sim-range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-4); margin-top: -4px; }
.enem-sim-info { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-3); padding: 12px 14px; background: var(--bg); border-radius: 10px; border: 1px solid var(--line); }
.enem-sim-info span:nth-child(even) { opacity: 0.3; }
.enem-mode-cta { width: 100%; justify-content: center; }
.enem-ms-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 280px; }
.enem-ms-spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: enem-spin 0.75s linear infinite; }
@keyframes enem-spin { to { transform: rotate(360deg); } }
.enem-ms-loading-text { font-size: 15px; color: var(--ink-3); }

/* ── Provas: filtro de matérias (dropdown) ── */
.pv-seg-drop { position: relative; }
.pv-seg-count { display: inline-flex; align-items: center; justify-content: center; background: var(--green); color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; padding: 0 5px; min-width: 16px; height: 16px; margin-left: 5px; vertical-align: middle; }
.pv-seg-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 190px; }
.pv-seg-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--ink); text-align: left; transition: background 0.12s; }
.pv-seg-item:hover { background: var(--bg-2); }
.pv-seg-item.selected { color: var(--green); font-weight: 600; }
.pv-seg-check { width: 14px; font-size: 11px; color: var(--green); flex-shrink: 0; }
.pv-seg-clear { width: 100%; padding: 7px 10px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 12px; color: var(--ink-3); text-align: center; transition: color 0.12s; }
.pv-seg-clear:hover { color: var(--rust); }

/* ── Nova prova: qty chips ── */
.pv-qty-chips { display: flex; gap: 8px; margin-top: 2px; }
.pv-qty-chip {
  flex: 1; padding: 10px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg);
  font-size: 15px; font-weight: 600; color: var(--ink-3);
  cursor: pointer; transition: all 0.15s;
}
.pv-qty-chip:hover { border-color: var(--green-3); color: var(--ink); }
.pv-qty-chip.active { border-color: var(--green); background: var(--green-4); color: var(--green); }

/* ── Nova prova: toggle ── */
.pv-toggle-row { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.pv-toggle {
  flex-shrink: 0; width: 42px; height: 24px; border-radius: 12px;
  background: var(--surface-2); border: 1.5px solid var(--line);
  position: relative; transition: background 0.2s, border-color 0.2s; cursor: pointer;
}
.pv-toggle.on { background: var(--green); border-color: var(--green); }
.pv-toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink-4); transition: transform 0.2s, background 0.2s;
}
.pv-toggle.on .pv-toggle-thumb { transform: translateX(18px); background: #fff; }
.pv-toggle-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.pv-toggle-hint  { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ── Docs no modal de prova ── */
.pv-doc-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.pv-doc-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.pv-doc-icon { font-size: 13px; flex-shrink: 0; }
.pv-doc-name { flex: 1; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-doc-remove { background: none; border: none; color: var(--ink-4); cursor: pointer; padding: 2px; border-radius: 4px; display: flex; }
.pv-doc-remove:hover { color: #b84030; background: rgba(184,64,48,0.08); }
.pv-add-doc {
  margin-top: 6px; display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  border: 1.5px dashed var(--line-2); background: none;
  font-size: 13px; color: var(--ink-3); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pv-add-doc:hover { border-color: var(--green-3); color: var(--ink); }
.prova-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; cursor: pointer; transition: all 0.2s var(--ease); }
.prova-card.pc-pending { cursor: default; opacity: 0.7; }

/* ── ProvaSession & ProvaResult ── */
.ps-overlay { position: fixed; inset: 0; z-index: 200; background: var(--bg); overflow-y: auto; }
.ps-overlay::-webkit-scrollbar { width: 6px; }
.ps-overlay::-webkit-scrollbar-track { background: transparent; }
.ps-overlay::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.ps-overlay::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
.ps-wrap { max-width: 760px; margin: 0 auto; padding: 32px 40px 60px; box-sizing: border-box; }
.ps-topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.ps-back { background: none; border: none; font-size: 14px; color: var(--ink-3); cursor: pointer; padding: 4px 0; transition: color 0.15s; }
.ps-back:hover { color: var(--ink); }
.ps-info { display: flex; flex-direction: column; gap: 2px; }
.ps-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.ps-meta  { font-size: 12px; color: var(--ink-4); }
.ps-questions { display: flex; flex-direction: column; gap: 16px; }
.ps-question {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.ps-qhead-row { display: flex; align-items: center; justify-content: space-between; }
.ps-qnum  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); }
.ps-hl-btn {
  flex-shrink: 0; width: 34px; height: 34px;
  background: var(--surface-2); border: 1.5px solid var(--line);
  border-radius: 9px; cursor: pointer;
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.12s;
}
.ps-hl-btn:hover:not(:disabled) { border-color: var(--ink-4); transform: scale(1.07); }
.ps-hl-btn.active {
  border-color: #d4a800;
  background: #fef7d6;
  color: #b08800;
  box-shadow: 0 0 10px rgba(220,170,0,0.22);
}
.ps-hl-btn.active .hl-bulb-fill { fill: #f5c83a; }
.ps-hl-btn:disabled { opacity: 0.45; cursor: default; }
mark.hl-mark {
  background: rgba(45, 102, 36, 0.18);
  border-radius: 3px;
  padding: 1px 2px;
  color: inherit;
}
.ps-qtext { font-size: 16px; color: var(--ink); line-height: 1.65; }
.ps-textarea {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg);
  color: var(--ink); font-size: 15px; font-family: inherit;
  line-height: 1.6; resize: vertical; outline: none;
  transition: border-color 0.15s;
}
.ps-textarea:focus { border-color: var(--green); }
.ps-multi-opts { display: flex; flex-direction: column; gap: 8px; }
.ps-multi-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 14px; color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}
.ps-multi-opt:hover { border-color: var(--green-3); background: var(--surface-2); }
.ps-multi-opt.selected { border-color: var(--green); background: var(--green-4); color: var(--green); font-weight: 600; }
.ps-opt-letter {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--ink-3);
}
.ps-multi-opt.selected .ps-opt-letter { background: var(--green); border-color: var(--green); color: #fff; }
.ps-submit-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.ps-answered { font-size: 13px; color: var(--ink-3); }

/* ProvaResult extras */
.pr-header { margin-bottom: 28px; }
.pr-score { font-family: 'Fraunces', serif; font-size: 56px; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.pr-score small { font-size: 24px; color: var(--ink-3); margin-left: 2px; }
.pr-score-sub { font-size: 15px; color: var(--ink-3); margin-top: 6px; }
.pr-question.pr-correct { border-color: rgba(40,167,70,0.3); }
.pr-question.pr-wrong   { border-color: rgba(184,64,48,0.25); }
.pr-qhead { display: flex; align-items: center; gap: 8px; }
.pr-icon { font-size: 15px; font-weight: 700; }
.pr-icon.ok  { color: var(--green); }
.pr-icon.err { color: #b84030; }
.pr-essay-block { display: flex; flex-direction: column; gap: 8px; }
.pr-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
.pr-user-answer { font-size: 14px; color: var(--ink-2); line-height: 1.6; background: var(--bg-2); border-radius: 8px; padding: 10px 12px; }
.pr-opt-correct { border-color: var(--green) !important; background: rgba(40,167,70,0.08) !important; color: var(--green) !important; font-weight: 600; cursor: default; }
.pr-opt-wrong   { border-color: #b84030 !important; background: rgba(184,64,48,0.06) !important; color: #b84030 !important; cursor: default; text-decoration: line-through; opacity: 0.7; }
.pr-opt-dim     { opacity: 0.4; cursor: default; }
.prova-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.prova-badge { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 7px; background: var(--green-4); color: var(--green-ink); margin-bottom: 12px; }
.prova-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 7px; letter-spacing: -0.01em; }
.prova-desc { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; margin-bottom: 14px; }
.prova-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-3); }
.prova-status { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.prova-status.pausado { background: rgba(168,117,28,0.15); color: #6e4812; }
.prova-status.feito   { background: var(--green-4); color: var(--green-ink); }

/* ── TWEAKS ── */
.tweaks-panel { position: fixed; right: 22px; bottom: 22px; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; z-index: 100; animation: tweaks-in 0.3s var(--ease-spring); }
@keyframes tweaks-in { from { opacity: 0; transform: translateY(14px) scale(0.95); } }
.tweaks-title { font-family: 'Fraunces', serif; font-style: italic; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.tweaks-close { color: var(--ink-3); }
.tweaks-row { margin-bottom: 14px; }
.tweaks-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); font-weight: 600; margin-bottom: 8px; }
.accent-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.accent-swatch { aspect-ratio: 1; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: transform 0.12s var(--ease); }
.accent-swatch:hover { transform: scale(1.08); }
.accent-swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink); }
.sidebar-choice { display: flex; gap: 6px; }
.sidebar-choice button { flex: 1; padding: 8px 10px; font-size: 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-weight: 500; transition: all 0.15s var(--ease); }
.sidebar-choice button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── SETTINGS MODAL ── */
/* ── Novidades ── */
.nv-btn-wrap { position: relative; }
.nv-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #c0392b; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.nv-modal { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; animation: slide-up 0.25s var(--ease-spring); }
.nv-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.nv-header h3 { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 22px; font-weight: 500; color: var(--ink); }
.nv-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nv-empty { text-align: center; color: var(--ink-4); font-size: 13px; padding: 24px 0; }
.news-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color 0.15s; }
.news-item:hover { border-color: var(--line-2); }
.news-item.unread { border-left: 2.5px solid var(--green); }
.news-item-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.news-type { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.news-type.comunicado { color: #fff; background: var(--green); }
.news-type.enquete { color: #7c5c00; background: rgba(180,130,0,0.14); border: 1px solid rgba(180,130,0,0.25); }
.news-type.atualizacao { color: #2a5ca8; background: rgba(42,92,168,0.1); border: 1px solid rgba(42,92,168,0.2); }
.news-date { font-size: 11px; color: var(--ink-4); }
.news-item-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.news-item-body { font-size: 13px; color: var(--ink-3); line-height: 1.6; white-space: pre-wrap; }
.poll-options { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.poll-opt { padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all 0.14s; font-family: inherit; text-align: left; }
.poll-opt:hover { border-color: var(--line-2); color: var(--ink); }
.poll-opt.voted { background: var(--green-3); border-color: var(--green); color: #fff; font-weight: 600; }

.overlay { position: fixed; inset: 0; background: rgba(20,12,4,0.48); z-index: 200; display: grid; place-items: center; padding: 24px; animation: fade 0.18s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; max-width: 820px; max-height: 90vh; display: grid; grid-template-columns: 200px 1fr; overflow: hidden; animation: slide-up 0.3s var(--ease-spring); }
@keyframes slide-up { from { opacity: 0; transform: translateY(12px); } }
.modal-sidebar { background: var(--bg-2); border-right: 1px solid var(--line); padding: 20px 12px; }
.modal-sidebar h4 { font-family: 'Fraunces', serif; font-style: italic; font-size: 18px; font-weight: 500; color: var(--ink); margin-bottom: 16px; padding: 0 10px; }
.modal-nav { display: flex; flex-direction: column; gap: 2px; }
.modal-nav button { text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); transition: all 0.15s var(--ease); }
.modal-nav button:hover { background: var(--surface-2); }
.modal-nav button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.modal-body { padding: 32px 36px; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); transition: all 0.15s var(--ease); }
.modal-close:hover { background: var(--bg-2); color: var(--ink); }
.modal h3 { font-family: 'Fraunces', serif; font-style: italic; font-size: 24px; font-weight: 500; margin-bottom: 24px; color: var(--ink); }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 14px; color: var(--ink); }
.settings-row-sub { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.theme-opt { border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; transition: all 0.18s var(--ease); }
.theme-opt:hover { border-color: var(--line-2); transform: translateY(-1px); }
.theme-opt.active { border-color: var(--green); }
.theme-preview { height: 80px; border-radius: 10px; margin-bottom: 8px; position: relative; overflow: hidden; }
.theme-preview::before, .theme-preview::after { content: ''; position: absolute; border-radius: 3px; }
.theme-preview::before { top: 10px; left: 10px; width: 38%; height: 10px; }
.theme-preview::after  { bottom: 10px; left: 10px; right: 10px; height: 44%; border-radius: 6px; }
.theme-opt .theme-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.theme-opt .theme-hint { font-size: 11.5px; color: var(--ink-4); }

/* ── LOGIN ── */
.login-shell { display: grid; place-items: center; height: 100vh; padding: 24px; position: relative; }
.login-watermark { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0.06; z-index: 0; }
.login-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 40px 32px 28px; box-shadow: var(--shadow-lg); max-width: 380px; width: 100%; text-align: center; }
.login-tag { font-size: 14px; color: var(--ink-3); margin-bottom: 28px; line-height: 1.5; max-width: 300px; margin-left: auto; margin-right: auto; }
.login-tag em { font-family: 'Fraunces', serif; font-style: italic; color: var(--green-ink); background: var(--highlight-a); padding: 0 4px; border-radius: 2px; }
.btn-google { width: 100%; padding: 14px; border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 13px; font-size: 14.5px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.18s var(--ease); }
.btn-google:hover { background: var(--surface-2); border-color: var(--ink-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ── LOADING ── */
.app-loading { height: 100vh; display: grid; place-items: center; background: var(--bg); }
.app-loading-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.app-loading-logo { font-family: 'Fraunces', Georgia, serif; font-size: 64px; font-style: italic; font-weight: 700; color: var(--green); letter-spacing: -2px; }
.app-loading-sub { font-size: 13px; color: var(--ink-4); }

/* ── EMPTY STATES ── */
.empty { max-width: 460px; margin: 0 auto; padding: 60px 24px; text-align: center; }
.empty-glyph { font-family: 'Fraunces', Georgia, serif; font-size: 64px; font-style: italic; font-weight: 400; color: var(--ink-4); margin-bottom: 16px; opacity: 0.5; }
.empty h3 { font-family: 'Fraunces', serif; font-style: italic; font-size: 24px; color: var(--ink); margin-bottom: 8px; font-weight: 500; }
.empty p { font-size: 14.5px; color: var(--ink-3); margin-bottom: 22px; line-height: 1.55; }

/* ── MISC ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .main { grid-template-columns: 230px 1fr 250px; }
  :root { --sidebar-w: 230px; --notes-w: 250px; }
}
@media (max-width: 900px) {
  .main, .main.no-right { grid-template-columns: 1fr; }
  .sidebar, .right-sidebar { display: none; }
  .topbar { grid-template-columns: auto 1fr auto; }
}
