/* ═══════════════════════════════════════════════════════════════════════════
   TRAFIKALT GRUNNKURS — "Oxford Dark" Design System
   Inspired by Winchester, Oxford, and the quiet confidence of old academia
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --gold: #C9A84C;
  --gold-dim: #A08636;
  --gold-glow: rgba(201, 168, 76, 0.12);
  --oxford: #002147;
  --oxford-light: #1a3a5c;
  --burgundy: #8B2E3B;
  --burgundy-bg: rgba(139, 46, 59, 0.15);
  --forest: #2D5A3D;
  --forest-bg: rgba(45, 90, 61, 0.15);

  --bg: #0E0D0B;
  --bg-elevated: #16140F;
  --bg-surface: #1D1A14;
  --card-bg: #1D1A14;

  --text: #E8E4DC;
  --text-secondary: #8A8478;
  --text-muted: #5C574E;

  --border: #2A2620;
  --border-hover: #3D382F;
  --border-active: var(--gold);

  --radius: 4px;
  --radius-sm: 3px;

  --font-serif: 'Libre Baskerville', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --transition: 0.2s ease;
}

/* ─── RESET + BASE ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--gold);
  color: var(--bg);
}

/* ─── LOADING SCREEN ─────────────────────────────────────────────────────────── */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
}

.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────────── */
#app { min-height: 100vh; }

.view {
  max-width: 580px;
  margin: 0 auto;
  padding: 20px 16px;
  min-height: 100vh;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 34px; height: 34px;
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
}

.header h1 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.02em;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ─── CARDS ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 48px;
  width: 100%;
  transition: all var(--transition);
  text-decoration: none;
}
.btn:active { transform: scale(0.99); }

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-secondary:hover {
  background: var(--gold-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ─── FORM ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--bg-elevated);
  color: var(--text);
  min-height: 50px;
  transition: border-color var(--transition);
}
.form-group input:focus {
  outline: none;
  border-color: var(--gold-dim);
}
.form-group input::placeholder {
  color: var(--text-muted);
}

/* ─── LOGIN VIEW ─────────────────────────────────────────────────────────────── */
.login-view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  max-width: 380px;
  margin: 0 auto;
}

.login-logo {
  text-align: center;
  margin-bottom: 48px;
}

.login-logo .logo-circle {
  width: 64px; height: 64px;
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
}

.login-logo h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--text);
}
.login-logo p {
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.error-msg {
  color: var(--burgundy);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ─── DASHBOARD ──────────────────────────────────────────────────────────────── */
.welcome-text {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 4px;
  color: var(--text);
}
.welcome-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.tema-bars { margin-bottom: 32px; }
.tema-bar-item { margin-bottom: 12px; }
.tema-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.tema-bar-track {
  height: 3px;
  background: var(--border);
  border-radius: 0;
  overflow: hidden;
}
.tema-bar-fill {
  height: 100%;
  background: var(--gold-dim);
  border-radius: 0;
  transition: width 0.6s ease;
}
.tema-bar-fill.good { background: var(--forest); }

.action-buttons { display: flex; flex-direction: column; gap: 10px; }

/* ─── MODE SELECT ────────────────────────────────────────────────────────────── */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.mode-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mode-card:hover, .mode-card:active {
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
}
.mode-card.exam {
  grid-column: 1 / -1;
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}
.mode-card.exam .mode-title { color: var(--gold); }
.mode-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
}
.mode-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─── QUIZ ───────────────────────────────────────────────────────────────────── */
.quiz-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.quiz-progress-text {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 0;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 0;
  transition: width 0.3s ease;
}

.timer-badge {
  background: var(--oxford);
  color: var(--text);
  padding: 4px 12px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.timer-badge.urgent {
  background: var(--burgundy);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.question-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 20px;
  max-height: 200px;
  object-fit: contain;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.question-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--text);
}

.answer-options { display: flex; flex-direction: column; gap: 8px; }

.answer-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  min-height: 52px;
  transition: all var(--transition);
  color: var(--text);
  width: 100%;
}
.answer-btn:hover:not(:disabled) {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}
.answer-btn:disabled { cursor: default; }

.answer-btn.correct {
  border-color: var(--forest);
  background: var(--forest-bg);
}
.answer-btn.wrong {
  border-color: var(--burgundy);
  background: var(--burgundy-bg);
}

.answer-letter {
  width: 26px; height: 26px;
  border-radius: 2px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.answer-btn.correct .answer-letter {
  background: var(--forest);
  color: var(--text);
}
.answer-btn.wrong .answer-letter {
  background: var(--burgundy);
  color: var(--text);
}

.forklaring {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--forest-bg);
  border-left: 3px solid var(--forest);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}

.next-btn { margin-top: 24px; }

/* ─── RESULTAT ───────────────────────────────────────────────────────────────── */
.result-circle {
  width: 120px; height: 120px;
  border-radius: 50%;
  margin: 24px auto 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--forest);
}
.result-circle.fail { border-color: var(--burgundy); }
.result-score {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--forest);
}
.result-circle.fail .result-score { color: var(--burgundy); }
.result-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-verdict {
  text-align: center;
  margin-bottom: 32px;
}
.result-verdict h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 6px;
}
.result-verdict p {
  color: var(--text-secondary);
  font-size: 14px;
}

.feil-list { margin-bottom: 28px; }
.feil-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
  border-left: 3px solid var(--burgundy);
}
.feil-item p { font-size: 14px; margin-bottom: 4px; }
.feil-item .riktig {
  color: var(--forest);
  font-size: 13px;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ─── HISTORIKK ──────────────────────────────────────────────────────────────── */
.historikk-list { }
.historikk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: border-color var(--transition);
}
.historikk-item:hover { border-color: var(--border-hover); }
.historikk-left { }
.historikk-type {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 15px;
}
.historikk-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.historikk-right { text-align: right; }
.historikk-score {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-pass {
  background: var(--forest-bg);
  color: var(--forest);
  border: 1px solid rgba(45, 90, 61, 0.3);
}
.badge-fail {
  background: var(--burgundy-bg);
  color: var(--burgundy);
  border: 1px solid rgba(139, 46, 59, 0.3);
}
.badge-neutral {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state p {
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
}

/* ─── DECORATIVE DETAILS ─────────────────────────────────────────────────────── */
.view::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  margin: 0 auto 0;
  opacity: 0;
}

/* Subtle top gold line */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  z-index: 100;
  opacity: 0.6;
}

/* ─── DESKTOP TWEAKS ─────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .view { padding: 40px 32px; }
  .question-text { font-size: 20px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .welcome-text { font-size: 28px; }
}

/* ─── COURSE SELECTOR ────────────────────────────────────────────────────────── */
.course-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
  display: flex;
}
.course-card:hover {
  border-color: var(--course-accent, var(--gold-dim));
  background: var(--bg-elevated);
}
.course-accent {
  width: 4px;
  background: var(--course-accent, var(--gold));
  flex-shrink: 0;
}
.course-body {
  padding: 20px;
  flex: 1;
}
.course-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--text);
}
.course-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.course-stat {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.course-progress {
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  color: var(--course-accent, var(--gold));
}

/* ─── ADMIN PANEL ───────────────────────────────────────────────────────────── */
.admin-view .header { flex-wrap: wrap; gap: 12px; }

.btn-sm {
  padding: 8px 16px;
  min-height: 36px;
  font-size: 12px;
}

.admin-filters {
  margin-bottom: 20px;
}
.admin-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-filter-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.admin-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238A8478' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.admin-select:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.admin-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-table { }
.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all var(--transition);
}
.admin-row:hover {
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
}
.admin-row-id {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 40px;
  flex-shrink: 0;
}

.admin-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-elevated);
}
.admin-thumb-empty {
  background: var(--bg-elevated);
}

.admin-row-content {
  flex: 1;
  min-width: 0;
}
.admin-row-tema {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.admin-row-text {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row-actions {
  flex-shrink: 0;
}

.admin-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.admin-page-btn {
  min-width: 36px;
  min-height: 36px;
  font-size: 13px;
}
.admin-page-active {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}
.admin-page-dots {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 0 4px;
}

/* Admin modal / overlay */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  margin: 20px auto;
  max-height: none;
}
.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.admin-modal-header h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
}

.admin-modal-body {
  padding: 24px;
}

.admin-modal-body .form-group {
  margin-bottom: 16px;
}
.admin-modal-body .form-group input,
.admin-modal-body .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--text);
  min-height: 42px;
}
.admin-modal-body .form-group input:focus,
.admin-modal-body .form-group select:focus,
.admin-textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.admin-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--text);
  resize: vertical;
  line-height: 1.5;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-image-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-image-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-image-preview img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.admin-no-image {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-serif);
}

.admin-upload-zone {
  border: 2px dashed var(--gold-dim);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
}
.admin-upload-zone:hover,
.admin-upload-zone.dragover {
  border-color: var(--gold);
  background: var(--gold-glow);
}
.admin-upload-zone p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.admin-upload-zone strong {
  color: var(--gold);
}
.admin-upload-hint {
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

.admin-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.admin-modal-actions .btn {
  flex: 1;
  min-width: 120px;
}
.admin-modal-actions .btn-ghost {
  flex: 0;
  min-width: auto;
}

/* Mobile responsive for admin */
@media (max-width: 599px) {
  .admin-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .admin-filter-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .admin-modal {
    margin: 10px;
  }
  .admin-modal-body {
    padding: 16px;
  }
  .admin-row-id { display: none; }
  .admin-row { gap: 8px; padding: 10px 12px; }
  .admin-modal-actions {
    flex-direction: column;
  }
  .admin-modal-actions .btn {
    min-width: auto;
  }
}
