/* sat/css/sat.css — 12/05/2026 14:50:00 EDT */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #0F1923;
  color: #1A1814;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

/* ── LOGIN OVERLAY ── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: #0F1923;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-header .logo-title {
  margin-bottom: 8px;
}

.login-header .logo-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 8px;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 7px;
}

.login-field input {
  width: 100%;
  background: #1C2B3A;
  border: 1px solid #2A3D52;
  border-radius: 8px;
  color: rgba(255,255,255,0.9);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 11px 14px;
  transition: border-color 0.2s;
}

.login-field input::placeholder { color: rgba(255,255,255,0.2); }
.login-field input:focus { outline: none; border-color: #C9922A; }

.login-error {
  color: #f87171;
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}

.btn-login {
  width: 100%;
  padding: 13px 0;
  background: #C9922A;
  color: #0F1923;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  margin-bottom: 16px;
}

.btn-login:hover:not(:disabled) { background: #F0C870; }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; }

.login-switch {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

.login-switch a {
  color: #C9922A;
  text-decoration: none;
  font-weight: 500;
}

.login-switch a:hover { color: #F0C870; }

/* ── LOGOUT BUTTON ── */
.btn-logout {
  width: 100%;
  margin-top: 16px;
  padding: 8px 0;
  background: transparent;
  border: 1px solid #2A3D52;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.5); }

/* ── SIDEBAR ── */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #0F1923;
  display: flex;
  flex-direction: column;
  padding: 36px 28px;
  border-right: 1px solid #2A3D52;
  overflow-y: auto;
}

.logo { margin-bottom: 40px; }

.logo-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: #C9922A;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.logo-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.logo-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
  font-weight: 300;
}

.sidebar-section { margin-bottom: 32px; }

.sidebar-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 12px;
}

/* Stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.stat-card {
  background: #1C2B3A;
  border-radius: 8px;
  padding: 12px 10px;
  border: 1px solid #2A3D52;
}

.stat-card.accent {
  border-color: rgba(201,146,42,0.4);
  background: rgba(201,146,42,0.08);
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.stat-card.accent .stat-num { color: #F0C870; }

.stat-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Controls */
.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 7px;
  font-family: 'DM Mono', monospace;
}

.field select {
  width: 100%;
  background: #1C2B3A;
  border: 1px solid #2A3D52;
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s;
}

.field select:hover  { border-color: rgba(201,146,42,0.5); }
.field select:focus  { outline: none; border-color: #C9922A; }
.field select option { background: #1C2B3A; }

.btn-generate {
  width: 100%;
  padding: 13px 0;
  background: #C9922A;
  color: #0F1923;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  margin-top: 4px;
}

.btn-generate:hover:not(:disabled)  { background: #F0C870; }
.btn-generate:active:not(:disabled) { transform: scale(0.98); }
.btn-generate:disabled              { opacity: 0.4; cursor: not-allowed; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #2A3D52;
}

.streak-bar { display: flex; gap: 5px; flex-wrap: wrap; }

.streak-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2A3D52;
  transition: background 0.3s;
}

.streak-dot.correct { background: #4ade80; }
.streak-dot.wrong   { background: #f87171; }

.streak-label {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  margin-bottom: 8px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── MAIN ── */
.main {
  flex: 1;
  background: #F7F4EE;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.main-header {
  padding: 20px 56px;
  border-bottom: 1px solid #D8D3C8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F7F4EE;
  position: sticky;
  top: 0;
  z-index: 10;
}

.breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: #9a9490;
  letter-spacing: 0.5px;
}

.breadcrumb span { color: #C9922A; }

.q-counter {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: #9a9490;
  letter-spacing: 1px;
}

.main-content {
  flex: 1;
  padding: 56px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.empty-ornament {
  font-family: 'Playfair Display', serif;
  font-size: 72px;
  color: #D8D3C8;
  line-height: 1;
  margin-bottom: 24px;
  font-style: italic;
}

.empty-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 500;
  color: #1A1814;
  margin-bottom: 10px;
}

.empty-sub {
  font-size: 14px;
  color: #5a5650;
  line-height: 1.6;
  max-width: 340px;
}

/* Loading state */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

.spinner-ring {
  width: 40px;
  height: 40px;
  border: 2px solid #D8D3C8;
  border-top-color: #C9922A;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 16px;
  color: #5a5650;
}

/* Problem */
.problem-wrap { animation: slideUp 0.4s cubic-bezier(0.16,1,0.3,1); }

.problem-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.tag-cat    { background: #DBEAFE; color: #1D4ED8; }
.tag-easy   { background: #D8F3DC; color: #2D6A4F; }
.tag-medium { background: #EDE9E0; color: #5a5650; border: 1px solid #D8D3C8; }
.tag-hard   { background: #FFCDD2; color: #9B2226; }

.q-number {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: #9a9490;
  margin-left: auto;
}

.problem-body {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  line-height: 1.75;
  color: #1A1814;
  margin-bottom: 36px;
  white-space: pre-wrap;
  border-left: 3px solid #C9922A;
  padding-left: 20px;
}

.choices-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: #9a9490;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1.5px solid #D8D3C8;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #1A1814;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.choice:hover:not(:disabled) { border-color: #C9922A; transform: translateX(3px); }
.choice:disabled              { cursor: default; }
.choice.selected              { border-color: #1D4ED8; background: #DBEAFE; }
.choice.correct               { border-color: #2D6A4F; background: #D8F3DC; }
.choice.wrong                 { border-color: #9B2226; background: #FFCDD2; }

.choice-letter {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EDE9E0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s;
}

.choice.selected .choice-letter { background: #1D4ED8; color: #ffffff; }
.choice.correct  .choice-letter { background: #2D6A4F; color: #ffffff; }
.choice.wrong    .choice-letter { background: #9B2226; color: #ffffff; }

.choice-text { line-height: 1.5; }

.result-banner {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.result-banner.correct { background: #D8F3DC; color: #2D6A4F; border: 1px solid rgba(45,106,79,0.2); }
.result-banner.wrong   { background: #FFCDD2; color: #9B2226; border: 1px solid rgba(155,34,38,0.2); }
.result-icon           { font-size: 18px; }

.explanation-card {
  background: #ffffff;
  border: 1.5px solid #D8D3C8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  animation: slideUp 0.3s cubic-bezier(0.16,1,0.3,1);
}

.explanation-header {
  padding: 12px 20px;
  background: #EDE9E0;
  border-bottom: 1px solid #D8D3C8;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9a9490;
}

.explanation-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.75;
  color: #5a5650;
  white-space: pre-wrap;
}

.actions { display: flex; gap: 10px; }

.btn-secondary {
  flex: 1;
  padding: 12px 0;
  border: 1.5px solid #D8D3C8;
  background: #ffffff;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1A1814;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover    { border-color: #1A1814; background: #EDE9E0; }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  flex: 1;
  padding: 12px 0;
  background: #1A1814;
  border: 1.5px solid #1A1814;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary:hover { background: #0F1923; border-color: #0F1923; }

/* Error */
.error-box {
  background: #FFCDD2;
  border: 1px solid rgba(155,34,38,0.2);
  border-radius: 10px;
  padding: 16px 20px;
  color: #9B2226;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.error-title { font-weight: 500; margin-bottom: 4px; }

/* Stats line (shown after answering) */
.stats-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #EDE9E0;
  border-radius: 8px;
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}

.stats-line-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: #5a5650;
  letter-spacing: 0.3px;
}

.stats-line-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1A1814;
}

/* Welcome stats dashboard */
.welcome-stats { max-width: 660px; margin: 0 auto; }

.welcome-header { text-align: center; margin-bottom: 28px; }

.dash-overall {
  text-align: center;
  padding: 20px;
  background: #ffffff;
  border: 1.5px solid #D8D3C8;
  border-radius: 12px;
  margin-bottom: 24px;
}

.dash-overall-num {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  color: #1A1814;
  line-height: 1;
  margin-bottom: 6px;
}

.dash-overall-label {
  font-size: 13px;
  color: #9a9490;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1.5px solid #D8D3C8;
  border-radius: 12px;
  overflow: hidden;
}

.dash-th-cat, .dash-th {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9a9490;
  padding: 12px 14px;
  text-align: center;
  background: #EDE9E0;
  border-bottom: 1px solid #D8D3C8;
}

.dash-th-cat { text-align: left; }

.dash-cat {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1A1814;
  padding: 12px 14px;
  border-bottom: 1px solid #EDE9E0;
}

.dash-cell {
  text-align: center;
  padding: 12px 14px;
  border-bottom: 1px solid #EDE9E0;
}

.dash-cell.dash-empty {
  color: #D8D3C8;
  font-size: 14px;
}

.dash-score {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1A1814;
  display: block;
  line-height: 1;
  margin-bottom: 2px;
}

.dash-score.stat-good { color: #2D6A4F; }
.dash-score.stat-ok   { color: #C9922A; }
.dash-score.stat-low  { color: #9B2226; }

.dash-pct {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: #9a9490;
}

tr:last-child .dash-cat,
tr:last-child .dash-cell { border-bottom: none; }

/* Review button on welcome screen */
.btn-review {
  margin-top: 16px;
  padding: 10px 24px;
  background: transparent;
  border: 1.5px solid #D8D3C8;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #5a5650;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-review:hover { border-color: #C9922A; color: #C9922A; }

/* History badge */
.history-badge {
  background: #EDE9E0;
  color: #9a9490;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
}

/* History navigation */
.history-nav { gap: 8px; }
.history-nav .btn-secondary { flex: none; padding: 10px 16px; }
.history-nav .btn-primary { flex: 1; }

/* Ornament */
.ornament-divider {
  text-align: center;
  color: #D8D3C8;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  margin: 32px 0;
  letter-spacing: 8px;
}

/* Animations */
@keyframes fadeIn  { from { opacity: 0; }                             to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin    { to   { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  body            { flex-direction: column; overflow: auto; }
  .sidebar        { width: 100%; padding: 24px 20px; border-right: none; border-bottom: 1px solid #2A3D52; }
  .stats-grid     { grid-template-columns: repeat(4, 1fr); }
  .sidebar-footer { display: none; }
  .main           { overflow: visible; }
  .main-header    { padding: 14px 20px; }
  .main-content   { padding: 28px 20px; }
  .problem-body   { font-size: 16px; }
  .login-card     { padding: 32px 24px; }
}