﻿/* LUMO Portal â€” shared styles.
 * Aesthetic: cream paper + gold accent, lifted from the prototype. */

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

:root {
  --ink: #15151a; --ink-2: #1f1f27; --ink-3: #2a2a34;
  --paper: #faf8f3; --paper-2: #f1eee6; --card: #ffffff;
  --line: rgba(20, 20, 26, 0.10); --line-2: rgba(20, 20, 26, 0.16);
  --muted: #5c5c66; --muted-2: #7a7a85;
  --gold: #e0982a; --gold-hi: #f4be5e; --gold-deep: #b6761a;
  --ok: #2e9e6b; --ok-bg: #e6f5ee; --warn: #c0492f; --warn-bg: #fbeae6;
  --display: 'Bricolage Grotesque', sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--ink); }
a { color: inherit; text-decoration: none; }

/* ==== A11Y ==== */
.skip-link {
  position: absolute; top: -100px; left: 12px;
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 8px;
  font-weight: 600; font-size: 13px;
  z-index: 1000; transition: top 0.15s;
}
.skip-link:focus {
  top: 12px; outline: 3px solid var(--gold-hi); outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Focus-visible: only show ring on keyboard focus, not mouse. */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, .nav-item:focus-visible {
  outline-offset: 3px;
}
/* The inputs already have a custom focus style with box-shadow; keep theirs. */
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
}
main:focus { outline: none; }  /* Programmatic main focus from skip-link shouldn't show. */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 17px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; transition: 0.2s;
}
.btn svg { width: 15px; height: 15px; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff; box-shadow: 0 2px 10px -2px rgba(224, 152, 42, 0.5);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--card); border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }

.brand { display: flex; align-items: center; gap: 11px; }
.star {
  font-size: 24px;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(224, 152, 42, 0.4));
}
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.02em;
}
.brand-name small {
  display: block; font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase; font-weight: 400;
  color: var(--muted-2); margin-top: 2px;
}

/* ==== LOGIN PAGE ==== */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-card {
  width: 100%; max-width: 460px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 38px;
  box-shadow: 0 24px 60px -28px rgba(20, 20, 26, 0.18);
}
.login-card .brand { margin-bottom: 28px; }
.login-card .brand-name { font-size: 28px; }
.login-card h1 {
  font-family: var(--display); font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.login-card p.lead { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.login-card form { display: grid; gap: 14px; }
.login-card label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.01em;
}
.login-card input[type="email"] {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--paper); transition: 0.15s;
}
.login-card input[type="email"]:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 3px rgba(224, 152, 42, 0.12);
}
.login-card button[type="submit"] {
  width: 100%; justify-content: center; padding: 13px 17px; font-size: 14px;
}
.login-msg {
  margin-top: 14px; padding: 12px 14px; border-radius: 9px;
  font-size: 13px; line-height: 1.45;
}
.login-msg.ok { background: var(--ok-bg); color: var(--ok); }
.login-msg.err { background: var(--warn-bg); color: var(--warn); }
.login-foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted-2);
}

/* ==== APP SHELL ==== */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

.side {
  background: var(--ink); color: rgba(255, 255, 255, 0.7);
  padding: 26px 20px;
  display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh;
}
.side .brand {
  padding: 4px 8px 22px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}
.side .brand-name { color: #fff; }
.side .brand-name small { color: rgba(255, 255, 255, 0.4); }
.client-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 8px; margin: 0 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.client-brand img {
  width: 36px; height: 36px;
  border-radius: 8px; background: rgba(255, 255, 255, 0.06);
  padding: 4px; object-fit: contain; flex-shrink: 0;
}
.client-brand-name {
  font-family: var(--display); font-weight: 600; font-size: 14.5px;
  color: rgba(255, 255, 255, 0.95); letter-spacing: -0.01em;
  line-height: 1.2;
  word-break: break-word;
}

.side-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.35);
  padding: 14px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: rgba(255, 255, 255, 0.66); transition: 0.18s;
  width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: rgba(224, 152, 42, 0.16); color: var(--gold-hi); }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.side-foot {
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px; color: rgba(255, 255, 255, 0.4);
}
.side-foot b { color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.side-foot .logout-link {
  display: inline-block; margin-top: 8px; color: rgba(255, 255, 255, 0.55);
  font-weight: 600; font-size: 12px;
}
.side-foot .logout-link:hover { color: var(--gold-hi); }

.main { padding: 34px 40px 80px; max-width: 1180px; }

.portal-banner {
  background: linear-gradient(120deg, var(--ink), var(--ink-3));
  color: #fff; border-radius: 14px;
  padding: 24px 28px; margin-bottom: 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
}
.pb-hello {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.02em;
}
.pb-sub { font-size: 13.5px; color: rgba(255, 255, 255, 0.65); margin-top: 4px; }
.pb-right {
  font-family: var(--mono); font-size: 11px;
  color: rgba(255, 255, 255, 0.55); text-align: right;
}

.edit-module {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 16px; overflow: hidden;
}
.em-head {
  display: flex; align-items: center; gap: 13px;
  padding: 18px 22px; cursor: pointer; transition: 0.15s;
}
.em-head:hover { background: var(--paper); }
.em-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(224, 152, 42, 0.14), rgba(244, 190, 94, 0.1));
  color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.em-icon svg { width: 19px; height: 19px; }
.em-title { font-family: var(--display); font-weight: 600; font-size: 16px; }
.em-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.em-help {
  margin-left: 8px; vertical-align: middle;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 13px; color: var(--muted-2);
  background: var(--paper-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: help; transition: 0.15s;
  position: relative; line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.em-help:hover, .em-help[data-open="1"] { color: var(--gold-deep); border-color: var(--gold); background: rgba(224, 152, 42, 0.08); }
.em-help-pop {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%);
  width: 280px; padding: 11px 14px;
  background: var(--ink); color: rgba(255,255,255,0.92);
  font-size: 12.5px; line-height: 1.55; font-weight: 400; letter-spacing: 0;
  text-align: left; text-transform: none;
  border-radius: 8px; box-shadow: 0 14px 28px -10px rgba(0,0,0,0.4);
  z-index: 60; cursor: default;
}
.em-help-pop::before {
  content: ""; position: absolute; bottom: 100%; left: 50%;
  margin-left: -6px; border: 6px solid transparent;
  border-bottom-color: var(--ink);
}

/* ==== CONFETTI ==== */
.confetti-host {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -20px;
  width: 10px; height: 16px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-host, .confetti-piece { display: none; }
}

.em-chev { margin-left: auto; color: var(--muted-2); transition: 0.2s; }
.em-chev svg { width: 18px; height: 18px; }
.edit-module.open .em-chev { transform: rotate(180deg); }
.em-body { display: none; padding: 4px 22px 24px; border-top: 1px solid var(--line); }
.edit-module.open .em-body { display: block; }

.locked-note {
  background: var(--paper-2); border: 1px dashed var(--line-2);
  border-radius: 12px; padding: 20px 22px;
  font-size: 13.5px; color: var(--muted);
  display: flex; align-items: center; gap: 12px; margin-top: 20px;
}
.locked-note svg { width: 20px; height: 20px; color: var(--muted-2); flex-shrink: 0; }

/* ==== EDITOR (Session 3) ==== */

.draft-bar {
  background: linear-gradient(135deg, rgba(224, 152, 42, 0.18), rgba(244, 190, 94, 0.12));
  border: 1px solid rgba(224, 152, 42, 0.45);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px;
  font-size: 13.5px; color: var(--gold-deep);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.draft-bar > div { flex: 1; min-width: 240px; }
.draft-bar b { color: var(--ink); }

.rebuild-bar {
  background: rgba(46, 158, 107, 0.10);
  border: 1px solid rgba(46, 158, 107, 0.35);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px;
  font-size: 13.5px; color: var(--ok);
}
.rebuild-bar b { color: var(--ink); }

.rollback-bar {
  background: rgba(192, 73, 47, 0.06);
  border: 1px solid rgba(192, 73, 47, 0.25);
  border-radius: 12px; padding: 13px 18px; margin-bottom: 18px;
  font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.rollback-bar > div { flex: 1; min-width: 240px; }
.rollback-bar b { color: var(--ink); }
.rollback-bar .btn { border-color: rgba(192, 73, 47, 0.4); color: var(--warn); }
.rollback-bar .btn:hover { background: var(--warn-bg); }

.module-pip {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); margin-left: 8px;
  box-shadow: 0 0 0 3px rgba(224, 152, 42, 0.18);
  vertical-align: middle;
}

.autosave-pip {
  display: inline-block; margin-left: 10px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px;
  vertical-align: middle;
}
.autosave-saving { background: var(--paper-2); color: var(--muted); }
.autosave-ok { background: var(--ok-bg); color: var(--ok); }
.autosave-err { background: var(--warn-bg); color: var(--warn); }

.ed-empty {
  background: var(--paper-2); border: 1px dashed var(--line-2);
  border-radius: 10px; padding: 14px 16px;
  font-size: 13px; color: var(--muted-2); margin-bottom: 14px;
}

.ed-field { margin-bottom: 14px; }
.ed-field-multi { margin-bottom: 18px; }
.ed-label {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 6px;
}
.ed-field input[type="text"], .ed-field input:not([type]),
.ed-field-multi input:not([type]), .ed-field-multi input[type="text"] {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--paper); transition: 0.15s; font-size: 13.5px;
}
.ed-field textarea, .ed-field-multi textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--paper); transition: 0.15s;
  font-size: 13.5px; line-height: 1.5;
  font-family: inherit; min-height: 88px; resize: vertical;
}
.ed-field input:focus, .ed-field textarea:focus,
.ed-field-multi input:focus, .ed-field-multi textarea:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 3px rgba(224, 152, 42, 0.12);
}

.ed-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.ed-check input { width: 17px; height: 17px; accent-color: var(--gold); }

/* Social-links editor */
.social-editor { display: grid; gap: 8px; }
.social-row {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 14px; align-items: center;
  padding: 10px 14px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 9px;
}
.social-platform {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.social-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); border-radius: 7px; flex-shrink: 0;
}
.social-icon svg { width: 16px; height: 16px; }
.social-label { font-family: var(--display); font-weight: 600; font-size: 14px; }
.social-row input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: 7px;
  background: #fff; font-size: 13px;
  font-family: var(--mono); letter-spacing: -0.01em;
}
.social-row input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 152, 42, 0.12);
}
@media (max-width: 600px) {
  .social-row { grid-template-columns: 1fr; gap: 8px; }
}

/* Hours-of-week editor */
.hours-editor { display: grid; gap: 14px; }
.hours-grid-head {
  display: grid; grid-template-columns: 110px 1fr 110px;
  gap: 16px; padding: 0 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 500;
}
.hours-grid { display: grid; gap: 6px; }
.hours-row {
  display: grid; grid-template-columns: 110px 1fr 110px;
  gap: 16px; align-items: center;
  padding: 10px 14px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 9px; transition: 0.15s;
}
.hours-row.is-closed { background: var(--paper-2); }
.hours-day {
  font-family: var(--display); font-weight: 600; font-size: 14.5px;
}
.hours-row.is-closed .hours-day { color: var(--muted-2); }
.hours-times {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 10px; align-items: center;
}
.hours-times input {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line-2); border-radius: 7px;
  background: #fff; font-size: 13.5px;
  transition: 0.15s;
}
.hours-times input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 152, 42, 0.12);
}
.hours-times input:disabled {
  background: var(--paper-2); color: var(--muted-2);
  border-style: dashed;
}
.hours-sep {
  font-size: 12px; color: var(--muted-2); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.hours-closed {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted);
  cursor: pointer; user-select: none;
  justify-content: flex-end;
}
.hours-closed input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: var(--gold);
}

@media (max-width: 700px) {
  .hours-grid-head { display: none; }
  .hours-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hours-closed { justify-content: flex-start; }
}

/* Photo URL field with upload button */
.ed-upload-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.ed-upload-row input[type="text"], .ed-upload-row input:not([type]) {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--paper); font-size: 13.5px;
}
.ed-upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 8px;
  background: var(--paper-2); border: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.ed-upload-btn:hover { border-color: var(--gold); background: rgba(224, 152, 42, 0.06); }
.ed-upload-btn input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.ed-photo-preview {
  display: block; width: 100%; max-height: 200px; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 10px;
}
.ed-photo-preview img {
  display: block; width: 100%; max-height: 200px;
  object-fit: cover; object-position: center;
}

.ed-list { display: grid; gap: 8px; margin-bottom: 8px; }
.ed-list-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

.ed-cards { display: grid; gap: 12px; margin-bottom: 10px; }
.ed-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px;
}
.ed-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.ed-card-num {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 500;
}

.ed-group {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
}
.ed-group-label {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 10px;
}

.ed-remove {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--warn-bg); color: var(--warn);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1;
}
.ed-remove:hover { background: var(--warn); color: #fff; }

.ed-card-head { display: flex; align-items: center; gap: 8px; }
.ed-card-num { flex: 1; }
.ed-move {
  display: inline-flex; gap: 4px;
}
.ed-mv {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--paper-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
  transition: 0.12s;
}
.ed-mv:hover:not(:disabled) { background: var(--ink); color: #fff; }
.ed-mv:disabled { opacity: 0.3; cursor: not-allowed; }

.ed-add {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--gold-deep);
  padding: 9px 14px;
  border: 1.5px dashed var(--line-2); border-radius: 8px;
  width: 100%; justify-content: center; transition: 0.15s;
}
.ed-add:hover { border-color: var(--gold); background: rgba(224, 152, 42, 0.04); }
.ed-add svg { width: 14px; height: 14px; }

.em-save {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line);
  align-items: center;
}
.btn-discard {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 7px 12px; border-radius: 7px;
}
.btn-discard:hover { color: var(--warn); background: var(--warn-bg); }

/* ==== BILLING ROWS (in the subscription modal) ==== */
.billing-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 14px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 9px;
  flex-wrap: wrap;
}
.billing-row-current {
  background: rgba(224, 152, 42, 0.06); border-color: rgba(224, 152, 42, 0.35);
}
.billing-tier { font-size: 13.5px; color: var(--ink); }
.billing-links { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ==== ANALYTICS DASHBOARD ==== */
.analytics-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; margin-bottom: 18px;
}
.analytics-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 14px; flex-wrap: wrap;
}
.analytics-title {
  font-family: var(--display); font-weight: 600; font-size: 16px;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.analytics-range {
  display: inline-flex; gap: 2px;
  background: var(--paper-2); padding: 3px; border-radius: 8px;
}
.analytics-rng {
  padding: 6px 12px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: 0.15s;
}
.analytics-rng:hover { color: var(--ink); }
.analytics-rng.active { background: var(--ink); color: #fff; }
.analytics-empty {
  text-align: center; padding: 28px 16px; color: var(--muted);
  font-size: 13.5px; line-height: 1.55;
}
.analytics-totals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 20px;
}
.analytics-stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 11px; padding: 16px 18px;
}
.analytics-stat-num {
  font-family: var(--display); font-weight: 700; font-size: 28px;
  letter-spacing: -0.025em; color: var(--ink); line-height: 1.1;
}
.analytics-stat-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); margin-top: 4px;
}
.analytics-chart-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2);
  margin: 4px 0 10px;
}
.analytics-chart {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 6px; height: 90px; align-items: end;
  margin-bottom: 20px;
}
.analytics-bar {
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: help; height: 100%; position: relative;
}
.analytics-bar-fill {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-radius: 4px 4px 2px 2px;
  min-height: 2px; transition: 0.18s;
}
.analytics-bar:hover .analytics-bar-fill { background: var(--ink); }
.analytics-bar-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em;
  color: var(--muted-2); text-align: center;
  margin-top: 4px; white-space: nowrap; overflow: hidden;
}
.analytics-lists {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.analytics-list-title {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px;
}
.analytics-list {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 14px;
}
.analytics-list-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.analytics-list-row:last-child { border-bottom: none; }
.analytics-list-path {
  color: var(--ink); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 75%;
}
.analytics-list-count {
  font-family: var(--mono); font-weight: 600; color: var(--gold-deep);
}
@media (max-width: 600px) {
  .analytics-totals { grid-template-columns: 1fr; }
  .analytics-stat-num { font-size: 24px; }
  .analytics-chart { height: 70px; }
}

/* ==== WELCOME MODAL ==== */
.welcome-steps {
  display: grid; gap: 14px; margin: 22px 0 6px;
}
.welcome-step {
  display: grid; grid-template-columns: 38px 1fr; gap: 14px;
  align-items: start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px;
  font-size: 13.5px; line-height: 1.55;
}
.welcome-step-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff; font-family: var(--display); font-weight: 700; font-size: 14.5px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 2px 8px -2px rgba(224, 152, 42, 0.45);
}
.welcome-step b { color: var(--ink); }

/* ==== GENERIC MODAL (reused for support contact) ==== */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20, 20, 26, 0.5);
  backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 200;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--card); border-radius: 16px; padding: 30px;
  width: 100%; max-width: 480px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.4);
}
.modal h3 { font-family: var(--display); font-weight: 700; font-size: 21px; margin-bottom: 6px; }
.modal p { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.modal .field { margin-bottom: 14px; }
.modal .field label {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 6px;
}
.modal .field input, .modal .field textarea, .modal .field select {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--paper); font-size: 14px; transition: 0.15s;
  font-family: inherit;
}
.modal .field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.modal .field input:focus, .modal .field textarea:focus, .modal .field select:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 3px rgba(224, 152, 42, 0.12);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ==== PREVIEW MODAL (diff) ==== */
.preview-modal-bg {
  position: fixed; inset: 0; background: rgba(20, 20, 26, 0.55);
  backdrop-filter: blur(4px);
  display: none; align-items: stretch; justify-content: center;
  padding: 40px 20px; z-index: 250;
}
.preview-modal-bg.open { display: flex; }
.preview-modal {
  background: var(--card); border-radius: 16px;
  width: 100%; max-width: 720px;
  max-height: 100%;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.preview-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 26px 28px 14px; gap: 18px;
  border-bottom: 1px solid var(--line);
}
.preview-head h2 {
  font-family: var(--display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em; margin: 0 0 4px;
}
.preview-sub { font-size: 13.5px; color: var(--muted); }
.preview-close {
  font-size: 24px; color: var(--muted-2); line-height: 1;
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.preview-close:hover { background: var(--paper-2); color: var(--ink); }
.preview-body {
  padding: 18px 28px; overflow-y: auto; flex: 1;
  display: grid; gap: 18px;
}
.preview-empty {
  background: var(--paper-2); border: 1px dashed var(--line-2);
  border-radius: 10px; padding: 28px;
  text-align: center; color: var(--muted); font-size: 13.5px;
}
.preview-section {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 11px; overflow: hidden;
}
.preview-section-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card);
}
.preview-section-head .em-icon { width: 32px; height: 32px; border-radius: 8px; }
.preview-section-head .em-icon svg { width: 16px; height: 16px; }
.preview-section-title {
  font-family: var(--display); font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em;
}
.preview-section-count {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted-2);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px;
}
.preview-rows {
  display: grid; gap: 10px; padding: 14px 16px;
}
.diff-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 13px;
}
.diff-path {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.diff-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 5px; font-weight: 500;
}
.diff-tag.diff-added { background: var(--ok-bg); color: var(--ok); }
.diff-tag.diff-removed { background: var(--warn-bg); color: var(--warn); }
.diff-tag.diff-changed { background: rgba(224, 152, 42, 0.16); color: var(--gold-deep); }
.diff-old, .diff-new {
  font-size: 13px; line-height: 1.45;
  padding: 7px 10px; border-radius: 6px;
  word-break: break-word; overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.diff-old { background: rgba(192, 73, 47, 0.06); color: var(--ink); margin-bottom: 4px; border-left: 3px solid rgba(192, 73, 47, 0.45); }
.diff-new { background: rgba(46, 158, 107, 0.06); color: var(--ink); border-left: 3px solid rgba(46, 158, 107, 0.55); }
.diff-side {
  display: inline-block; font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2);
  margin-right: 8px; font-weight: 500;
}
.diff-empty { color: var(--muted-2); font-style: italic; }
.preview-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--line);
}

/* ==== TOAST ==== */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 13px 22px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  opacity: 0; visibility: hidden; transition: 0.3s;
  z-index: 300;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast-action {
  margin-left: 14px; padding: 4px 12px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  border: none; transition: background 0.15s;
}
.toast-action:hover { background: rgba(255, 255, 255, 0.3); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 6px; padding: 16px;
  }
  .side .brand { border: none; margin: 0; padding: 0 12px 0 4px; }
  .side-label, .side-foot { display: none; }
  .nav-item { width: auto; }
  .client-brand { padding: 0 8px 0 4px; margin: 0; border: none; }
  .client-brand img { width: 28px; height: 28px; }
  .client-brand-name { font-size: 13px; }
  .main { padding: 24px 18px 60px; }
  .ro-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 600px) {
  .portal-banner { padding: 18px 20px; }
  .pb-hello { font-size: 18px; }
  .pb-right { text-align: left; font-size: 10px; }
  .em-head { padding: 14px 16px; gap: 10px; }
  .em-body { padding: 4px 16px 18px; }
  .em-title { font-size: 15px; }
  .em-sub { font-size: 12px; }
  .em-help { width: 20px; height: 20px; font-size: 11px; }
  .em-help-pop { width: 220px; }
  .em-save { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .em-save .btn { width: 100%; justify-content: center; }
  .draft-bar { flex-direction: column; align-items: stretch; }
  .draft-bar > div:last-child { display: flex; gap: 8px; }
  .draft-bar .btn { flex: 1; justify-content: center; }
  .ed-card-head { flex-wrap: wrap; }
  .preview-modal { max-height: 96vh; }
  .preview-head { padding: 18px 20px 12px; }
  .preview-body { padding: 14px 20px; }
  .preview-foot { padding: 14px 20px 18px; flex-direction: column-reverse; }
  .preview-foot .btn { width: 100%; justify-content: center; }
}

/* ==== PHASE 3: SPECIALIZED SECTION EDITORS ==== */

/* Section-header band (eyebrow / heading / sub / currency) shared across
   menu, listings, portfolio_gallery, and people sections. */
.ed-section-header {
  padding: 4px 0 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

/* Generic responsive grid of cards (listings, people sections). */
.ed-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; margin-bottom: 10px;
}

/* Shared side-action stack for "remove + move" on a heavyweight card
   (categories, collections). */
.ed-card-side-actions {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
}

/* Listing card â€” keeps the photo on top, then key facts in a 4-up grid. */
.ed-listing-card .ed-photo-preview { aspect-ratio: 16/10; }
.ed-listing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.ed-listing-grid .ed-field { margin-bottom: 0; }
.ed-status-badge {
  display: inline-block;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600;
  padding: 3px 7px; border-radius: 5px;
  margin-right: 6px;
  background: rgba(46,158,107,.12); color: #1f8b3b;
}
.ed-status-for-rent { background: rgba(31, 111, 158, 0.12); color: #1f6f9e; }
.ed-status-sold     { background: rgba(192, 73, 47, 0.12); color: #c0492f; }
.ed-status-pending  { background: rgba(184, 144, 10, 0.14); color: #8a6a08; }

/* People cards (staff, team, doctors, agents) â€” same shell, with the
   photo getting a tighter aspect ratio so headshots don't dominate. */
.ed-people-card .ed-photo-preview { aspect-ratio: 1/1; max-height: 240px; }
.ed-people-card .ed-photo-preview img { object-position: center top; }

/* Menu â€” categories as outer cards, dishes as a 2-up inner grid. */
.ed-menu-cats { display: grid; gap: 16px; margin-bottom: 12px; }
.ed-menu-cat {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
}
.ed-menu-cat-head {
  display: grid; grid-template-columns: 1fr auto; gap: 14px;
  align-items: start; margin-bottom: 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.ed-menu-cat-meta { display: block; }
.ed-menu-cat-meta .ed-field:last-child { margin-bottom: 0; }
.ed-menu-dishes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin-bottom: 12px;
}
.ed-menu-dish {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px;
}
.ed-menu-dish .ed-photo-preview { aspect-ratio: 4/3; }
.ed-menu-dish .ed-card-head { margin-bottom: 8px; }

/* Portfolio gallery â€” collections are heavyweight cards holding inner
   photo grids. */
.ed-collections { display: grid; gap: 18px; margin-bottom: 12px; }
.ed-collection {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
}
.ed-collection-head {
  display: grid; grid-template-columns: 1fr auto; gap: 14px;
  align-items: start; margin-bottom: 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.ed-collection-meta .ed-field:last-child { margin-bottom: 0; }
.ed-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 12px;
}
.ed-photo-tile {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.ed-photo-tile .ed-photo-preview { aspect-ratio: 1/1; }
.ed-photo-tile-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}

/* <select> styling â€” matches inputs since the existing CSS only targets
   input/textarea explicitly. */
.ed-field select, .ed-field-multi select {
  width: 100%; padding: 9px 11px; font-size: 14px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px;
  font-family: inherit;
}
.ed-field select:focus, .ed-field-multi select:focus {
  outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold);
}

@media (max-width: 720px) {
  .ed-listing-grid { grid-template-columns: repeat(2, 1fr); }
  .ed-menu-cat-head, .ed-collection-head { grid-template-columns: 1fr; }
  .ed-card-side-actions { flex-direction: row; align-self: stretch; justify-content: flex-end; }
}

/* ==== AI COPY ASSIST (Standard + Premium) ==== */

/* Wrap sits around any textarea that gets the âœ¨ button. Positioning is
   relative so the button + dropdown can absolute-anchor inside. */
.ed-ai-wrap {
  position: relative;
}
/* Reserve room for the âœ¨ button so it doesn't overlap user text. Specificity
   (0,3,1) beats the (0,2,1) base rule on .ed-field-multi textarea. */
.ed-field .ed-ai-wrap textarea,
.ed-field-multi .ed-ai-wrap textarea {
  padding-right: 38px;
}
.ed-ai-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(224, 152, 42, 0.1);
  color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
  border: 1px solid rgba(224, 152, 42, 0.25);
  cursor: pointer;
  transition: 0.12s;
}
.ed-ai-btn:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  transform: scale(1.05);
}
.ed-ai-wrap.is-open .ed-ai-btn {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* The dropdown / loading / suggestions panel anchors below the field. */
.ed-ai-panel {
  margin-top: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  font-size: 13px;
}

.ed-ai-menu-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 4px 8px 8px;
}
.ed-ai-menu-item {
  display: block; width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  border: none;
}
.ed-ai-menu-item:hover {
  background: var(--paper-2);
  color: var(--gold-deep);
}

.ed-ai-loading {
  display: flex; gap: 6px;
  padding: 14px;
  justify-content: center;
}
.ed-ai-loading span {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: aiAssistPulse 1.2s infinite ease-in-out;
}
.ed-ai-loading span:nth-child(2) { animation-delay: 0.15s; }
.ed-ai-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiAssistPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40%           { opacity: 1;   transform: scale(1); }
}

.ed-ai-error {
  padding: 10px 12px;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 7px;
  font-size: 12.5px;
  margin-bottom: 8px;
}

.ed-ai-suggestion {
  padding: 10px 12px;
  background: var(--paper-2);
  border-radius: 8px;
  margin-bottom: 8px;
}
.ed-ai-suggestion:last-of-type { margin-bottom: 4px; }
.ed-ai-suggestion-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.ed-ai-suggestion-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink);
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.ed-ai-actions {
  display: flex; gap: 6px; justify-content: flex-end;
}
.ed-ai-btn-primary {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ed-ai-btn-primary:hover { background: var(--gold-deep); }
.ed-ai-btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.ed-ai-btn-secondary:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.ed-ai-foot {
  display: flex; gap: 6px; justify-content: flex-end;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ==== BLOG VIEW (Phase B.1 â€” Standard + Premium) ==== */

.blog-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.blog-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.blog-list {
  display: flex; flex-direction: column; gap: 10px;
}

.blog-empty {
  padding: 56px 24px;
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  color: var(--muted);
}

.blog-post-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: 0.12s;
}
.blog-post-row:hover {
  border-color: var(--line-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.blog-post-meta {
  flex: 1; min-width: 0;
}
.blog-post-title {
  font-size: 15px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
  line-height: 1.3;
}
.blog-post-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.blog-post-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-post-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}

.blog-status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
}
.blog-status-draft     { background: rgba(184, 144, 10, 0.14); color: #8a6a08; }
.blog-status-published { background: rgba(46, 158, 107, 0.14); color: #1f8b3b; }

.blog-modal {
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
}
.blog-modal textarea {
  width: 100%;
  resize: vertical;
}

.blog-hero-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.blog-hero-row input[type="text"] {
  flex: 1;
}
.blog-hero-preview {
  margin-top: 8px;
  max-width: 320px;
  border-radius: 6px;
  overflow: hidden;
  background: #f4f1ea;
}
.blog-hero-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
}

.blog-seo-details {
  margin: 4px 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.015);
}
.blog-seo-details > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  user-select: none;
  list-style: none;
}
.blog-seo-details > summary::before {
  content: "â–¸";
  display: inline-block;
  margin-right: 6px;
  color: var(--muted);
  transition: transform 0.15s;
}
.blog-seo-details[open] > summary::before { transform: rotate(90deg); }
.blog-seo-details .field { margin-top: 12px; }

@media (max-width: 720px) {
  .blog-post-row { flex-direction: column; }
  .blog-post-actions { align-self: flex-end; }
  .blog-banner { flex-direction: column; }
}

/* ==== SUPPORT MODAL â€” Send / Your tickets tabs ==== */

.modal.support-modal {
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
}
.support-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-2);
  margin: 0 0 18px;
}
.support-tab {
  background: none;
  border: none;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.support-tab:hover { color: var(--ink); }
.support-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.support-pane[hidden] { display: none; }

.support-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}
.support-history-item {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
}
.support-history-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.support-history-summary:hover { background: rgba(0, 0, 0, 0.02); }
.support-history-title {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-history-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.support-history-meta {
  font-size: 12px;
  color: var(--muted);
}
.support-history-body {
  border-top: 1px solid var(--line-2);
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.015);
}
.support-history-body pre {
  margin: 0;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #2b2b2b;
}

.support-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 5px;
}
.support-status-open      { background: rgba(184, 144, 10, 0.14); color: #8a6a08; }
.support-status-resolved  { background: rgba(46, 158, 107, 0.14); color: #1f8b3b; }

.support-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}
.support-empty-title {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

/* ==== Ticket reply thread (customer side) ==== */
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.support-msg {
  border-radius: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line-2);
}
.support-msg-admin  { background: rgba(184, 144, 10, 0.08); border-color: rgba(184, 144, 10, 0.22); }
.support-msg-client { background: rgba(0, 0, 0, 0.02); }
.support-msg-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.support-msg-body {
  margin: 0;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #2b2b2b;
}
.support-reply-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.support-reply-input {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13.5px;
  background: #fff;
  color: #2b2b2b;
}
.support-reply-input:focus {
  outline: none;
  border-color: rgba(184, 144, 10, 0.55);
}
.support-reply-send {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 16px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
}
.support-reply-send:hover { opacity: 0.9; }
.support-reply-send:disabled { opacity: 0.5; cursor: default; }

/* ==== LUMO ASSISTANT â€” chat-style side panel (Phase C) ==== */

#lumo-asst-host {
  /* Container is just for ownership; the pill + panel position themselves. */
}

#lumo-asst-pill {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px 10px 14px;
  background: #15151a;
  color: #fbfaf7;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
#lumo-asst-pill:hover {
  transform: translateY(-2px);
  background: #1f1f26;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), 0 4px 10px rgba(0, 0, 0, 0.14);
}
#lumo-asst-pill svg {
  width: 16px; height: 16px;
  color: var(--gold);
}

#lumo-asst-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  width: 440px;
  max-width: 100vw;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s ease;
}
#lumo-asst-panel.open { transform: translateX(0); }

.lumo-asst-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: #15151a; color: #fbfaf7;
  flex-shrink: 0;
}
.lumo-asst-head-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
}
.lumo-asst-head-title svg {
  width: 16px; height: 16px;
  color: var(--gold);
}
.lumo-asst-head-actions { display: flex; gap: 6px; }
.lumo-asst-head-actions button {
  background: transparent;
  color: rgba(251, 250, 247, 0.75);
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
}
.lumo-asst-head-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fbfaf7;
}
#lumo-asst-close { font-size: 22px; line-height: 1; padding: 2px 9px; }

.lumo-asst-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper);
}

.lumo-asst-welcome {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}
.lumo-asst-welcome-icon {
  display: inline-flex;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(224, 152, 42, 0.12);
  align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.lumo-asst-welcome-icon svg { width: 22px; height: 22px; color: var(--gold-deep); }
.lumo-asst-welcome-title {
  color: var(--ink);
  font-size: 16px; font-weight: 600;
  margin-bottom: 6px;
}
.lumo-asst-welcome-sub {
  font-size: 13px;
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

.lumo-asst-msg {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}
.lumo-asst-msg p { margin: 0 0 8px; }
.lumo-asst-msg p:last-child { margin-bottom: 0; }
.lumo-asst-msg-user {
  align-self: flex-end;
  background: #15151a;
  color: #fbfaf7;
  border-bottom-right-radius: 4px;
}
.lumo-asst-msg-asst {
  align-self: flex-start;
  background: var(--paper-2);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.lumo-asst-msg-asst code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
}

.lumo-asst-code {
  position: relative;
  background: #15151a;
  color: #fbfaf7;
  border-radius: 8px;
  margin: 8px 0;
  padding: 10px 12px;
}
.lumo-asst-code pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  padding-right: 60px;
}
.lumo-asst-copy {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fbfaf7;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
}
.lumo-asst-copy:hover { background: var(--gold); color: #15151a; border-color: var(--gold); }

.lumo-asst-typing { display: flex; gap: 4px; padding: 11px 14px; }
.lumo-asst-typing span {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--gold);
  opacity: 0.4; animation: lumoAsstPulse 1.2s infinite ease-in-out;
}
.lumo-asst-typing span:nth-child(2) { animation-delay: 0.15s; }
.lumo-asst-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes lumoAsstPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40%           { opacity: 1;   transform: scale(1); }
}

.lumo-asst-form {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 12px 14px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
#lumo-asst-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  resize: none;
  max-height: 140px;
  outline: none;
  line-height: 1.4;
}
#lumo-asst-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 152, 42, 0.15);
}
#lumo-asst-input:disabled { background: var(--paper-2); color: var(--muted); cursor: not-allowed; }
#lumo-asst-send {
  width: 40px; height: 40px;
  background: var(--gold);
  color: #fbfaf7;
  border: none;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
#lumo-asst-send svg { width: 16px; height: 16px; }
#lumo-asst-send:hover:not(:disabled) { background: var(--gold-deep); }
#lumo-asst-send:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 720px) {
  #lumo-asst-panel { width: 100vw; }
  #lumo-asst-pill { bottom: 14px; right: 14px; padding: 9px 16px 9px 12px; font-size: 12.5px; }
}
