/* ═══════════════════════════════════════════════════════════
   REENGLISH — Design Gamificado
   Paleta: Roxo/Violeta + Dourado + Branco
   ═══════════════════════════════════════════════════════════ */

:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --primary-bg: #f5f3ff;
  --success: #059669;
  --finish: #7c3aed;
  --finish-dark: #6d28d9;
  --gold: #f59e0b;
  --gold-dark: #d97706;
  --gold-bg: #fffbeb;
  --bg: #f5f3ff;
  --card-bg: #ffffff;
  --text: #1e1b4b;
  --muted: #6b7280;
  --border: #ede9fe;
  --danger: #dc2626;
  --radius: 20px;
}

/* ─── RESET ────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── BODY ─────────────────────────────────────────────── */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text);
  background:
    radial-gradient(ellipse 700px 500px at 15% -5%,  rgba(139, 92, 246, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 600px 600px at 90% 105%, rgba(124, 58, 237, 0.10) 0%, transparent 55%),
    #f0ebff;
  font-family: ui-sans-serif, "Segoe UI", system-ui, sans-serif;
}

.container { width: 100%; max-width: 560px; }
.screen { display: none; }
.screen.active { display: block; }

/* ─── PANEL ─────────────────────────────────────────────── */
.panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 8px 40px rgba(109, 40, 217, 0.13), 0 0 0 1px rgba(109, 40, 217, 0.07);
}

.panel-center { text-align: center; }

/* ─── BRAND ─────────────────────────────────────────────── */
.brand {
  background: linear-gradient(135deg, #6d28d9 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.subtitle {
  margin-top: 6px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: .92rem;
}

h2 { margin-bottom: 14px; font-size: 1.1rem; font-weight: 700; }
a.btn { text-decoration: none; }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, background .15s;
  letter-spacing: 0.01em;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  box-shadow: 0 6px 26px rgba(124, 58, 237, 0.55);
}

.btn-success {
  color: #fff;
  background: linear-gradient(135deg, #059669 0%, #34d399 100%);
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.35);
}
.btn-success:hover {
  background: linear-gradient(135deg, #047857 0%, #10b981 100%);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f87171);
  border: none;
}
.btn-danger:hover { background: linear-gradient(135deg, #b91c1c, #dc2626); }

.btn-ghost {
  color: var(--primary);
  background: var(--primary-bg);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: #ece8ff; }

.btn-finish {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}
.btn-finish:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-small { padding: 10px 14px; font-size: .88rem; border-radius: 10px; }

/* ─── BADGE ──────────────────────────────────────────────── */
.badge {
  min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px; border-radius: 999px;
  color: #fff; background: var(--danger);
  font-size: .72rem; font-weight: 800; line-height: 1;
}

.btn-col, .stack-sm { display: flex; flex-direction: column; gap: 11px; }
.stack-sm { margin-top: 14px; }

/* ─── GOAL TOGGLE ────────────────────────────────────────── */
.goal-toggle {
  display: flex; gap: 4px; margin-bottom: 18px;
  padding: 4px; border-radius: 12px; background: var(--primary-bg);
}
.goal-opt {
  flex: 1; padding: 10px; border: 0; border-radius: 9px;
  color: var(--muted); background: transparent;
  cursor: pointer; font-size: .9rem; font-weight: 500;
  text-align: center; transition: all .15s;
}
.goal-opt.active {
  color: var(--primary); background: var(--card-bg);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.15);
}

/* ─── INPUTS ──────────────────────────────────────────────── */
.input-wrap { margin-bottom: 18px; }
.input-wrap label {
  display: block; margin-bottom: 7px;
  color: var(--muted); font-size: .86rem; font-weight: 600;
}
.input-wrap input {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--border); border-radius: 12px;
  outline: none; font-size: 1.25rem; font-weight: 700;
  text-align: center; background: #fafafe;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.info-box {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 20px; padding: 10px 14px;
  border: 1px solid #c4b5fd; border-radius: 10px;
  color: #5b21b6; background: #ede9fe; font-size: .83rem;
}

.link-btn {
  border: 0; color: var(--primary); background: none;
  cursor: pointer; font-size: .8rem; text-decoration: underline;
  white-space: nowrap;
}

/* ─── STATS BAR (JOGO HUD) ────────────────────────────────── */
.stats-bar {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.stat {
  flex: 1; padding: 12px 8px; border-radius: 14px;
  background: var(--card-bg); text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.08);
}
.stat-val {
  color: var(--primary); font-size: 1.4rem;
  font-weight: 800; line-height: 1;
}
.stat-label {
  margin-top: 3px; color: var(--muted);
  font-size: .68rem; letter-spacing: .05em; text-transform: uppercase;
}

/* ─── PROGRESS BAR XP ─────────────────────────────────────── */
.prog-wrap { margin-bottom: 18px; }
.prog-bar {
  height: 10px; overflow: hidden; border-radius: 5px;
  background: #e8e4ff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}
.prog-fill {
  width: 0%; height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
  transition: width .45s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}
.prog-text {
  margin-top: 5px; color: var(--muted);
  font-size: .78rem; text-align: right; font-weight: 600;
}

/* ─── FLASHCARD ─────────────────────────────────────────────── */
.flashcard {
  position: relative; min-height: 160px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin-bottom: 18px; padding: 36px 28px 28px;
  border: 2px solid var(--border); border-radius: 20px;
  background: #fff; text-align: center;
  box-shadow: 0 4px 24px rgba(109, 40, 217, 0.09);
  transition: border-color .3s, box-shadow .3s;
}
.flashcard.revealed {
  border-color: #6ee7b7;
  box-shadow: 0 4px 24px rgba(5, 150, 105, 0.2);
}

.card-badge {
  position: absolute; top: 11px; right: 13px;
  padding: 3px 10px; border-radius: 20px;
  color: var(--primary); background: #f0eeff;
  font-size: .72rem; font-weight: 700;
}

.card-type {
  position: absolute; top: 10px; left: 12px;
  padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.card-type.type-s { border: 1px solid #c4b5fd; color: #5b21b6; background: #ede9fe; }
.card-type.type-p { border: 1px solid #fde68a; color: #b45309; background: #fffbeb; }
.card-type:empty { display: none; }

.card-front {
  width: 100%; font-size: 1.2rem; font-weight: 600;
  line-height: 1.55; padding: 20px;
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  border-radius: 14px; border: 2px solid #fbbf24;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}
.card-front::before {
  content: "Repita e aprenda com a expressão abaixo";
  display: block; font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #a16207; text-align: center; margin-bottom: 12px;
}

.word-lnk {
  display: inline-block; border-bottom: 1px dashed transparent;
  cursor: pointer; transition: all .2s;
}
.word-lnk:active { background: #ede9fe; transform: scale(1.1); }

@media (hover: hover) {
  .word-lnk:hover { border-bottom-color: var(--primary); color: var(--primary); }
}

.speaker-btn {
  display: inline-block; margin-right: 8px; cursor: pointer;
  font-size: 1.4rem; user-select: none; vertical-align: middle;
  transition: transform .1s;
}
.speaker-btn:active { transform: scale(1.2); }

.card-back {
  width: 100%; margin-top: 20px; padding: 20px;
  background: #fff; border-radius: 14px;
  border: 1px solid var(--border); color: var(--text);
  font-size: 1.05rem; font-weight: 600; line-height: 1.45;
  animation: fadeIn .25s ease; text-align: center;
}
.card-back::before {
  content: "Tradução e detalhes";
  display: block; font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); text-align: center; margin-bottom: 12px;
}

/* ─── EXERCÍCIO VERBAL ───────────────────────────────────── */
.card-exercise {
  width: 100%; margin-top: 20px; padding: 20px;
  background: #f5f3ff; border-radius: 14px;
  border: 1px solid #ddd6fe;
}
.ex-title {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: #7c3aed;
  text-align: center; margin-bottom: 4px;
}
.ex-regularity {
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.10em; text-align: center; margin-bottom: 14px;
}
.ex-regularity.ex-regular { color: #1a5c2a; }
.ex-regularity.ex-irregular { color: #c62828; }

.ex-verb-hint {
  display: none; font-size: 0.9rem; font-weight: 600;
  color: var(--success); text-align: center;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.flashcard.revealed .ex-verb-hint { display: block; }

.ex-question { margin-bottom: 16px; text-align: left; }
.ex-question:last-child { margin-bottom: 0; }
.ex-tense {
  font-size: 0.68rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 5px; text-align: center;
}
.ex-tense-past-regular { color: #1a5c2a; }
.ex-tense-past-irregular { color: #c62828; }
.ex-sentence {
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  line-height: 1.5; margin-bottom: 2px; text-align: center;
}
.ex-blank {
  display: inline-block; min-width: 64px; padding: 0 4px;
  border-bottom: 2px solid var(--primary);
  color: var(--primary); font-weight: 700; text-align: center;
  transition: color .15s, border-color .15s;
}
.ex-blank.correct { color: var(--success); border-bottom-color: var(--success); }
.ex-blank.wrong { color: var(--danger); border-bottom-color: var(--danger); }

.ex-options {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  justify-content: center;
}
.ex-options[data-count="5"],
.ex-options[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
.ex-options[data-count="7"],
.ex-options[data-count="8"] { grid-template-columns: repeat(4, 1fr); }

.ex-opt {
  min-width: 0; padding: 10px 6px;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text);
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: all .15s; text-align: center; line-height: 1.2;
}
.ex-opt:hover:not(:disabled) {
  border-color: var(--primary); background: #ede9fe; color: var(--primary);
}
.ex-opt.correct { border-color: var(--success); background: #d1fae5; color: #065f46; }
.ex-opt.wrong { border-color: var(--danger); background: #fee2e2; color: var(--danger); }
.ex-opt:disabled { cursor: default; opacity: 0.75; }

.ex-translation {
  font-size: 0.85rem; color: var(--muted); margin-top: 4px;
  margin-bottom: 10px; font-style: italic; text-align: center;
}
.ex-speaker-btn {
  display: inline; padding: 0 4px; border: none; background: none;
  font-size: 0.95rem; cursor: pointer; vertical-align: middle;
  opacity: 0.7; transition: opacity .15s;
}
.ex-speaker-btn:hover { opacity: 1; }

/* ─── VERSO ESTRUTURADO ─────────────────────────────────── */
.cb-translation {
  font-size: 1.15rem; font-weight: 700; color: var(--success);
  margin-bottom: 6px; text-align: center;
}
.cb-pt-example {
  font-size: 0.86rem; color: var(--muted);
  font-style: italic; margin-bottom: 8px; text-align: center;
}
.cb-pronunciation {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  background: #fffbeb; border: 1px solid #fde68a;
  color: #b45309; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em; margin: 4px auto 10px;
}
.cb-mentalize {
  text-align: center; font-size: 0.82rem; font-style: italic;
  color: var(--primary); margin: 10px 0 6px; padding: 8px 14px;
  border-radius: 10px; background: #f5f3ff; border: 1px solid #ddd6fe;
}
.cb-type-badge {
  display: block; text-align: center; margin: 0 auto 12px;
  width: fit-content; padding: 2px 12px; border-radius: 20px;
  background: #d1fae5; border: 1px solid #6ee7b7;
  color: #065f46; font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.cb-conj-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem; margin-bottom: 14px;
  border-radius: 8px; overflow: hidden; border: 1px solid #059669;
}
.cb-conj-table thead th {
  background: #f0fdf4; color: #065f46; font-weight: 700;
  padding: 7px 6px; border-bottom: 1px solid #059669;
  border-right: 1px solid #059669; text-align: center;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.cb-conj-table thead th:last-child { border-right: none; }
.cb-conj-table tbody td {
  padding: 8px 6px; text-align: center; color: var(--text);
  background: #fff; font-weight: 500; border-right: 1px solid #059669;
}
.cb-conj-table tbody td:last-child { border-right: none; }
.cb-examples {
  width: 100%; text-align: left; border-top: 1px dashed #059669;
  padding-top: 10px; margin-top: 2px;
}
.cb-examples-title {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-bottom: 8px;
}
.cb-example-row {
  display: grid; grid-template-columns: 105px 1fr;
  gap: 6px; margin-bottom: 5px; align-items: start;
}
.cb-tense {
  color: #059669; font-weight: 700; font-size: 0.75rem;
  padding-top: 3px; white-space: nowrap;
}
.cb-sentence { color: var(--text); font-size: 0.85rem; font-weight: 400; line-height: 1.4; }
.cb-example-translation {
  color: var(--muted); font-style: italic; font-weight: normal;
  display: block; font-size: 0.78rem; margin-top: 2px;
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.hidden { display: none !important; }

.key-hint { margin-top: 10px; color: #94a3b8; font-size: .77rem; text-align: center; }
kbd {
  display: inline-block; padding: 2px 7px;
  border: 1px solid var(--border); border-radius: 5px;
  background: #f8f5ff; font-family: inherit; font-size: .73rem;
}

/* ─── TELA DE CONCLUSÃO ──────────────────────────────────── */
.big-emoji {
  display: block; margin-bottom: 12px;
  font-size: 4rem; text-align: center;
  animation: pulse 1.5s infinite;
}

.cg {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin: 20px 0;
}
.cs {
  padding: 18px; border-radius: 14px;
  background: var(--primary-bg); text-align: center;
  border: 1px solid var(--border);
}
.cs-val { color: var(--primary); font-size: 2.2rem; font-weight: 800; }
.cs-lbl { margin-top: 3px; color: var(--muted); font-size: .8rem; }

.summary-stats {
  margin: 20px 0; padding: 18px;
  background: var(--primary-bg); border-radius: 14px;
  border: 1px solid var(--border);
}
.summary-stats h3 { margin-bottom: 14px; font-size: 1rem; color: var(--text); }
.summary-no-errors {
  font-size: 0.95rem; color: var(--success);
  text-align: center; padding: 20px 10px; line-height: 1.5;
}
.point-item {
  padding: 12px; margin-bottom: 10px;
  background: var(--card-bg); border-radius: 10px;
  border: 1px solid var(--border);
}
.point-item:last-child { margin-bottom: 0; }
.point-tense {
  font-size: 0.68rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px;
}
.point-sentence-row { margin-top: 4px; }
.point-speaker {
  display: inline; padding: 0 4px; border: none;
  background: none; font-size: 0.9rem; cursor: pointer;
  vertical-align: middle; opacity: 0.7;
}
.point-speaker:hover { opacity: 1; }

.divider { margin: 20px 0; border: 0; border-top: 1px solid var(--border); }

/* ─── UPDATE / CSV SECTION ───────────────────────────────── */
.update-section { margin-top: 16px; }
.update-toggle {
  width: 100%; display: flex; align-items: center; gap: 6px;
  padding: 6px 0; border: 0; color: var(--muted); background: none;
  cursor: pointer; font-size: .83rem; text-align: left;
}
.update-toggle:hover { color: var(--primary); }
.update-body { display: none; margin-top: 10px; }
.update-body.open { display: block; }
.update-body p { margin-bottom: 8px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.update-body textarea {
  width: 100%; min-height: 100px; margin-bottom: 10px;
  padding: 10px 12px; border: 2px solid var(--border); border-radius: 10px;
  outline: none; font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: .82rem; resize: vertical; transition: border-color .15s;
}
.update-body textarea:focus { border-color: var(--primary); }

.update-err, .update-ok { display: none; margin-bottom: 8px; font-size: .8rem; }
.update-err { color: var(--danger); }
.update-ok { color: var(--success); }

.last-session { margin-top: 5px; margin-bottom: 20px; color: var(--muted); font-size: .75rem; text-align: center; }

.status { padding: 8px 12px; border-radius: 8px; font-size: .8rem; }
.status.ok { color: #065f46; background: #d1fae5; }
.status.err { color: var(--danger); background: #fee2e2; }
.status.loading { color: #5b21b6; background: #ede9fe; }

/* ─── FEEDBACK / REPLIES ──────────────────────────────────── */
.feedback-panel, .admin-feedback {
  margin-top: 18px; padding: 14px;
  border: 1px solid var(--border); border-radius: 14px; background: #f8f5ff;
}
.feedback-panel h3, .admin-feedback h3 { margin-bottom: 10px; font-size: .95rem; }
.feedback-list, .feedback-reply-list { display: flex; flex-direction: column; gap: 10px; }
.feedback-item {
  padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff;
  font-size: .82rem; line-height: 1.45;
}
.feedback-meta { margin-bottom: 6px; color: var(--muted); font-size: .74rem; }
.feedback-message, .feedback-reply { margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.feedback-reply { padding: 8px; border-radius: 8px; color: #065f46; background: #d1fae5; }
.feedback-empty { color: var(--muted); font-size: .82rem; text-align: center; }

/* ─── ADMIN ───────────────────────────────────────────────── */
.admin-help { margin-bottom: 10px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.card-admin-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 8px;
}
.upload-label { margin: 0; }

.feedback-item textarea, .modal-panel textarea {
  width: 100%; min-height: 92px; margin-top: 10px;
  padding: 10px; border: 2px solid var(--border);
  border-radius: 10px; outline: none; font: inherit; resize: vertical;
}
.feedback-item textarea:focus,
.modal-panel textarea:focus { border-color: var(--primary); }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
}
.modal-panel {
  width: min(100%, 520px); padding: 24px;
  border-radius: 18px; background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
}
.modal-panel h2 { margin-bottom: 8px; }
.modal-panel p, .feedback-context { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.feedback-context { margin-top: 10px; font-weight: 700; }
.modal-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-top: 14px;
}

/* ─── GAME CONTROLS ───────────────────────────────────────── */
.revealed-controls {
  width: 100%; display: flex; flex-direction: column; gap: 11px;
}
.action-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px; margin-top: 10px;
}
.action-row .btn { font-size: 0.8rem; padding: 7px 4px !important; white-space: nowrap; }

.secondary-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.secondary-action-row .btn { min-width: 0; padding-right: 8px; padding-left: 8px; font-size: .82rem; }

.delay-wrap {
  display: flex; align-items: center; gap: 4px;
  padding: 4px; border-radius: 11px; background: var(--border);
}
.delay-wrap span { margin-left: 4px; color: var(--muted); font-size: .7rem; }
.delay-input {
  width: 45px; padding: 6px; border: 0; border-radius: 7px;
  font-size: .9rem; font-weight: 700; text-align: center;
}
.delay-button { width: auto; padding: 6px 10px; border-radius: 8px; font-size: .8rem; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 520px) {
  body { align-items: flex-start; padding: 12px; }
  .panel { padding: 28px 22px; }
  .action-row { grid-template-columns: 1fr; }
  .secondary-action-row { grid-template-columns: 1fr; }
  .card-admin-actions { grid-template-columns: 1fr; }
  .cb-conj-table thead th, .cb-conj-table tbody td { padding: 6px 4px; font-size: 0.72rem; }
  .cb-example-row { grid-template-columns: 90px 1fr; }
  .flashcard { padding: 30px 18px 22px; }
}

/* ═══════════════════════════════════════════════════════════
   ADMIN DASHBOARD
   ═══════════════════════════════════════════════════════════ */
.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 20px; justify-content: center;
}
.admin-tab {
  padding: 8px 16px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--primary-bg); color: var(--muted); cursor: pointer;
  transition: all 0.2s;
}
.admin-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-tab .badge { margin-left: 4px; font-size: 0.7rem; padding: 1px 6px; border-radius: 10px; }
.admin-panel { margin-top: 4px; }
.admin-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.admin-stat-card {
  background: var(--primary-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 12px; text-align: center;
}
.admin-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.admin-stat-label {
  font-size: 0.7rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; text-align: left; }
.admin-table th {
  padding: 10px 8px; color: var(--muted); border-bottom: 2px solid var(--border);
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.admin-table .base-badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; }
.base-badge.personal { background: #e8f5e9; color: #1a5c2a; }
.base-badge.global { background: #ede9fe; color: #5b21b6; }
.admin-table .btn-tiny {
  padding: 4px 8px; font-size: 0.7rem; border-radius: 4px;
  border: 1px solid var(--border); background: var(--primary-bg);
  cursor: pointer; margin-right: 4px;
}
.admin-table .btn-tiny.danger { color: var(--danger); border-color: var(--danger); }
.admin-info-block {
  background: var(--primary-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; font-size: 0.85rem;
}
.form-row { margin-bottom: 12px; }
.input-select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.9rem; background: var(--primary-bg);
}
.feedback-list { max-height: 500px; overflow-y: auto; }
.feedback-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; font-size: 0.85rem; }
.feedback-item .fb-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 6px; }
.feedback-item .fb-msg { margin-bottom: 4px; }
.feedback-item .fb-reply { background: #ecfdf5; border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 0.82rem; }
.feedback-item textarea { width: 100%; margin-top: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; resize: vertical; min-height: 60px; }
.feedback-item .fb-actions { margin-top: 8px; display: flex; gap: 6px; }
.feedback-empty { text-align: center; padding: 20px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  padding: 12px 24px; border-radius: 12px; font-size: 0.85rem; font-weight: 600;
  color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  animation: toastIn 0.25s ease-out; pointer-events: auto;
  max-width: 360px; text-align: center;
}
.toast.success { background: linear-gradient(135deg, #065f46, #059669); }
.toast.error   { background: linear-gradient(135deg, #991b1b, #dc2626); }
.toast.info    { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.toast.out { animation: toastOut 0.2s ease-in forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); }  to { opacity: 0; transform: translateY(14px); } }

/* ─── CONFIRM MODAL ──────────────────────────────────────── */
#confirm-modal .modal-panel { max-width: 400px; text-align: center; }
#confirm-modal .modal-panel p { margin: 0 0 16px; font-size: 0.95rem; }

/* ─── UTILITY ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 20px; }
.mb-sm { margin-bottom: 10px; }
.mb-md { margin-bottom: 15px; }

.pin-input { text-align: center; font-size: 1.5rem; letter-spacing: 0.5rem; }
.login-hint { color: #888; font-size: 0.8rem; display: block; margin-top: 5px; }

.stats-grid {
  margin-top: 25px; padding: 16px;
  background: var(--primary-bg); border-radius: 14px;
  font-size: 0.85rem; display: flex; flex-wrap: wrap;
  gap: 10px; justify-content: center; border: 1px solid var(--border);
}
.stat-item { flex: 1 1 40%; text-align: center; }
.stat-item.full { flex: 1 1 100%; }
.stat-item.success { color: var(--success); }
.stat-item.muted { color: var(--muted); }
.stat-item.primary { color: var(--primary); }
.stat-item.finish { color: var(--finish); }

.admin-panel-wide { max-width: 900px; }
.admin-error-box { display: none; margin-bottom: 15px; text-align: center; }
.admin-table-wrap { overflow-x: auto; }
.table-loading { text-align: center; padding: 20px; }

.card-edit-btn {
  position: absolute; bottom: 12px; right: 12px;
  border: none; background: none; font-size: 1.2rem;
  cursor: pointer; opacity: 0.6; transition: opacity 0.2s;
}
.card-save-btn {
  position: absolute; bottom: 12px; right: 12px;
  padding: 6px 12px; font-size: 0.85rem; z-index: 10;
}

/* ═══════════════════════════════════════════════════════════
   ENGAGEMENT GAMIFICADO — HUD Escuro
   ═══════════════════════════════════════════════════════════ */

.engagement-panel {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4c1d95 100%);
  border-radius: 18px;
  padding: 20px 20px 16px;
  margin-bottom: 20px;
  color: #fff;
  text-align: center;
  box-shadow: 0 8px 32px rgba(49, 46, 129, 0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid rgba(139, 92, 246, 0.35);
  position: relative;
  overflow: hidden;
}

/* Brilho decorativo de fundo */
.engagement-panel::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.streak-banner {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.streak-icon {
  font-size: 2rem;
  animation: pulse 2s ease-in-out infinite;
  display: inline-block;
}
.streak-text { color: #fbbf24; text-shadow: 0 0 12px rgba(251,191,36,0.4); }
.streak-sub {
  display: block; font-size: 0.8rem; color: rgba(255,255,255,0.65);
  font-weight: 400; margin-top: 2px;
}

.goal-quick {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 0.9rem; color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
}
.goal-emoji { font-size: 1.2rem; }
.goal-quick .btn-ghost {
  color: #a5b4fc; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2); font-size: 0.75rem;
  padding: 4px 10px; border-radius: 6px;
}
.goal-quick .btn-ghost:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ─── GOAL HUD (número grande editável no painel de engajamento) ── */
.goal-hud {
  margin-bottom: 10px;
}
.goal-hud-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
  cursor: default;
}
.goal-hud-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}
.goal-value-hud {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  font-size: 2.8rem;
  font-weight: 900;
  text-align: center;
  width: 90px;
  outline: none;
  padding: 0 4px 2px;
  line-height: 1;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
  transition: border-bottom-color .2s;
  /* remove spinner */
  -moz-appearance: textfield;
}
.goal-value-hud::-webkit-inner-spin-button,
.goal-value-hud::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.goal-value-hud:focus { border-bottom-color: #fcd34d; outline: none; }

.goal-hud-unit {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  padding-bottom: 4px;
}

/* Botões − e + do goal */
.goal-adj-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
  font-weight: 700;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .1s;
  line-height: 1;
  flex-shrink: 0;
  padding: 0;
}
.goal-adj-btn:hover { background: rgba(255, 255, 255, 0.22); transform: scale(1.1); }
.goal-adj-btn:active { transform: scale(0.95); }

/* Botão Começar dentro do HUD */
.btn-start-hud {
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1e1b4b;
  background: linear-gradient(135deg, #fbbf24, #fcd34d);
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.45);
  transition: transform .15s, box-shadow .15s;
}
.btn-start-hud:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.6);
}
.btn-start-hud:active { transform: translateY(0); }

.daily-bar-wrap { margin-top: 10px; }
.daily-bar {
  height: 10px; background: rgba(255,255,255,0.12); border-radius: 5px;
  overflow: hidden; margin-bottom: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.daily-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #fcd34d);
  border-radius: 5px; transition: width 0.5s ease;
  width: 0%;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.daily-bar-text { font-size: 0.75rem; color: rgba(255,255,255,0.65); font-weight: 600; }

/* ─── SQUAD ──────────────────────────────────────────────── */
.squad-panel {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 16px; padding: 16px; margin-bottom: 18px;
}
.squad-header { font-weight: 700; font-size: 1rem; margin-bottom: 12px; }
.squad-members { display: flex; flex-direction: column; gap: 8px; }
.squad-member {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #fff; border-radius: 12px;
  border: 1px solid var(--border);
}
.squad-member-you { border-color: var(--primary); background: #f5f3ff; }
.squad-member-name { font-weight: 600; font-size: 0.9rem; }
.squad-member-streak { font-size: 0.8rem; color: #92400e; }
.squad-member-progress { font-size: 0.75rem; color: var(--muted); }
.squad-member-done { color: var(--success); font-weight: 700; }
.squad-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
/* ─── COMPLETE SCREEN ─────────────────────────────────────── */
.complete-streak { font-size: 1.1rem; font-weight: 700; color: #92400e; margin-bottom: 10px; }
.complete-badges { margin-bottom: 16px; }
.complete-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d; border-radius: 20px;
  padding: 5px 14px; margin: 3px; font-size: 0.85rem; font-weight: 700;
  animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #92400e;
}
@keyframes badgePop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── SQUAD INVITE BANNER ─────────────────────────────────── */
.squad-invite-banner {
  background: #ede9fe; border: 1px solid #c4b5fd;
  border-radius: 16px; padding: 16px; margin-bottom: 18px; text-align: center;
}

/* ─── FORGOT PIN FORM ─────────────────────────────────────── */
.forgot-pin-form {
  margin-top: 16px; padding: 20px 16px;
  background: #fafafe; border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 2px 8px rgba(124,58,237,0.06);
}
.forgot-pin-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.forgot-pin-desc { font-size: 0.9rem; color: #6b7280; line-height: 1.5; margin: 0 0 16px; }
.forgot-pin-desc strong { color: var(--primary); font-weight: 600; }

.input-full {
  width: 100%; font-size: 1rem; padding: 14px 16px;
  border: 1.5px solid #d1d5db; border-radius: 10px;
  box-sizing: border-box; -webkit-appearance: none;
  background: #f9fafb; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-full:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); background: #fff;
}
.code-input {
  font-size: 1.5rem; letter-spacing: 8px; text-align: center;
  font-weight: 700; color: var(--primary); font-family: monospace;
}
.code-input::placeholder {
  font-size: 0.9rem; letter-spacing: normal; font-weight: 400;
  font-family: system-ui; color: #9ca3af;
}

/* ═══════════════════════════════════════════════════════════
   PAYMENT SCREEN
   ═══════════════════════════════════════════════════════════ */
.payment-price-box {
  text-align: center; padding: 24px;
  background: var(--primary-bg); border-radius: 16px; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.payment-de { display: block; font-size: 0.85rem; color: var(--muted); text-decoration: line-through; }
.payment-price { font-size: 2.8rem; font-weight: 800; color: var(--primary); }
.payment-period { display: block; font-size: 0.9rem; color: var(--muted); }
.payment-guarantee { text-align: center; font-size: 0.8rem; color: var(--success); margin-bottom: 16px; }
.payment-trial-msg {
  text-align: center; padding: 14px 16px; margin-bottom: 16px;
  background: #fef3c7; border: 1px solid #fcd34d; border-radius: 10px;
  font-size: 0.88rem; color: #92400e; line-height: 1.5;
}
.payment-trial-msg strong { color: #78350f; }
.pix-qr-wrap { text-align: center; padding: 16px; background: #fff; border-radius: 12px; border: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN — Tela de entrada gamificada
   ═══════════════════════════════════════════════════════════ */

.login-hero {
  margin-bottom: 20px;
}

.login-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border: 1px solid #c4b5fd;
  color: #5b21b6;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.login-tagline {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0;
  margin-top: 6px;
}

.login-features {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 8px;
}

.login-features span {
  padding: 6px 13px;
  border-radius: 20px;
  background: var(--primary-bg);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .container { padding: 12px; }
  .flashcard { padding: 24px 14px 18px; }
  .brand { font-size: 1.6rem; }
  .admin-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-table-wrap { -webkit-overflow-scrolling: touch; }
  .card-admin-actions { flex-direction: column; }
  .card-admin-actions .btn { width: 100%; }
}
@media (max-width: 520px) {
  .ex-options { grid-template-columns: repeat(2, 1fr); }
  .admin-tabs { gap: 4px; }
  .admin-tab { padding: 6px 10px; font-size: 0.72rem; }
}
@media (max-width: 375px) {
  .ex-options { grid-template-columns: 1fr; }
  .admin-cards-grid { grid-template-columns: 1fr; }
  .admin-tabs { flex-direction: column; }
  .admin-tab { width: 100%; text-align: center; }
  .btn-col { gap: 6px; }
  body { font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e1a;
    --bg-secondary: #1a1827;
    --text: #e8e4ff;
    --muted: #9ca3af;
    --border: #2d2b45;
    --card-bg: #16142a;
    --primary-bg: #1e1b36;
  }
  body { background: radial-gradient(ellipse 700px 500px at 15% -5%, rgba(124,58,237,0.18) 0%, transparent 55%), #0f0e1a; }
  .panel { background: var(--card-bg); border-color: rgba(124, 58, 237, 0.15); }
  .flashcard { background: #1a1827; border-color: var(--border); }
  .admin-stat-card { background: var(--primary-bg); }
  .admin-table th, .admin-table td { border-color: var(--border); }
  .btn-ghost { background: var(--primary-bg); color: #a78bfa; border-color: var(--border); }
  input, select, textarea { background: #1a1827; color: var(--text); border-color: var(--border); }
  .feedback-item { border-color: var(--border); }
  .feedback-item .fb-reply { background: #1a3a2a; }
  .stat { background: var(--primary-bg); }
  .card-front { background: #2a2510; border-color: #a16207; }
  .squad-panel { background: #0f2a1a; border-color: #065f46; }
  .login-hero-badge { background: #1e1b36; border-color: #4c1d95; color: #a78bfa; }
  .login-features span { background: #1e1b36; border-color: var(--border); color: #a78bfa; }
  .forgot-pin-form { background: #1a1827; border-color: var(--border); }
  .engagement-panel { box-shadow: 0 8px 40px rgba(49, 46, 129, 0.6), inset 0 1px 0 rgba(255,255,255,0.05); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══════════════════════════════════════════════════
   ADMIN PANEL — Full-Screen Sidebar Layout (V89)
   ═══════════════════════════════════════════════════ */

#screen-admin.active {
  position: fixed !important;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  display: flex !important;
  flex-direction: row;
  background: #0a0f1e;
}

.admin-layout {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ── Sidebar ── */
.admin-sidebar {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  background: #111827;
  border-right: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 18px 20px;
  border-bottom: 1px solid #1f2937;
}

.admin-sidebar-logo {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.admin-sidebar-name {
  font-weight: 800;
  font-size: 1rem;
  color: #f9fafb;
  line-height: 1.2;
}

.admin-sidebar-role {
  font-size: 0.65rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  flex: 1;
  /* Override any inherited .admin-tabs styles */
  flex-wrap: nowrap !important;
}

.admin-nav .admin-tab {
  text-align: left !important;
  padding: 9px 12px !important;
  border-radius: 7px !important;
  color: #9ca3af !important;
  background: transparent !important;
  border: none !important;
  font-size: 0.83rem !important;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

.admin-nav .admin-tab:hover {
  background: #1f2937 !important;
  color: #d1d5db !important;
}

.admin-nav .admin-tab.active {
  background: rgba(124, 58, 237, 0.2) !important;
  color: #a78bfa !important;
  border-left: 3px solid #7c3aed !important;
  padding-left: 9px !important;
}

.admin-back-btn {
  margin: 10px;
  padding: 9px 12px !important;
  color: #4b5563 !important;
  font-size: 0.78rem !important;
  border-radius: 7px !important;
  text-align: left !important;
  width: calc(100% - 20px);
  border-color: transparent !important;
  background: transparent !important;
}

.admin-back-btn:hover {
  background: #1f2937 !important;
  color: #9ca3af !important;
}

/* ── Main Content ── */
.admin-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 32px 36px;
  background: #0a0f1e;
  color: #e2e8f0;
}

.admin-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1f2937;
}

/* ── Stat Cards (dark override) ── */
#screen-admin .admin-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  margin-bottom: 0;
}

#screen-admin .admin-stat-card {
  background: #111827;
  border-radius: 12px;
  padding: 18px 16px;
  border: 1px solid #1f2937;
  border-left-width: 4px;
  border-left-color: #374151;
}

#screen-admin .admin-stat-val {
  font-size: 1.9rem;
  font-weight: 800;
  color: #a78bfa;
  line-height: 1.1;
}

#screen-admin .admin-stat-label {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.4;
}

/* Color variants */
#screen-admin .admin-stat-blue  { border-left-color: #3b82f6; }
#screen-admin .admin-stat-blue  .admin-stat-val { color: #60a5fa; }
#screen-admin .admin-stat-green { border-left-color: #10b981; }
#screen-admin .admin-stat-green .admin-stat-val { color: #34d399; }
#screen-admin .admin-stat-purple { border-left-color: #7c3aed; }
#screen-admin .admin-stat-purple .admin-stat-val { color: #a78bfa; }
#screen-admin .admin-stat-gold  { border-left-color: #f59e0b; }
#screen-admin .admin-stat-gold  .admin-stat-val { color: #fbbf24; }
#screen-admin .admin-stat-orange { border-left-color: #f97316; }
#screen-admin .admin-stat-orange .admin-stat-val { color: #fb923c; }
#screen-admin .admin-stat-red   { border-left-color: #ef4444; }
#screen-admin .admin-stat-red   .admin-stat-val { color: #f87171; }

/* ── Tables (dark override) ── */
#screen-admin .admin-table-wrap {
  background: #111827;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1f2937;
  margin-top: 12px;
}

#screen-admin .admin-table th {
  background: #0a0f1e;
  color: #6b7280;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 11px 14px;
  border-bottom: 1px solid #1f2937;
}

#screen-admin .admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #0a0f1e;
  color: #cbd5e1;
  font-size: 0.82rem;
}

#screen-admin .admin-table tr:last-child td { border-bottom: none; }
#screen-admin .admin-table tr:hover td { background: #0f172a; }

/* ── Misc elements ── */
#screen-admin h4 {
  color: #6b7280;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 20px 0 8px;
  font-weight: 600;
}

#screen-admin .admin-help {
  color: #6b7280;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

#screen-admin .admin-info-block {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 14px 16px;
  color: #9ca3af;
  font-size: 0.83rem;
}

#screen-admin .btn-ghost {
  color: #9ca3af;
  border-color: #374151;
  background: #111827;
}

#screen-admin .btn-ghost:hover {
  background: #1f2937;
  color: #e2e8f0;
}

#screen-admin .input-full,
#screen-admin .input-select {
  background: #111827;
  border-color: #374151;
  color: #e2e8f0;
}

#screen-admin .card-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#screen-admin .status { font-size: 0.82rem; }
#screen-admin .admin-error-box { margin-bottom: 16px; }

#screen-admin .feedback-list { background: #111827; border-radius: 10px; padding: 16px; }
#screen-admin .feedback-empty { color: #6b7280; text-align: center; padding: 24px; }

/* ── Mobile: sidebar vira topbar ── */
@media (max-width: 700px) {
  #screen-admin.active { flex-direction: column; overflow: auto; }
  .admin-sidebar {
    width: 100%;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid #1f2937;
  }
  .admin-sidebar-brand { padding: 14px 16px 12px; }
  .admin-nav {
    flex-direction: row !important;
    overflow-x: auto;
    padding: 8px 10px;
    flex: unset;
  }
  .admin-nav .admin-tab { white-space: nowrap; font-size: 0.72rem !important; padding: 6px 10px !important; }
  .admin-nav .admin-tab.active { border-left: none !important; border-bottom: 2px solid #7c3aed !important; border-radius: 4px !important; }
  .admin-back-btn { display: none; }
  .admin-main { padding: 16px; overflow: visible; }
  #screen-admin .admin-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Admin theme toggle button */
.admin-theme-btn {
  margin-top: auto;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.15s ease;
}
.admin-theme-btn:hover { background: rgba(255,255,255,0.12); color: #e2e8f0; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN LIGHT THEME — completo
   ═══════════════════════════════════════════════════════════════ */

.admin-layout.admin-light {
  /* Reset admin to light palette */
  .admin-sidebar {
    background: #fff;
    border-right: 1px solid #e2e8f0;
    color: #334155;
  }
  .admin-sidebar-brand { border-bottom-color: #e2e8f0; }
  .admin-sidebar-name { color: #1e293b; }
  .admin-sidebar-role { color: #94a3b8; }

  .admin-nav .admin-tab {
    color: #475569;
    background: transparent;
    border-radius: 6px;
  }
  .admin-nav .admin-tab:hover { background: #f1f5f9; color: #1e293b; }
  .admin-nav .admin-tab.active {
    background: #ede9fe;
    color: #5b21b6;
    border-left: 3px solid #7c3aed;
    font-weight: 700;
  }

  .admin-main {
    background: #f8fafc;
    color: #1e293b;
  }

  .admin-section-title {
    color: #1e293b;
    font-weight: 700;
  }

  .admin-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }
  .admin-stat-val { color: #1e293b; }
  .admin-stat-label { color: #64748b; }

  /* Cards coloridos mantidos */
  .admin-stat-blue .admin-stat-val { color: #2563eb; }
  .admin-stat-green .admin-stat-val { color: #059669; }
  .admin-stat-purple .admin-stat-val { color: #7c3aed; }
  .admin-stat-gold .admin-stat-val { color: #d97706; }
  .admin-stat-orange .admin-stat-val { color: #ea580c; }
  .admin-stat-red .admin-stat-val { color: #dc2626; }

  .admin-table {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
  }
  .admin-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
  }
  .admin-table td {
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
  }
  .admin-table tr:hover td { background: #f8fafc; }

  input, select, textarea {
    background: #fff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
  }
  input:focus, select:focus, textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
    outline: none;
  }

  .admin-help { color: #64748b; }
  .admin-info-block { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
  .admin-error-box { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

  .admin-table-wrap { border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }

  label { color: #475569; }

  .admin-back-btn, .admin-theme-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
  }
  .admin-back-btn:hover, .admin-theme-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
  }

  /* status / badges */
  .status { color: #475569; }
  .table-loading { color: #94a3b8; }

  h4 { color: #1e293b; }
}
