/* ==========================================================================
   The Mist — design system
   Shared tokens and components for the admin console and the public site.
   Fonts are self-hosted: the property runs on a LAN and guest phones may have
   no internet, so a CDN would leave the site rendering in Times.
   ========================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
@font-face { font-family: 'Mulish'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/mulish.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/poppins-800.woff2) format('woff2'); }

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
    --gold: #bd9354;
    --gold-dark: #a67f42;
    --gold-soft: #f2efe9;
    --ink: #0d0d0d;
    --ink-2: #141414;
    --ink-3: #3a3a3a;
    --muted: #8f8a80;
    --muted-2: #9a9a9a;
    --muted-3: #a3a3a3;
    --bg: #f4f3f1;
    --surface: #fff;
    --line: #eae6df;
    --line-2: #e0dbd2;

    --green: #3d8b52;
    --green-bg: #e9f1e8;
    --red: #b0503f;
    --red-bg: #fbecea;
    --amber: #b07d29;
    --amber-bg: #faf1e2;
    --blue: #46617f;
    --blue-bg: #eaf0f6;

    /* Aliases. Views written against the guest portal's palette reference these
       names; without them the whole declaration is invalid, so a status stripe
       written as `border-left: 4px solid var(--warn)` silently becomes none. */
    --brand: #bd9354;
    --warn: #b07d29;
    --success: #3d8b52;
    --danger: #b0503f;

    --r-card: 22px;
    --r-btn: 12px;
    --r-input: 11px;
    --r-pill: 999px;
    --sidebar-w: 250px;

    --font-head: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'Mulish', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink-2); font-family: var(--font-body); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); margin: 0; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::placeholder { color: #9a9a9a; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ── App shell ─────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar { background: var(--ink); color: #c9c9c9; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; z-index: 100; transition: transform .25s ease; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }

.brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 22px; color: #fff; }
.brand-mark { display: grid; place-items: center; height: 38px; width: 38px; border-radius: 11px; background: var(--gold); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 19px; flex-shrink: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.15; }
.brand-sub { display: block; color: #7d7d7d; font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 2px; }

.nav-group { color: #6a6a6a; font-size: 9.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; padding: 16px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: #c9c9c9; font-size: 14px; font-weight: 500; }
.nav-item:hover { background: #1a1a1a; color: #fff; }
.nav-item.active { background: var(--gold); color: #fff; font-weight: 600; }
.nav-item .ico { width: 17px; height: 17px; flex-shrink: 0; opacity: .9; }
.nav-item .count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: var(--r-pill); background: #2a2a2a; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.nav-item.active .count { background: rgba(255, 255, 255, .28); }

.signed-in { margin-top: auto; background: #141414; border-radius: 14px; padding: 14px; }
.signed-in .lbl { color: #6a6a6a; font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; }
.signed-in .who { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: #fff; margin-top: 5px; }
.signed-in .sub { color: #8a8a8a; font-size: 12px; }
.signed-in .dot { display: inline-block; height: 6px; width: 6px; border-radius: 50%; background: var(--green); margin-right: 6px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 26px; background: var(--bg); position: sticky; top: 0; z-index: 50; }
.topbar h1 { font-size: 24px; font-weight: 700; color: var(--ink-2); }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn { display: grid; place-items: center; height: 40px; width: 40px; border-radius: var(--r-btn); background: var(--surface); border: 1px solid var(--line); cursor: pointer; position: relative; color: var(--ink-3); }
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn .badge-dot { position: absolute; top: 9px; right: 10px; height: 7px; width: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--surface); }

.user-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 6px 14px 6px 8px; }
.avatar { display: grid; place-items: center; height: 32px; width: 32px; border-radius: 9px; background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.user-chip .nm { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.user-chip .rl { color: var(--muted); font-size: 11.5px; }

.content { padding: 4px 26px 40px; max-width: 1560px; width: 100%; }

/* ── Hamburger / off-canvas ────────────────────────────────────────────── */
.hamburger { display: none; height: 40px; width: 40px; border-radius: var(--r-btn); background: var(--surface); border: 1px solid var(--line); cursor: pointer; place-items: center; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 90; }
.scrim.open { display: block; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; }
.card.flush { padding: 0; overflow: hidden; }
.card.dark { background: var(--ink); border-color: var(--ink); color: #e9e9e9; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head.pad { padding: 22px 24px 0; margin-bottom: 14px; }
.card-title { font-size: 17px; font-weight: 700; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.grid { display: grid; gap: 16px; }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1.6fr) minmax(300px, .85fr); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-cms { grid-template-columns: minmax(230px, .7fr) minmax(0, 1.5fr) minmax(250px, .8fr); }
.stack { display: grid; gap: 16px; align-content: start; }

/* ── KPI ───────────────────────────────────────────────────────────────── */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { color: var(--muted-2); font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; }
/* Money values get long, so the figure shrinks to fit rather than spilling out. */
.kpi-value { font-family: var(--font-head); font-size: clamp(22px, 2.4vw, 34px); font-weight: 800; color: var(--ink-2); line-height: 1.05; overflow-wrap: anywhere; }
.kpi-value.gold { color: var(--gold); }
.kpi-value.green { color: var(--green); }
.kpi-value.red { color: var(--red); }
.kpi-foot { color: var(--muted); font-size: 12.5px; }

/* ── Pills / badges ────────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--gold-soft); color: var(--ink-3); }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-blue { background: var(--blue-bg); color: var(--blue); }
.pill-gold { background: var(--gold-soft); color: var(--gold-dark); }
.pill-dark { background: #ecebe8; color: var(--ink-3); }

/* Status → colour mapping shared by every module. */
.st-available, .st-paid, .st-completed, .st-delivered, .st-approved, .st-active, .st-received, .st-resolved, .st-answered, .st-checked_in { background: var(--green-bg); color: var(--green); }
.st-occupied, .st-confirmed, .st-in_progress, .st-preparing, .st-accepted, .st-partially_received, .st-under_investigation, .st-under_review, .st-assigned { background: var(--blue-bg); color: var(--blue); }
.st-dirty, .st-pending, .st-partial, .st-ready, .st-draft, .st-low, .st-ordered, .st-deposit_paid, .st-new, .st-open { background: var(--amber-bg); color: var(--amber); }
.st-maintenance, .st-out_of_order, .st-cancelled, .st-unpaid, .st-critical, .st-rejected, .st-no_show, .st-blocked, .st-spam { background: var(--red-bg); color: var(--red); }
.st-checked_out, .st-closed, .st-hidden, .st-skipped, .st-refunded, .st-watch { background: #ecebe8; color: var(--ink-3); }
.st-reserved, .st-charged_to_room { background: var(--gold-soft); color: var(--gold-dark); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 22px; border-radius: var(--r-btn); border: 1px solid transparent; background: var(--gold); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s ease; }
.btn:hover { background: var(--gold-dark); color: #fff; }
.btn-2 { background: var(--surface); border-color: var(--line-2); color: var(--ink-3); }
.btn-2:hover { background: #faf9f7; border-color: #cfc8bb; color: var(--ink-3); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #262626; color: #fff; }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: #f0d5d0; }
.btn-danger:hover { background: #f7ded9; color: var(--red); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 9px 18px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tab:hover { border-color: var(--line-2); }
.tab.active { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 620px; }
th { text-align: left; padding: 10px 24px; color: var(--muted-3); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 15px 24px; border-bottom: 1px solid #f2f0ec; font-size: 13.5px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfaf8; }
th.num, td.num { text-align: right; }
.t-strong { font-weight: 700; color: var(--ink-2); }
.t-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.field .hint { color: var(--muted); font-size: 11.5px; }
/* Styled by exclusion rather than by listing every type: an <input> with no type
   attribute is a text field, and listing types silently skipped those. */
input:not([type=checkbox], [type=radio], [type=file], [type=submit], [type=button], [type=reset], [type=image], [type=range], [type=color], [type=hidden]),
select, textarea {
    width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-input); padding: 11px 13px; font-size: 14px; font-family: inherit; color: var(--ink-3); transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 88px; resize: vertical; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f8a80' stroke-width='1.7' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; }
.check input { width: auto; accent-color: var(--gold); height: 16px; width: 16px; }

/* ── Toolbar / filters ─────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { max-width: 260px; }

/* ── Progress rows ─────────────────────────────────────────────────────── */
.meter-row { display: grid; gap: 7px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; }
.meter-top .v { font-weight: 700; }
.meter { height: 6px; border-radius: 4px; background: #efedea; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: var(--gold); }
.meter.green > span { background: var(--green); }
.meter.red > span { background: var(--red); }

/* ── Flash / alerts ────────────────────────────────────────────────────── */
.flash { display: flex; gap: 11px; align-items: flex-start; padding: 13px 17px; border-radius: 13px; margin-bottom: 18px; font-size: 13.5px; background: var(--green-bg); border: 1px solid #cfe3cd; color: #22593a; }
.flash-error { background: var(--red-bg); border-color: #f0d5d0; color: var(--red); }
.flash ul { margin: 6px 0 0; padding-left: 18px; }
.field-error { color: var(--red); font-size: 12px; }

/* ── Empty state ───────────────────────────────────────────────────────── */
.empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink-3); font-family: var(--font-head); font-size: 15px; margin-bottom: 4px; }

/* ── Working… ──────────────────────────────────────────────────────────── */
/* Shown while a form is submitting, so a slow reply never reads as a dead
   button. Lives in both stylesheets because both surfaces submit forms. */
.busy { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(244, 243, 241, .72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .18s ease; }
.busy.on { opacity: 1; }
.busy[hidden] { display: none; }
.busy-in { display: grid; justify-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px 38px; box-shadow: 0 18px 50px rgba(0, 0, 0, .12); }
.busy-ring { height: 36px; width: 36px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--gold); animation: busyspin .7s linear infinite; }
.busy-say { color: var(--ink-3); font-size: 14px; font-weight: 600; }
@keyframes busyspin { to { transform: rotate(360deg); } }

button.is-busy, .btn.is-busy { opacity: .65; cursor: progress; }

@media (prefers-reduced-motion: reduce) {
    .busy-ring { animation-duration: 2.4s; }
}

/* A count on a sidebar item — work waiting, not decoration. */
.nav-count { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }

/* ── Branding & settings ───────────────────────────────────────────────── */
.ticks { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-3); font-size: 13.5px; line-height: 1.6; }
.ticks svg { color: var(--gold); flex-shrink: 0; margin-top: 3px; }

.brand-logo { max-height: 40px; max-width: 178px; width: auto; object-fit: contain; display: block; }
.brand-shot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.brand-shot img { max-height: 56px; max-width: 210px; width: auto; object-fit: contain; }
.map-frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); height: 320px; background: var(--bg); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── Decisions panel ───────────────────────────────────────────────────── */
.decision { display: flex; gap: 11px; align-items: flex-start; }
.decision b { display: block; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.decision > span:last-child > span { display: block; color: #8a847c; font-size: 12px; margin-top: 2px; }
.decision:hover b { color: var(--gold); }
.decision .dot { height: 8px; width: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--gold); }
.decision .dot.red { background: #d2604c; }
.decision .dot.amber { background: #d69b3f; }
.decision .dot.green { background: #4fa268; }

/* ── Room type cards ───────────────────────────────────────────────────── */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.type-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.type-media { position: relative; aspect-ratio: 16 / 10; background: var(--bg); display: grid; place-items: center; }
.type-media img { width: 100%; height: 100%; object-fit: cover; }
.type-noimg { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.type-count { position: absolute; right: 10px; bottom: 10px; background: rgba(13, 13, 13, .8); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }
.type-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.type-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.type-head h2 { font-size: 17px; font-weight: 700; }
.type-rate { font-family: var(--font-head); font-size: 21px; font-weight: 800; color: var(--gold-dark); }
.type-rate small { color: var(--muted); font-family: var(--font-body); font-size: 12.5px; font-weight: 600; }
.type-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.type-facts li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.type-facts span { color: var(--muted); }
.type-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }

/* ── Image uploader ────────────────────────────────────────────────────── */
.uploader { display: grid; gap: 6px; }
.uploader > label:first-child { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.up-grid:empty { display: none; }
.up-shot { position: relative; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--bg); }
.up-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-shot:first-child::after { content: 'Cover'; position: absolute; left: 6px; bottom: 6px; background: rgba(13, 13, 13, .82); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.up-shot.pending { border-style: dashed; border-color: var(--gold); }
.up-drop { position: absolute; top: 5px; right: 5px; height: 24px; width: 24px; border: 0; border-radius: 50%; background: rgba(13, 13, 13, .74); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.up-drop:hover { background: var(--red); }

/* ── Row thumbnail ─────────────────────────────────────────────────────── */
.room-thumb { display: grid; place-items: center; height: 46px; width: 60px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.room-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Photo library ─────────────────────────────────────────────────────── */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 15px; }
.shot-admin { margin: 0; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: var(--surface); }
.shot-admin.off { opacity: .5; }
.shot-admin > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.shot-admin figcaption { padding: 12px; }

.dropzone { display: grid; place-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--line-2); border-radius: 16px; background: var(--bg); text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease; color: var(--muted); }
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }
.dropzone strong { font-family: var(--font-head); font-size: 15px; color: var(--ink-2); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ── CMS section list ──────────────────────────────────────────────────── */
.cms-sec { display: flex; align-items: stretch; gap: 6px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.cms-sec.on { border-color: var(--gold); background: var(--gold-soft); }
.cms-sec-main { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 11px 13px; }
.cms-sec-main .t-strong { font-size: 13.5px; }
.cms-sec-tools { display: flex; align-items: center; gap: 2px; padding-right: 8px; }
.ico-btn { display: grid; place-items: center; height: 27px; width: 27px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.ico-btn:hover:not(:disabled) { background: #fff; color: var(--ink-2); }
.ico-btn.on { color: var(--green); }
.ico-btn:disabled { opacity: .28; cursor: default; }
.repeat-block { border: 1px solid var(--line); border-radius: 13px; padding: 15px; margin-bottom: 10px; }

/* ── Chips (feature presets) ───────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--gold); color: var(--gold-dark); }
.chip.on { background: var(--gold-soft); border-color: #e6dcc9; color: var(--gold-dark); cursor: default; }
.chip i { font-style: normal; font-size: 15px; line-height: 1; cursor: pointer; opacity: .6; }
.chip i:hover { opacity: 1; color: var(--red); }
.chips.chosen:empty::after { content: 'No features chosen yet.'; color: var(--muted); font-size: 12.5px; }

/* ── Repeatable rows ───────────────────────────────────────────────────── */
.repeat { display: grid; gap: 8px; }
.repeat-row { display: flex; gap: 8px; align-items: center; }
.repeat-row input { flex: 1; min-width: 0; }

/* ── Misc ──────────────────────────────────────────────────────────────── */
.sec-label { color: var(--muted-2); font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.divide { height: 1px; background: var(--line); margin: 18px 0; }
/* Styled on .pagination itself, not on a .pager wrapper — most views render
   {{ $x->links() }} bare, and a paginator that only works when wrapped is a
   paginator that mostly does not work. */
.pager { margin-top: 18px; }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 18px 0 0; flex-wrap: wrap; }
.pagination .page-item span, .pagination .page-item a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.pagination .page-item a:hover { border-color: var(--gold); color: var(--gold-dark); }
.pagination .page-item.active span { background: var(--gold); border-color: var(--gold); color: #fff; }
.pagination .page-item.disabled span { opacity: .45; }
.pager .pagination { margin-top: 0; }
/* The bars stretch to the full track so their percentage heights have a
   definite height to resolve against; the two series sit side by side. */
.chart { display: flex; align-items: stretch; gap: 6px; height: 200px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chart .bar-cols { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.chart .bar-cols i { display: block; width: 42%; max-width: 13px; min-height: 2px; background: var(--gold); border-radius: 3px 3px 0 0; transition: opacity .15s; }
.chart .bar-cols i.prev { background: #e6ddcd; }
.chart .bar:hover .bar-cols i { opacity: .75; }
.chart .bar-label { text-align: center; color: var(--muted-2); font-size: 10.5px; padding-top: 8px; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; height: 8px; width: 8px; border-radius: 50%; margin-right: 5px; background: var(--gold); }
.legend i.prev { background: #e6ddcd; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .grid-2, .grid-cms { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100%; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .hamburger { display: grid; }
    .topbar { padding: 14px 16px; }
    .topbar h1 { font-size: 20px; }
    /* The strapline is context, not navigation — on a phone it only pushes the
       controls out of reach. */
    .topbar .sub { display: none; }
    .content { padding: 4px 16px 34px; }
    .user-chip .nm, .user-chip .rl { display: none; }
    .user-chip { padding: 6px; }
    .form-grid { grid-template-columns: 1fr; }
    th, td { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 560px) {
    .grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi-value { font-size: 22px; }
    .chart { height: 160px; }
    .chart .bar-label { font-size: 9.5px; }
    .card { padding: 18px; border-radius: 18px; }
    .card-head.pad { padding: 18px 18px 0; }
}
@media print {
    .sidebar, .topbar-actions, .hamburger, .row-actions, .no-print { display: none !important; }
    .shell { grid-template-columns: 1fr; }
    body { background: #fff; }
    .card { border-color: #ddd; break-inside: avoid; }
}
