/* Akut Admin — styles */
:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232c;
  --border: #2a2f3a;
  --text: #e6e8ec;
  --muted: #9aa3b2;
  --primary: #4f8cff;
  --primary-600: #3a76e6;
  --success: #2fbf71;
  --danger: #ef5350;
  --warning: #e0a64b;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Alert / badge tint colors — overridden by the light theme below */
  --alert-error-text: #ff9b99;
  --alert-success-text: #7fe3ab;
  --alert-info-text: #aac6ff;
  --tint-primary: #aac6ff;
  --plain-glow: #1b2030;

  /* Solid (non-transparent) alert backgrounds — used by #menuAlert since it
     floats over arbitrary page content and a see-through tint would blend
     unpredictably with whatever is underneath. */
  --alert-error-bg: #2a1516;
  --alert-error-border: #6b2b29;
  --alert-success-bg: #12281c;
  --alert-success-border: #1f5c3b;
  --alert-info-bg: #131c2e;
  --alert-info-border: #2c4c8f;
}

/* ---------- Light theme ---------- */
[data-theme="light"] {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --border: #d8dde6;
  --text: #1b2027;
  --muted: #5a6472;
  --primary: #2f6fe0;
  --primary-600: #245ac0;
  --success: #1f9d57;
  --danger: #d64541;
  --warning: #b7791f;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.12);

  --alert-error-text: #b3312d;
  --alert-success-text: #157a42;
  --alert-info-text: #245ac0;
  --tint-primary: #245ac0;
  --plain-glow: #e6ecf7;

  --alert-error-bg: #fdecec;
  --alert-error-border: #f1b0ae;
  --alert-success-bg: #e8f7ee;
  --alert-success-border: #a8dfc0;
  --alert-info-bg: #eaf1ff;
  --alert-info-border: #b7cdfa;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 600; }
hr.divider { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 4px; font-size: .9em; }

/* ---------- Plain (login) layout ---------- */
.layout-plain {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--plain-glow) 0%, var(--bg) 60%);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand-mark { font-size: 40px; }
.auth-brand h1 { margin: 8px 0 2px; font-size: 22px; }
.auth-tagline { color: var(--muted); margin: 0; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }

/* ---------- App layout ---------- */
.layout-app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark { font-size: 22px; }
.brand-name { font-weight: 700; letter-spacing: .2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.is-active { background: var(--surface-2); color: var(--text); }
.sidebar-footer { margin-top: auto; }
.user-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.user-name { font-weight: 600; font-size: 14px; }
.user-meta { color: var(--muted); font-size: 12px; }

.app-main { flex: 1; min-width: 0; padding: 28px 36px; max-width: 1100px; }
.page-header { margin-bottom: 22px; }
.page-header-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-header h1 { font-size: 24px; }
.page-sub { color: var(--muted); margin: 0; }
.tenant-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(79, 140, 255, 0.12);
  border: 1px solid rgba(79, 140, 255, 0.35);
  border-radius: 999px;
  color: var(--tint-primary);
  font-size: 12px; font-weight: 600;
  padding: 3px 11px;
  white-space: nowrap;
}
.tenant-tag::before { content: '🏢'; font-size: 12px; }

/* ---------- Cards & grids ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card h2 { font-size: 17px; }
.card-link { display: block; color: var(--text); transition: border-color .15s; }
.card-link:hover { border-color: var(--primary); text-decoration: none; }
.card-icon { font-size: 26px; margin-bottom: 6px; }
.card-cta { color: var(--primary); font-weight: 600; font-size: 14px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid.tight { gap: 12px; }
/* ---------- Mobile topbar & hamburger ---------- */
.mobile-topbar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hamburger {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 5px 9px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.hamburger:hover { border-color: var(--primary); color: var(--primary); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 199;
}
.sidebar-overlay.is-open { display: block; }

@media (max-width: 720px) {
  .layout-app { display: block; }
  .mobile-topbar { display: flex; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.is-open { transform: translateX(0); }

  .app-main { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
}

.def-list { display: grid; gap: 10px; margin: 0; }
.def-list > div { display: flex; justify-content: space-between; gap: 16px; }
.def-list dt { color: var(--muted); }
.def-list dd { margin: 0; font-weight: 500; text-align: right; }
.muted { color: var(--muted); }
.muted.pad { padding: 6px 2px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-help { font-size: 12px; color: var(--muted); font-weight: 400; }
.field-inline { display: flex; align-items: center; gap: 8px; }
.field-inline .field-label { margin: 0; }
.field-checkbox { flex-direction: row; align-items: center; gap: 8px; }
.field-checkbox span { font-size: 14px; color: var(--text); }
.field-saved { font-size: 12px; color: var(--success); }
.field-saved.field-error { color: var(--danger); }

/* Momentary highlight when navigating to a field from a validation error */
.field-flash { animation: field-flash 2s ease-out; border-radius: var(--radius-sm); }
@keyframes field-flash {
  0%, 100% { background: transparent; box-shadow: none; }
  15% { background: rgba(239, 83, 80, 0.18); box-shadow: 0 0 0 2px rgba(239, 83, 80, 0.4); }
}

input[type="text"], input[type="password"], input[type="number"],
select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 11px;
  font-family: inherit;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}
textarea { resize: vertical; }
.inline-controls { display: flex; align-items: center; gap: 10px; }

/* Character counters */
.field-input-row { display: flex; align-items: flex-end; gap: 8px; }
.field-input-row input, .field-input-row textarea { flex: 1; }
.char-counter { font-size: 11px; color: var(--muted); white-space: nowrap; min-width: 42px; text-align: right; }
.char-counter.char-counter-limit { color: var(--danger); font-weight: 600; }

/* Active-language translation control — one visible input at a time,
   language dots show which languages already have content. */
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lang-dots { display: flex; gap: 4px; flex-shrink: 0; }
.lang-dot {
  appearance: none; border: 1px solid var(--border); background: transparent;
  color: var(--muted); border-radius: 999px; width: 26px; height: 22px;
  font-size: 10px; font-weight: 700; letter-spacing: .2px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.lang-dot.has-content { border-color: var(--success); color: var(--success); }
.lang-dot.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Diet chips */
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.chip-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.chip-check input { width: auto; }

/* Radio option group (e.g. category type) */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.radio-option input[type="radio"] { width: auto; margin-top: 3px; }
.radio-option-text { display: flex; flex-direction: column; gap: 2px; }
.radio-option-title { font-size: 14px; color: var(--text); font-weight: 500; }
.radio-option.is-selected { border-color: var(--primary); background: rgba(79, 140, 255, 0.08); }

/* Icon-button group shared by reorderable list rows (images, videos, ...) */
.row-actions { display: flex; gap: 6px; }

/* Images */
.image-box, .image-list { display: flex; flex-direction: column; gap: 8px; }
.image-editor {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px;
}
.image-fields { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 6px; flex: 1; }
@media (max-width: 720px) { .image-fields { grid-template-columns: 1fr; } }

/* YouTube video URLs */
.video-list { display: flex; flex-direction: column; gap: 8px; }
.video-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px;
}
.video-row input { flex: 1; }

/* Portions */
.portion-list { display: flex; flex-direction: column; gap: 8px; }
.portion-editor {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px;
}
.portion-fields { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 6px; flex: 1; }
@media (max-width: 720px) { .portion-fields { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--primary); }
.btn-success { background: var(--success); color: #06281a; }
.btn-danger { background: var(--danger); color: #fff; }
.icon-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--text); border-color: var(--primary); }

/* ---------- Alerts & badges ---------- */
.alert { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; margin-bottom: 16px; white-space: pre-line; }
.alert-error { background: rgba(239, 83, 80, 0.12); color: var(--alert-error-text); border: 1px solid rgba(239, 83, 80, 0.4); }
.alert-success { background: rgba(47, 191, 113, 0.12); color: var(--alert-success-text); border: 1px solid rgba(47, 191, 113, 0.4); }
.alert-info { background: rgba(79, 140, 255, 0.12); color: var(--alert-info-text); border: 1px solid rgba(79, 140, 255, 0.4); }
.alert-error-title { margin: 0 0 6px; font-weight: 600; }
.alert-error-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.alert-error-item { padding: 4px 0; }
.alert-error-item.is-clickable {
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.alert-error-item.is-clickable:hover { color: var(--text); }

/* Feedback alert that must stay visible regardless of scroll position
   (e.g. publish result triggered while scrolled to the bottom of a long form). */
#menuAlert.alert {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin-bottom: 0;
  padding-right: 40px;
  box-shadow: var(--shadow);
}
#menuAlert.alert-error   { background: var(--alert-error-bg);   border-color: var(--alert-error-border); }
#menuAlert.alert-success { background: var(--alert-success-bg); border-color: var(--alert-success-border); }
#menuAlert.alert-info    { background: var(--alert-info-bg);    border-color: var(--alert-info-border); }
.alert-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: inherit;
  opacity: 0.65;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.alert-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }
.alert-action { vertical-align: middle; margin-left: 4px; width: auto; }

@media (max-width: 720px) {
  #menuAlert.alert { top: 64px; width: calc(100% - 24px); }
}
.badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--muted);
}
.badge-success { background: rgba(47, 191, 113, 0.15); color: var(--alert-success-text); border-color: rgba(47, 191, 113, 0.4); }
.badge-danger { background: rgba(239, 83, 80, 0.15); color: var(--alert-error-text); border-color: rgba(239, 83, 80, 0.4); }
.badge-sm { padding: 2px 8px; font-size: 11px; white-space: nowrap; }

/* ---------- Status page ---------- */
.status-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.status-actions { display: flex; gap: 10px; margin: 18px 0 12px; }

/* ---------- Menu toolbar ---------- */
.toolbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.toolbar-group { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.toolbar select { width: auto; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.seg { background: var(--surface); color: var(--muted); border: none; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 13px; }
.seg.is-active { background: var(--surface-2); color: var(--text); }

.empty-state {
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted);
}

/* ---------- Sections & accordions ---------- */
.section { margin-bottom: 18px; }
.subsection { margin-top: 8px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; }
.section-header h3 { font-size: 16px; margin: 0; }
.section-header h4 { font-size: 14px; margin: 0; color: var(--muted); }

.accordion { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--surface); }
.accordion-nested { background: var(--surface-2); }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 4px 4px; }
.accordion-toggle {
  flex: 1; text-align: left; background: transparent; border: none; color: var(--text);
  font-weight: 600; font-size: 14px; padding: 10px 8px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.caret { color: var(--muted); font-size: 11px; }
.accordion-actions { display: flex; gap: 6px; }
.accordion-content { padding: 6px 14px 14px; border-top: 1px solid var(--border); }
.accordion-title-wrap { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Item rows (compact list; click opens the focused item editor panel) ---------- */
.item-row-list { display: flex; flex-direction: column; gap: 4px; }
.item-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.item-row:hover, .item-row:focus { border-color: var(--primary); outline: none; background: var(--surface-2); }
.item-row-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.item-row-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row-price { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- Sticky editor action bar ----------
   Sticky only above the mobile breakpoint: with this many buttons, a wrapped
   toolbar can run to several rows on a phone-width screen, and pinning that
   many rows permanently at the top would eat a large share of the viewport
   for the whole editing session. Below 720px it scrolls away like normal
   content instead — .toolbar-group wrapping (below) already keeps every
   button visible with no clipping or horizontal scroll either way. */
.toolbar-sticky {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg); padding: 12px 0; margin: -12px 0 16px;
}
@media (max-width: 720px) {
  .toolbar-sticky { position: static; padding: 0; margin: 0 0 16px; }
}

.json-area {
  width: 100%; min-height: 420px; font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; margin-bottom: 12px;
}

/* ---------- Menu listing ---------- */
.menu-group-header { margin-bottom: 14px; }
.menu-group-header h2 { font-size: 15px; margin: 0; }
.menu-list { display: flex; flex-direction: column; gap: 2px; }
.menu-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.menu-list-item:hover, .menu-list-item:focus {
  background: var(--surface-2); border-color: var(--border); outline: none;
}
.menu-item-name { font-weight: 600; font-size: 14px; }
.menu-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.menu-item-meta span { color: var(--muted); font-size: 12px; }
.menu-item-date { color: var(--muted); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  max-width: 460px; width: 100%;
  box-shadow: var(--shadow);
}
.modal-card h3 { font-size: 18px; margin-bottom: 10px; }
.modal-card p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* Indeterminate progress — no real progress signal exists during PDF
   generation, so this deliberately never claims a percentage. */
.pdf-progress {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--border); margin-bottom: 12px;
}
.pdf-progress-bar {
  height: 100%; width: 40%; border-radius: 999px;
  background: var(--primary);
  animation: pdf-progress-slide 1.4s ease-in-out infinite;
}
@keyframes pdf-progress-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ---------- Item editor panel (focused single-item editing, full-screen) ----------
   Comes after .modal-overlay/.modal-card above so it wins the cascade at equal
   specificity. Sits below the shared .modal-overlay z-index (500) so AkutConfirm's
   "discard changes?" prompt — triggered from inside this panel — always renders on top. */
.modal-overlay-full { padding: 0; z-index: 480; }
.modal-card-wide {
  width: 100%; height: 100%; max-width: none; max-height: none;
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  border-radius: 0; border: none;
}
.modal-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-card-header h3 { margin: 0; font-size: 16px; }
.modal-card-body {
  padding: 18px 22px; overflow-y: auto; flex: 1; min-height: 0;
  max-width: 760px; width: 100%; margin: 0 auto;
}
.modal-actions-row {
  flex-direction: row; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.modal-actions-row .btn { width: auto; }

/* Full-bleed edge-to-edge only makes sense on small screens. Above the app's
   existing mobile breakpoint, show it as a large centered dialog instead —
   dimmed backdrop, rounded corners, shadow — so it still reads as a modal
   rather than a page navigation. */
@media (min-width: 721px) {
  .modal-overlay-full { padding: 40px; }
  .modal-card-wide {
    width: 100%; max-width: 900px;
    height: auto; max-height: calc(100vh - 80px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin-bottom: 10px;
}
.theme-toggle .theme-icon { font-size: 14px; line-height: 1; }
.theme-toggle-auth { width: auto; padding: 6px 14px; margin: 14px auto 0; }

/* ---------- Language switcher ---------- */
.lang-switcher { display: flex; gap: 4px; margin-bottom: 10px; }
.lang-btn {
  flex: 1; background: transparent; border: 1px solid var(--border);
  color: var(--muted); border-radius: var(--radius-sm);
  padding: 5px 0; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: border-color .15s, color .15s;
}
.lang-btn:hover { color: var(--text); border-color: var(--primary); }
.lang-btn.is-active { background: var(--surface-2); color: var(--text); border-color: var(--primary); }
.lang-switcher-auth { justify-content: center; gap: 8px; margin-top: 18px; }
.lang-switcher-auth .lang-btn { flex: 0 0 auto; padding: 5px 16px; }
@media (max-width: 720px) { .lang-switcher:not(.lang-switcher-auth) { display: none; } }
