/* ═══════════════════════════════════════════════════════
   Egghead — style.css
   Design System: Pastel Study Workspace
   Paleta: Periwinkle + Mint + Peach | Plus Jakarta Sans
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* ── Superfícies ── */
  --bg:                #f8fbff;
  --surface:           #fffefd;
  --surface-2:         #f2f8f6;
  --surface-3:         #f5f1fb;
  --surface-4:         #eaf2f0;
  --surface-5:         #e3e9f2;
  --border:            #d9e3e7;
  --border-soft:       #e8eef2;

  /* ── Texto ── */
  --text-primary:      #20222f;
  --text-secondary:    #4a5262;
  --text-muted:        #758093;

  /* ── Primary (Lavanda) ── */
  --accent:            #746fb6;
  --accent-dark:       #565192;
  --accent-soft:       #eceaff;
  --accent-mid:        #d8d4f6;
  --primary-container: #b9c7ff;

  /* ── Secondary (Mint) ── */
  --success:           #2f7d72;
  --success-soft:      #e8f8f4;
  --success-mid:       #9bdccf;

  /* ── Tertiary (Azure) ── */
  --info:              #58799a;
  --info-soft:         #edf5ff;
  --info-container:    #9fc7df;

  /* ── Warn / Danger ── */
  --warn:              #8f6430;
  --warn-soft:         #f8e7c8;
  --danger:            #a25467;
  --danger-soft:       #fde9ed;

  /* ── Layout ── */
  --sidebar-w:         240px;
  --radius:            16px;
  --radius-sm:         12px;
  --radius-xs:         8px;
  --radius-full:       9999px;

  /* ── Sombras (Soft-UI / Ambient) ── */
  --shadow:            0 10px 25px -5px rgba(87,103,136,.07), 0 4px 10px -3px rgba(0,0,0,.035);
  --shadow-md:         0 20px 50px -12px rgba(87,103,136,.14), 0 8px 20px -6px rgba(0,0,0,.055);
  --shadow-sm:         0 2px 8px rgba(87,103,136,.08);

  /* ── Tipografia ── */
  --font-display:      'Plus Jakarta Sans', sans-serif;
  --font-body:         'Plus Jakarta Sans', sans-serif;

  /* ── Transições ── */
  --transition:        .2s cubic-bezier(.4,0,.2,1);
  --transition-slow:   .35s cubic-bezier(.4,0,.2,1);
}

/* ════════════════ RESET ══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* ════════════════ APP WRAPPER ══ */
#app-wrapper {
  width: 100%;
  min-height: 100vh;
  position: relative;
  flex: 1;
}

/* ════════════════ SIDEBAR ══ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition-slow);
}

.sidebar-brand {
  display: block;
  padding: 8px 8px 6px;
  border-bottom: 1px solid var(--border-soft);
  overflow: visible;
}

.sidebar-brand-banner {
  display: block;
  width: 114%;
  max-width: none;
  height: auto;
  margin-left: -7%;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  filter: drop-shadow(0 8px 14px rgba(17, 24, 39, .12));
}

.sidebar-brand-title {
  display: none !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.brand-icon {
  width: 78px; height: 78px;
  background: #fff;
  color: var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800; font-size: 17px;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid rgba(17, 24, 39, .14);
  box-shadow: 0 14px 30px rgba(116,111,182,.28);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  display: block;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.3px;
  color: var(--text-primary);
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-full);
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.nav-item:hover { background: var(--surface-2); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-icon img { width: 18px; height: 18px; display: block; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
}
.sidebar-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.sidebar-toggle {
  display: none;
  position: fixed; top: 16px; left: 16px; z-index: 300;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  box-shadow: var(--shadow);
}
.sidebar-toggle span { display: block; width: 18px; height: 2px; background: var(--text-primary); border-radius: 2px; }

/* ════════════════ MAIN ══ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 36px 40px;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-w));
  background: var(--bg);
}

.page { display: none; animation: fadeUp .3s ease; }
.page.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════ PAGE HEADER ══ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 12px;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.6px;
  color: var(--text-primary);
}
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; font-weight: 400; }

/* ════════════════ CARDS ══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
}
.card-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .1px;
  color: var(--text-primary);
}
.card-body { padding: 24px; }

/* ════════════════ STAT CARDS ══ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border-soft);
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card.accent::before { background: linear-gradient(90deg, var(--accent), var(--primary-container)); }
.stat-card.warn::before   { background: linear-gradient(90deg, var(--warn), #f59e0b); }

.stat-icon {
  font-size: 18px;
  width: 46px; height: 46px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  color: var(--text-muted);
}
.stat-card.accent .stat-icon { background: var(--accent-soft); color: var(--accent); }
.stat-card.warn   .stat-icon { background: var(--warn-soft); color: var(--warn); }

.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.6px;
  color: var(--text-primary);
  line-height: 1.1;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

/* ════════════════ GRIDS ══ */
.grid-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.grid-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 0; }

/* ════════════════ BUTTONS ══ */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(103,75,181,.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(103,75,181,.4);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent-soft);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-mid);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(186,26,26,.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-danger:hover { background: #ffc5bc; }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--surface-2); color: var(--text-primary); }

/* ════════════════ FORMS ══ */
.form-card { margin-bottom: 24px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.form-full { grid-column: 1 / -1; }
.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 400;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--border);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(103,75,181,.1);
}
.form-actions { grid-column: 1 / -1; padding-top: 4px; }
.file-input { padding: 7px !important; cursor: pointer; }
.img-preview { margin-top: 8px; max-height: 160px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); object-fit: contain; }

/* ── Form section headers ── */
.form-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.form-section-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; margin-top: -4px; }

/* ════════════════ TABELA DE MATÉRIAS ══ */
.materias-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.materias-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.materias-table thead th {
  background: var(--surface-2);
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.materias-table tbody tr { border-bottom: 1px solid var(--surface-3); }
.materias-table tbody tr:last-child { border-bottom: none; }
.materias-table tbody tr:hover { background: var(--surface-2); }
.materias-table td { padding: 8px 14px; vertical-align: middle; }
.materias-table td:first-child { font-weight: 600; white-space: nowrap; min-width: 130px; }
.mat-input {
  width: 80px;
  padding: 6px 10px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-xs);
  font-family: inherit; font-size: 13.5px;
  text-align: center;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.mat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(103,75,181,.1);
}
.mat-pct { font-weight: 700; font-size: 13px; min-width: 48px; display: inline-block; }
.mat-pct.high   { color: var(--success); }
.mat-pct.mid    { color: var(--accent); }
.mat-pct.low    { color: var(--warn); }
.mat-pct.danger { color: var(--danger); }
.mat-pct.empty  { color: var(--text-muted); }
.table-total-row td {
  padding: 10px 14px;
  background: var(--surface-2);
  border-top: 2px solid var(--border-soft);
  font-size: 14px;
}

/* ════════════════ ENEM ÁREAS ══ */
.enem-areas-wrap { display: flex; flex-direction: column; gap: 24px; }
.enem-area-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-full);
  display: inline-block;
}

/* ════════════════ SIMULADOS LIST ══ */
.simulados-list { display: flex; flex-direction: column; gap: 10px; }
.sim-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.sim-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-mid);
}
.sim-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 120px; }
.sim-name { font-weight: 700; font-size: 14.5px; color: var(--text-primary); }
.sim-meta { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.sim-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pct-badge { font-family: var(--font-display); font-weight: 800; font-size: 18px; min-width: 56px; text-align: right; }
.pct-badge.high   { color: var(--success); }
.pct-badge.mid    { color: var(--accent); }
.pct-badge.low    { color: var(--warn); }
.pct-badge.danger { color: var(--danger); }
.diff-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.diff-facil   { background: var(--success-soft); color: var(--success); }
.diff-medio   { background: var(--warn-soft); color: var(--warn); }
.diff-dificil { background: var(--danger-soft); color: var(--danger); }
.sim-actions { display: flex; gap: 6px; }

/* ── Matérias mini no simulado ── */
.sim-materias-mini {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.mini-badge {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-weight: 600;
}
.mini-badge.high   { background: var(--success-soft); border-color: var(--success-mid); color: var(--success); }
.mini-badge.mid    { background: var(--accent-soft); border-color: var(--accent-mid); color: var(--accent); }
.mini-badge.low    { background: var(--warn-soft); border-color: #fde68a; color: var(--warn); }
.mini-badge.danger { background: var(--danger-soft); border-color: #ffc5bc; color: var(--danger); }

/* ════════════════ RANKING ══ */
.ranking-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.ranking-item:last-child { border-bottom: none; }
.rank-pos { font-family: var(--font-display); font-weight: 800; font-size: 12px; color: var(--text-muted); width: 20px; text-align: center; }
.rank-name { flex: 1; font-size: 14px; font-weight: 600; }
.rank-bar-wrap { width: 120px; height: 8px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.rank-bar { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--info-container), var(--success-mid)); transition: width .6s cubic-bezier(.4,0,.2,1); }
.rank-pct { font-weight: 700; font-size: 13px; min-width: 40px; text-align: right; }

/* ── Último simulado ── */
.last-sim-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--border-soft); }
.last-sim-row:last-child { border-bottom: none; }
.last-sim-label { color: var(--text-muted); font-weight: 500; }
.last-sim-value { font-weight: 700; }

/* ════════════════ INTERVALOS DE REVISÃO ══ */
.intervalos-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.intervalo-tag {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13.5px;
}
.intervalo-tag label { font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.intervalo-tag input {
  width: 58px; padding: 4px 8px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-xs);
  font-family: inherit; font-size: 13.5px; text-align: center;
  outline: none; background: var(--surface);
  transition: border-color var(--transition);
}
.intervalo-tag input:focus { border-color: var(--accent); }
.intervalo-tag .btn-remove-int {
  background: none; border: none;
  color: var(--text-muted); font-size: 14px;
  cursor: pointer; padding: 2px 4px;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition);
  line-height: 1;
}
.intervalo-tag .btn-remove-int:hover { color: var(--danger); background: var(--danger-soft); }

/* ════════════════ REVISÃO ESPAÇADA ══ */
.revisao-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.revisao-item.overdue { border-left: 3px solid var(--danger); }
.revisao-item.today   { border-left: 3px solid var(--accent); }
.revisao-item.soon    { border-left: 3px solid var(--warn); }
.revisao-item.done    { opacity: .5; }
.rev-info { flex: 1; min-width: 0; }
.rev-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rev-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* ════════════════ META / METAS ══ */
.meta-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.meta-input-wrap { display: flex; align-items: center; gap: 8px; }
.meta-input {
  padding: 8px 12px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; width: 80px;
  outline: none;
  background: var(--surface-2);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.meta-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(103,75,181,.1); }

/* ════════════════ BACKUP ══ */
.backup-grid { display: flex; flex-direction: column; gap: 20px; }
.backup-item { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.backup-icon {
  width: 46px; height: 46px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700;
  flex-shrink: 0;
}
.backup-item > div:nth-child(2) { flex: 1; min-width: 160px; }
.backup-item strong { font-size: 14px; font-weight: 700; display: block; margin-bottom: 2px; }
.backup-item p { font-size: 13px; color: var(--text-muted); }
.import-area { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ════════════════ PROGRESSO METAS ══ */
.meta-progress-item { margin-bottom: 16px; }
.meta-progress-header { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.meta-progress-name { font-weight: 700; }
.meta-progress-pct  { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.progress-bar-wrap { height: 10px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--info-container), var(--success-mid));
  transition: width .7s cubic-bezier(.4,0,.2,1);
}

/* ════════════════ TABS ══ */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--border-soft);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.hub-tabs {
  margin-top: -12px;
}

/* ════════════════ CHARTS ══ */
.chart-container { position: relative; height: 280px; }

/* ════════════════ MODAL ══ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(29,26,33,.5);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%; max-width: 520px; max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(103,75,181,.2), 0 10px 30px rgba(0,0,0,.1);
  animation: slideUp .25s ease;
  border: 1px solid var(--border-soft);
}
.modal-lg { max-width: 700px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-header h3 { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.modal-body { padding: 24px; }
.modal-row {
  display: flex; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--surface-3);
  font-size: 14px;
}
.modal-row:last-child { border-bottom: none; }
.modal-row-label { color: var(--text-muted); font-weight: 500; }
.modal-row-value { font-weight: 700; }
.modal-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 18px 0 10px;
}
.modal-img { max-height: 300px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); width: 100%; margin-top: 8px; }

/* ── Modal mat table ── */
.modal-mat-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 4px; }
.modal-mat-table th {
  text-align: left; padding: 8px 10px;
  font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}
.modal-mat-table td { padding: 8px 10px; border-bottom: 1px solid var(--surface-3); }
.modal-mat-table tr:last-child td { border-bottom: none; }
.modal-mat-table .col-pct { font-weight: 700; }

/* ════════════════ TOAST ══ */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--text-primary);
  color: #fff;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 900;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ════════════════ HELPERS ══ */
.hidden { display: none !important; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.empty-state {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 28px 0;
  font-weight: 500;
}

/* ── Próximas revisões ── */
.next-rev-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px; gap: 8px;
}
.next-rev-item:last-child { border-bottom: none; }
.next-rev-name { font-weight: 600; flex: 1; }
.next-rev-date {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  white-space: nowrap;
}
.next-rev-date.overdue { background: var(--danger-soft); color: var(--danger); }
.next-rev-date.today   { background: var(--accent-soft); color: var(--accent); }
.next-rev-date.soon    { background: var(--warn-soft); color: var(--warn); }
.next-rev-date.future  { background: var(--surface-3); color: var(--text-secondary); }

/* ════════════════ RESPONSIVE ══ */
@media (max-width: 1180px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-md); }
  .sidebar-toggle { display: flex; }
  .sidebar.open + .sidebar-toggle { display: none; }
  .main-content { margin-left: 0; max-width: 100vw; padding: 64px 16px 24px; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .erros-list { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .backup-item { flex-direction: column; align-items: flex-start; }
  .materias-table-wrap { font-size: 13px; }
  .grid-3col { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
}

/* ════════════════ REPERTÓRIOS ══ */
.repertorios-list { display: flex; flex-direction: column; gap: 14px; }

.repertorio-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--rep-accent, var(--accent));
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.repertorio-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}
.repertorio-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.repertorio-eixo-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.repertorio-eixo {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--accent);
  margin-bottom: 10px;
  padding: 4px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-full);
  display: inline-block;
}
.repertorio-texto {
  font-size: 14px; line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.repertorio-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ════════════════ PERSONALIZAÇÃO DE CORES ══ */
.cores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.cor-item { display: flex; flex-direction: column; gap: 6px; }
.cor-item label {
  font-size: 12px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .05em;
}
.cor-input-wrap { display: flex; align-items: center; gap: 8px; }
.cor-picker {
  width: 44px; height: 38px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 2px; cursor: pointer;
  background: var(--surface);
  flex-shrink: 0;
}
.cor-hex {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: monospace; font-size: 14px;
  background: var(--surface-2); color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.cor-hex:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(103,75,181,.1); }

/* ════════════════ CRONOGRAMA ══ */
.crono-table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}
.crono-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 700px;
}
.crono-table thead th {
  background: var(--surface-2);
  padding: 10px 12px;
  text-align: center;
  font-size: 11.5px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 2px solid var(--border-soft);
  white-space: nowrap;
}
.crono-th-hora { text-align: left !important; min-width: 90px; }
.crono-hora-cell {
  padding: 0 12px;
  font-weight: 700; font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-2);
  border-right: 2px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
  min-width: 90px;
  position: relative;
}
.crono-del-hora {
  background: none; border: none;
  color: var(--text-muted); font-size: 10px;
  cursor: pointer; padding: 2px 4px;
  border-radius: var(--radius-xs);
  margin-left: 6px; vertical-align: middle;
  transition: color var(--transition), background var(--transition);
  line-height: 1;
}
.crono-del-hora:hover { color: var(--danger); background: var(--danger-soft); }
.crono-slot-cell {
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  text-align: center;
  cursor: pointer;
  min-width: 110px; height: 52px;
  vertical-align: middle;
  transition: filter var(--transition), transform var(--transition);
  position: relative;
}
.crono-slot-cell:hover { filter: brightness(.93); transform: scale(1.02); z-index: 1; }
.crono-slot-text { font-size: 12.5px; font-weight: 700; line-height: 1.3; display: block; word-break: break-word; }
.crono-empty-slot { font-size: 18px; color: var(--border-soft); font-weight: 300; }
.crono-time-input {
  padding: 9px 12px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface-2); color: var(--text-primary);
}
.crono-time-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(103,75,181,.1); }
.crono-cor-quick {
  width: 22px; height: 22px;
  border: 2px solid transparent; border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.crono-cor-quick:hover { transform: scale(1.25); border-color: var(--accent); }

/* ════════════════ ENEM DIA BLOCKS ══ */
.enem-dia-block {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  background: var(--surface-2);
}
.enem-dia-title {
  font-family: var(--font-display);
  font-weight: 800; font-size: 12px;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-soft);
}
.enem-dia-block .enem-area-block { margin-bottom: 14px; }
.enem-dia-block .enem-area-block:last-child { margin-bottom: 0; }

/* ════ SELEÇÃO DE FONTES ════ */
.fontes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 4px;
}
.fonte-option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.fonte-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.fonte-option input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.fonte-option input[type="radio"]:checked + .fonte-preview { color: var(--accent); font-weight: 700; }
.fonte-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.fonte-preview { font-size: 15px; color: var(--text-primary); transition: color .18s; }

/* ═══════════════════════════════════════════════
   AUTH SCREENS
   ═══════════════════════════════════════════════ */
#auth-screen, #pending-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}
#auth-screen[hidden], #pending-screen[hidden], .sidebar-user[hidden] { display: none !important; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 0.5rem;
  box-shadow: var(--shadow-md);
}
html[data-maintenance="true"] #auth-screen .auth-card { max-width: 520px; }
html[data-maintenance="true"] #auth-screen {
  align-items: flex-start;
}
html[data-maintenance="true"] #auth-screen .auth-card {
  margin: auto 0;
}
.auth-brand img { border-radius: 10px; }
.auth-brand {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 800; font-size: 1.1rem;
}
.auth-card h2 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.maintenance-notice {
  margin: 0 0 18px;
  padding: 16px;
  border: 3px solid var(--text-primary);
  border-radius: 18px;
  background: var(--surface-2);
  box-shadow: 4px 4px 0 var(--text-primary);
  text-align: left;
}
.maintenance-notice[hidden],
.maintenance-account-box[hidden] {
  display: none !important;
}
.maintenance-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 9px;
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-full);
  background: var(--warning-container);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.maintenance-notice h2 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 1.45rem;
}
.maintenance-notice p {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}
.maintenance-notice .maintenance-admin-note {
  margin-bottom: 0;
  color: var(--accent);
  font-weight: 900;
}
.maintenance-account-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 2px solid var(--text-primary);
  border-radius: 16px;
  background: var(--surface-2);
}
.maintenance-account-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}
html[data-maintenance="true"] #maintenanceNotice {
  display: block !important;
}
html[data-maintenance="true"][data-maintenance-admin-entry="false"] #authTitle,
html[data-maintenance="true"][data-maintenance-admin-entry="false"] #authSubtitle,
html[data-maintenance="true"][data-maintenance-admin-entry="false"] #authLoginControls,
html[data-maintenance="true"][data-maintenance-admin-entry="false"] .maintenance-account-box,
html[data-maintenance="true"][data-maintenance-admin-entry="false"] .auth-public-links {
  display: none !important;
}

.bq-maintenance-notice {
  display: none;
  gap: 10px;
  max-width: 760px;
  margin: 18px 0 0;
  padding: 22px;
  border: 3px solid var(--text-primary);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  color: var(--text-primary);
  box-shadow: 5px 5px 0 var(--text-primary);
}
.bq-maintenance-kicker {
  width: fit-content;
  padding: 6px 10px;
  border: 2px solid var(--text-primary);
  border-radius: 999px;
  background: var(--accent);
  color: #111111;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}
.bq-maintenance-notice h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.bq-maintenance-notice p {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 800;
  line-height: 1.55;
}
.bq-maintenance-notice .bq-maintenance-note {
  color: var(--accent);
  font-weight: 900;
}
html[data-question-bank-maintenance="true"]:not([data-admin="true"]) #page-banco .bq-maintenance-notice {
  display: grid !important;
  width: min(760px, 100%);
  margin: min(8vh, 60px) auto 0;
}
html[data-question-bank-maintenance="true"]:not([data-admin="true"]) #page-banco.active {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
html[data-question-bank-maintenance="true"]:not([data-admin="true"]) #page-banco > :not(.bq-maintenance-notice) {
  display: none !important;
}
.auth-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.auth-field label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.auth-field input {
  background: var(--surface-2);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: inherit; font-size: 0.95rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(103,75,181,.1); }
.auth-error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; margin: 0; }
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 0.8rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; margin: 0.45rem 0 0.2rem;
}
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; background: var(--border-soft); flex: 1; }
.auth-submit {
  width: 100%; padding: 0.8rem;
  border-radius: var(--radius-full);
  border: none;
  background: var(--accent);
  color: #fff; font-size: 1rem; font-weight: 700;
  cursor: pointer; margin-top: 0.5rem;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(103,75,181,.3);
}
.auth-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.auth-toggle {
  background: none; border: none;
  color: var(--accent); cursor: pointer;
  font-size: 0.9rem; margin-top: 0.75rem;
  text-align: center; text-decoration: underline;
}
.auth-toggle:disabled,
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.pending-icon { font-size: 3rem; margin: 0.5rem 0; }
.pending-contact { font-size: 0.85rem; color: var(--text-muted); }

/* Sidebar user */
.sidebar-user {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 10px;
  border-top: 1px solid var(--border-soft); gap: 8px;
}
.user-email { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.logout-btn-top {
  background: none; border: 1.5px solid var(--border-soft);
  color: var(--text-secondary); border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 12px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.logout-btn-top:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* Google btn */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  width: 100%; padding: 0.8rem 1rem; margin-top: 1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-soft);
  background: var(--surface-2);
  color: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.google-btn:hover { background: var(--surface-3); border-color: var(--border); }
.google-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Admin */
.admin-only[hidden] { display: none !important; }
.admin-stats-grid { margin-top: 0; }
.admin-table-wrap { width: 100%; overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  white-space: nowrap;
}
.admin-table th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-table td { color: var(--text-primary); font-weight: 700; }

.feedback-card { max-width: 860px; }
.feedback-note {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}
.feedback-support-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-top: 18px;
}
.feedback-support-copy {
  min-width: 0;
}
.feedback-support-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 2px solid var(--text-primary);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 900;
}
.feedback-support-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
}
.feedback-support-card p {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}
.feedback-pix-key {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 2px solid var(--text-primary);
  border-radius: 14px;
  background: var(--surface-2);
}
.feedback-pix-key span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.feedback-pix-key strong {
  color: var(--text-primary);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.feedback-pix-qr-wrap {
  justify-self: end;
  width: 220px;
  padding: 12px;
  border: 3px solid var(--text-primary);
  border-radius: 18px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--text-primary);
}
.feedback-pix-qr-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
@media (max-width: 760px) {
  .feedback-support-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .feedback-pix-qr-wrap {
    justify-self: start;
    width: min(220px, 100%);
  }
}
.admin-feedback-title {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.admin-feedback-msg {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  max-width: 560px;
  white-space: pre-wrap;
}
.admin-feedback-meta {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
}
.admin-feedback-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 5px 10px;
  border: 2px solid var(--text-primary);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 900;
}
.admin-feedback-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-feedback-actions button {
  padding: 7px 10px;
  font-size: 12px;
}

/* ════════════════ SIMULADOS DISCURSIVOS ══ */
.disc-wrap { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.disc-materia-block {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}
.disc-materia-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.disc-materia-header select,
.disc-materia-header input[type="number"],
.disc-materia-header input[type="text"] {
  padding: 7px 10px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px;
  background: var(--surface-2); color: var(--text-primary);
  outline: none; transition: border-color var(--transition);
}
.disc-materia-header select:focus,
.disc-materia-header input:focus { border-color: var(--accent); }
.disc-materia-label {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.disc-questoes-wrap { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.disc-questao-block {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.disc-questao-title {
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.disc-questao-nota-total { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--accent); }
.disc-itens-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.disc-item-group { display: flex; flex-direction: column; gap: 4px; min-width: 72px; }
.disc-item-label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.disc-item-input {
  width: 72px; padding: 7px 10px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; text-align: center;
  background: var(--surface-2); color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.disc-item-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(103,75,181,.1); }
.disc-nota-badge { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--accent); min-width: 56px; text-align: right; }
.disc-modal-materia-title {
  font-family: var(--font-display); font-weight: 700; font-size: 12px; color: var(--accent);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 16px 0 8px;
  padding: 5px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-full);
  display: inline-block;
}
.disc-modal-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 6px; }
.disc-modal-table th {
  text-align: left; padding: 7px 10px;
  font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}
.disc-modal-table td { padding: 7px 10px; border-bottom: 1px solid var(--surface-3); vertical-align: middle; }
.disc-modal-table tr:last-child td { border-bottom: none; }
.disc-modal-table .td-nota { font-weight: 700; color: var(--accent); }
.disc-modal-table .td-itens { font-size: 12.5px; color: var(--text-muted); }
.disc-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  border-top: 2px solid var(--border-soft);
  margin-top: 8px;
}
.disc-total-label { font-weight: 700; font-size: 14px; }
.disc-total-value { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--accent); }

@media (max-width: 768px) {
  .disc-materia-header { gap: 8px; }
  .disc-itens-grid { gap: 8px; }
}

/* ════════════════ ARQUIVOS ══ */
@keyframes arqSpin { to { transform: rotate(360deg); } }
.arq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.arq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; text-align: center; position: relative;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.arq-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-mid); }
.arq-item-icon { font-size: 32px; line-height: 1; }
.arq-item-name {
  font-size: 12.5px; font-weight: 600; color: var(--text-primary);
  word-break: break-word; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%;
}
.arq-item-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; }
.arq-btn-del {
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; padding: 3px 5px; border-radius: var(--radius-xs);
  cursor: pointer; line-height: 1;
  transition: color var(--transition), background var(--transition);
  opacity: 0;
}
.arq-btn-dl {
  background: none; border: none; color: var(--text-muted);
  font-size: 13px; padding: 3px 5px; border-radius: var(--radius-xs);
  cursor: pointer; line-height: 1;
  transition: color var(--transition), background var(--transition);
  opacity: 0;
}
.arq-item:hover .arq-btn-del,
.arq-item:hover .arq-btn-dl { opacity: 1; }
.arq-btn-del:hover { color: var(--danger); background: var(--danger-soft); }
.arq-btn-dl:hover { color: var(--accent); background: var(--accent-soft); }

/* ════════════════ TEMPO DE ESTUDO ══ */
.tempo-stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.tempo-stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 20px; flex-shrink: 0;
}
.tempo-stat-value { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.tempo-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

.tempo-sessao-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700;
  border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.tempo-sessao-btn.iniciar {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(103,75,181,.3);
}
.tempo-sessao-btn.iniciar:hover { background: var(--accent-dark); transform: translateY(-1px); }
.tempo-sessao-btn.pausar { background: var(--warn-soft); color: var(--warn); }
.tempo-sessao-btn.pausar:hover { background: #fde68a; }
.tempo-sessao-btn.parar { background: var(--danger-soft); color: var(--danger); }
.tempo-sessao-btn.parar:hover { background: #ffc5bc; }

.tempo-timer-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  letter-spacing: -2px;
  color: var(--text-primary);
  line-height: 1;
}
.tempo-materia-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.tempo-materia-bar:last-child { border-bottom: none; }
.tempo-materia-nome { flex: 1; font-size: 14px; font-weight: 600; }
.tempo-materia-valor { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--accent); min-width: 60px; text-align: right; }
.tempo-bar-wrap { width: 100px; height: 8px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.tempo-bar { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--accent), var(--primary-container)); transition: width .6s ease; }

/* ════════════════ ERROS ══ */
.erros-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.erro-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column; gap: 10px;
}
.erro-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.erro-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.erro-materia-badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--accent-soft); color: var(--accent);
  text-transform: uppercase; letter-spacing: .04em;
}
.erro-pergunta { font-size: 14px; line-height: 1.6; color: var(--text-primary); font-weight: 500; }
.erro-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.erro-fonte { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.erro-actions { display: flex; gap: 6px; }

/* ════════════════ REDAÇÕES ══ */
.redacoes-list { display: flex; flex-direction: column; gap: 12px; }
.redacao-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.redacao-card:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.redacao-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.redacao-meta { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.redacao-nota {
  font-family: var(--font-display);
  font-weight: 800; font-size: 22px;
  color: var(--accent);
}

/* ── Rank filter wrap ── */
.rank-filter-wrap {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ════════════════ MODELO MATÉRIAS (formulário) ══ */
.modelo-materias-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.modelo-materia-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  flex-wrap: wrap;
}
.modelo-materia-row input,
.modelo-materia-row select {
  padding: 7px 10px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px;
  background: var(--surface); color: var(--text-primary);
  outline: none; transition: border-color var(--transition);
  flex: 1; min-width: 120px;
}
.modelo-materia-row input:focus,
.modelo-materia-row select:focus { border-color: var(--accent); }

/* ════════════════ EIXOS TEMÁTICOS ══ */
.eixo-novo-cor-label { position: relative; cursor: pointer; }
.eixo-novo-cor-label:focus-within .eixo-novo-cor-preview { outline: 2px solid var(--accent-mid); }
.eixo-novo-cor-preview {
  display: block; width: 28px; height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-soft);
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.eixo-novo-cor-preview:hover { transform: scale(1.12); border-color: var(--accent-mid); }

.eixos-modal-empty { color: var(--text-muted); font-size: 14px; text-align: center; padding: 20px 0 8px; }
.eixos-lista-modal { display: flex; flex-direction: column; gap: 7px; }
.eixo-modal-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: border-color .15s;
}
.eixo-modal-item:hover { border-color: var(--border); }
.eixo-modal-left { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.eixo-modal-dot { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.eixo-modal-nome { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eixo-modal-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 10px; }

.eixo-color-label { position: relative; cursor: pointer; }
.eixo-color-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .15s, transform .1s;
  line-height: 1;
}
.eixo-color-btn:hover { background: var(--surface-4); transform: scale(1.08); }
.eixo-modal-delete {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  background: var(--danger-soft);
  border: 1px solid rgba(186,26,26,.2);
  color: var(--danger);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.eixo-modal-delete:hover { background: #ffc5bc; transform: scale(1.08); }

/* ── Widget multi-select de eixos ── */
.eixos-select-wrapper {
  position: relative;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
.eixos-select-wrapper:hover { border-color: var(--border); }
.eixos-select-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(103,75,181,.1); }
.eixos-selected-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 9px 12px; min-height: 46px;
  align-items: center; user-select: none;
}
.eixo-placeholder { font-size: 13px; color: var(--text-muted); pointer-events: none; }
.eixo-add-more {
  font-size: 11px; color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1.5px dashed var(--border-soft);
  cursor: pointer; transition: border-color .15s, color .15s;
  align-self: center;
}
.eixo-add-more:hover { color: var(--accent); border-color: var(--accent-mid); }

.eixo-tag {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 11px;
  font-size: 12px; font-weight: 700; border: 1px solid;
  line-height: 1.3;
  transition: filter .15s;
}
.eixo-tag:hover { filter: brightness(1.05); }
.eixo-tag-remove {
  background: none; border: none; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 1px;
  opacity: 0.6; transition: opacity .15s, transform .1s;
  margin-left: 2px;
}
.eixo-tag-remove:hover { opacity: 1; transform: scale(1.2); }
.eixo-tag-display {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--radius-full);
  padding: 3px 10px; font-size: 11.5px; font-weight: 700; border: 1px solid;
  letter-spacing: .01em;
}

/* ── Dropdown eixos ── */
.eixos-dropdown {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  z-index: 300; max-height: 240px; overflow-y: auto;
  box-shadow: var(--shadow-md);
  padding: 6px;
  animation: dropdownIn .15s ease;
}
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.eixos-dropdown.hidden { display: none; }
.eixo-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-xs);
  font-size: 13px; cursor: pointer;
  transition: background .12s; user-select: none;
}
.eixo-option:hover { background: var(--surface-2); }
.eixo-option.selected { background: var(--surface-3); }
.eixo-option-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.eixo-option-nome { flex: 1; font-weight: 600; }
.eixo-option-check {
  font-size: 12px; font-weight: 800;
  opacity: 0; transition: opacity .12s, transform .12s;
  transform: scale(0.6); color: var(--success);
}
.eixo-option-check.visible { opacity: 1; transform: scale(1); }
.eixo-option-empty { padding: 14px 12px; font-size: 13px; color: var(--text-muted); text-align: center; }

/* ════════════════ TEMPO DE ESTUDO 2026 ══ */
#page-tempo {
  --tempo-dark: #171b2b;
  --tempo-dark-2: #20263a;
  --tempo-line: rgba(255,255,255,.12);
  --tempo-blue: #2f6df6;
}

#page-tempo .page-header {
  align-items: flex-start;
  margin-bottom: 22px;
}

#page-tempo .page-title {
  color: #101321;
  letter-spacing: 0;
}

#page-tempo .page-subtitle {
  font-size: 12px;
  letter-spacing: 0;
}

#btnNovaMateriaTimer {
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--tempo-blue);
  box-shadow: none;
}

.timer-summary-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 18px 24px;
  margin-bottom: 24px;
  border-radius: 8px;
  background: var(--tempo-dark);
  color: #fff;
}

.timer-summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timer-summary-label {
  color: #9ba9c8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.timer-summary-value {
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.timer-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(23,27,43,.25);
  border-radius: 8px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 700;
}

.timer-card {
  min-height: 126px;
  padding: 15px 14px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: var(--tempo-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(16,19,33,.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.timer-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--card-color);
  opacity: .95;
}

.timer-card-active {
  outline: 2px solid color-mix(in srgb, var(--card-color) 70%, #fff);
  outline-offset: 1px;
}

.timer-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.timer-card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--card-color);
  flex: 0 0 auto;
}

.timer-card-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-card-del {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ba9c8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.timer-card-del:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.timer-card-time {
  margin: 12px 0 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.timer-card-btn {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: var(--card-color);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.timer-card-btn:hover {
  filter: brightness(1.06);
}

.timer-card-btn-stop {
  background: #f43f46;
}

.timer-btn-icon {
  margin-right: 5px;
  font-size: 10px;
}

.timer-modal-box {
  width: min(430px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: 0 24px 80px rgba(16,19,33,.28);
}

.timer-modal-title {
  margin: 0 0 14px;
  color: var(--text-primary);
  font-size: 20px;
  letter-spacing: 0;
}

.timer-modal-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border-soft);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  outline: none;
}

.timer-modal-input:focus {
  border-color: var(--tempo-blue);
  box-shadow: 0 0 0 4px rgba(47,109,246,.12);
}

.timer-modal-colors {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px;
}

.timer-color-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.timer-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timer-color-swatch {
  width: 24px;
  height: 24px;
  border: 2px solid transparent;
  border-radius: 7px;
  background: var(--swatch);
  cursor: pointer;
}

.timer-color-swatch.selected {
  border-color: #fff;
  outline: 2px solid var(--tempo-blue);
}

.timer-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hist-section {
  min-height: 260px;
  padding: 22px 22px 28px;
  border-radius: 8px;
  background: var(--tempo-dark);
  color: #fff;
}

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

.hist-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.hist-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 8px;
}

.hist-toggle-btn {
  min-width: 58px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.hist-toggle-btn.active {
  background: var(--tempo-blue);
}

.hist-legend {
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.hist-legend-label {
  color: #9ba9c8;
  font-size: 10px;
  font-weight: 700;
}

.hist-legend-squares {
  display: flex;
  gap: 4px;
}

.hist-sq,
.hist-week-sq {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(47,109,246,var(--sq-opacity));
}

.hist-nav-row {
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 24px;
}

.hist-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 7px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.hist-nav-btn.disabled,
.hist-nav-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.hist-nav-label {
  min-width: 170px;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.hist-week-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 26px);
  align-items: end;
}

.hist-week-cell {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 88px;
}

.hist-week-sq {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.65);
}

.hist-cell-hoje .hist-week-sq,
.hist-cell-hoje.hist-month-cell {
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--tempo-blue);
}

.hist-week-label,
.hist-week-day,
.hist-week-time {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.hist-week-label {
  color: #aeb9d4;
}

.hist-week-time {
  color: #4f80ff;
}

.hist-dia-empty,
.hist-day-panel {
  color: #fff;
}

.hist-dia-empty {
  padding: 30px;
  text-align: center;
  color: #aeb9d4;
  font-weight: 700;
}

.hist-day-panel {
  max-width: 760px;
  margin: 0 auto;
}

.hist-day-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--tempo-line);
}

.hist-day-total span {
  color: #aeb9d4;
  font-size: 12px;
  font-weight: 800;
}

.hist-day-total strong {
  font-size: 22px;
}

.hist-day-list {
  display: grid;
  gap: 12px;
}

.hist-day-row-top,
.hist-det-row-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 7px;
}

.hist-day-dot,
.hist-det-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.hist-day-name,
.hist-det-nome {
  font-size: 13px;
  font-weight: 800;
}

.hist-day-time,
.hist-det-tempo {
  font-size: 12px;
  font-weight: 900;
  color: #dbe6ff;
}

.hist-day-track,
.hist-det-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.hist-day-track span,
.hist-det-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.hist-month-wrap {
  max-width: 940px;
  margin: 0 auto;
}

.hist-month-dow,
.hist-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  gap: 8px;
}

.hist-month-dow {
  margin-bottom: 8px;
}

.hist-month-dow span {
  color: #9ba9c8;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.hist-month-cell {
  min-height: 54px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(47,109,246,var(--sq-opacity));
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 7px;
  font-weight: 900;
}

.hist-month-cell.empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.hist-month-cell strong {
  color: #dbe6ff;
  font-size: 10px;
}

.hist-det-box {
  width: min(520px, calc(100vw - 32px));
  max-height: 86vh;
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: var(--tempo-dark);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

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

.hist-det-date {
  font-weight: 900;
  color: #fff;
}

.hist-det-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}

.hist-det-total {
  margin-bottom: 16px;
  color: #aeb9d4;
  font-weight: 800;
}

.hist-det-total strong {
  color: #fff;
  font-size: 20px;
}

.hist-det-list {
  display: grid;
  gap: 12px;
}

.hist-det-empty {
  color: #aeb9d4;
  padding: 18px 0;
  text-align: center;
}

@media (max-width: 900px) {
  .hist-week-row {
    gap: 7px;
    overflow-x: visible;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .hist-week-sq {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 680px) {
  #page-tempo .page-header {
    gap: 12px;
  }

  .timer-summary-bar,
  .hist-header {
    flex-direction: column;
    align-items: stretch;
  }

  .timer-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  }

  .hist-toggle {
    width: 100%;
  }

  .hist-toggle-btn {
    flex: 1;
  }

  .hist-nav-row {
    flex-wrap: wrap;
  }

  .hist-week-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .hist-week-sq {
    width: 25px;
    height: 25px;
  }

  .hist-week-label,
  .hist-week-day,
  .hist-week-time {
    font-size: 9px;
  }
}

/* The HTML has an inline light timer theme, so these scoped important rules
   intentionally restore the dark Yeolpumta-style panel requested here. */
#page-tempo .timer-summary-bar {
  background: var(--tempo-dark) !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #fff !important;
}

#page-tempo .timer-summary-label {
  color: #9ba9c8 !important;
}

#page-tempo .timer-summary-value {
  color: #fff !important;
  font-size: 20px !important;
}

#page-tempo .timer-card {
  background: var(--tempo-dark) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 22px rgba(16,19,33,.12) !important;
}

#page-tempo .timer-card:hover {
  box-shadow: 0 12px 28px rgba(16,19,33,.18) !important;
}

#page-tempo .timer-card-active {
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--card-color) 70%, #fff), 0 12px 28px rgba(16,19,33,.18) !important;
}

#page-tempo .timer-card-name,
#page-tempo .timer-card-time {
  color: #fff !important;
}

#page-tempo .timer-card-del {
  color: #9ba9c8 !important;
}

#page-tempo .hist-section {
  background: var(--tempo-dark) !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

#page-tempo .hist-title {
  color: #fff !important;
}

#page-tempo .hist-toggle {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.75) !important;
}

#page-tempo .hist-toggle-btn {
  color: #fff !important;
}

#page-tempo .hist-toggle-btn.active {
  background: var(--tempo-blue) !important;
  color: #fff !important;
}

#page-tempo .hist-legend-label,
#page-tempo .hist-week-label,
#page-tempo .hist-month-dow span {
  color: #9ba9c8 !important;
}

#page-tempo .hist-sq,
#page-tempo .hist-week-sq {
  background: rgba(47,109,246,var(--sq-opacity)) !important;
}

#page-tempo .hist-week-sq {
  border: 1px solid rgba(255,255,255,.65) !important;
}

#page-tempo .hist-cell-hoje .hist-week-sq {
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--tempo-blue) !important;
}

#page-tempo .hist-week-day {
  color: #fff !important;
}

#page-tempo .hist-week-time {
  color: #4f80ff !important;
}

#page-tempo .hist-nav-btn {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.75) !important;
  color: #fff !important;
}

#page-tempo .hist-nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.08) !important;
  border-color: #fff !important;
  color: #fff !important;
}

#page-tempo .hist-nav-label {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.75) !important;
  color: #fff !important;
}

#page-tempo .hist-dia-empty,
#page-tempo .hist-day-panel {
  color: #fff !important;
}

#page-tempo .hist-day-total,
#page-tempo .hist-dia-total-row {
  border-bottom-color: var(--tempo-line) !important;
}

#page-tempo .hist-day-total span,
#page-tempo .hist-dia-total-label,
#page-tempo .hist-day-time,
#page-tempo .hist-det-tempo {
  color: #aeb9d4 !important;
}

#page-tempo .hist-day-name,
#page-tempo .hist-det-nome,
#page-tempo .hist-det-date,
#page-tempo .hist-det-total strong {
  color: #fff !important;
}

#page-tempo .hist-day-track,
#page-tempo .hist-det-bar-wrap {
  background: rgba(255,255,255,.08) !important;
}

#page-tempo .hist-det-box {
  background: var(--tempo-dark) !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.35) !important;
}

#page-tempo .hist-det-total,
#page-tempo .hist-det-empty {
  color: #aeb9d4 !important;
}

/* ════════════════ REVISAO ESPACADA 2026 ══ */
#page-revisao {
  --rev-blue: #2563eb;
  --rev-border: #d7dce8;
  --rev-muted: #647087;
  --rev-soft: #f1f4f9;
}

#page-revisao .page-title {
  color: #111827;
  letter-spacing: 0;
}

#page-revisao .page-subtitle {
  color: #6b7280;
  font-size: 12px;
  letter-spacing: 0;
}

.rev-page-header {
  align-items: flex-start;
  margin-bottom: 22px;
}

.rev-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rev-header-actions .btn-primary,
.rev-header-actions .btn-secondary {
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 800;
}

.rev-interval-card {
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--rev-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}

.rev-interval-title {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rev-border);
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.rev-interval-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px 10px;
}

.rev-interval-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--rev-border);
  border-radius: 7px;
  background: var(--rev-soft);
  color: #5d6678;
  font-size: 12px;
  font-weight: 700;
}

.rev-interval-chip input {
  width: 58px;
  height: 25px;
  border: 1px solid #cbd3df;
  border-radius: 5px;
  background: #fff;
  color: #111827;
  font: inherit;
  text-align: center;
}

.rev-chip-remove {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: #8b95a7;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.rev-chip-remove:hover {
  color: #ef4444;
}

.rev-interval-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px 18px;
}

.rev-interval-actions .btn-primary,
.rev-interval-actions .btn-secondary {
  border-radius: 7px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 800;
}

.rev-tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin: 8px 0 16px;
  border-bottom: 1px solid var(--rev-border);
}

.rev-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  padding: 12px 0 11px;
  font-size: 12px;
  font-weight: 800;
}

.rev-tab.active {
  color: var(--rev-blue);
}

.rev-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: var(--rev-blue);
}

.rev-filter-row {
  margin-bottom: 18px;
}

.rev-filter-row select {
  height: 34px;
  min-width: 170px;
  border: 1px solid var(--rev-border);
  border-radius: 6px;
  background: #fff;
  color: #111827;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
}

.rev-list-panel {
  border: 1px solid var(--rev-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
  padding: 16px;
}

.rev-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.rev-row-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--rev-border);
  border-left: 4px solid var(--rev-color, var(--rev-blue));
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}

.rev-row-card.overdue {
  border-left-color: #2563eb;
}

.rev-row-card.today {
  border-left-color: #ef4444;
}

.rev-row-card.soon {
  border-left-color: #f97316;
}

.rev-row-card.done {
  opacity: .72;
}

.rev-check-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.rev-check-wrap input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rev-check-wrap span {
  width: 16px;
  height: 16px;
  border: 1.5px solid #cbd3df;
  border-radius: 4px;
  background: #fff;
}

.rev-check-wrap input:checked + span {
  border-color: var(--rev-blue);
  background: var(--rev-blue);
  box-shadow: inset 0 0 0 3px #fff;
}

.rev-row-main {
  min-width: 0;
}

.rev-row-title {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rev-row-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.rev-next-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #7b8497;
  font-size: 10px;
  font-weight: 900;
}

.rev-row-date {
  color: #374151;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.rev-empty,
.rev-empty-subjects {
  padding: 26px;
  color: var(--rev-muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.rev-content-grid {
  display: grid;
  gap: 12px;
}

.rev-content-card {
  border: 1px solid var(--rev-border);
  border-left: 4px solid var(--rev-color, var(--rev-blue));
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.rev-content-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.rev-content-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rev-progress-line {
  height: 7px;
  margin: 12px 0 8px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.rev-progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rev-color, var(--rev-blue));
}

.rev-progress-meta {
  color: var(--rev-muted);
  font-size: 11px;
  font-weight: 800;
}

.rev-schedule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rev-schedule-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #4b5563;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.rev-schedule-pill.done {
  background: #dcfce7;
  color: #166534;
}

.rev-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,.48);
  padding: 22px;
}

.rev-modal.hidden {
  display: none;
}

.rev-modal-box {
  width: min(760px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--rev-border);
  background: #fff;
  box-shadow: 0 26px 90px rgba(15,23,42,.28);
  padding: 22px;
}

.rev-modal-small {
  width: min(560px, calc(100vw - 32px));
}

.rev-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.rev-modal-head h3 {
  margin: 0 0 5px;
  color: #111827;
  font-size: 20px;
  letter-spacing: 0;
}

.rev-modal-head p {
  margin: 0;
  color: var(--rev-muted);
  font-size: 12px;
  font-weight: 600;
}

.rev-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rev-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rev-form-grid span {
  color: #4b5563;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.rev-form-grid input,
.rev-form-grid select,
.rev-form-grid textarea,
.rev-subject-form input {
  width: 100%;
  border: 1.5px solid var(--rev-border);
  border-radius: 7px;
  background: #fff;
  color: #111827;
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.rev-form-grid input:focus,
.rev-form-grid select:focus,
.rev-form-grid textarea:focus,
.rev-subject-form input:focus {
  border-color: var(--rev-blue);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.rev-form-wide {
  grid-column: 1 / -1;
}

.rev-form-note {
  margin-top: 14px;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
}

.rev-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.rev-subject-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px auto;
  gap: 10px;
  align-items: center;
}

.rev-subject-form input[type="color"] {
  height: 42px;
  padding: 5px;
}

.rev-subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rev-subject-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rev-border);
  border-radius: 999px;
  background: var(--rev-soft);
  padding: 7px 10px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.rev-subject-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.rev-subject-pill button {
  border: 0;
  background: transparent;
  color: #8b95a7;
  cursor: pointer;
  font-size: 14px;
}

.rev-subject-pill button:hover {
  color: #ef4444;
}

@media (max-width: 980px) {
  .rev-board-grid,
  .rev-form-grid {
    grid-template-columns: 1fr;
  }

  .rev-row-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .rev-row-date {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .rev-page-header,
  .rev-content-top {
    flex-direction: column;
    align-items: stretch;
  }

  .rev-header-actions,
  .rev-interval-actions,
  .rev-modal-actions {
    width: 100%;
  }

  .rev-header-actions button,
  .rev-interval-actions button,
  .rev-modal-actions button {
    flex: 1;
  }

  .rev-tabs {
    gap: 12px;
    overflow-x: auto;
  }

  .rev-subject-form {
    grid-template-columns: 1fr;
  }
}

/* Arquivos / Google Drive */
.arquivos-header {
  align-items: center;
  gap: 18px;
}

.arquivos-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.arquivos-config-card {
  margin-bottom: 16px;
}

.drive-config-help {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 12px;
}

.drive-config-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.drive-config-row input {
  width: 100%;
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  padding: 12px 14px;
  outline: none;
}

.drive-config-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(155, 92, 246, .12);
}

.drive-drop-zone {
  min-height: 120px;
  border: 1.5px dashed transparent;
  border-radius: 18px;
  background: transparent;
  padding: 0;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
}

.drive-drop-zone.dragover,
.drive-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(155, 92, 246, .07);
}

.drive-float-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.drive-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 13.5px;
}

.drive-crumb {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
}

.drive-crumb:hover,
.drive-crumb.active {
  background: var(--accent-soft);
}

.drive-crumb-sep {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.drive-status {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.drive-empty {
  display: none;
  min-height: 180px;
  border: 1px dashed var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 28px;
}

.drive-empty .btn-primary {
  margin-top: 10px;
}

.drive-empty strong {
  color: var(--text-primary);
  font-size: 16px;
}

.drive-empty span {
  color: var(--text-muted);
  font-size: 13px;
}

.drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.drive-card {
  min-height: 116px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  position: relative;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.drive-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.drive-card-main {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.drive-card-icon {
  font-size: 34px;
  line-height: 1;
}

.drive-card-name {
  width: 100%;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.drive-card-meta {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
}

.drive-card-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 2px;
}

.drive-mini-action {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 4px 6px;
  opacity: 0;
  transition: color var(--transition), background var(--transition), opacity var(--transition);
}

.drive-card:hover .drive-mini-action {
  opacity: 1;
}

.drive-mini-action:hover {
  color: var(--accent);
  background: rgba(99,102,241,.1);
}

.drive-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}

.drive-drop-overlay.hidden {
  display: none;
}

.drive-drop-msg {
  border: 2.5px dashed var(--accent);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-primary);
  padding: 48px 64px;
  text-align: center;
}

.drive-drop-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.drive-drop-title {
  font-size: 18px;
  font-weight: 800;
}

.drive-drop-sub {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  margin-top: 6px;
}

@media (max-width: 760px) {
  .arquivos-header,
  .drive-float-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .arquivos-actions {
    justify-content: stretch;
  }

  .arquivos-actions button,
  .drive-config-row button {
    flex: 1;
  }

  .drive-config-row {
    grid-template-columns: 1fr;
  }

  .drive-status {
    text-align: left;
    margin-left: 0;
  }

  .drive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drive-mini-action {
    opacity: 1;
    background: var(--surface-2);
  }
}

/* Panorama de Questões */
.pq-header {
  align-items: flex-start;
}

.pq-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.pq-main-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-soft);
  margin: 2px 0 22px;
}

.pq-main-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 12px 14px 11px;
  font-size: 13px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.pq-main-tab:hover,
.pq-main-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: linear-gradient(180deg, transparent, var(--accent-soft));
}

.pq-main-tab span {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}

.pq-section-panel[hidden] {
  display: none !important;
}

.pq-period-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  background: var(--surface-2);
}

.pq-period-btn {
  min-width: 72px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 800;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.pq-period-btn:hover,
.pq-period-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(103,75,181,.18);
}

.pq-select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pq-select-label select {
  min-width: 160px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-primary);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.pq-select-label select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(103,75,181,.12);
}

.pq-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.pq-overview-card {
  margin-bottom: 26px;
}

.pq-card-meta {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-full);
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pq-overview-body {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.pq-chart-wrap {
  position: relative;
  width: 100%;
  height: 190px;
}

.pq-chart-wrap-lg {
  height: 260px;
}

.pq-overview-copy {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 22px;
}

.pq-overview-copy strong {
  display: block;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.2;
  margin-bottom: 8px;
}

.pq-overview-copy span {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.pq-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
}

.pq-section-title h2 {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 850;
}

.pq-section-title span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.pq-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.pq-subject-card .card-header {
  padding: 16px 18px;
}

.pq-subject-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.pq-subject-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pq-subject-stats span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 9px 8px;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.pq-subject-stats strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 850;
}

.pq-empty {
  display: none;
  margin-top: 14px;
  padding: 30px 16px;
  text-align: center;
}

.pq-wrong-entry {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 12px 8px 15px;
  font-size: 12.5px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.pq-wrong-entry:hover,
.pq-wrong-entry.active {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
  box-shadow: 0 10px 22px rgba(186, 26, 26, .16);
  transform: translateY(-1px);
}

.pq-wrong-entry strong {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.pq-wrong-entry.active strong,
.pq-wrong-entry:hover strong {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.pq-wrong-panel {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  margin: 0 0 28px;
  box-shadow: var(--shadow);
}

.pq-wrong-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: 16px;
}

.pq-wrong-list {
  display: grid;
  gap: 14px;
}

.pq-wrong-question {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.pq-wrong-question-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.pq-wrong-question-top strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 850;
}

.pq-wrong-question-top span {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 750;
}

.pq-wrong-enunciado,
.pq-wrong-pergunta,
.pq-wrong-muted {
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.7;
  padding: 14px 16px 0;
}

.pq-wrong-pergunta {
  font-weight: 750;
}

.pq-wrong-muted {
  color: var(--text-secondary);
  padding-bottom: 16px;
}

.pq-wrong-img {
  padding: 14px 16px 0;
}

.pq-wrong-img img {
  display: block;
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.pq-wrong-alts {
  display: grid;
  gap: 7px;
  padding: 14px 16px 16px;
}

.pq-wrong-alt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px 12px;
}

.pq-wrong-alt span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-soft);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 850;
}

.pq-wrong-alt p,
.pq-wrong-alt-text {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.45;
}

.pq-wrong-alt.is-answer {
  border-color: rgba(16,185,129,.45);
  background: rgba(16,185,129,.08);
}

.pq-wrong-alt.is-answer span {
  background: #10b981;
  color: #fff;
}

.pq-lists-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pq-list-manager,
.pq-list-detail {
  margin: 0;
}

.pq-list-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.pq-list-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.pq-list-create input {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-primary);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.pq-list-create input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(103,75,181,.12);
}

.pq-list-cards,
.pq-list-questions {
  display: grid;
  gap: 10px;
}

.pq-list-card {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-primary);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.pq-list-card:hover,
.pq-list-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pq-list-card strong {
  font-size: 13px;
  font-weight: 850;
}

.pq-list-card span,
.pq-list-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

.pq-list-question .pq-wrong-question-top > div {
  display: grid;
  gap: 3px;
}

@media (max-width: 760px) {
  .pq-controls {
    width: 100%;
    justify-content: stretch;
  }

  .pq-period-tabs,
  .pq-select-label,
  .pq-select-label select {
    width: 100%;
  }

  .pq-period-btn {
    flex: 1;
    min-width: 0;
  }

  .pq-overview-body {
    grid-template-columns: 1fr;
  }

  .pq-chart-wrap-lg {
    height: 220px;
  }

  .pq-subject-grid {
    grid-template-columns: 1fr;
  }

  .pq-wrong-entry {
    width: 100%;
    align-items: center;
  }

  .pq-wrong-question-top {
    align-items: flex-start;
  }

  .pq-wrong-filters .pq-select-label,
  .pq-wrong-filters .pq-select-label select {
    width: 100%;
  }

  .pq-main-tab {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .pq-lists-layout,
  .pq-list-create {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Hoje */
.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}

.dash-eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.dash-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-compact {
  padding: 7px 12px;
  font-size: 12px;
}

.dash-today-stats {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.dash-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dash-focus-card .card-body {
  padding: 18px;
}

.dash-soft-pill {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 850;
}

.dash-action-list,
.dash-rev-list {
  display: grid;
  gap: 10px;
}

.dash-action-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px;
}

.dash-action-dot {
  width: 10px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--dash-action-color, var(--accent));
}

.dash-action-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dash-action-copy strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 850;
}

.dash-action-copy span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.dash-rev-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--dash-rev-color, var(--accent));
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 11px 12px;
  cursor: pointer;
}

.dash-rev-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.dash-rev-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dash-rev-item strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-rev-item small {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 650;
}

.dash-rev-item em {
  border-radius: var(--radius-full);
  padding: 5px 9px;
  font-style: normal;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.dash-rev-item em.danger { background: var(--danger-soft); color: var(--danger); }
.dash-rev-item em.today { background: var(--accent-soft); color: var(--accent); }
.dash-rev-item em.soon { background: var(--warn-soft); color: var(--warn); }

.dash-empty {
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.dash-question-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.dash-question-summary div {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px;
  text-align: center;
}

.dash-question-summary strong {
  display: block;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.dash-question-summary span,
.dash-progress-meta {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

.dash-progress {
  height: 9px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.dash-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--success));
}

.dash-progress-meta {
  margin-top: 8px;
}

.dash-insight {
  margin-top: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 750;
}

.dash-full-btn {
  width: 100%;
  margin-top: 12px;
}

.dash-time-row {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.dash-time-row:last-child {
  margin-bottom: 0;
}

.dash-time-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.dash-time-top span {
  color: var(--text-muted);
  white-space: nowrap;
}

.dash-time-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.dash-time-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--dash-time-color, var(--accent));
}

.dash-recent-card {
  margin-top: 4px;
}

.dash-ranking-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.dash-recent-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 14px;
  display: grid;
  gap: 4px;
}

.dash-recent-item span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.dash-recent-item strong {
  color: var(--text-primary);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.1;
}

.dash-recent-item small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.dash-ranking-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 850;
  margin: 4px 0 12px;
}

@media (max-width: 900px) {
  .dash-main-grid {
    grid-template-columns: 1fr;
  }

  .dash-recent-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dash-hero {
    flex-direction: column;
  }

  .dash-hero-actions,
  .dash-hero-actions button {
    width: 100%;
  }

  .dash-action-item,
  .dash-rev-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dash-action-item button,
  .dash-rev-item em {
    grid-column: 2;
    width: fit-content;
  }

  .dash-question-summary {
    grid-template-columns: 1fr;
  }
}
