/* =====================================================================
   L.P. Mooradian — Store Dashboard (Phase-3 scaffold)
   Heritage design language: near-black ground, brand gold, warm paper,
   serif display headings. Self-contained — deliberately does not import
   the shipped site's stylesheets, so the two can evolve independently.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --primary: #1a1611;      /* near-black ink */
  --accent: #b9902f;       /* brand gold */
  --accent-deep: #96721f;
  --light: #faf8f3;        /* warm paper */
  --ink: #26221c;
  --muted: #6e675c;
  --line: #e3dccc;
  --radius: 4px;
  --shadow: 0 2px 14px rgba(26, 22, 17, .07);
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--light);
  line-height: 1.6;
  min-height: 100%;
}
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--primary); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn-gold, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.btn-gold {
  background: var(--accent);
  color: var(--primary);
  border: 0;
}
.btn-gold:hover { background: #d0a53c; }
.btn-gold:disabled { opacity: .55; cursor: default; }
.btn-ghost {
  background: transparent;
  color: #f4efe4;
  border: 1px solid rgba(185, 144, 47, .6);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
/* Compact visual weight, full-size touch target. */
.btn-sm { padding: 8px 16px; font-size: .68rem; letter-spacing: 1.6px; min-height: 44px; }

/* ---------------------------------------------------------------------
   Gate screens (loading / login / denied) — dark, centered card
   --------------------------------------------------------------------- */
.gate-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background-color: #171310;
  background-image:
    repeating-linear-gradient(45deg, rgba(244, 239, 228, .045) 0 3px, transparent 3px 26px),
    repeating-linear-gradient(-45deg, rgba(244, 239, 228, .045) 0 3px, transparent 3px 26px),
    linear-gradient(120deg, #171310 30%, #241b11 75%, #2c2114);
  color: #f4efe4;
}
.gate-card {
  width: 100%;
  max-width: 420px;
  background: rgba(26, 22, 17, .88);
  border: 1px solid rgba(185, 144, 47, .35);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.gate-wordmark {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  color: #f4efe4;
  margin-bottom: 26px;
}
.gate-wordmark small {
  display: block;
  font-family: var(--font);
  font-style: normal;
  font-size: .6rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-top: 4px;
}
.gate-card h1 {
  color: #f4efe4;
  font-size: 1.7rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.gate-sub { font-size: .92rem; opacity: .8; margin-bottom: 24px; }
.gate-status { font-size: .9rem; opacity: .75; }
.gate-foot { margin-top: 22px; font-size: .78rem; opacity: .55; }

.gate-card form label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 16px 0 6px;
}
.gate-card form input {
  width: 100%;
  padding: 12px 14px;
  font-size: .95rem;
  font-family: var(--font);
  color: #f4efe4;
  background: rgba(250, 248, 243, .06);
  border: 1px solid rgba(185, 144, 47, .4);
  border-radius: var(--radius);
}
.gate-card form input:focus { border-color: var(--accent); }
.gate-card form .btn-gold { width: 100%; margin-top: 24px; }
.gate-error {
  margin-top: 16px;
  padding: 10px 14px;
  font-size: .85rem;
  color: #f3c7b5;
  background: rgba(150, 50, 30, .25);
  border: 1px solid rgba(200, 90, 60, .45);
  border-radius: var(--radius);
}
.gate-status {
  margin-top: 16px;
  padding: 10px 14px;
  font-size: .85rem;
  color: #d9e8d3;
  background: rgba(60, 110, 40, .22);
  border: 1px solid rgba(110, 170, 80, .4);
  border-radius: var(--radius);
}
.link-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 6px;
  display: inline-block;
  font: inherit;
  font-size: .78rem;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  min-height: 0;
}
.link-button:hover { color: #d0a53c; }

/* ---------------------------------------------------------------------
   Application shell — top bar, module nav, main pane
   --------------------------------------------------------------------- */
#app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.shell-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 26px;
  height: 66px;
  background: var(--primary);
  color: #f4efe4;
  border-bottom: 1px solid rgba(185, 144, 47, .35);
  position: sticky;
  top: 0;
  z-index: 40;
}
.shell-brand {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
}
.shell-brand small {
  font-family: var(--font);
  font-style: normal;
  font-size: .58rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-left: 12px;
  vertical-align: 2px;
}
.shell-user { display: flex; align-items: center; gap: 16px; font-size: .82rem; opacity: .9; }

.shell-body { display: flex; flex: 1; min-height: 0; }

/* Module navigation */
.shell-nav {
  width: 232px;
  flex: none;
  background: #211c15;
  color: #f4efe4;
  padding: 22px 0 30px;
  border-right: 1px solid rgba(185, 144, 47, .25);
}
.shell-nav .nav-group-label {
  display: block;
  padding: 14px 24px 8px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.shell-nav button,
.shell-nav .nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 11px 24px;
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  color: #f4efe4;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  opacity: .78;
  transition: opacity .15s, background .15s;
}
.shell-nav button:hover,
.shell-nav .nav-link:hover { opacity: 1; background: rgba(185, 144, 47, .08); }
.shell-nav button.active,
.shell-nav .nav-link.active {
  opacity: 1;
  border-left-color: var(--accent);
  background: rgba(185, 144, 47, .12);
  color: var(--accent);
}
.shell-nav button:disabled {
  opacity: .32;
  cursor: default;
  background: none;
}
.badge-phase {
  flex: none;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(185, 144, 47, .5);
  border-radius: 3px;
  padding: 2px 6px;
}

/* Main pane */
.shell-main {
  flex: 1;
  min-width: 0;
  padding: 40px 44px 70px;
  overflow-y: auto;
}
.module-eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
}
.module-eyebrow::after {
  content: "";
  display: inline-block;
  width: 42px;
  height: 1px;
  background: var(--accent);
  margin-left: 14px;
  vertical-align: middle;
}
.shell-main h1 { font-size: 2rem; font-weight: 500; margin-bottom: 8px; }
.module-sub { color: var(--muted); max-width: 640px; margin-bottom: 30px; }

/* Stub cards used by module placeholder views */
.stub-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  max-width: 760px;
  margin-bottom: 20px;
}
.stub-card h2 { font-size: 1.15rem; margin-bottom: 10px; }
.stub-card p { font-size: .9rem; color: var(--ink); margin-bottom: 8px; }
.stub-card ul { margin: 8px 0 4px 20px; font-size: .88rem; }
.stub-card li { margin-bottom: 5px; }
.stub-card code {
  font-family: Consolas, "Courier New", monospace;
  font-size: .82em;
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}
.stub-note {
  font-size: .8rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin-top: 16px;
}

/* ---------------------------------------------------------------------
   UI preview banner (localhost-only development mode)
   --------------------------------------------------------------------- */
.preview-banner {
  padding: 9px 26px;
  background: var(--accent);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-align: center;
  border-bottom: 1px solid var(--accent-deep);
}

/* ---------------------------------------------------------------------
   Additional buttons used inside the light main pane
   --------------------------------------------------------------------- */
.btn-ghost-dark, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.btn-ghost-dark {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost-dark:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn-ghost-dark:disabled { opacity: .5; cursor: default; }
.btn-danger {
  background: #8f2f1d;
  color: #faf3ee;
  border: 0;
}
.btn-danger:hover { background: #a63a24; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

/* ---------------------------------------------------------------------
   Panels and module layout
   --------------------------------------------------------------------- */
.module-body { max-width: 1040px; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 22px;
}
.panel-title { font-size: 1.15rem; margin-bottom: 14px; }
.panel-text { font-size: .9rem; margin-bottom: 10px; }
.loading-hint { color: var(--muted); font-size: .88rem; padding: 12px 2px; }

/* Site publish panel (Milestone 5) — distinct from .publish-panel
   below, which is the per-content-area draft/version UI. */
.publish-site-panel { padding: 16px 20px; margin-top: 14px; }
.publish-site-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.publish-site-status { font-weight: 600; }
.publish-site-last { color: var(--muted); font-size: .85rem; }

/* Publish/version panel shared by the content modules. */
.publish-panel { padding: 16px 20px; }
.publish-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.publish-meta { color: var(--muted); font-size: .85rem; }
.publish-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.publish-locked-note { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.version-history { margin-top: 14px; }
.upload-progress { color: var(--accent-deep); font-size: .88rem; margin: 0 0 12px; }

.module-index { list-style: none; }
.module-index li { padding: 2px 0; border-bottom: 1px solid var(--light); font-size: .9rem; }
.module-index li:last-child { border-bottom: 0; }
.module-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}
.module-index a:hover { text-decoration: underline; }
.module-index-sub { color: var(--muted); }

.media-thumb {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--line);
}
.media-thumb-empty {
  width: 40px;
  height: 40px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-value { font-family: var(--display); font-size: 1.8rem; color: var(--primary); line-height: 1.2; }
.stat-label { font-size: .72rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent-deep); }
.stat-sub { font-size: .74rem; color: var(--muted); }

/* ---------------------------------------------------------------------
   Form fields
   --------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: .92rem;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field-input:focus { border-color: var(--accent); }
.field-input:disabled { background: var(--light); color: var(--muted); }
.field-textarea { resize: vertical; }
.field-help { font-size: .76rem; color: var(--muted); margin-top: 5px; }
.form-grid { display: grid; gap: 4px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.select-compact { width: auto; min-height: 44px; padding: 6px 10px; font-size: .82rem; }

/* Toggle switch (real checkbox underneath). The invisible checkbox
   stretches across the whole label so the touch target meets the
   44px minimum while the visible track stays compact. */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.toggle-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.toggle-track {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  background: #d8d0bd;
  border-radius: 11px;
  transition: background .18s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(26, 22, 17, .3);
  transition: left .18s;
}
.toggle-input:checked + .toggle-track { background: var(--accent); }
.toggle-input:checked + .toggle-track::after { left: 21px; }
.toggle-input:focus-visible + .toggle-track { outline: 3px solid var(--accent); outline-offset: 2px; }
.toggle-input:disabled + .toggle-track { opacity: .45; }
.toggle-text { font-size: .88rem; font-weight: 600; }
.toggle-bare {
  vertical-align: middle;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

/* ---------------------------------------------------------------------
   Toolbar (search + filters above tables)
   --------------------------------------------------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.toolbar .search-input { max-width: 340px; }
.toolbar-filter { margin-bottom: 0; }
.toolbar-filter .field-input { width: auto; }
.toolbar-end { justify-content: flex-end; }

/* ---------------------------------------------------------------------
   Data table
   --------------------------------------------------------------------- */
.table-host { margin-bottom: 18px; }
.table-scroll {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--light);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--light);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(185, 144, 47, .045); }
.cell-right { text-align: right; }
.cell-center { text-align: center; }
.cell-primary { display: flex; flex-direction: column; }
.cell-title { font-weight: 600; }
.cell-sub { font-size: .74rem; color: var(--muted); }
.row-removed td { opacity: .55; }
.row-actions { display: inline-flex; gap: 8px; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.pager-status { font-size: .82rem; color: var(--muted); }
.pager-jump { display: inline-flex; align-items: center; gap: 8px; }
.pager-jump-label { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.pager-jump-input {
  width: 64px;
  min-height: 44px;
  padding: 8px 10px;
  font-size: .88rem;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.pager-jump-input:focus { border-color: var(--accent); }

/* ---------------------------------------------------------------------
   Badges
   --------------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-green { color: #2e6b34; background: #ecf4ea; border-color: #cadfc7; }
.badge-gold  { color: var(--accent-deep); background: #f8f1de; border-color: #e8d9ae; }
.badge-grey  { color: var(--muted); background: var(--light); border-color: var(--line); }
.badge-red   { color: #8f2f1d; background: #f9ece7; border-color: #ecccc1; }

/* ---------------------------------------------------------------------
   Notes, empty states, code blocks
   --------------------------------------------------------------------- */
.note {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .84rem;
  margin-bottom: 18px;
}
.note p { margin: 0; }
.note-heading { display: block; font-size: .68rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 5px; }
.note-info { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); color: var(--ink); }
.note-info .note-heading { color: var(--accent-deep); }
.note-caution { background: #fdf6ec; border: 1px solid #ecdcb8; border-left: 3px solid #c07f18; color: #5c4a1e; }
.note-caution .note-heading { color: #a15f10; }

.empty-state {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  max-width: 640px;
}
.empty-title { font-size: 1.2rem; margin-bottom: 8px; }
.empty-message { font-size: .9rem; color: var(--ink); max-width: 480px; margin: 0 auto 10px; }
.empty-note { font-size: .78rem; color: var(--muted); max-width: 480px; margin: 0 auto; }

.code-block {
  font-family: Consolas, "Courier New", monospace;
  font-size: .8rem;
  line-height: 1.7;
  background: var(--primary);
  color: #f4efe4;
  border-radius: var(--radius);
  padding: 14px 18px;
  overflow-x: auto;
  margin: 12px 0 14px;
}
.step-list { margin: 8px 0 4px 20px; font-size: .88rem; }
.step-list li { margin-bottom: 5px; }

/* ---------------------------------------------------------------------
   Modal dialogs
   --------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 19, 16, .62);
}
.modal-panel {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 1.25rem; }
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 8px;
}
.modal-close:hover { color: var(--primary); }
.modal-body { padding: 18px 24px 6px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 24px 20px;
}
.confirm-message { font-size: .92rem; }

/* Lead detail list */
.detail-list { margin: 0; }
.detail-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row dt {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent-deep);
  padding-top: 3px;
}
.detail-row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------------------------------------------------------------------
   Toasts
   --------------------------------------------------------------------- */
.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(340px, calc(100vw - 40px));
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: .84rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: toast-in .18s ease-out;
}
.toast-info    { background: var(--primary); color: #f4efe4; border-left: 3px solid var(--accent); }
.toast-success { background: #274d2b; color: #eaf4e8; border-left: 3px solid #6cae70; }
.toast-error   { background: #6d2416; color: #f9ece7; border-left: 3px solid #d4694f; }
.toast-out { opacity: 0; transition: opacity .4s; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------------
   Module-specific touches
   --------------------------------------------------------------------- */
.block-editor { padding: 14px 0 6px; border-bottom: 1px solid var(--light); margin-bottom: 8px; }
.block-editor:last-child { border-bottom: 0; }
.roomvo-state { font-size: .88rem; font-weight: 600; margin-bottom: 14px; }

/* ---------------------------------------------------------------------
   Small screens: the sidebar collapses behind the topbar Menu button
   (wired in dashboard.js) and opens as a full-width module list.
   --------------------------------------------------------------------- */
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .shell-body { flex-direction: column; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 16px;
    background: transparent;
    color: #f4efe4;
    border: 1px solid rgba(185, 144, 47, .6);
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 700;
    font-size: .68rem;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    cursor: pointer;
  }
  .nav-toggle:hover,
  .nav-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

  .shell-nav {
    display: none;
    width: 100%;
    padding: 6px 0 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(185, 144, 47, .25);
  }
  .shell-nav.nav-open { display: block; }
  .shell-nav .nav-group-label { padding: 12px 20px 4px; }
  .shell-nav button,
  .shell-nav .nav-link { padding: 10px 20px; }

  .shell-main { padding: 28px 16px 60px; }
  .shell-topbar { padding: 0 14px; gap: 10px; }
  .shell-brand small { display: none; }
  .shell-user span { display: none; }
  .shell-user { gap: 8px; }
  .preview-banner { padding: 8px 14px; font-size: .7rem; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .detail-row { grid-template-columns: 1fr; gap: 2px; }
  .toolbar .search-input { max-width: none; }
  .panel { padding: 18px 16px; }
  .empty-state { padding: 28px 18px; }
}

@media (max-width: 480px) {
  .gate-card { padding: 30px 20px; }
  .shell-brand { font-size: .95rem; }
  .btn-sm { padding: 8px 12px; }
  .shell-main h1 { font-size: 1.6rem; }
  .modal-overlay { padding: 12px; }
  .modal-panel { max-height: calc(100vh - 24px); }
}
