/* =============================================================================
 * Quiz · app.css — Soft Sidebar (DM Sans + Caveat, paleta sóbria)
 * ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800;9..40,900&family=Caveat:wght@500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --bg:           #f4f8fb;
  --paper:        #ffffff;
  --line:         #dde7ee;
  --line-soft:    #eaf1f6;
  --line-hi:      #c5d3de;
  --ink:          #073b5c;
  --muted:        #5b7083;
  --muted-2:      #93a3b1;
  --accent:       #ff7400;
  --accent-hi:    #e06500;
  --accent-bg:    #fff1e3;
  --accent-glow:  rgba(255, 116, 0, 0.25);
  --green:        #16a34a;
  --green-bg:     #ecfdf5;
  --blue:         #2563eb;
  --blue-bg:      #eff6ff;
  --amber:        #b45309;
  --amber-bg:     #fef3c7;
  --red:          #dc2626;
  --red-bg:       #fef2f2;
  --r-sm:         10px;
  --r:            14px;
  --r-lg:         18px;
  --r-xl:         24px;
  --shadow-sm:    0 1px 2px rgba(7, 59, 92, 0.04);
  --shadow:       0 4px 12px rgba(7, 59, 92, 0.06);
  --shadow-lg:    0 14px 32px rgba(7, 59, 92, 0.08);
  --sidebar-w:    240px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.5;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0 0 12px; } p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hi); }
button { font-family: inherit; font-size: inherit; }
img { max-width: 100%; height: auto; }
hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }

/* LAYOUT */
body.has-sidebar {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 24px; margin-bottom: 16px;
  text-decoration: none; color: inherit;
}
.brand:hover { color: inherit; }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--ink);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  font-weight: 800; font-size: 18px;
}
.brand-mark .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%; margin-left: 1px;
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; }
.brand-sub {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 14px; color: var(--accent);
  line-height: 1; margin-top: -1px; font-weight: 600;
}

.btn-iniciar {
  background: var(--ink); color: var(--paper);
  width: 100%; padding: 13px 14px;
  border: none; border-radius: 12px;
  font-family: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 20px; text-decoration: none;
  transition: all 0.18s;
}
.btn-iniciar:hover { background: #000; transform: translateY(-1px); color: var(--paper); }
.btn-iniciar .play {
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--paper);
}

.nav-section { margin-bottom: 24px; }
.nav-label {
  font-size: 11px; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0 10px; margin-bottom: 6px; font-weight: 600;
}
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  color: var(--muted); text-decoration: none;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: all 0.15s;
}
.nav-item:hover { background: var(--line-soft); color: var(--ink); }
.nav-item.active { background: var(--ink); color: var(--paper); font-weight: 600; }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 18px; font-size: 16px; text-align: center; flex-shrink: 0; }
.nav-count {
  margin-left: auto;
  font-size: 11px; color: var(--muted-2);
  background: var(--line-soft);
  padding: 2px 7px; border-radius: 99px; font-weight: 600;
}
.nav-item.active .nav-count { background: rgba(255,255,255,0.15); color: var(--paper); }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px;
  background: var(--accent-bg); color: var(--accent-hi);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-info .nome {
  font-size: 13px; font-weight: 600; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-info .email {
  font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sair {
  color: var(--muted-2); text-decoration: none;
  font-size: 16px; padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
}
.sair:hover { color: var(--accent); background: var(--accent-bg); }

/* MAIN */
.main {
  padding: 32px 48px 80px;
  max-width: 1280px; min-width: 0;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px;
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--muted-2); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: 32px; font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.05; margin-bottom: 6px;
  display: flex; align-items: center; gap: 14px;
}
.page-head h1 .icon-big {
  width: 48px; height: 48px;
  background: var(--accent); color: var(--paper);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  flex-shrink: 0;
}
.page-head h1 .turma-badge {
  background: var(--accent); color: var(--paper);
  padding: 6px 14px; border-radius: 10px;
  font-size: 20px; font-weight: 800;
}
.page-head .sub { color: var(--muted); font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 10px;
  transition: all 0.15s;
}
.back-link:hover { background: var(--line-soft); color: var(--ink); }

.greeting {
  margin-bottom: 32px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
}
.greeting h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.greeting h1 .name { color: var(--accent); }
.greeting h1 .squiggle {
  font-family: 'Caveat', cursive;
  color: var(--muted);
  font-weight: 500; font-size: 24px;
  transform: rotate(-2deg);
  display: inline-block;
  margin-left: 8px;
}
.greeting .sub { color: var(--muted); margin-top: 6px; font-size: 14px; }
.greeting-date {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 18px;
  text-align: right; flex-shrink: 0;
}
.greeting-date .day { font-family: 'Caveat', cursive; font-size: 22px; color: var(--accent); line-height: 1; font-weight: 700; }
.greeting-date .date { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 4px; }

/* CARDS */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.card-title .num {
  width: 24px; height: 24px;
  background: var(--accent-bg); color: var(--accent-hi);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.card-title .count {
  margin-left: auto;
  background: var(--accent-bg); color: var(--accent-hi);
  padding: 3px 10px; border-radius: 99px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  text-transform: none; letter-spacing: 0;
}
.card-header {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.card-header .ico-big {
  width: 44px; height: 44px;
  background: var(--accent-bg); color: var(--accent-hi);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.card-header h3 { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.card-header .sub { color: var(--muted); font-size: 13px; }

/* BUTTONS */
.btn {
  background: var(--paper); color: var(--ink);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; white-space: nowrap; line-height: 1;
  transition: all 0.15s;
}
.btn:hover {
  border-color: var(--ink); color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--ink); color: var(--paper);
  border-color: var(--ink); font-weight: 700;
}
.btn-primary:hover { background: #000; color: var(--paper); }
.btn-primary .ico {
  width: 16px; height: 16px;
  background: var(--accent); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--paper);
}
.btn-primary.btn-lg .ico { width: 18px; height: 18px; border-radius: 5px; font-size: 11px; }
.btn-accent {
  background: var(--accent); color: var(--paper);
  border-color: var(--accent); font-weight: 700;
}
.btn-accent:hover {
  background: var(--accent-hi); border-color: var(--accent-hi); color: var(--paper);
  box-shadow: 0 8px 18px var(--accent-glow);
}
.btn-ghost {
  background: transparent; border-color: transparent;
  color: var(--muted); box-shadow: none;
}
.btn-ghost:hover {
  background: var(--line-soft); color: var(--ink);
  border-color: transparent; box-shadow: none;
}
.btn-danger {
  background: var(--paper); color: var(--red); border-color: var(--line);
}
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-lg { padding: 13px 22px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* FORM */
.form-row { margin-bottom: 18px; }
.form-row:last-child { margin-bottom: 0; }
.form-row label {
  display: block; font-weight: 600; font-size: 13px;
  margin-bottom: 8px; color: var(--ink);
}
.form-row label .req { color: var(--accent); }
.form-row .hint { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.5; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="search"],
.form-row input[type="date"],
.form-row input[type="time"],
.form-row textarea,
.form-row select,
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: inherit; font-size: 14px;
  transition: all 0.15s;
}
.form-row textarea, textarea.form-input {
  resize: vertical; min-height: 80px; line-height: 1.5;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus, .form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.form-row input:hover:not(:focus):not(:disabled),
.form-row select:hover:not(:focus):not(:disabled),
.form-input:hover:not(:focus) {
  border-color: var(--muted-2);
}
.form-row input::placeholder, .form-row textarea::placeholder, .form-input::placeholder {
  color: var(--muted-2);
}
.form-row select, select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%2378716c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-actions {
  display: flex; gap: 10px;
  margin-top: 24px; padding-top: 22px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.form-actions .spacer { flex: 1; }

/* FILE UPLOAD */
.file-upload {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg);
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer; position: relative;
  text-transform: none; letter-spacing: 0;
  transition: all 0.18s;
}
.file-upload * { text-transform: none; letter-spacing: 0; }
.file-upload input[type="file"] {
  position: absolute; width: 100%; height: 100%;
  top: 0; left: 0; opacity: 0;
  cursor: pointer; z-index: 2;
}
.file-upload:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
}
.file-upload .ico {
  width: 44px; height: 44px;
  background: var(--paper); border: 1px solid var(--line);
  color: var(--accent);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.file-upload:hover .ico { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.file-upload .body { flex: 1; min-width: 0; }
.file-upload .ttl { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.file-upload .hint { color: var(--muted); font-size: 12px; }
.file-upload .badge {
  background: var(--ink); color: var(--paper);
  padding: 7px 14px; border-radius: 999px;
  font-weight: 600; font-size: 12px;
  flex-shrink: 0;
}
.file-upload:hover .badge { background: var(--accent); }
.file-upload.has-file { background: var(--green-bg); border-color: var(--green); border-style: solid; }
.file-upload.has-file .ico { background: var(--green); color: var(--paper); border-color: var(--green); }
.file-upload.has-file .badge { background: var(--green); }

/* BADGES, PILLS */
.badge-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-status.ativo  { background: var(--green-bg); color: var(--green); }
.badge-status.inativo{ background: var(--line-soft); color: var(--muted); }
.badge-status.warn   { background: var(--amber-bg); color: var(--amber); }

.pill {
  display: inline-flex; align-items: center;
  background: var(--accent-bg); color: var(--accent-hi);
  padding: 5px 10px; border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700;
}
.pill-muted { background: var(--line-soft); color: var(--muted); }
.pill-blue  { background: var(--blue-bg);  color: var(--blue); }
.pill-green { background: var(--green-bg); color: var(--green); }

.tag {
  display: inline-block;
  background: var(--line-soft); color: var(--muted);
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
}

/* INFO BOX */
.info-box {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.info-box .ico { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
.info-box .body { flex: 1; font-size: 13px; line-height: 1.55; }
.info-box .title { font-weight: 700; color: var(--accent-hi); display: block; margin-bottom: 2px; }
.info-box strong { color: var(--accent-hi); font-weight: 700; }
.info-box.warn { background: var(--amber-bg); border-left-color: var(--amber); color: #78350f; }
.info-box.warn .title, .info-box.warn strong { color: #78350f; }
.info-box.info { background: var(--blue-bg); border-left-color: var(--blue); color: #1e3a8a; }
.info-box.info .title, .info-box.info strong { color: #1e40af; }

/* TABLE */
.table-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; padding: 14px 20px;
  background: var(--line-soft);
  font-size: 11px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}
.table thead th.num { text-align: right; }
.table thead th.acoes { text-align: right; width: 1px; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--line-soft); }
.table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px; vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-footer-info {
  padding: 14px 20px;
  background: var(--line-soft);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.table-footer-info strong { color: var(--ink); font-weight: 700; }
.cell-nome {
  font-weight: 700; color: var(--ink);
  font-size: 15px; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px;
}
.avatar-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--line-soft); color: var(--ink);
  border-radius: 50%;
  font-weight: 700; font-size: 13px;
}

/* ROW ACTIONS */
.row-actions {
  display: inline-flex; gap: 4px;
  align-items: center; justify-content: flex-end;
}
.row-actions a, .row-actions button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: all 0.15s;
}
.row-actions a:hover, .row-actions button:hover {
  background: var(--paper); border-color: var(--line); color: var(--ink);
}
.row-actions .danger:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }

/* STATS */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 28px;
}
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
  transition: all 0.2s;
}
.stat:hover { transform: translateY(-2px); border-color: var(--ink); }
.stat .icon {
  width: 36px; height: 36px;
  background: var(--line-soft); color: var(--ink);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 14px;
}
.stat .label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.stat .value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat .value .unit { font-size: 18px; color: var(--muted); font-weight: 600; }
.stat .delta { margin-top: 10px; font-size: 12px; color: var(--green); font-weight: 600; }
.stat .delta.neutral { color: var(--muted-2); }
.stat.featured { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stat.featured .icon { background: rgba(255, 255, 255, 0.1); color: var(--accent); }
.stat.featured .label { color: rgba(255, 255, 255, 0.6); }
.stat.featured .delta { color: var(--accent); }

.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.quick-stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
}
.quick-stat .ico-circle {
  width: 40px; height: 40px;
  background: var(--accent-bg); color: var(--accent-hi);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.quick-stat.green .ico-circle { background: var(--green-bg); color: var(--green); }
.quick-stat.blue  .ico-circle { background: var(--blue-bg);  color: var(--blue); }
.quick-stat .val { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.quick-stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* SECTION HEAD */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 32px 0 14px;
}
.section-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.section-head h2 .smile {
  font-family: 'Caveat', cursive;
  color: var(--muted); font-weight: 500;
  font-size: 18px; margin-left: 6px;
}
.section-head a {
  color: var(--accent); text-decoration: none;
  font-weight: 600; font-size: 13px;
  display: flex; align-items: center; gap: 4px;
}
.section-head a:hover { gap: 8px; }

/* TURMA CARDS */
.turmas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.turma-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px;
  text-decoration: none; color: inherit;
  transition: all 0.2s; display: block;
}
.turma-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.turma-card .header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.turma-card .ico {
  width: 44px; height: 44px;
  background: var(--accent-bg); color: var(--accent-hi);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  letter-spacing: -0.02em;
}
.turma-card .nome { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.turma-card .ano { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.turma-card .stats {
  display: flex; gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}
.turma-card .stats > div { font-size: 12px; color: var(--muted); }
.turma-card .stats strong { display: block; font-size: 18px; color: var(--ink); font-weight: 700; }
.turma-card .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.turma-card .actions a {
  background: var(--line-soft); color: var(--ink);
  padding: 7px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.turma-card .actions a:hover { background: var(--ink); color: var(--paper); }
.turma-card.add {
  border: 1.5px dashed var(--line);
  background: transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; min-height: 240px;
}
.turma-card.add .plus {
  width: 56px; height: 56px;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 300;
  margin-bottom: 14px;
}
.turma-card.add .ttl { font-weight: 700; color: var(--ink); margin-bottom: 4px; font-size: 16px; }
.turma-card.add .hint { color: var(--muted); font-size: 13px; }
.turma-card.add:hover { border-color: var(--accent); background: rgba(255, 241, 230, 0.4); }
.turma-card.add:hover .plus { background: var(--accent); color: var(--paper); }

/* TOOLBAR */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input {
  flex: 1; min-width: 240px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px 11px 38px;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='7' cy='7' r='5' stroke='%2378716c' stroke-width='1.5'/%3E%3Cpath d='M11 11L14 14' stroke='%2378716c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
  transition: all 0.15s;
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

.filter-pill {
  background: var(--paper); border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-pill:hover { border-color: var(--ink); color: var(--ink); }
.filter-pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-pill .count {
  background: rgba(255, 255, 255, 0.15);
  padding: 1px 6px; border-radius: 99px;
  font-size: 11px;
}
.filter-pill:not(.active) .count { background: var(--line-soft); color: var(--muted); }

/* FLASH */
.flash {
  padding: 12px 16px; border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 3px solid;
  display: flex; align-items: flex-start; gap: 10px;
}
.flash strong { font-weight: 700; }
.flash-success { background: var(--green-bg); color: var(--green); border-left-color: var(--green); }
.flash-error   { background: var(--red-bg);   color: var(--red);   border-left-color: var(--red); }
.flash-info    { background: var(--blue-bg);  color: var(--blue);  border-left-color: var(--blue); }
.flash-warn    { background: var(--amber-bg); color: var(--amber); border-left-color: var(--amber); }

/* CENTER SCREEN */
.center-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.center-screen .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 40px;
  max-width: 420px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.center-screen .brand-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}

/* EMPTY STATE */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty-state p { margin-bottom: 16px; font-size: 14px; }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .turmas-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body.has-sidebar { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: -260px;
    transition: left 0.25s;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }
  .sidebar.open { left: 0; }
  .sidebar-toggle {
    display: flex !important;
    position: fixed; top: 16px; left: 16px;
    z-index: 999;
    width: 40px; height: 40px;
    background: var(--ink); color: var(--paper);
    border-radius: 10px; border: none;
    align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer;
  }
  .main { padding: 64px 20px 40px; }
  .turmas-grid { grid-template-columns: 1fr; }
  .quick-stats { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
}
.sidebar-toggle { display: none; }

/* Compat com páginas antigas que usam .page-header e .subtitle */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-header .subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.link-back {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 10px;
  transition: all 0.15s;
}
.link-back:hover { background: var(--line-soft); color: var(--ink); }

/* Compat com classes antigas */
.q-list, .q-item { /* legado - usado em listas antigas */ }
.q-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: all 0.15s;
}
.q-item:hover { border-color: var(--ink); }
.q-item .enunciado { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.q-item .alts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 12px; color: var(--muted); }
.q-item .alts .alt.correct { color: var(--green); font-weight: 700; }
.q-item .meta { display: flex; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }

/* Compat: tag colorida antiga (tag-correct, etc) */
.tag-correct { background: var(--green-bg); color: var(--green); }

/* Abas (página antiga de import) */
.abas { display: flex; gap: 4px; margin-bottom: 20px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; width: fit-content; }
.aba {
  padding: 10px 18px; border-radius: 9px;
  color: var(--muted); text-decoration: none;
  font-weight: 600; font-size: 14px;
}
.aba:hover { color: var(--ink); }
.aba.active { background: var(--ink); color: var(--paper); }

/* csv-exemplo antigo */
.csv-exemplo {
  background: #073b5c;
  color: #f3f4f6;
  border-radius: 12px;
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  margin-bottom: 12px;
}
.csv-exemplo code { background: transparent; padding: 0; }

/* Modo radios (quizzes) */
.modo-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modo-opt {
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 14px;
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer;
  transition: all 0.15s;
}
.modo-opt:hover { border-color: var(--muted-2); }
.modo-opt input[type="radio"] { margin-top: 3px; }
.modo-opt.selected {
  background: var(--accent-bg);
  border-color: var(--accent);
}
.modo-opt strong { display: block; margin-bottom: 4px; font-weight: 700; }
.modo-opt small { color: var(--muted); font-size: 12px; }

/* Modal exclusão (alunos) */
.modal-excluir {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-excluir-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}
.modal-excluir h3 { margin-bottom: 8px; }
.opt-renumerar { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.opt-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.opt-card:hover { border-color: var(--muted-2); }
.opt-card input { margin-top: 3px; }
.marker-id { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--accent-hi); }

/* Compat: dash-grid / dash-stat (resultado, rankings antigos) */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.dash-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.dash-stat:hover { transform: translateY(-2px); border-color: var(--ink); color: inherit; }
.dash-stat .num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--ink);
}
.dash-stat .lbl {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* =============================================================================
 * TEMA INOVA (out/2026) — claro, azul-marinho #004e7a + laranja #ff7400.
 * Só visual: nenhuma regra de negócio. Pra voltar ao visual anterior,
 * apague daqui até o fim do arquivo.
 * ============================================================================= */
:root {
  --navy:        #004E7A;
  --navy-hi:     #003A5C;
  --navy-bg:     #E8F1F7;
  --bg:          #F4F8FB;
  --paper:       #FFFFFF;
  --line:        #DDE7EE;
  --line-soft:   #EEF4F8;
  --line-hi:     #C5D3DE;
  --ink:         #0B2A3D;
  --muted:       #5B7083;
  --muted-2:     #93A3B1;
  --accent:      #FF7400;
  --accent-hi:   #E06500;
  --accent-bg:   #FFF1E3;
  --accent-glow: rgba(255, 116, 0, .28);
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --shadow:      0 4px 14px rgba(0, 78, 122, .07);
  --shadow-lg:   0 20px 44px -20px rgba(0, 78, 122, .30);
  --font-titulo: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;
}
body { background: var(--bg); color: var(--ink); }
h1, h2, h3, .page-head h1, .greeting h1, .card-header h3, .brand-name { font-family: var(--font-titulo); }
:focus-visible { outline: 3px solid rgba(0, 78, 122, .35); outline-offset: 2px; border-radius: 6px; }

/* ---------- Menu lateral (claro) ---------- */
.sidebar { background: #fff; border-right: 1px solid var(--line); box-shadow: 4px 0 24px -18px rgba(0,78,122,.25); }
.brand-mark { background: var(--navy); color: #fff; border-radius: 11px; }
.sidebar .brand-mark .brand-edu, .brand-mark .brand-edu { color: var(--accent); }
.brand-name { color: var(--navy); }
.brand-edu { color: var(--accent); }
.brand-sub { color: var(--accent); }
.btn-iniciar { background: var(--accent); color: #fff; border-radius: 12px; font-weight: 700;
  box-shadow: 0 10px 22px -12px rgba(255, 116, 0, .95); }
.btn-iniciar:hover { background: var(--accent-hi); color: #fff; }
.btn-iniciar .play { background: #fff; color: var(--accent); }
.nav-label { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted-2); font-weight: 600; }
.nav-item { color: var(--muted); border-radius: 10px; position: relative; }
.nav-item:hover { background: var(--line-soft); color: var(--navy); }
.nav-item.active { background: var(--navy); color: #fff; font-weight: 700; box-shadow: 0 8px 18px -12px rgba(0,78,122,.8); }
.nav-item.active::after { content: ''; position: absolute; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nav-item.active .nav-icon { color: #FFB066; }
.nav-item.active .nav-count { background: rgba(255,255,255,.18); color: #fff; margin-right: 12px; }
.nav-count { background: var(--line-soft); color: var(--muted); }
.sidebar-footer { border-top-color: var(--line); }
.avatar { background: var(--accent-bg); color: var(--accent-hi); }
.sidebar-toggle { background: var(--navy) !important; color: #fff !important; }

/* Selo "um produto Inova Web Plus" */
.inova-selo { display: flex; align-items: center; gap: 8px; margin: 12px 4px 0; padding: 9px 10px;
  border-radius: 10px; background: var(--navy-bg); color: var(--navy); text-decoration: none;
  font-size: 11.5px; line-height: 1.2; }
.inova-selo:hover { color: var(--navy); background: #DCEAF3; }
.inova-selo i { width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff; font-style: normal;
  font-weight: 800; font-size: 13px; display: grid; place-items: center; position: relative; flex: none; }
.inova-selo i::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--navy-bg); }
.inova-selo b { font-weight: 800; }
.inova-selo span { color: var(--muted); }

/* ---------- Cabeçalhos ---------- */
.page-head { border-bottom-color: var(--line); }
.page-head h1 { font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.page-head h1 .icon-big { background: var(--navy); color: #fff; border-radius: 13px; box-shadow: inset 0 -3px 0 var(--accent); }
.page-head h1 .turma-badge { background: var(--navy); color: #fff; }
.greeting h1 { font-weight: 800; letter-spacing: -0.03em; }
.greeting h1 .name { color: var(--navy); }
.greeting-date { box-shadow: var(--shadow); }
.greeting-date .day { color: var(--accent); }

/* ---------- Cards ---------- */
.card, .table-card, .stat, .quick-stat { border-color: var(--line); box-shadow: 0 1px 2px rgba(0,78,122,.05); }
.card-title { text-transform: none; letter-spacing: -0.01em; font-family: var(--font-titulo); font-size: 17px; color: var(--ink); }
.card-title .num { background: var(--navy); color: #fff; }
.card-header .ico-big { background: var(--navy-bg); color: var(--navy); }
.stat:hover { border-color: var(--line-hi); box-shadow: var(--shadow); }
.stat .icon { background: var(--navy-bg); color: var(--navy); }
.stat .value { font-family: var(--font-titulo); color: var(--ink); }
.stat.featured { background: linear-gradient(140deg, var(--navy), #00669E); border-color: var(--navy); color: #fff; }
.stat.featured .value { color: #fff; }
.stat.featured .icon { background: rgba(255,255,255,.14); color: #FFB066; }
.stat.featured .label { color: rgba(255,255,255,.75); }
.stat.featured .delta { color: #FFB066; }
.quick-stat .ico-circle { background: var(--accent-bg); color: var(--accent-hi); }

/* ---------- Botões ---------- */
.btn { border-radius: 10px; }
.btn:hover { border-color: var(--navy); color: var(--navy); box-shadow: var(--shadow); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-hi); border-color: var(--navy-hi); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: #fff; }

/* ---------- Formulários ---------- */
.form-row label { color: var(--ink); }
.form-input, .form-row input:not([type=checkbox]):not([type=radio]):not([type=file]),
.form-row select, .form-row textarea { border-radius: 10px; border-color: var(--line-hi); background: #fff; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus, .form-input:focus {
  border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0, 78, 122, .12); }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); }

/* ---------- Tabelas ---------- */
.table thead th { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--muted); background: #F6F9FB; }
.table tbody tr:hover { background: #F6F9FB; }
.table td.num { font-family: var(--font-titulo); font-weight: 700; }
.badge-status.ativo, .pill-green { font-weight: 700; }

/* ---------- Telas de entrada (login, cadastro, senha, checkout) ---------- */
body:not(.has-sidebar) {
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(255,116,0,.10), transparent 60%),
    radial-gradient(1000px 520px at -10% -20%, rgba(0,78,122,.14), transparent 60%),
    var(--bg);
}
.center-screen .panel { border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0,78,122,.35); }
.center-screen .inova-selo { justify-content: center; margin: 18px 0 0; background: transparent; }

@media (max-width: 900px) {
  .page-head h1 { font-size: 27px; }
  .greeting h1 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .stat, .nav-item { transition: none !important; transform: none !important; }
}
