/* =============================================================================
   Solution Services — theme layer
   =============================================================================

   Consumes the custom properties emitted by includes/theme.php. Nothing in this
   file names a colour directly, so both identities run through the same rules
   and the toggle never has a branch to get wrong.

   THE SIGNATURE DEVICE
     One idea, used everywhere and nowhere else: a 2px rule in the logo's gold.
     It marks the active navigation tab, opens a section heading, and edges a
     card that vouches for someone. The logo's mark is a cut gold ribbon; this is
     that ribbon reduced to its smallest useful form. Everything else on the page
     stays quiet so this reads.
   ========================================================================== */

/* ── Base ─────────────────────────────────────────────────────────────────── */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ss-font-body);
    background-color: var(--ss-paper);
    color: var(--ss-ink);
    font-feature-settings: "kern" 1;
}

/* Pages hard-code their page colour on the <body> element itself — `bg-white`
   on the public site, `bg-gray-50` in the panels — and Tailwind's runtime
   stylesheet is injected after this file, so the utility would win. Two
   classes on one element out-specify it without touching the ~100 body tags,
   and without affecting `bg-white` anywhere else (cards still read white). */
body.bg-white,
body.bg-gray-50,
body.bg-gray-100 {
    background-color: var(--ss-paper);
}

/* Money, references and dates line up in columns. Plex ships tabular figures;
   this asks for them wherever numbers are compared vertically. */
.ss-num,
table td, table th,
.ss-amount {
    font-variant-numeric: tabular-nums;
}

h1, h2, h3, .ss-display {
    font-family: var(--ss-font-display);
    letter-spacing: -0.011em;
}

h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }

/* The serif runs a touch large at the same nominal size as the sans. */
.ss-display { line-height: 1.15; }

a { color: inherit; }

/* Keyboard focus must always be visible; several components override outline
   for mouse users and previously left keyboard users with nothing. */
:focus-visible {
    outline: 2px solid var(--ss-seal-text);
    outline-offset: 2px;
    border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Gold legibility ──────────────────────────────────────────────────────────
   Gold is the hardest colour in the palette to use safely: the shade that reads
   on navy is invisible on white, and vice versa. Tailwind generates `.bg-` and
   `.text-` from one palette entry, so the two uses are separated here.

   `!important` is deliberate and load-bearing. The Play CDN injects its
   stylesheet after this file, so equal-specificity rules would lose, and the
   markup these override says `text-white` on a gold fill — 2.7:1, the exact
   defect being corrected.
   ───────────────────────────────────────────────────────────────────────────── */

/* Gold TEXT sits on white: needs the dark bronze. 5.04:1. */
.text-yellow-500, .text-yellow-600,
.text-amber-500,  .text-amber-600 { color: var(--ss-seal-text) !important; }
.text-yellow-700, .text-amber-700 { color: var(--ss-seal-800)  !important; }

/* Anything FILLED with brand gold carries navy type, never white — the logo's
   own pairing, and the only one that clears 4.5:1 on this hue. */
.bg-yellow-400, .bg-yellow-500, .bg-yellow-600,
.bg-amber-400,  .bg-amber-500,  .bg-amber-600 { color: var(--ss-ink) !important; }

/* ── The signature rule ───────────────────────────────────────────────────── */

.ss-rule {
    display: block;
    width: 2.25rem;
    height: 2px;
    background: var(--ss-seal);
    border: 0;
    border-radius: 2px;
}

.ss-rule--full { width: 100%; }

/* Section heading: gold rule, then the label. Encodes hierarchy without a box. */
.ss-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--ss-font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ss-soft);
}
.ss-eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    background: var(--ss-seal);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Surfaces ─────────────────────────────────────────────────────────────── */

.ss-card {
    background: var(--ss-card);
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
}

/* Reserved for cards that assert trust: a verified professional, a confirmed
   booking. The gold edge is the seal. */
.ss-card--sealed {
    border-left: 2px solid var(--ss-seal);
}

/* ── Public top bar ───────────────────────────────────────────────────────── */

#ssNav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: var(--ss-card);
    border-bottom: 1px solid var(--ss-line);
    box-shadow: none;
    color: var(--ss-ink);
}

/* Layout: the logo alone on the left, everything else in one cluster hard right.
   The previous bar used `justify-between` across three children, which stranded
   the menu in the middle of the viewport with slack on both sides. */
.ss-nav-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 4rem;
    padding-left: 1.25rem;
    padding-right: 0.75rem;
    max-width: 1400px;
    margin: 0 auto;
}
.ss-nav-brand { flex-shrink: 0; margin-right: auto; }
.ss-nav-brand img { height: 2.25rem; width: auto; display: block; }
.ss-nav-cluster {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Desktop nav item. The active state is the gold rule, not a fill. */
.ss-navlink {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ss-ink);
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
    white-space: nowrap;
}
.ss-navlink:hover { background: var(--ss-ink-50); }

.ss-navlink::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.125rem;
    height: 2px;
    border-radius: 2px;
    background: var(--ss-seal);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s cubic-bezier(.32,.72,0,1);
}
.ss-navlink[aria-current="page"]::after,
.ss-navlink.is-active::after { transform: scaleX(1); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.ss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5625rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.ss-btn-primary { background: var(--ss-ink); color: #fff; }
.ss-btn-primary:hover { background: var(--ss-ink-800); }

/* Gold is a seal, not a call to action: outlined, never a filled slab. A large
   fill at this chroma is what made the old palette shout. */
.ss-btn-seal {
    background: transparent;
    color: var(--ss-seal-text);
    border-color: var(--ss-seal);
}
.ss-btn-seal:hover { background: var(--ss-seal-50); }

.ss-btn-quiet {
    background: transparent;
    color: var(--ss-ink);
    border-color: var(--ss-line);
}
.ss-btn-quiet:hover { background: var(--ss-ink-50); }

/* ── App shell: mobile tab bar ────────────────────────────────────────────── */
/*
   One bar for guests, clients and professionals. Same height, same position,
   same icon language, same active treatment; only the tab contents differ by
   role. That is what makes three separate areas feel like one application.

   `position: fixed` is restated here because css/style.css carries a global
   bare-element `nav { position: fixed; width: 100% }` rule written for the
   public header, which matches every <nav> on the page.
*/
.ss-tabbar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    align-items: stretch;
    height: 4rem;
    background: var(--ss-card);
    border-top: 1px solid var(--ss-line);
    box-shadow: 0 -1px 12px rgba(11, 27, 43, .05);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ss-tab {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    color: var(--ss-mute);
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .15s ease;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
}
.ss-tab:active { opacity: .6; }
.ss-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ss-tab.is-active { color: var(--ss-ink); }

/* The same gold rule as the desktop nav, seated at the top edge of the tab. */
.ss-tab::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 1.75rem;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--ss-seal);
    transform: translateX(-50%) scaleX(0);
    transition: transform .2s cubic-bezier(.32,.72,0,1);
}
.ss-tab.is-active::before { transform: translateX(-50%) scaleX(1); }

.ss-tab-badge {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    margin-left: 0.25rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--ss-danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── App shell: bottom sheet ──────────────────────────────────────────────── */

.ss-sheet { position: fixed; inset: 0; z-index: 65; }
.ss-sheet[hidden] { display: none; }
.ss-sheet-scrim {
    position: absolute;
    inset: 0;
    background: rgba(11, 27, 43, .45);
    animation: ssFade .2s ease;
}
.ss-sheet-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--ss-card);
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -8px 40px rgba(11, 27, 43, .18);
    padding-bottom: env(safe-area-inset-bottom, 1rem);
    animation: ssSheetUp .28s cubic-bezier(.32,.72,0,1);
}
.ss-sheet-grip {
    width: 2.25rem;
    height: 0.25rem;
    border-radius: 999px;
    background: var(--ss-line);
    margin: 0.75rem auto 0.25rem;
}
.ss-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--ss-line);
    position: sticky;
    top: 0;
    background: var(--ss-card);
    z-index: 1;
}
.ss-sheet-title {
    font-family: var(--ss-font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ss-ink);
}

.ss-sheet-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.875rem;
    color: var(--ss-ink);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color .15s ease;
}
.ss-sheet-item:hover { background: var(--ss-ink-50); }
.ss-sheet-item.is-active { background: var(--ss-ink-50); font-weight: 600; }

/* One tint for every utility icon. The previous menus gave each row its own
   colour — blue, green, purple, yellow, red across five adjacent lines — which
   was the single largest source of visual noise in the app. Colour is now
   reserved for things that mean something: unread, confirmed, overdue. */
.ss-sheet-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--ss-ink-50);
    color: var(--ss-ink-700);
}
.ss-sheet-icon--danger { background: #FDECEA; color: var(--ss-danger); }

@keyframes ssFade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes ssSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ── Panel sidebar links (client / pro / admin) ───────────────────────────── */

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ss-ink-100);
    transition: background-color .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Active sidebar item: white plate with the gold rule down its leading edge —
   the same device as the tab bar, rotated. */
.nav-link-active {
    background: #fff;
    color: var(--ss-ink);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--ss-seal);
}
.nav-link-active:hover { background: #fff; color: var(--ss-ink); }

/* ── Spacing for the fixed bars ───────────────────────────────────────────── */

@media (max-width: 767px) {
    body.has-tabbar { padding-bottom: 4rem; }
    .main-content { padding-top: 3.5rem; padding-bottom: 5rem; }

    /* Bottom-anchored banners (push permission prompt) must clear the tab bar
       rather than cover it — assets/js/push-init.js reads this. */
    body.has-tabbar { --ss-banner-offset: 4rem; }
}

/* ── Admin surfaces ───────────────────────────────────────────────────────────
   The administration grew page by page, so every screen invented its own
   header, table and status chip. These are the shared primitives; a page that
   uses them inherits the identity instead of restating it.
   ───────────────────────────────────────────────────────────────────────────── */

.ss-page       { padding: 1rem; }
.ss-page-inner { max-width: 1400px; }
@media (min-width: 768px) { .ss-page { padding: 1.75rem 2rem 2.5rem; } }

/* Page header. No white band across the top — the title sits on the paper and
   the gold eyebrow does the separating, which is quieter and saves ~90px of
   vertical space on a laptop. */
.ss-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.ss-page-title {
    font-family: var(--ss-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ss-ink);
}
@media (min-width: 768px) { .ss-page-title { font-size: 2.125rem; } }
.ss-page-sub { margin-top: .375rem; font-size: .875rem; color: var(--ss-soft); max-width: 60ch; }

/* Panels */
.ss-panel {
    background: var(--ss-card);
    border: 1px solid var(--ss-line);
    border-radius: 1rem;
    overflow: hidden;
}
.ss-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ss-line);
}
.ss-panel-title {
    font-family: var(--ss-font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ss-ink);
}
.ss-panel-body { padding: 1.25rem; }

/* Stat tile. One navy icon tint for all of them — the previous blue/amber/
   green/purple set made four unrelated metrics look like four categories. */
.ss-stat {
    display: block;
    background: var(--ss-card);
    border: 1px solid var(--ss-line);
    border-radius: 1rem;
    padding: 1.125rem 1.25rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
a.ss-stat:hover { border-color: var(--ss-seal); box-shadow: 0 6px 24px rgba(11,27,43,.07); }
.ss-stat-icon {
    width: 2.25rem; height: 2.25rem;
    border-radius: .625rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--ss-ink-50);
    color: var(--ss-ink-700);
    margin-bottom: .875rem;
}
.ss-stat-label { font-size: .75rem; font-weight: 500; color: var(--ss-soft); letter-spacing: .01em; }
.ss-stat-value {
    font-family: var(--ss-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ss-ink);
    margin-top: .125rem;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;      /* "297 000 FCFA" must not break the card */
}
.ss-stat-meta { margin-top: .5rem; font-size: .75rem; color: var(--ss-mute); }

/* Tables */
.ss-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ss-table thead th {
    text-align: left;
    padding: .625rem 1.25rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ss-mute);
    background: var(--ss-paper);
    border-bottom: 1px solid var(--ss-line);
    white-space: nowrap;
}
.ss-table tbody td { padding: .875rem 1.25rem; border-bottom: 1px solid var(--ss-line); vertical-align: middle; }
.ss-table tbody tr:last-child td { border-bottom: 0; }
.ss-table tbody tr:hover { background: var(--ss-ink-50); }
.ss-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Status pills. Colour carries state and nothing else. */
.ss-pill {
    display: inline-flex;
    align-items: center;
    gap: .3125rem;
    padding: .1875rem .5625rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ss-pill::before { content: ""; width: .375rem; height: .375rem; border-radius: 999px; background: currentColor; flex-shrink: 0; }
.ss-pill--ok     { background: #E8F3ED; color: #17603A; }
.ss-pill--warn   { background: var(--ss-seal-50); color: var(--ss-seal-800); }
.ss-pill--bad    { background: #FDECEA; color: #8E2B25; }
.ss-pill--info   { background: var(--ss-ink-50); color: var(--ss-ink-800); }
.ss-pill--muted  { background: var(--ss-paper); color: var(--ss-soft); border-color: var(--ss-line); }

/* Forms */
.ss-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--ss-ink); margin-bottom: .375rem; }
.ss-input, .ss-select, .ss-textarea {
    width: 100%;
    padding: .5625rem .75rem;
    border: 1px solid var(--ss-line);
    border-radius: .625rem;
    background: var(--ss-card);
    color: var(--ss-ink);
    font-size: .875rem;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ss-input:focus, .ss-select:focus, .ss-textarea:focus {
    outline: none;
    border-color: var(--ss-ink-600);
    box-shadow: 0 0 0 3px var(--ss-ink-50);
}
.ss-help { margin-top: .375rem; font-size: .75rem; color: var(--ss-soft); }

/* Filter toolbar */
.ss-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    align-items: end;
    padding: 1rem 1.25rem;
    background: var(--ss-card);
    border: 1px solid var(--ss-line);
    border-radius: 1rem;
    margin-bottom: 1.25rem;
}

/* Empty state — an invitation to act, not a shrug. */
.ss-empty { padding: 3rem 1.5rem; text-align: center; }
.ss-empty-icon {
    width: 3rem; height: 3rem;
    margin: 0 auto .875rem;
    border-radius: .875rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--ss-ink-50);
    color: var(--ss-ink-600);
}
.ss-empty-title { font-family: var(--ss-font-display); font-size: 1.0625rem; font-weight: 600; color: var(--ss-ink); }
.ss-empty-text  { margin-top: .25rem; font-size: .8125rem; color: var(--ss-soft); }

/* ── Retrofit: existing admin markup ──────────────────────────────────────────
   Thirteen admin pages share one header/card/table idiom, written before the
   design system existed. Restyling that idiom in place gives every page the new
   treatment without editing the PHP inside them — which is where the working
   query, filter and action logic lives, and where a mechanical rewrite would do
   real damage for a purely visual gain.
   ───────────────────────────────────────────────────────────────────────────── */

/* The full-width white header band cost ~90px of vertical space and repeated
   what the sidebar already said. It becomes part of the page. */
.main-content > header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 0 !important;
    padding-top: .75rem;
}
.main-content > header h1 {
    font-family: var(--ss-font-display);
    font-size: 1.75rem !important;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ss-ink) !important;
    letter-spacing: -0.011em;
}
@media (min-width: 768px) {
    .main-content > header h1 { font-size: 2.125rem !important; }
    .main-content > header { padding-top: 1.25rem; }
}
/* The signature gold rule, introducing the page title. */
.main-content > header h1::before {
    content: "";
    display: block;
    width: 2.25rem;
    height: 2px;
    border-radius: 2px;
    background: var(--ss-seal);
    margin-bottom: .875rem;
}
.main-content > header h1 > i[data-feather],
.main-content > header h1 > svg { display: none; }   /* the rule replaces it */
.main-content > header p { color: var(--ss-soft) !important; }

/* Cards */
.main-content .bg-white.rounded-xl,
.main-content .bg-white.rounded-2xl,
.main-content .bg-white.rounded-lg {
    border-color: var(--ss-line) !important;
    box-shadow: none;
}

/* Tables: quiet header, generous rows, hover feedback. */
.main-content table thead th {
    background: var(--ss-paper) !important;
    color: var(--ss-mute) !important;
    font-size: .6875rem !important;
    font-weight: 600 !important;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ss-line) !important;
}
.main-content table tbody tr { transition: background-color .12s ease; }
.main-content table tbody tr:hover { background: var(--ss-ink-50); }
.main-content table tbody td { border-color: var(--ss-line) !important; }

/* Wide tables scroll inside their own card instead of pushing the page. */
.main-content .overflow-x-auto { -webkit-overflow-scrolling: touch; }

/* Primary actions. `blue-600` and `blue-700` map to mid-tones of the ink ramp,
   which is right for a link and washed out for a submit button. Actions get the
   full-strength brand colour so the primary control on a screen is obvious. */
.main-content button.bg-blue-600,  .main-content a.bg-blue-600,
.main-content button.bg-blue-700,  .main-content a.bg-blue-700,
.main-content input[type="submit"].bg-blue-600,
.main-content input[type="submit"].bg-blue-700 {
    background-color: var(--ss-ink) !important;
    color: #fff !important;
}
.main-content button.bg-blue-600:hover, .main-content a.bg-blue-600:hover,
.main-content button.bg-blue-700:hover, .main-content a.bg-blue-700:hover {
    background-color: var(--ss-ink-800) !important;
}

/* Rows of buttons must wrap rather than push the page sideways: the admin-row
   action cluster overflowed a 1440px desktop, and pagination overflowed a
   390px phone. Both are horizontal flex rows with no wrap. */
.main-content .admin-actions,
.main-content .page-btn:first-child ~ .page-btn,
.main-content div:has(> .page-btn) {
    flex-wrap: wrap;
}
.main-content .admin-actions { justify-content: flex-end; }

/* Last line of defence: no admin screen may scroll sideways. Wide tables have
   their own scroll container, so this only catches stragglers. */
.main-content { overflow-x: clip; }

/* Form controls inside the admin inherit the shared field treatment. */
.main-content input[type="text"],  .main-content input[type="email"],
.main-content input[type="date"],  .main-content input[type="number"],
.main-content input[type="search"],.main-content input[type="tel"],
.main-content select, .main-content textarea {
    border-color: var(--ss-line);
    border-radius: .625rem;
}
.main-content input:focus, .main-content select:focus, .main-content textarea:focus {
    outline: none;
    border-color: var(--ss-ink-600);
    box-shadow: 0 0 0 3px var(--ss-ink-50);
}

/* Notice bars */
.ss-note {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .875rem 1rem;
    border-radius: .75rem;
    font-size: .875rem;
    margin-bottom: 1.25rem;
}
.ss-note--ok   { background: #E8F3ED; color: #17603A; }
.ss-note--bad  { background: #FDECEA; color: #8E2B25; }
.ss-note--info { background: var(--ss-ink-50); color: var(--ss-ink-800); }
.ss-note--seal { background: var(--ss-seal-50); color: var(--ss-seal-800); }

/* ── Notification toasts ──────────────────────────────────────────────────────
   Announced where each device expects them: dropping from the top on a phone,
   the way a system banner arrives, and rising in the bottom-right corner on a
   desktop, where it stays out of the reading column.
   ───────────────────────────────────────────────────────────────────────────── */

.ss-toasts {
    position: fixed;
    z-index: 9997;              /* under the bell panel (9999), over everything else */
    display: flex;
    flex-direction: column;
    gap: .5rem;
    pointer-events: none;       /* the empty column must not swallow clicks */
}

/* Phone: below the fixed top bar, full width less a margin. */
@media (max-width: 767px) {
    .ss-toasts {
        top: calc(3.5rem + env(safe-area-inset-top, 0px) + .5rem);
        left: .75rem;
        right: .75rem;
    }
}

/* Desktop: bottom-right, clear of the content column — and lifted above any
   bottom-anchored bar (the push permission prompt) so it is never clipped.
   The lift is measured in JS, because the bar's height depends on its text. */
@media (min-width: 768px) {
    .ss-toasts {
        bottom: calc(1.25rem + var(--ss-toast-lift, 0px));
        right: 1.25rem;
        width: min(21rem, calc(100vw - 2.5rem));
    }
}

.ss-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .875rem;
    border-radius: .875rem;
    background: var(--ss-card);
    border: 1px solid var(--ss-line);
    border-left: 3px solid var(--ss-seal);   /* the signature rule, on its edge */
    box-shadow: 0 10px 34px rgba(11, 27, 43, .16);
    text-align: left;
    cursor: pointer;
    animation: ssToastInTop .28s cubic-bezier(.32,.72,0,1);
}
@media (min-width: 768px) {
    .ss-toast { animation-name: ssToastInRight; }
}
.ss-toast.is-leaving { animation: ssToastOut .2s ease forwards; }

.ss-toast-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--ss-ink-50);
    color: var(--ss-ink-700);
}
.ss-toast-title {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--ss-ink);
    line-height: 1.3;
}
.ss-toast-text {
    font-size: .75rem;
    color: var(--ss-soft);
    margin-top: .125rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;          /* two lines, then ellipsis */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ss-toast-close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--ss-mute);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ss-toast-close:hover { background: var(--ss-ink-50); color: var(--ss-ink); }

@keyframes ssToastInTop   { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes ssToastInRight { from { opacity: 0; transform: translateX(20px); }  to { opacity: 1; transform: none; } }
@keyframes ssToastOut     { to   { opacity: 0; transform: scale(.97); } }

/* The badge pulses once when the count rises: a number changing from 2 to 3 is
   otherwise easy to miss on a busy screen. */
@keyframes ssBellRing {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(-13deg); }
    30% { transform: rotate(11deg); }
    45% { transform: rotate(-8deg); }
    60% { transform: rotate(6deg); }
    75% { transform: rotate(-3deg); }
}
.ss-bell-ring { animation: ssBellRing .8s ease; transform-origin: 50% 15%; }

/* ── Preview banner ───────────────────────────────────────────────────────── */
/* Shown only to an admin holding a personal preview, so a half-made decision is
   never mistaken for the live site. */
.ss-preview-bar {
    position: fixed;
    bottom: 4.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border-radius: 999px;
    background: var(--ss-ink-950);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(11, 27, 43, .35);
    white-space: nowrap;
    max-width: calc(100vw - 2rem);
}
.ss-preview-bar a {
    background: rgba(255,255,255,.14);
    padding: 0.3125rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
}
.ss-preview-bar a:hover { background: rgba(255,255,255,.24); }

@media (min-width: 768px) {
    .ss-preview-bar { bottom: 1.25rem; }
}

/* Assign-professional rows: hover echoes the selected state without committing. */
.pro-row:hover { border-color: var(--ss-ink-300) !important; background: var(--ss-ink-50) !important; }
