/* AirCalendar — back-office stylesheet */

/* ============================================================
   Fonts — Inter Variable (https://rsms.me/inter, OFL)
   Drop InterVariable.woff2 into /public/assets/fonts/.
   ============================================================ */
@font-face {
    font-family: "Inter";
    src: url("../fonts/InterVariable.woff2") format("woff2-variations"),
         url("../fonts/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   Design tokens — slate palette, light by default
   The theme is selected by an attribute on <html>: data-theme="light" or
   data-theme="dark". An inline <head> script sets it before render to avoid
   FOUC. Layouts that should be locked light (installer, auth) hard-code
   data-theme="light" on <html> and skip the script.
   ============================================================ */
:root,
html[data-theme="light"] {
    --bg:        #f8fafc;   /* slate-50 */
    --bg-raised: #ffffff;
    --panel:     #ffffff;
    --panel-2:   #f1f5f9;   /* slate-100 */
    --text:      #0f172a;   /* slate-900 */
    --text-2:    #334155;   /* slate-700 */
    --muted:     #64748b;   /* slate-500 */
    --subtle:    #94a3b8;   /* slate-400 */
    --line:      #e2e8f0;   /* slate-200 */
    --line-2:    #f1f5f9;   /* slate-100 */

    --accent:      #0f172a;
    --accent-ink:  #ffffff;
    --accent-soft: rgba(15, 23, 42, .05);
    --accent-ring: rgba(15, 23, 42, .12);

    --ok:   #166534;        /* green-800 */
    --warn: #92400e;        /* amber-800 */
    --err:  #b91c1c;        /* red-700  */

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow:    0 1px 3px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);

    --radius:    8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-feature: "cv02", "cv03", "cv04", "cv11";
}

html[data-theme="dark"] {
    --bg:        #0f172a;   /* slate-900 */
    --bg-raised: #1e293b;   /* slate-800 */
    --panel:     #1e293b;
    --panel-2:   #172033;   /* between 900/800 */
    --text:      #f1f5f9;   /* slate-100 */
    --text-2:    #cbd5e1;   /* slate-300 */
    --muted:     #94a3b8;   /* slate-400 */
    --subtle:    #64748b;   /* slate-500 */
    --line:      #334155;   /* slate-700 */
    --line-2:    #1e293b;   /* slate-800 */

    --accent:      #f1f5f9;
    --accent-ink:  #0f172a;
    --accent-soft: rgba(241, 245, 249, .06);
    --accent-ring: rgba(241, 245, 249, .16);

    --ok:   #86efac;        /* green-300 */
    --warn: #fde68a;        /* amber-200 */
    --err:  #fca5a5;        /* red-300  */

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow:    0 2px 4px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .25);
}

/* Select chevron — separate per theme so the icon stays visible against the bg */
html[data-theme="light"] select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="light"] select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="dark"] select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="dark"] select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-11'/%3E%3C/svg%3E");
}

/* Stepper checkmark in light needs white on dark bg */
html[data-theme="light"] .step.done .step-dot::before {
    background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-11'/%3E%3C/svg%3E") center/contain no-repeat;
}
html[data-theme="dark"] .step.done .step-dot::before {
    background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-11'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Toggle thumb / accent-ink invert per theme — handled by var(--accent) */

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    font: 14px/1.55 var(--font-body);
    font-feature-settings: var(--font-feature);
    margin: 0;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 12px;
    line-height: 1.2;
    color: var(--text);
}
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; }

p { margin: 0 0 12px; color: var(--text-2); }
small { font-size: 12px; color: var(--muted); }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text); }

code {
    background: var(--line-2);
    padding: 2px 6px;
    border-radius: 4px;
    font: 12.5px var(--font-mono);
    color: var(--text-2);
}

hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* .muted and .small moved to shared.css */
.subtle  { color: var(--subtle); }
.tiny    { font-size: 11px; }

/* ============================================================
   Layout utilities
   ============================================================ */
.stack    { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
/* .hstack moved to shared.css */
.hstack-sm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spread   { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grow     { flex: 1; }
.nowrap   { white-space: nowrap; }
.center   { text-align: center; }
.hidden   { display: none !important; }

/* ============================================================
   Cards — subtle elevation
   ============================================================ */
/* .card base moved to shared.css. Admin-only variants below. */
.card--flush { margin: 0; }
.card--padded { padding: 32px; }
.card > h2:first-child { margin-top: 0; }
.card h2 { margin: 24px 0 14px; font-size: 17px; }
.card h2:first-child { margin-top: 0; }
.card-divider { margin: 20px -24px; border-top: 1px solid var(--line); }

/* ============================================================
   Stats grid — proper dashboard cards
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 500;
}
.stat-value {
    font-family: var(--font-heading);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text);
}
.stat-value.muted { color: var(--subtle); }
.stat-hint { color: var(--muted); font-size: 12px; }
.stat-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }

/* ============================================================
   Forms
   ============================================================ */
label {
    display: block;
    margin: 14px 0 5px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}
label:first-child { margin-top: 0; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 7px 11px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.row input, .row select, .row textarea,
.row-3 input, .row-3 select, .row-3 textarea { max-width: none; }

input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) {
    border-color: var(--subtle);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }

textarea { min-height: 96px; resize: vertical; font-family: inherit; line-height: 1.55; }

input[disabled], select[disabled], textarea[disabled] { opacity: .5; cursor: not-allowed; }

select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    cursor: pointer;
}
select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
select::-ms-expand { display: none; }
select option { background: var(--panel); color: var(--text); }

/* .row base moved to shared.css */
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.row-3 label:first-child { margin-top: 0; }

/* Consistent vertical rhythm between any block-level form group inside a card.
   Single labels already get margin-top via the `label` rule; this matches it
   for grids, toggles and helpers so they don't sit flush against the input above. */
.card .row,
.card .row-3,
.card > .toggle,
.card > .form-hint,
.card > .dropzone,
.card > p { margin-top: 14px; }
.card > h2 + .row,
.card > h2 + .row-3,
.card > h2 + .toggle,
.card > h2 + .form-hint,
.card > h2 + p { margin-top: 0; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: var(--s-4);
    padding: 12px 0;
}
.pagination-info { font-variant-numeric: tabular-nums; }
.pagination-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pagination-select {
    -webkit-appearance: none;
    appearance: none;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel, #fff);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    color: var(--text);
    cursor: pointer;
    width: auto !important;
    max-width: 140px;
    flex: 0 0 auto;
}
.pagination-pages { display: flex; align-items: center; gap: 2px; }
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background .1s;
}
.pagination-btn:hover:not(.is-disabled):not(.is-current) { background: var(--surface-2); }
.pagination-btn.is-current { background: var(--accent); color: var(--accent-ink, #fff); font-weight: 600; }
.pagination-btn.is-disabled { opacity: .3; cursor: not-allowed; }
.pagination-ellipsis { padding: 0 4px; color: var(--muted); font-size: 13px; }

/* Tint control — preview + styled range slider */
.tint-control { margin-top: 8px; }
.tint-preview {
    position: relative;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.tint-preview-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    pointer-events: none;
}
.tint-preview-text {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.tint-slider {
    display: flex;
    align-items: center;
    gap: 14px;
}
.tint-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Styled range input */
.range-wrap { position: relative; padding-bottom: 22px; }
.range-styled {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--line);
    outline: none;
    border: 0;
    padding: 0;
    margin: 10px 0 0;
}
.range-styled::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text);
    cursor: pointer;
    border: 3px solid var(--panel, #fff);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    margin-top: -8px;
}
.range-styled::-webkit-slider-thumb:hover { box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.range-styled::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text);
    cursor: pointer;
    border: 3px solid var(--panel, #fff);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.range-styled::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; }
.range-styled::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.range-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding: 0 2px;
}
.range-markers span {
    font-size: 11px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.range-markers span.is-active { color: var(--text); font-weight: 600; }

.roles-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-5); margin-top: var(--s-3); }
.roles-perm-group h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
.roles-perm-group .toggle { margin: 4px 0; }

.email-preview { font-size: 14px; line-height: 1.6; color: var(--text); }
.email-preview table { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.email-preview td { background: transparent !important; border: 0 !important; border-radius: 0 !important; }
.email-preview img { max-width: 100%; }

.ical-copy-field {
    position: relative;
    display: flex;
}
.ical-copy-field input {
    flex: 1;
    padding-right: 44px;
}
.ical-copy-btn {
    position: absolute;
    right: 1px; top: 1px; bottom: 1px;
    width: 38px;
    border: 0;
    background: var(--surface-2);
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background .1s;
}
.ical-copy-btn:hover { background: var(--line); }

.feed-colors { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.feed-color-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .1s, transform .1s;
    padding: 0;
}
.feed-color-dot:hover { transform: scale(1.15); }
.feed-color-dot.is-selected { border-color: var(--text); transform: scale(1.15); }

/* Daily-digest fields — give the time hint and the send-now row more
   breathing room than the default tight form rhythm. */
.digest-time-hint { margin-top: 10px; margin-bottom: 4px; }
.digest-send-row  { margin-top: 18px; margin-bottom: 8px; }

/* Generic input with a leading icon (social URLs, etc.). Icon sits
   inside the field so the layout lines up with a normal <input>. */
.input-prefixed { position: relative; }
.input-prefixed .input-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    display: inline-flex;
    pointer-events: none;
}
.input-prefixed > input { padding-left: 36px; }

.account-photo-row { display: flex; align-items: center; gap: 20px; }
.account-photo {
    width: 80px; height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.account-photo img { width: 100%; height: 100%; object-fit: cover; }
.account-photo-initials { font-size: 28px; font-weight: 700; color: var(--muted); }
.account-photo-actions { display: flex; flex-direction: column; gap: 6px; }
.account-photo-actions .form-hint { margin: 0; }

.audit-details { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


th.sortable a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
th.sortable a:hover { color: var(--text); }
.sort-arrow { font-size: 12px; line-height: 1; }
.sort-arrow-idle { opacity: .3; }
th.is-sorted .sort-arrow { opacity: 1; color: var(--text); }

.form-actions {
    display: flex; gap: 10px; align-items: center;
    margin-top: 24px; flex-wrap: wrap;
    justify-content: space-between;
}
.form-actions.compact { border: 0; margin-top: 10px; padding-top: 0; }
.form-actions a.secondary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    background: var(--bg-raised);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .1s, border-color .1s;
}
.form-actions a.secondary:hover {
    background: var(--panel-2);
    border-color: var(--subtle);
}
/* .form-hint moved to shared.css */

/* Field-level validation error — red, right-aligned, under the field */
.field-error {
    color: var(--err);
    font-size: 12px;
    text-align: right;
    margin: 4px 0 0;
    max-width: 460px;
    line-height: 1.4;
}
.row .field-error, .row-3 .field-error { max-width: none; }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--err); }
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(252,165,165,.18);
    border-color: var(--err);
}

/* ============================================================
   Amenity picker — grid of toggle switches grouped by category
   ============================================================ */
.amenity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 6px 20px;
}
.amenity-toggle {
    margin: 0;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background .08s;
    width: 100%;
}
.amenity-toggle:hover { background: var(--accent-soft); }
.amenity-toggle .toggle-text { font-size: 13px; }

/* ============================================================
   Dropzone — photo upload area
   ============================================================ */
.dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-lg);
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: transparent;
    min-height: 180px;
}
.dropzone:hover {
    border-color: var(--subtle);
    background: var(--accent-soft);
}
.dropzone.is-dragover {
    border-color: var(--accent);
    border-style: solid;
    background: var(--accent-soft);
}
.dropzone input[type=file] {
    position: absolute; inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
.dropzone-status {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
    min-height: 18px;
}
.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.dropzone-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--text);
    margin-bottom: 4px;
}
.dropzone-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.dropzone-sub {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}
.dropzone-link {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--muted);
    text-underline-offset: 3px;
}

/* ============================================================
   Photo grid (property photos)
   ============================================================ */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.photo-tile { display: flex; flex-direction: column; gap: 8px; }
.photo-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel-2);
    border: 1px solid var(--line);
    text-decoration: none;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile.is-primary .photo-thumb { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.photo-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: .04em;
}
.photo-alt {
    width: 100%;
    max-width: none;
    padding: 6px 9px;
    font-size: 12px;
}
.photo-actions { display: flex; gap: 6px; align-items: center; }
.photo-actions form { margin: 0; flex-shrink: 0; }
.photo-actions form:first-child { flex: 1; }
.photo-actions form:first-child button { width: 100%; }

/* Toggle switch — base rules moved to shared.css. Admin-only additions below. */
.toggle-hint { display: block; color: var(--muted); font-size: 12.5px; margin: -4px 0 14px 52px; line-height: 1.5; }

.checkbox { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 14px; cursor: pointer; }
.checkbox input { width: auto; margin: 0; accent-color: var(--accent); }

/* Buttons — base rules moved to shared.css. Admin-only additions below. */

.link-button {
    background: none; border: 0; color: var(--text); padding: 0; cursor: pointer; font: inherit;
    text-decoration: underline; text-decoration-color: var(--subtle); text-underline-offset: 3px;
    box-shadow: none;
}
.link-button:hover { text-decoration-color: var(--text); background: none; filter: none; }

/* ============================================================
   Tables — single global pattern used everywhere
   ============================================================ */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    color: var(--text);
}
thead th {
    text-align: left;
    padding: 10px 16px;
    color: var(--muted);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    white-space: nowrap;
}
thead th:first-child { border-left: 1px solid var(--line); border-top-left-radius: var(--radius-lg); }
thead th:last-child  { border-right: 1px solid var(--line); border-top-right-radius: var(--radius-lg); }
tbody td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    color: var(--text);
    background: var(--panel);
}
tbody td:first-child { border-left: 1px solid var(--line); }
tbody td:last-child  { border-right: 1px solid var(--line); }
tbody tr:nth-child(even) td { background: var(--panel-2); }
tbody tr { transition: background .08s; }
tbody tr:hover td { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 1px solid var(--line); }
tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-lg); }
tbody tr:last-child td:last-child  { border-bottom-right-radius: var(--radius-lg); }

/* When a table sits inside a card alone, drop card chrome and let table draw its own */
.card.card--table { padding: 0; border: 0; box-shadow: none; background: transparent; }

/* Wrapper div placed inside an action <td>. The td stays a normal table cell
   (so vertical alignment works correctly); this div lays out the buttons. */
.table-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    vertical-align: middle;
}
.table-actions form { margin: 0; display: inline-flex; }
td.cell-actions { text-align: right; white-space: nowrap; }
.cell-strong { font-weight: 500; color: var(--text); }
.cell-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Responsive: tables scroll horizontally on small screens rather than crushing.
   Place the table inside .table-wrap (or .card.card--table) and it'll behave. */
.card--table, .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.card--table table, .table-wrap table { min-width: 600px; }

/* Hide low-priority cells on small screens. Add .col-hide-sm to th/td you can drop. */
@media (max-width: 720px) {
    .col-hide-sm { display: none; }
}

/* ============================================================
   Flash + badges
   ============================================================ */
/* Toast container — fixed top-right stack. Individual toasts slide in
   from the right and auto-dismiss after a few seconds. */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    width: calc(100vw - 32px);
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 13.5px;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    pointer-events: auto;
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    transition: transform .28s cubic-bezier(.2, .7, .2, 1), opacity .22s ease;
}
.toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}
.toast.is-leaving {
    transform: translateX(calc(100% + 20px));
    opacity: 0;
}
.toast-close {
    margin-left: auto;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
    font-size: 16px;
    line-height: 1;
}
.toast-close:hover { opacity: 1; }
.toast.success {
    background: var(--panel);
    color: var(--ok);
    border-color: rgba(134,239,172,.28);
}
.toast.error {
    background: var(--panel);
    color: var(--err);
    border-color: rgba(252,165,165,.28);
}
.toast.info {
    background: var(--panel);
    color: var(--text);
    border-color: var(--line);
}
.toast.warn {
    background: var(--panel);
    color: var(--warn);
    border-color: rgba(252,211,77,.28);
}

/* Legacy flash banner — kept as fallback if toast JS hasn't loaded. */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: none; /* hidden by default — toast takes over */
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    border: 1px solid;
    line-height: 1.5;
}

/* .badge moved to shared.css */

/* .icon moved to shared.css */

/* ============================================================
   Auth shell
   ============================================================ */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow);
}
.auth-subtitle { color: var(--muted); margin: 0 0 24px; font-size: 14px; line-height: 1.55; }
.auth-foot     { margin-top: 20px; text-align: center; font-size: 14px; }
.auth-subfoot {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    font-size: 13px;
}
.auth-sublink {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--muted);
    font: inherit;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
}
.auth-sublink:hover, .auth-sublink:focus {
    background: transparent;
    color: var(--text);
    text-decoration: none;
    outline: none;
    box-shadow: none;
    filter: none;
}

/* Login code slider */
.slider { position: relative; overflow: hidden; }
.slider-track { display: flex; transition: transform .35s cubic-bezier(.4,0,.2,1); }
.slider-track.show-code { transform: translateX(-100%); }
.slider-step { flex: 0 0 100%; min-width: 0; box-sizing: border-box; }

.code-inputs { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 20px; }
.code-inputs input {
    width: 100%;
    height: 56px;
    text-align: center;
    font: 500 24px/1 var(--font-body);
    letter-spacing: .04em;
    margin: 0;
    padding: 0;
}

/* ============================================================
   Install wizard shell
   ============================================================ */
.install-shell { max-width: 720px; margin: 48px auto; padding: 24px; }

.check-list { display: flex; flex-direction: column; }
.check-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.check-row:last-child { border-bottom: 0; }
.check-row .check-hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.check-ok   { color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
.check-fail { color: var(--err); display: inline-flex; align-items: center; gap: 4px; }

/* Wizard stepper timeline */
.stepper {
    list-style: none; padding: 0; margin: 0 0 32px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 0;
    counter-reset: step;
}
.stepper .step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; counter-increment: step; }
.stepper .step::before {
    content: ""; position: absolute; top: 14px; left: 50%; right: -50%;
    height: 1px; background: var(--line); z-index: 0;
}
.stepper .step:last-child::before { display: none; }
.stepper .step.done::before { background: var(--accent); }

.step-dot {
    position: relative; z-index: 1;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font: 12px/1 var(--font-body); font-weight: 500; color: var(--muted);
    box-shadow: var(--shadow-sm);
}
.step-dot::before { content: counter(step); }

.step.current .step-dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.step.done    .step-dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step.done    .step-dot::before { content: ""; width: 12px; height: 12px; background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-11'/%3E%3C/svg%3E") center/contain no-repeat; }

.step-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; text-align: center; font-weight: 500; }
.step.current .step-label { color: var(--text); }

/* ============================================================
   Admin shell — sidebar with collapsible groups (Cloudflare-style)
   ============================================================ */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-shell--collapsed { grid-template-columns: 56px 1fr; }
.admin-hamburger { display: none; border: 0; background: none; padding: 4px; cursor: pointer; color: var(--text); }
.admin-sidebar-scrim { display: none; }

.admin-sidebar {
    background: var(--panel);
    border-right: 1px solid var(--line);
    padding: 0 0 12px;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 50;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    height: 53px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    box-sizing: border-box;
    flex-shrink: 0;
}
.brand-mark { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-text { letter-spacing: -0.01em; }

.admin-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* Top-level item (no children) */
.nav-item, .nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 16px);
    margin: 1px 8px;
    padding: 7px 12px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    border: 0;
    background: transparent;
    border-radius: 6px;
    box-shadow: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    transition: background .08s, color .08s;
}
.nav-item:hover, .nav-group-toggle:hover {
    background: var(--accent-soft);
    color: var(--text);
    text-decoration: none;
    filter: none;
}
.nav-item.active {
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 500;
}
.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: var(--muted);
}
.nav-item:hover .nav-icon, .nav-item.active .nav-icon,
.nav-group-toggle:hover .nav-icon, .nav-group.open .nav-group-toggle .nav-icon { color: var(--muted); }
.nav-label { flex: 1; }

/* Collapsible group */
.nav-group { position: relative; }
.nav-chevron {
    margin-left: auto;
    display: inline-flex;
    color: var(--subtle);
    transition: transform .22s ease;
}
.nav-group.open > .nav-group-toggle .nav-chevron { transform: rotate(90deg); color: var(--muted); }

/* Height is managed by JS (initNavGroups in admin.js): it measures the
   actual content height and animates between 0 and that, then sets to auto
   so content can grow without re-measuring. CSS provides only the easing. */
.nav-group-items {
    height: 0;
    overflow: hidden;
    transition: height .22s cubic-bezier(.2, .8, .2, 1);
    padding: 0;
}
.nav-group-items > .nav-subitem:first-child { margin-top: 4px; }
.nav-group-items > .nav-subitem:last-child  { margin-bottom: 4px; }

.nav-subitem {
    display: flex;
    align-items: center;
    margin: 1px 8px;
    padding: 6px 12px 6px 40px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 12.5px;
    border-radius: 6px;
    transition: background .08s, color .08s;
}
.nav-subitem:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.nav-subitem.active { background: var(--accent-soft); color: var(--text); font-weight: 500; }

/* ---------- Dashboard / analytics ---------- */
.kpi-grid {
    display: grid;
    /* Fixed column count so 6 tiles don't fall into a 5+1 stranded row.
       Modifier `.kpi-grid--wide` bumps to 4 for pages with 8 tiles. */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 20px;
}
.kpi-grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .kpi-grid,
    .kpi-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .kpi-grid,
    .kpi-grid--wide { grid-template-columns: 1fr; }
}
.kpi {
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.kpi-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.kpi-hint  { font-size: 12px; margin-top: 4px; }

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.dashboard-row .card { margin: 0; }
.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.card-head h2 { margin: 0; font-size: 15px; }

/* Ordered top-list used on "Top properties". */
.top-list { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.top-list li {
    counter-increment: n;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.top-list li:last-child { border-bottom: 0; }
.top-list li::before {
    content: counter(n);
    display: inline-flex;
    width: 22px; height: 22px;
    align-items: center; justify-content: center;
    background: var(--bg-raised);
    color: var(--muted);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 10px;
}
.top-list a { color: inherit; text-decoration: none; flex: 1; }
.top-list a:hover { text-decoration: underline; }
.top-amount { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Upcoming check-ins / check-outs. */
.stack-list { margin: 0; padding: 0; list-style: none; }
.stack-list li {
    display: grid;
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.stack-list li:last-child { border-bottom: 0; }
.stack-date { grid-row: 1 / span 2; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.stack-main { font-size: 14px; font-weight: 500; }
.stack-sub  { font-size: 12px; }

/* SVG chart — colour driven by CSS so theme swap hits charts too. */
.chart { display: block; width: 100%; height: auto; }
.chart-bar  { fill: var(--accent, #2563eb); transition: fill 120ms ease; }
.chart-bar:hover { fill: var(--text); }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-xlabel { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-ylabel { fill: var(--muted); font-size: 11px; font-family: inherit; }

/* Booking status pills (inline in dashboard tables). */
.pill-pending        { background: #d97706; color: #fff; }
.pill-confirmed      { background: #2563eb; color: #fff; }
.pill-paid           { background: #059669; color: #fff; }
.pill-declined       { background: #dc2626; color: #fff; }
.pill-cancelled      { background: #64748b; color: #fff; }
.pill-unpaid         { background: #94a3b8; color: #fff; }
.pill-deposit_paid   { background: #3b82f6; color: #fff; }
.pill-failed         { background: #ef4444; color: #fff; }
.pill-refunded       { background: #64748b; color: #fff; }
.pill-partial_refund { background: #d97706; color: #fff; }
.pill-approved       { background: #059669; color: #fff; }
.pill-rejected       { background: #dc2626; color: #fff; }
.pill-muted          { background: var(--bg-raised); color: var(--muted); }

/* ---------- Booking detail drawer (slides from right) ---------- */
.bk-drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.bk-drawer[hidden] { display: none; }
.bk-drawer-scrim {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: auto;
}
.bk-drawer.is-open .bk-drawer-scrim { opacity: 1; }
.bk-drawer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(480px, 92vw);
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: -12px 0 40px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .24s cubic-bezier(.2,.7,.2,1);
    display: flex; flex-direction: column;
    pointer-events: auto;
}
.bk-drawer.is-open .bk-drawer-panel { transform: translateX(0); }
.bk-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}
.bk-drawer-head h2 { margin: 0; font-size: 16px; }
.bk-drawer-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 0;
    background: var(--bg-raised);
    color: var(--text);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.bk-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}
.bk-dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; font-size: 14px; margin: 0 0 20px; }
.bk-dl dt { color: var(--muted); }
.bk-dl dd { margin: 0; }
.bk-progress { margin-bottom: 20px; }
.bk-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}
.bk-progress-bar {
    height: 16px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.bk-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width .3s ease;
}
.bk-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.bk-pay-table { width: 100%; font-size: 13px; }
.bk-pay-table th { text-align: left; font-weight: 600; padding: 6px 8px; }
.bk-pay-table td { padding: 6px 8px; }

/* ---------- Guest email timeline ---------- */
.guest-timeline { display: flex; flex-direction: column; gap: 0; padding-left: 16px; border-left: 2px solid var(--line); }
.guest-timeline-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; position: relative; }
.guest-timeline-dot {
    position: absolute;
    left: -23px;
    top: 14px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--text);
    border: 2px solid var(--panel);
}
.guest-timeline-label { font-weight: 500; font-size: 14px; }

/* Small count bubble on nav items (e.g. pending rota drafts). */
.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, #f59e0b 28%, transparent);
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.nav-divider { height: 1px; background: var(--line); margin: 8px 16px; }

.nav-soon {
    pointer-events: none;
    opacity: .45;
}
.nav-soon::after {
    content: "soon";
    font-size: 9.5px;
    margin-left: auto;
    color: var(--subtle);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
}

/* Sidebar footer with collapse toggle */
.admin-sidebar-footer {
    border-top: 1px solid var(--line);
    padding: 6px 0;
    flex-shrink: 0;
}
.sidebar-collapse {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 16px);
    margin: 4px 8px;
    padding: 6px 12px;
    background: transparent;
    border: 0;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: none;
    text-align: left;
}
.sidebar-collapse:hover { background: var(--accent-soft); color: var(--text); filter: none; }
.sidebar-collapse .nav-icon { color: inherit; transition: transform .2s; }
.admin-shell--collapsed .sidebar-collapse .nav-icon { transform: rotate(180deg); }

/* ---- Collapsed (icon-only) mode ---- */
.admin-shell--collapsed .admin-sidebar { overflow: visible; }
.admin-shell--collapsed .admin-nav     { overflow: visible; }
.admin-shell--collapsed .nav-label,
.admin-shell--collapsed .nav-chevron,
.admin-shell--collapsed .brand-text     { display: none; }
.admin-shell--collapsed .admin-brand    { padding: 0; justify-content: center; }
.admin-shell--collapsed .nav-item,
.admin-shell--collapsed .nav-group-toggle,
.admin-shell--collapsed .sidebar-collapse {
    justify-content: center;
    padding: 8px;
    width: 40px;
    margin: 1px 8px;
}
.admin-shell--collapsed .nav-divider { margin: 6px 12px; }

/* Tooltip on hover (collapsed only) */
.admin-shell--collapsed .nav-item,
.admin-shell--collapsed .nav-group { position: relative; }
.admin-shell--collapsed .nav-item:hover::after,
.admin-shell--collapsed .nav-group:hover > .nav-group-toggle::after {
    content: attr(data-label);
    position: absolute;
    left: 56px; top: 50%;
    transform: translateY(-50%);
    background: var(--text);
    color: var(--bg);
    font-size: 12px;
    padding: 5px 9px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: var(--shadow);
    pointer-events: none;
}

/* Flyout submenu in collapsed mode — overrides JS-set height entirely */
.admin-shell--collapsed .nav-group-items {
    display: none !important;
    height: auto !important;
    transition: none;
}
.admin-shell--collapsed .nav-group:hover > .nav-group-items {
    display: block !important;
    position: absolute;
    left: 56px;
    top: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    min-width: 200px;
    padding: 6px 0;
    z-index: 99;
}
.admin-shell--collapsed .nav-group:hover .nav-subitem {
    padding: 7px 14px;
    margin: 0;
    border-radius: 0;
}
.admin-shell--collapsed .nav-group:hover > .nav-group-toggle::after { display: none; }

@media (max-width: 768px) {
    .admin-shell, .admin-shell--collapsed { display: block; }
    .admin-hamburger { display: inline-flex; align-items: center; }
    .sidebar-collapse { display: none; }
    .admin-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 280px;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform .24s cubic-bezier(.2,.7,.2,1);
        box-shadow: none;
        height: 100vh;
    }
    .admin-sidebar.is-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.15); }
    .admin-sidebar-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(0,0,0,.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s;
    }
    .admin-sidebar-scrim.is-open { opacity: 1; pointer-events: auto; }
    .admin-topbar { padding: 0 16px; }
}

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 53px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-raised);
    position: sticky; top: 0; z-index: 10;
    box-sizing: border-box;
}
.admin-crumbs { color: var(--muted); font-size: 13px; }
.admin-crumbs .crumb-sep { margin: 0 8px; color: var(--subtle); }
.admin-crumbs .crumb-current { color: var(--text); font-weight: 500; }
.admin-crumbs a { color: var(--muted); text-decoration: none; }
.admin-crumbs a:hover { color: var(--text); }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }

.admin-content { padding: 28px 32px 80px; width: 100%; }
.admin-content--narrow { max-width: 760px; }

.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.page-header.no-divider { border-bottom: 0; padding-bottom: 0; }
.page-header-actions { display: flex; align-items: center; gap: 8px; }
.filter-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #10b981; margin-left: 6px; vertical-align: middle; }
.clickable-row { cursor: pointer; }
.page-title {
    display: flex; align-items: center; gap: 10px; margin: 0;
    font-size: 22px;
    letter-spacing: -0.015em;
}
.page-subtitle { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

/* ============================================================
   Filter / search bar
   ============================================================ */
.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
}
.filter-bar input, .filter-bar select {
    width: auto;
    padding: 7px 10px;
    font-size: 13px;
    background: var(--bg-raised);
}
.filter-bar .grow { flex: 1; min-width: 140px; }
.filter-bar .count { margin-left: auto; color: var(--muted); font-size: 13px; padding-right: 6px; }

.kv { font-family: var(--font-mono); font-size: 12px; color: var(--muted); word-break: break-all; max-width: 420px; }

.log-action  { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.log-when    { white-space: nowrap; color: var(--muted); font-size: 12px; }
.log-subject { font-size: 12px; color: var(--muted); }
.exception-cell { font-family: var(--font-mono); font-size: 11px; max-width: 420px; word-break: break-all; color: var(--err); }

/* ============================================================
   Public shell placeholder
   ============================================================ */
.public-shell { max-width: 720px; margin: 10vh auto; padding: 40px; }

/* .empty + .empty-title moved to shared.css */

/* Modal styles moved to shared.css */

/* ============================================================
   Toolbar (between pre-built card buttons)
   ============================================================ */
.toolbar { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* ============================================================
   User menu (avatar dropdown in topbar)
   ============================================================ */
.user-menu { position: relative; }
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    padding: 0;
    cursor: pointer;
    font: 500 12px/1 var(--font-body);
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    vertical-align: middle;
    flex-shrink: 0;
}
.user-avatar img { width: 34px; height: 34px; object-fit: cover; display: block; border-radius: 50%; }
.user-avatar:hover, .user-avatar:focus {
    background: var(--accent);
    filter: brightness(1.08);
    outline: none;
}
.user-menu-panel {
    position: fixed;
    top: 53px;
    right: 0;
    min-width: 240px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 6px 0;
    z-index: 100;
    display: none;
}
.user-menu.open .user-menu-panel { display: block; }
.user-menu-header { padding: 10px 14px 8px; }
.user-menu-name { font-size: 13.5px; color: var(--text); font-weight: 500; }
.user-menu-email { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.user-menu-divider { height: 1px; background: var(--line); margin: 4px 0; }
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 8px 14px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
    border-radius: 0;
}
.user-menu-item:hover, .user-menu-item:focus {
    background: var(--accent-soft);
    color: var(--text);
    outline: none;
    filter: none;
    border-color: transparent;
}
.user-menu form { margin: 0; padding: 0; }

/* Make sure the global "primary button" hover doesn't apply to transparent
   utility buttons (dropdown items, nav toggles, tabs, link-buttons).
   Theme-agnostic so it works in both light and dark. */
.user-menu-item:hover,
.user-menu-item:focus,
.nav-group-toggle:hover,
.nav-item:hover,
.sidebar-collapse:hover,
.tab-trigger:hover,
.auth-sublink:hover,
.link-button:hover {
    background: var(--accent-soft);
    color: var(--text);
    border-color: transparent;
    filter: none;
}

/* ============================================================
   Tabs
   ============================================================ */
.tabs { width: 100%; }
.tab-list {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
    overflow-x: auto;
    /* Hide the scrollbar visually — swipe/wheel still scrolls if tabs overflow */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab-trigger {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 18px;
    color: var(--muted);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: -1px;
    transition: color .12s, border-color .12s;
    white-space: nowrap;
}
.tab-trigger:hover { color: var(--text); background: transparent; filter: none; }
.tab-trigger.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   Pricing page — base rates + override rules
   ============================================================ */

.page-header.bare {
    border: 0;
    padding: 0;
    margin-bottom: 12px;
}

.link-btn {
    background: transparent;
    border: 0;
    padding: 4px 6px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn.danger:hover { color: var(--danger); }

/* Narrow column helpers reused by any table in the admin. Paired with the
   global table styles above — no custom base rules here. */
th.check, td.check   { width: 32px; padding-left: 12px; padding-right: 6px; }
th.expand, td.expand { width: 24px; padding-left: 4px; padding-right: 0; }
th.actions, td.actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}
tr.empty-row td {
    color: var(--muted);
    padding: 24px 16px;
    text-align: center;
    font-style: italic;
}

/* Rate-table expandable detail row (per-room ladder). Always force a distinct
   background so it reads as a sub-panel regardless of zebra position above. */
.rate-table .rate-detail td {
    background: var(--accent-soft) !important;
    padding: 14px 18px;
    border-top: 0;
}

.rooms-ladder {
    width: auto;
    border-collapse: collapse;
    font-size: 13px;
}
.rooms-ladder th,
.rooms-ladder td {
    padding: 4px 16px 4px 0;
    text-align: left;
}
.rooms-ladder th {
    color: var(--text-muted);
    font-weight: 500;
}

.muted.small { font-size: 12px; }

/* ============================================================
   Rate modal form — reuses global .row / .row-3 / label spacing.
   Only section-specific bits live here.
   ============================================================ */

/* .modal-large moved to shared.css */

/* Modal form rhythm. Rules apply at any depth so fields wrapped in
   type-section / data-when containers still space consistently. */
.rate-form { display: flex; flex-direction: column; }

/* Base rhythm for direct children of the form. */
.rate-form > * + *                 { margin-top: 10px; }
.rate-form > label                 { margin-top: 14px; margin-bottom: 5px; }
.rate-form > label:first-child     { margin-top: 0; }
.rate-form > label + input,
.rate-form > label + select,
.rate-form > label + textarea,
.rate-form > label + .segmented,
.rate-form > label + .weekday-row,
.rate-form > label + [data-daterange],
.rate-form > label + .staffpicker,
.rate-form > label + .timepicker,
.rate-form > label + .datepicker,
.rate-form > label + .locationpicker,
.rate-form > label + .numericpicker,
.rate-form > label + .toggle,
.rate-form > label + .row,
.rate-form > label + [data-staffpicker],
.rate-form > label + [data-timepicker],
.rate-form > label + [data-datepicker],
.rate-form > label + [data-colorpicker] { margin-top: 0; }
.rate-form > .segmented + label { margin-top: 18px; }

/* Same rhythm propagated into show/hide wrapper divs so the content
   inside them doesn't collapse against itself. */
.rate-form [data-type-section] > * + *,
.rate-form [data-when]          > * + * { margin-top: 10px; }
.rate-form [data-type-section] > label,
.rate-form [data-when]          > label { margin-top: 14px; margin-bottom: 5px; }
.rate-form [data-type-section] > label:first-child,
.rate-form [data-when]          > label:first-child,
.rate-form [data-type-section] > .form-group-title,
.rate-form [data-when]          > .form-group-title { margin-top: 18px; }
.rate-form [data-type-section] > .form-group-title:first-child,
.rate-form [data-when]          > .form-group-title:first-child { margin-top: 0; }
.rate-form [data-type-section] > label + input,
.rate-form [data-type-section] > label + select,
.rate-form [data-type-section] > label + textarea,
.rate-form [data-type-section] > label + .staffpicker,
.rate-form [data-type-section] > label + .timepicker,
.rate-form [data-type-section] > label + [data-staffpicker],
.rate-form [data-type-section] > label + [data-timepicker],
.rate-form [data-when]          > label + input,
.rate-form [data-when]          > label + select,
.rate-form [data-when]          > label + textarea,
.rate-form [data-when]          > label + [data-daterange] { margin-top: 0; }

/* Stacked .row grids — consistent 10px gap regardless of depth. */
.rate-form .row + .row,
.rate-form .row + .row-3,
.rate-form .row-3 + .row,
.rate-form .row-3 + .row-3 { margin-top: 10px; }

/* Section headers — consistent gap to the first control below them. */
.rate-form .form-group-title + .row,
.rate-form .form-group-title + .row-3,
.rate-form .form-group-title + [data-supplement-list],
.rate-form .form-group-title + label,
.rate-form .form-group-title + .segmented,
.rate-form .form-group-title + [data-daterange] { margin-top: 10px; }

.rate-form > label              { margin: 14px 0 5px; }
.rate-form > label:first-child { margin-top: 0; }
.rate-form .row label,
.rate-form .row-3 label        { margin: 0 0 5px; }
.rate-form p.form-hint         { margin: 4px 0 0; }
.form-group-title + .form-hint { margin-top: 2px; }
.rate-form .toggle { margin-top: 18px; margin-bottom: 0; }

.rate-form .block-field { max-width: none; }

.form-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 14px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.form-group-title:first-child { margin-top: 0; }
.rate-form > .form-group-title { margin: 14px 0 8px; }
.rate-form > .form-group-title:first-child { margin-top: 0; }

/* Segmented picker — full width, equal columns. Unselected options carry a
   subtle border so the control still reads as "choose one" even when no
   state appears highlighted at first glance. */
.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 8px;
    margin: 0;
}
.segmented label {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    cursor: pointer;
    color: var(--text-muted);
    transition: background .12s, color .12s, border-color .12s;
    text-align: center;
}
.segmented label:hover { border-color: var(--accent); color: var(--text); }
.segmented label:has(input:checked) {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }

/* Weekday checkbox row — label + box on the same baseline. Wrapping each
   pair in its own flex line with fixed column widths keeps the 7 items
   visually tidy even when some days wrap to a second row. */
.weekday-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px 12px;
    margin-top: 4px;
}
.weekday-row .checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.weekday-row .checkbox input { margin: 0; }

[data-supplement-list] { display: flex; flex-direction: column; }
[data-supplement-list] .supplement-row:first-child { margin-top: 0; }

.supplement-row {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 14px 10px;
    margin-top: 10px;
    background: var(--surface-2);
}
.supplement-row .row,
.supplement-row .row-3 { margin-top: 10px; }
.supplement-row .row:first-child,
.supplement-row .row-3:first-child { margin-top: 0; }
.supplement-row-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.supplement-row-footer .toggle { margin: 0; }
.supplement-row-footer .link-btn { margin-left: auto; }

.mode-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-muted);
    vertical-align: middle;
}

/* ============================================================
   Preview-a-stay modal result
   ============================================================ */

.quote-result {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: grid;
    gap: 16px;
}

.quote-errors {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--err);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}
.quote-errors ul { margin: 6px 0 0 18px; padding: 0; }

.quote-breakdown .quote-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.quote-table th, .quote-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.quote-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 11px;
    color: var(--text-muted);
}
.quote-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.quote-totals {
    display: grid;
    gap: 6px;
    font-size: 14px;
}
.quote-totals .row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}
.quote-totals .row.discount { color: var(--success, #2a7a3f); }
.quote-totals .row.total {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 4px;
    font-weight: 600;
    font-size: 16px;
}
.quote-totals .row.supplement.optional { color: var(--text-muted); }
.quote-totals .row.optional-note { justify-content: space-between; }
.optional-tag {
    font-size: 10px;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-muted);
    margin-left: 6px;
    letter-spacing: 0.4px;
}

/* ============================================================
/* Channel sync card styles */
.outbound-feed input[readonly] { background: var(--bg-raised); cursor: text; }
.mode-badge.is-error { background: color-mix(in srgb, var(--err) 20%, var(--surface-2)); color: var(--err); }

/* Photo tiles — drag-to-reorder affordance. Primary is pinned (non-draggable)
   and shows a tiny "Pinned" hint on hover; other tiles get a grab cursor and
   a dashed placeholder treatment while dragging. */
.photo-tile[draggable="true"] { cursor: grab; }
.photo-tile[draggable="true"]:active { cursor: grabbing; }
.photo-tile.is-dragging {
    opacity: 0.45;
    outline: 2px dashed var(--accent);
    outline-offset: -4px;
    border-radius: var(--radius);
    transform: scale(0.98);
    transition: transform .1s, opacity .1s;
}
.photo-tile.is-dragging .photo-thumb img { filter: grayscale(40%); }
.photo-tile.is-primary { cursor: default; }
.photo-tile.is-primary::after {
    content: 'Pinned first';
    position: absolute;
    bottom: 6px; right: 6px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
}
.photo-tile.is-primary:hover::after { opacity: 1; }
.photo-tile { position: relative; }

/* Featured-property star on the properties list */
.featured-star {
    color: #f59e0b;
    margin-right: 4px;
    vertical-align: -2px;
    display: inline-flex;
}

/* Custom colour picker — trigger button + popover with SV square, hue
   slider, hex input and preset row. Reusable via [data-colorpicker]. */
.colorpicker { position: relative; display: inline-block; }
.cp-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    box-shadow: none;
}
.cp-trigger:hover { filter: none; border-color: var(--subtle); background: var(--bg-raised); }
.colorpicker.is-open .cp-trigger,
.cp-trigger:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.cp-swatch {
    width: 26px; height: 26px;
    border-radius: 4px;
    border: 1px solid var(--line);
    display: inline-block;
}
.cp-hex-label { font-variant-numeric: tabular-nums; }

.cp-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    width: 240px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0,0,0,.3);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Explicit display on .cp-pop overrides the browser's [hidden] rule —
   re-assert display:none so the popover actually hides. */
.cp-pop[hidden] { display: none; }
.cp-sv {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
}
.cp-sv-saturation,
.cp-sv-value { position: absolute; inset: 0; pointer-events: none; }
.cp-sv-saturation { background: linear-gradient(to right, #fff, rgba(255,255,255,0)); }
.cp-sv-value      { background: linear-gradient(to top,   #000, rgba(0,0,0,0)); }
.cp-cursor {
    position: absolute;
    width: 12px; height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.6);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.cp-hue {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right,
        #ff0000 0%,   #ffff00 17%,  #00ff00 33%,
        #00ffff 50%,  #0000ff 67%,  #ff00ff 83%,  #ff0000 100%);
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}
.cp-hue::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text);
    cursor: pointer;
}
.cp-hue::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text);
    cursor: pointer;
}
.cp-row { display: flex; align-items: center; gap: 8px; }
.cp-hex { flex: 1; max-width: none; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.cp-presets {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}
.cp-preset {
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}
.cp-preset:hover { transform: scale(1.08); filter: none; border-color: var(--accent); }

/* Generic styled file dropzone wrapping a real <input type="file">.
   File still travels via normal form submit; dropzone just provides the
   affordance (matches the photo-upload style). Reusable via
   [data-file-dropzone]. */
.filedrop-root,
[data-file-dropzone] {
    position: relative;
    cursor: pointer;
    display: block;
    margin-top: 20px;
    margin-bottom: 20px;
}
.filedrop-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px; height: 1px;
}
.filedrop {
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    padding: 22px 18px;
    background: var(--bg-raised);
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    transition: border-color .1s, background .1s, color .1s;
}
.filedrop-root:hover .filedrop { border-color: var(--accent); color: var(--text); }
.filedrop-root.is-dragover .filedrop {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
}
.filedrop-prompt  { display: inline-flex; align-items: center; gap: 10px; }
.filedrop-prompt svg { opacity: .7; }
.filedrop-selected {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 500;
}
.filedrop-filename { font-variant-numeric: tabular-nums; }
/* Explicit display wins over the browser's [hidden] rule — re-assert
   display:none so the prompt/selected toggles actually work. */
.filedrop-prompt[hidden],
.filedrop-selected[hidden] { display: none; }

/* Branding previews in the settings page */
.branding-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin: 6px 0 10px;
}
.branding-preview[hidden] { display: none; }
.branding-preview img { max-height: 48px; max-width: 160px; }
.branding-preview-fav img { max-height: 32px; max-width: 32px; }
.branding-preview-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    align-items: flex-start;
}
.filedrop-root[hidden] { display: none; }

/* Logo takes over the brand mark/text slot when uploaded */
.brand-logo { max-height: 28px; max-width: 100%; display: block; }

/* Mapbox pin-picker */
.map-picker {
    width: 100%;
    height: 320px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 4px;
}

/* Locations tree — nested list with a vertical guide line for children. */
.loc-tree { list-style: none; padding: 0; margin: 0; }
.loc-tree .loc-node { list-style: none; }
.loc-tree .loc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.loc-tree > .loc-node:last-child > .loc-row { border-bottom: 0; }
.loc-drag-handle { cursor: grab; color: var(--muted); flex-shrink: 0; }
.loc-drag-handle:active { cursor: grabbing; }
.loc-node.is-dragging { opacity: .4; }
.loc-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
.loc-actions { display: inline-flex; align-items: center; gap: 2px; }
.loc-children {
    list-style: none;
    margin: 0;
    padding-left: 22px;
    border-left: 1px dashed var(--line);
}
.loc-children .loc-node .loc-row { padding: 8px 0; }

/* Property FAQ list — draggable rows with a handle, question/answer
   body, and right-aligned actions. Mirrors the locations row pattern. */
.faq-list { list-style: none; margin: 0; padding: 0; }
.faq-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    cursor: grab;
}
.faq-row:last-child { border-bottom: 0; }
.faq-row:active { cursor: grabbing; }
.faq-row.is-dragging { opacity: .4; }
.faq-handle { color: var(--muted); flex-shrink: 0; padding-top: 2px; }
.faq-body { flex: 1; min-width: 0; }
.faq-question { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.faq-answer { white-space: pre-wrap; }
.faq-actions { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }

/* Tab badge — small count chip next to tab labels on the enquiries page. */
.tab-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 6px;
    background: var(--accent-soft);
    color: var(--text);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* Status pill — used on the enquiries list. */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--surface-2);
    color: var(--text-muted);
}
.status-badge.status-pending   { background: color-mix(in srgb, #f59e0b 18%, var(--surface-2)); color: #b45309; }
.status-badge.status-confirmed { background: color-mix(in srgb, #10b981 18%, var(--surface-2)); color: #065f46; }
.status-badge.status-paid      { background: color-mix(in srgb, #3b82f6 18%, var(--surface-2)); color: #1e40af; }
.status-badge.status-declined,
.status-badge.status-cancelled { background: color-mix(in srgb, #ef4444 15%, var(--surface-2)); color: #991b1b; }
html[data-theme="dark"] .status-badge.status-pending   { color: #fbbf24; }
html[data-theme="dark"] .status-badge.status-confirmed { color: #34d399; }
html[data-theme="dark"] .status-badge.status-paid      { color: #60a5fa; }
html[data-theme="dark"] .status-badge.status-declined,
html[data-theme="dark"] .status-badge.status-cancelled { color: #f87171; }

/* Form rule — visual separator inside a card form. */
hr.form-rule {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 20px 0 4px;
}

/* Featured cell inside the Basics row-3 — its label sits above the toggle
   so it lines up with the Owner / Type select labels. */
.featured-cell { display: flex; flex-direction: column; }
.featured-cell .toggle { margin-top: 4px; }

/* ============================================================
   Reusable time picker — mirrors .colorpicker / .daterange shape
   ============================================================ */
.timepicker { position: relative; display: inline-block; width: 100%; max-width: 460px; }
.tp-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    padding: 7px 11px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    box-shadow: none;
}
.tp-trigger:hover { filter: none; border-color: var(--subtle); background: var(--bg-raised); }
.tp-trigger:focus,
.timepicker.is-open .tp-trigger {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.tp-value { font-variant-numeric: tabular-nums; }
.tp-value.is-placeholder { color: var(--muted); }
.tp-caret { opacity: .7; flex-shrink: 0; }
.tp-pop {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    width: auto;
    max-height: 240px;
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0,0,0,.3);
    padding: 4px;
}
.tp-pop[hidden] { display: none; }
.tp-list { display: flex; flex-direction: column; }
.tp-option {
    display: block;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: 0;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}
.tp-option:hover { background: var(--accent-soft); }
.tp-option.is-selected { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ============================================================
   Reusable numeric picker — input + steppers either side.
   ============================================================ */
.numericpicker {
    display: inline-flex;
    align-items: stretch;
    width: 100%;
    max-width: 220px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    overflow: hidden;
}
.numericpicker:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.np-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 6px;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: none;
}
.np-step:hover { background: var(--surface-2); filter: none; }
.np-step:disabled { opacity: .35; cursor: not-allowed; }
.np-field {
    flex: 1;
    min-width: 0;
    text-align: center;
    border: 0 !important;
    border-left:  1px solid var(--line) !important;
    border-right: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: var(--surface) !important;
    font-variant-numeric: tabular-nums;
    max-width: none;
    box-shadow: none !important;
    padding: 7px 6px;
}
.np-field:focus { outline: none; }
/* Nuke native spinners — our buttons replace them. */
.np-field::-webkit-outer-spin-button,
.np-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.np-field { -moz-appearance: textfield; }

/* Allow time picker to fill its parent cell. The global max-width was
   only useful for standalone contexts. */
.timepicker { max-width: none; }
.tp-trigger { width: 100%; }

/* Guest picker styles moved to shared.css */

/* ============================================================
   Location picker — tile-style dropdown with per-option photo.
   ============================================================ */
.locationpicker { position: relative; display: block; width: 100%; }
.lp-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 11px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    box-shadow: none;
}
.lp-trigger:hover { filter: none; border-color: var(--subtle); background: var(--bg-raised); }
.lp-trigger:focus,
.locationpicker.is-open .lp-trigger {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.lp-trigger-photo { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.lp-trigger-text  { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-caret         { opacity: .7; flex-shrink: 0; }

.lp-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    min-width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0,0,0,.3);
    padding: 6px;
}
.lp-pop[hidden] { display: none; }
.lp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}
.lp-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: transparent;
    border: 0;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    border-radius: 6px;
    width: 100%;
    box-shadow: none;
}
.lp-option:hover { background: var(--accent-soft); }
.lp-option.is-selected { background: var(--accent); color: var(--accent-ink); }
.lp-option-photo {
    width: 40px; height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}
.lp-option-photo-empty { border: 1px dashed var(--line); }
.lp-option-label { flex: 1; min-width: 0; }
.lp-option-any .lp-option-photo { background: var(--surface-2); display: inline-block; }

/* Mapbox error fallback */
.map-error {
    padding: 14px 16px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
}

/* Settings hub: grid of cards linking to each section. */
.settings-hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.settings-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.settings-card:hover {
    border-color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}
.settings-card-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-raised);
    color: var(--text);
}
.settings-card-title {
    font-weight: 600;
    font-size: 16px;
}
.settings-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

/* Mail test card: put the submit button on the same row as the email input. */
.mail-test { margin-top: 20px; }
.mail-test-submit {
    display: flex;
    align-items: flex-end;
}

/* Property form: toggles stack + description editor */
.prop-toggles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.prop-toggles .toggle { margin: 0; }
.prop-desc-editor {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.prop-desc-editor .et-editable { min-height: 160px; }

/* Email template rich editor */
.et-editor-card { padding: 0; overflow: hidden; }
.et-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-raised);
    position: sticky;
    top: 0;
    z-index: 2;
    flex-wrap: wrap;
}
html[data-theme="dark"] .et-toolbar { background: var(--bg); }
.et-tool {
    width: 32px; height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
}
.et-tool:hover { background: var(--panel); border-color: var(--line); }
.et-tool.is-active { background: var(--accent-soft); border-color: var(--text); }
.et-divider {
    width: 1px;
    height: 20px;
    background: var(--line);
    margin: 0 6px;
}
.et-dropdown { position: relative; margin-left: 2px; }
.et-dropdown > .et-tool { width: auto; padding: 0 10px; gap: 4px; font-size: 12px; font-weight: 500; }
.et-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 4px 0;
    z-index: 10;
    min-width: 160px;
}
.et-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 14px;
    border: 0;
    border-radius: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.et-dropdown-menu button:hover { background: var(--surface-2); }
.et-dropdown-divider { height: 1px; background: var(--line); margin: 4px 0; }
.et-var-group { display: inline-flex; align-items: center; height: 32px; }
.et-var-select { max-width: 260px; font-size: 12px; height: 32px; }
.et-editable {
    min-height: 320px;
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
    color: var(--text);
}
.et-editable:focus { box-shadow: none; }
.et-editable p { margin: 0 0 10px; }
.et-editable a { color: var(--text); text-decoration: underline; }
.et-editable table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.et-editable td, .et-editable th {
    border: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
    min-width: 40px;
}
.et-editable th { background: var(--bg-raised); font-weight: 600; }
.et-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}
.et-bottom-row h2 { margin-top: 0; }
.et-bottom-row .form-hint { margin-bottom: 14px; }
@media (max-width: 720px) { .et-bottom-row { grid-template-columns: 1fr; } }

/* Simple pill badges used on the template list status column. */
.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.pill-success { background: color-mix(in srgb, #10b981 18%, transparent); color: #047857; }
.pill-muted   { background: var(--bg-raised); color: var(--muted); }

/* Copy-pasteable code block — used by the cron setup page and future
   install instructions. Respects the admin theme via tokens. */
.code-block {
    margin: 8px 0 6px;
    padding: 12px 14px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
    color: var(--text);
}

/* Simple inline notice block — icon on the left, message on the right. */
.callout {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.5;
}
.callout svg { flex: 0 0 auto; }
.callout-warn {
    background: color-mix(in srgb, #f59e0b 14%, transparent);
    color: #92400e;
    border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent);
}
.callout-warn svg { color: #b45309; }

/* ---------- Rota (day view) ---------- */
.rota-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.rota-date-nav { display: flex; gap: 8px; }
.rota-date-form { display: flex; align-items: center; gap: 8px; }
.rota-date-form label { margin: 0; }
.rota-date-form .datepicker { width: 150px; flex-shrink: 0; }
.rota-date-form .datepicker-input { height: 36px; }
.rota-legend { display: flex; gap: 8px; }
.rota-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.rota-chip-draft     { background: color-mix(in srgb, #94a3b8 22%, transparent); color: #475569; }
.rota-chip-confirmed { background: color-mix(in srgb, #2563eb 22%, transparent); color: #1d4ed8; }
.rota-chip-done      { background: color-mix(in srgb, #10b981 22%, transparent); color: #047857; }

.rota-shell { padding: 0; overflow: hidden; }
.rota-scroll { overflow: auto; max-height: calc(100vh - 320px); }
.rota-grid {
    display: grid;
    grid-template-columns: 70px repeat(auto-fit, minmax(220px, 1fr));
    min-width: 100%;
}
.rota-gutter {
    position: sticky; left: 0; z-index: 2;
    background: var(--panel);
    border-right: 1px solid var(--line);
}
.rota-gutter-head {
    height: 56px;
    border-bottom: 1px solid var(--line);
}
.rota-gutter-hour {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2px 10px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px dashed var(--line);
}
.rota-col { border-right: 1px solid var(--line); }
.rota-col:last-child { border-right: 0; }
.rota-col-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    height: 56px;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 1;
    background: var(--panel);
}
.rota-col-name { font-weight: 600; font-size: 13px; }
.rota-col-body {
    position: relative;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0 calc(var(--rota-hour-px) - 1px),
        var(--line) calc(var(--rota-hour-px) - 1px) var(--rota-hour-px)
    );
    cursor: crosshair;
}
.rota-block {
    /* Side-by-side layout for overlapping slots in the same column.
       --track = this block's horizontal index (0..N-1),
       --tracks = number of concurrent blocks at its moment,
       defaulting to a single full-width block when unset. */
    --track: 0;
    --tracks: 1;
    position: absolute;
    left: calc(6px + (var(--track) / var(--tracks)) * (100% - 12px));
    width: calc((100% - 12px) / var(--tracks) - 4px);
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--bg-raised);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    line-height: 1.3;
    transition: transform 80ms ease, box-shadow 80ms ease;
}
.rota-block:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.rota-block-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.rota-block-title { font-weight: 600; }
.rota-block-property { color: var(--muted); }
.rota-block-draft {
    background: color-mix(in srgb, #94a3b8 15%, var(--panel));
    border: 1px dashed #94a3b8;
}
.rota-block-confirmed {
    background: color-mix(in srgb, #2563eb 12%, var(--panel));
    border-color: #2563eb;
}
.rota-block-done {
    background: color-mix(in srgb, #10b981 14%, var(--panel));
    border-color: #10b981;
    opacity: 0.85;
}
.rota-block-cancelled {
    background: color-mix(in srgb, #ef4444 10%, var(--panel));
    border-color: #ef4444;
    text-decoration: line-through;
    opacity: 0.6;
}
/* Warning stripe for overlapping slots on the same staff member. */
.rota-block-clash {
    border-color: #ef4444 !important;
    box-shadow: inset 0 0 0 1px #ef4444;
    background-image: repeating-linear-gradient(
        135deg,
        transparent 0 8px,
        color-mix(in srgb, #ef4444 18%, transparent) 8px 10px
    );
}

/* Drop placeholder for rota drag-and-drop */
.rota-drop-placeholder {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    z-index: 5;
}

/* ---------- Staff picker (availability maintenance, rota forms) ---------- */
.staffpicker { position: relative; display: block; }
.sp-trigger {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    color: var(--text);
    font-size: 14px;
}
.sp-trigger:hover { border-color: var(--text); }
.staffpicker.is-open .sp-trigger { border-color: var(--text); }
.sp-trigger-text { flex: 1; }
.sp-trigger-role { color: var(--muted); font-weight: 400; }
.sp-caret { opacity: .6; transition: transform 120ms; }
.staffpicker.is-open .sp-caret { transform: rotate(180deg); }
.sp-pop {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    z-index: 20;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}
.sp-option {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    color: var(--text);
    font-size: 14px;
}
.sp-option:hover { background: var(--bg-raised); }
.sp-option.is-selected { background: var(--accent-soft); }
.sp-option-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sp-option-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-option-role { color: var(--muted); font-size: 12px; }

/* Shared avatar styling — reused by the trigger + every option row so
   swapping image <-> initials doesn't shift the layout. */
.sp-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 999px;
    object-fit: cover;
    background: var(--bg-raised);
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.sp-avatar-empty { color: var(--muted); }

/* Staff avatar — image or initial fallback. */
.staff-avatar-cell { width: 48px; }
.staff-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    background: var(--bg-raised);
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}
