﻿/**
 * SabiRecord app theme — Shipping Manifest palette (matches public/landing/styles.css)
 * Navy · safety orange · kraft · ink — orange reserved for primary actions only.
 */
:root {
    --sf-navy: #0a1628;
    --sf-navy-mid: #132338;
    --sf-orange: #ff5c00;
    --sf-orange-deep: #e04f00;
    --sf-kraft: #e8e2d6;
    --sf-kraft-dark: #d4cdb8;
    --sf-ink: #1c1917;
    --sf-ink-soft: #3f3a36;
    --sf-paper: #f4f0e8;
    --sf-steel: #8a857c;
    --sf-live: #2f9e64;
    --sf-warn: #c45c12;
    --sf-critical: #c23030;
    --sf-line: #d4cdb8;

    --sf-font-display: "Bebas Neue", Impact, sans-serif;
    --sf-font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
    --sf-font-mono: "IBM Plex Mono", ui-monospace, monospace;

    --sf-radius: 2px;
    --sf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Legacy token class names → manifest palette */
.bg-primary { background-color: var(--sf-navy); }
.bg-action { background-color: var(--sf-orange); }
.bg-canvas { background-color: var(--sf-paper); }
.bg-success { background-color: var(--sf-live); }
.bg-danger { background-color: var(--sf-critical); }
.bg-line { background-color: var(--sf-line); }

.text-kraft { color: var(--sf-kraft); }
.text-primary { color: var(--sf-navy); }
.text-ink { color: var(--sf-ink); }
.text-muted { color: var(--sf-steel); }
.text-success { color: var(--sf-live); }
.text-danger { color: var(--sf-critical); }

.border-line { border-color: var(--sf-line); }
.border-action { border-color: var(--sf-orange); }

.bg-primary\/40 { background-color: rgb(10 22 40 / 0.4); }
.bg-primary\/50 { background-color: rgb(10 22 40 / 0.5); }
.bg-ink\/40 { background-color: rgb(10 22 40 / 0.4); }
.bg-ink\/50 { background-color: rgb(10 22 40 / 0.5); }

.bg-danger\/10 { background-color: rgb(194 48 48 / 0.1); }
.bg-danger\/15 { background-color: rgb(194 48 48 / 0.15); }
.border-danger\/25 { border-color: rgb(194 48 48 / 0.25); }
.border-danger\/35 { border-color: rgb(194 48 48 / 0.35); }

.border-warning\/50 { border-color: rgb(196 92 18 / 0.5); }
.bg-warning\/20 { background-color: rgb(196 92 18 / 0.12); }
.border-warning\/60 { border-color: rgb(196 92 18 / 0.6); }
.bg-warning\/25 { background-color: rgb(196 92 18 / 0.18); }
.bg-warning\/35 { background-color: rgb(196 92 18 / 0.22); }

.bg-canvas\/80 { background-color: rgb(244 240 232 / 0.8); }
.bg-canvas\/70 { background-color: rgb(244 240 232 / 0.7); }

.border-action\/50 { border-color: rgb(255 92 0 / 0.5); }
.border-action\/40 { border-color: rgb(255 92 0 / 0.4); }

.hover\:bg-action-hover:hover { background-color: var(--sf-orange-deep); }
.hover\:bg-danger-hover:hover { background-color: #a82828; }
.hover\:bg-canvas:hover { background-color: var(--sf-paper); }

.focus\:border-action:focus { border-color: var(--sf-orange); }
.placeholder\:text-muted::placeholder { color: var(--sf-steel); }

.focus\:ring-action\/25:focus { --tw-ring-color: rgb(255 92 0 / 0.25); }
.focus\:ring-action\/30:focus { --tw-ring-color: rgb(255 92 0 / 0.3); }
.focus\:ring-action\/40:focus { --tw-ring-color: rgb(255 92 0 / 0.4); }
.focus\:ring-action\/50:focus { --tw-ring-color: rgb(255 92 0 / 0.5); }
.focus\:ring-danger\/40:focus { --tw-ring-color: rgb(194 48 48 / 0.4); }

/* -------------------------------------------------------------------------- */
/* App shell — grid paper canvas, manifest chrome                               */
/* -------------------------------------------------------------------------- */
.sf-app-body {
    font-family: var(--sf-font-body);
    color: var(--sf-ink);
    background:
        linear-gradient(90deg, transparent 79px, rgba(10, 22, 40, 0.03) 79px, rgba(10, 22, 40, 0.03) 80px, transparent 80px),
        repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(10, 22, 40, 0.035) 23px, rgba(10, 22, 40, 0.035) 24px),
        var(--sf-paper);
}

.sf-sidebar {
    background: var(--sf-navy);
    border-right: 1px solid rgba(232, 226, 214, 0.12);
    color: var(--sf-kraft);
}

.sf-sidebar nav a:not(.sf-nav-active) {
    color: rgba(232, 226, 214, 0.92);
}

.sf-sidebar nav a:not(.sf-nav-active):hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sf-sidebar-footnote {
    color: rgba(232, 226, 214, 0.6);
}

.sf-sidebar-rail {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: repeating-linear-gradient(180deg, var(--sf-orange) 0 12px, transparent 12px 20px);
    pointer-events: none;
}

/* Super Admin shell — fixed sidebar + offset main (Tailwind min() margins are unreliable on CDN) */
:root {
    --sa-sidebar-width: min(19rem, 90vw);
}

@media (min-width: 1024px) {
    :root {
        --sa-sidebar-width: 19rem;
    }
}

#superadmin-sidebar {
    width: var(--sa-sidebar-width);
}

.sa-layout-main {
    min-width: 0;
    width: 100%;
}

@media (min-width: 1024px) {
    .sa-layout-main {
        margin-left: var(--sa-sidebar-width);
    }
}

.sf-wordmark {
    font-family: var(--sf-font-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sf-nav-active {
    background: var(--sf-orange);
    color: var(--sf-navy) !important;
    font-weight: 600;
}

.sf-nav-badge {
    display: inline-flex;
    min-width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--sf-orange);
    color: var(--sf-navy);
    font-family: var(--sf-font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.sf-nav-badge--on-active {
    background: var(--sf-navy);
    color: #fff;
}

.sf-topbar-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    display: inline-flex;
    min-width: 1.1rem;
    height: 1.1rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--sf-orange);
    color: var(--sf-navy);
    font-family: var(--sf-font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.sf-notify-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--sf-ink);
    text-decoration: none;
    transition: background 0.15s ease;
}

.sf-notify-item:hover {
    background: rgb(10 22 40 / 0.04);
}

.sf-notify-item__dot {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.35rem;
    border-radius: 999px;
}

.sf-notify-item--danger .sf-notify-item__dot {
    background: var(--sf-danger, #dc2626);
}

.sf-notify-item--warn .sf-notify-item__dot {
    background: var(--sf-orange);
}

.sf-notify-item--info .sf-notify-item__dot {
    background: var(--sf-navy);
}

.sf-topbar {
    background: var(--sf-kraft);
    border-bottom: 2px solid var(--sf-navy);
    color: var(--sf-ink);
}

.sf-billing-hold-banner {
    border: 2px solid rgba(220, 38, 38, 0.28);
    border-left: 4px solid var(--sf-orange);
    border-radius: var(--sf-radius);
    background: linear-gradient(90deg, rgba(255, 92, 0, 0.1) 0%, rgba(255, 255, 255, 0.95) 55%);
    padding: 1rem 1.1rem;
}

.sf-billing-hold-banner__eyebrow {
    margin: 0 0 0.25rem;
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sf-steel);
}

.sf-billing-hold-banner__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sf-navy);
}

.sf-billing-hold-banner__copy {
    margin: 0.35rem 0 0;
    max-width: 42rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--sf-steel);
}

.sf-main {
    background: transparent;
}

/* Page structure */
.sf-page-head h1 {
    font-family: var(--sf-font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--sf-navy);
}

.sf-section-label {
    font-family: var(--sf-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sf-orange);
}

.sf-card {
    border: 1px solid rgba(10, 22, 40, 0.14);
    background: #fff;
    border-radius: var(--sf-radius);
    box-shadow: 4px 4px 0 rgba(10, 22, 40, 0.06);
}

.sf-card-kpi {
    border: 1px solid rgba(10, 22, 40, 0.12);
    background: #fff;
    border-radius: var(--sf-radius);
    transition: box-shadow var(--sf-ease) 200ms;
}

.sf-card-kpi:hover {
    box-shadow: 6px 6px 0 rgba(10, 22, 40, 0.08);
}

.sf-card-kpi--warn {
    border-color: rgba(196, 92, 18, 0.45);
    background: rgba(196, 92, 18, 0.06);
}

.sf-card-kpi--danger {
    border-color: rgba(194, 48, 48, 0.35);
    background: rgba(194, 48, 48, 0.06);
}

.sf-kpi-value {
    font-family: var(--sf-font-mono);
    font-variant-numeric: tabular-nums;
}

.sf-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.65rem 1.25rem;
    border: 2px solid var(--sf-orange);
    border-radius: var(--sf-radius);
    background: var(--sf-orange);
    color: var(--sf-navy);
    font-weight: 600;
    transition: background 200ms var(--sf-ease), border-color 200ms var(--sf-ease);
}

.sf-btn-primary:hover {
    background: var(--sf-orange-deep);
    border-color: var(--sf-orange-deep);
}

.sf-empty {
    border: 1px dashed rgba(10, 22, 40, 0.2);
    background: rgba(244, 240, 232, 0.6);
    border-radius: var(--sf-radius);
}

/* Usage meter (sidebar footer) */
.sf-usage {
    border-top: 1px solid rgba(232, 226, 214, 0.14);
    padding: 0.85rem 1rem 1rem;
    font-family: var(--sf-font-mono);
    font-size: 0.65rem;
    color: rgba(232, 226, 214, 0.75);
}

.sf-usage-plan {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--sf-font-display);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sf-kraft);
}

.sf-usage-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.sf-usage-bar {
    height: 3px;
    margin-top: 0.15rem;
    background: rgba(232, 226, 214, 0.15);
    overflow: hidden;
}

.sf-usage-bar i {
    display: block;
    height: 100%;
    background: var(--sf-live);
    transition: width 280ms var(--sf-ease);
}

.sf-usage-bar.is-warn i { background: var(--sf-warn); }
.sf-usage-bar.is-full i { background: var(--sf-orange); }
.sf-usage-bar.is-over i { background: var(--sf-critical); }

.sf-usage-warn {
    margin-bottom: 0.5rem;
    color: var(--sf-warn);
    font-size: 0.62rem;
    line-height: 1.35;
}

.sf-usage-warn--full {
    color: var(--sf-orange);
}

.sf-usage-upgrade {
    display: inline-block;
    margin-top: 0.65rem;
    color: var(--sf-kraft);
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 200ms var(--sf-ease);
}

.sf-usage-upgrade:hover {
    color: var(--sf-orange);
}

.sf-plan-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(10, 22, 40, 0.14);
    background: #fff;
    border-radius: var(--sf-radius);
    box-shadow: 4px 4px 0 rgba(10, 22, 40, 0.06);
    transition: transform 200ms var(--sf-ease), box-shadow 200ms var(--sf-ease);
}

.sf-plan-grid .sf-plan-card:hover {
    transform: translateY(-2px);
}

.sf-plan-card--featured {
    border-color: rgba(255, 92, 0, 0.45);
    box-shadow: 6px 6px 0 rgba(255, 92, 0, 0.12);
}

.sf-plan-card--current {
    border-color: rgba(255, 92, 0, 0.6);
    box-shadow: 6px 6px 0 rgba(255, 92, 0, 0.16);
}

.sf-plan-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 1rem 1.1rem 0.95rem;
}

.sf-plan-card__name {
    margin: 0;
    font-family: var(--sf-font-display);
    font-size: 2rem;
    line-height: 0.95;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sf-plan-card__pills {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.sf-plan-card__pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.45rem;
    border-radius: var(--sf-radius);
    font-family: var(--sf-font-mono);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sf-plan-card__pill--accent {
    background: var(--sf-kraft);
    color: var(--sf-navy);
}

.sf-plan-card__pill--danger {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.sf-plan-card--expired {
    border-color: rgba(220, 38, 38, 0.22);
}

.sf-plan-current--expired {
    border-color: rgba(220, 38, 38, 0.28);
}

.sf-plan-current--expired .sf-plan-current__meta {
    color: #b91c1c;
    font-weight: 600;
    text-transform: capitalize;
}

.sf-plan-card__price {
    padding: 0.95rem 1.1rem;
    border-top: 1px solid rgba(232, 226, 214, 0.18);
}

.sf-plan-card__amount {
    margin: 0;
    font-family: var(--sf-font-mono);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.05;
}

.sf-plan-card__period {
    margin: 0.3rem 0 0;
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.88;
}

.sf-plan-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.1rem;
}

.sf-plan-card__features {
    display: grid;
    flex: 1;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-plan-card__feature {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--sf-ink-soft);
}

.sf-plan-card__feature-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.08rem;
    border-radius: 50%;
    background: rgba(47, 158, 100, 0.14);
    color: var(--sf-live);
    font-size: 0.62rem;
    font-weight: 700;
}

.sf-plan-card__feature--muted {
    color: var(--sf-steel);
}

.sf-plan-card__feature--muted .sf-plan-card__feature-icon {
    background: rgba(10, 22, 40, 0.07);
    color: var(--sf-steel);
}

.sf-plan-card__action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(10, 22, 40, 0.08);
}

.sf-plan-card__status {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(10, 22, 40, 0.18);
    border-radius: var(--sf-radius);
    background: rgba(244, 240, 232, 0.55);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sf-steel);
    text-align: center;
}

/* Tier header + price blocks */
.sf-plan-card--free .sf-plan-card__header {
    background: linear-gradient(135deg, var(--sf-navy-mid), var(--sf-navy));
    color: var(--sf-kraft);
}

.sf-plan-card--free .sf-plan-card__pill {
    background: rgba(232, 226, 214, 0.18);
    color: var(--sf-kraft);
}

.sf-plan-card--free .sf-plan-card__price {
    background: var(--sf-paper);
    color: var(--sf-navy);
    border-top-color: rgba(10, 22, 40, 0.08);
}

.sf-plan-card--basic .sf-plan-card__header {
    background: linear-gradient(135deg, var(--sf-orange), var(--sf-orange-deep));
    color: #fff;
}

.sf-plan-card--basic .sf-plan-card__pill {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.sf-plan-card--basic .sf-plan-card__price {
    background: var(--sf-navy);
    color: var(--sf-kraft);
}

.sf-plan-card--pro .sf-plan-card__header {
    background: linear-gradient(145deg, var(--sf-navy) 0%, #17304f 100%);
    color: var(--sf-kraft);
    box-shadow: inset 0 -3px 0 var(--sf-orange);
}

.sf-plan-card--pro .sf-plan-card__pill {
    background: rgba(255, 92, 0, 0.22);
    color: var(--sf-kraft);
}

.sf-plan-card--pro .sf-plan-card__price {
    background: linear-gradient(120deg, rgba(255, 92, 0, 0.18), rgba(255, 92, 0, 0.06));
    color: var(--sf-navy);
}

.sf-plan-card--enterprise .sf-plan-card__header {
    background: linear-gradient(145deg, #1a1208 0%, var(--sf-navy) 55%, #2a1806 100%);
    color: var(--sf-kraft);
    box-shadow: inset 0 -3px 0 rgba(255, 196, 120, 0.85);
}

.sf-plan-card--enterprise .sf-plan-card__pill {
    background: rgba(255, 196, 120, 0.24);
    color: var(--sf-kraft);
}

.sf-plan-card--enterprise .sf-plan-card__price {
    background: linear-gradient(120deg, rgba(255, 196, 120, 0.22), rgba(255, 92, 0, 0.08));
    color: var(--sf-navy);
}

.sf-plan-card--platform .sf-plan-card__header,
.sf-plan-card--standard .sf-plan-card__header {
    background: var(--sf-navy);
    color: var(--sf-kraft);
}

.sf-plan-card--platform .sf-plan-card__price,
.sf-plan-card--standard .sf-plan-card__price {
    background: var(--sf-paper);
    color: var(--sf-navy);
}

/* Current plan summary */
.sf-plan-current__blocks {
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .sf-plan-current__blocks {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.sf-plan-current__header,
.sf-plan-current__price {
    padding: 1rem 1.1rem;
    border-radius: var(--sf-radius);
}

.sf-plan-current__eyebrow {
    margin: 0;
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}

.sf-plan-current__name {
    margin: 0.35rem 0 0;
    font-family: var(--sf-font-display);
    font-size: 2.2rem;
    line-height: 0.95;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.sf-plan-current__meta {
    margin: 0.45rem 0 0;
    font-family: var(--sf-font-mono);
    font-size: 0.72rem;
    opacity: 0.9;
}

.sf-plan-current__amount {
    margin: 0;
    font-family: var(--sf-font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.05;
}

.sf-plan-current__period {
    margin: 0.3rem 0 0;
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.88;
}

.sf-plan-current__features {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .sf-plan-current__features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sf-plan-current__footer {
    margin-top: 1rem;
}

.sf-plan-current--free .sf-plan-current__header {
    background: linear-gradient(135deg, var(--sf-navy-mid), var(--sf-navy));
    color: var(--sf-kraft);
}

.sf-plan-current--free .sf-plan-current__price {
    background: var(--sf-paper);
    color: var(--sf-navy);
}

.sf-plan-current--basic .sf-plan-current__header {
    background: linear-gradient(135deg, var(--sf-orange), var(--sf-orange-deep));
    color: #fff;
}

.sf-plan-current--basic .sf-plan-current__price {
    background: var(--sf-navy);
    color: var(--sf-kraft);
}

.sf-plan-current--pro .sf-plan-current__header {
    background: linear-gradient(145deg, var(--sf-navy) 0%, #17304f 100%);
    color: var(--sf-kraft);
    box-shadow: inset 0 -3px 0 var(--sf-orange);
}

.sf-plan-current--pro .sf-plan-current__price {
    background: linear-gradient(120deg, rgba(255, 92, 0, 0.18), rgba(255, 92, 0, 0.06));
    color: var(--sf-navy);
}

.sf-plan-current--enterprise .sf-plan-current__header {
    background: linear-gradient(145deg, #1a1208 0%, var(--sf-navy) 55%, #2a1806 100%);
    color: var(--sf-kraft);
    box-shadow: inset 0 -3px 0 rgba(255, 196, 120, 0.85);
}

.sf-plan-current--enterprise .sf-plan-current__price {
    background: linear-gradient(120deg, rgba(255, 196, 120, 0.22), rgba(255, 92, 0, 0.08));
    color: var(--sf-navy);
}

.sf-plan-current--platform .sf-plan-current__header,
.sf-plan-current--standard .sf-plan-current__header {
    background: var(--sf-navy);
    color: var(--sf-kraft);
}

.sf-plan-current--platform .sf-plan-current__price,
.sf-plan-current--standard .sf-plan-current__price {
    background: var(--sf-paper);
    color: var(--sf-navy);
}

.sf-plan-current--platform .sf-plan-current__price,
.sf-plan-current--standard .sf-plan-current__price {
    background: var(--sf-paper);
    color: var(--sf-navy);
}

/* Business switcher */
.sf-biz-switcher__panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    z-index: 60;
    width: min(18rem, 88vw);
    padding: 0.55rem;
    border: 1px solid rgba(10, 22, 40, 0.14);
    border-radius: var(--sf-radius);
    background: #fff;
    box-shadow: 0 16px 36px rgb(10 22 40 / 0.14);
}

.sf-biz-switcher__label {
    margin: 0.15rem 0.45rem 0.35rem;
    font-family: var(--sf-font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sf-steel);
}

.sf-biz-switcher__list {
    display: grid;
    gap: 0.25rem;
}

.sf-biz-switcher__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 0.7rem;
    border: 1px solid transparent;
    border-radius: var(--sf-radius);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 160ms var(--sf-ease), border-color 160ms var(--sf-ease);
}

.sf-biz-switcher__item:hover:not(:disabled) {
    background: var(--sf-paper);
    border-color: rgba(10, 22, 40, 0.08);
}

.sf-biz-switcher__item.is-active {
    background: rgba(255, 92, 0, 0.08);
    border-color: rgba(255, 92, 0, 0.28);
}

.sf-biz-switcher__item.is-inactive {
    opacity: 0.55;
    cursor: not-allowed;
}

.sf-biz-switcher__item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sf-ink);
}

.sf-biz-switcher__item-meta {
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    color: var(--sf-steel);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sf-biz-switcher__add {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding: 0.7rem;
    border: 1px dashed rgba(255, 92, 0, 0.35);
    border-radius: var(--sf-radius);
    background: rgba(255, 92, 0, 0.05);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sf-orange-deep);
    cursor: pointer;
}

.sf-biz-switcher__add:hover {
    background: rgba(255, 92, 0, 0.1);
}

.sf-biz-switcher__add-note {
    font-family: var(--sf-font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    color: var(--sf-steel);
}

.sf-biz-switcher--static {
    cursor: default;
}

.sf-biz-switcher--static .sf-biz-switcher__chevron {
    display: none;
}

.sf-biz-switcher--static:hover {
    border-color: var(--sf-line);
    background: #fff;
}

.sf-biz-switcher__trigger {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms var(--sf-ease), background 160ms var(--sf-ease);
}

.sf-biz-switcher__trigger.sf-biz-switcher--interactive:hover {
    border-color: rgba(10, 22, 40, 0.22);
    background: var(--sf-paper);
}

.sf-biz-switcher__trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 92, 0, 0.28);
}

.sf-biz-switcher__trigger.sf-biz-switcher--flash .sf-biz-switcher__avatar {
    animation: sf-switcher-flash 1.2s ease-out;
}

.sf-biz-switcher__copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0;
}

.sf-biz-switcher__name {
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--sf-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-biz-switcher__meta {
    display: block;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.25;
    color: var(--sf-steel);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-biz-switcher__chevron {
    color: var(--sf-steel);
    opacity: 0.85;
    transition: color 160ms var(--sf-ease), opacity 160ms var(--sf-ease);
}

.sf-biz-switcher__trigger.sf-biz-switcher--interactive:hover .sf-biz-switcher__chevron {
    color: var(--sf-ink);
    opacity: 1;
}

.sf-biz-switcher__avatar {
    display: inline-flex;
    height: 2.25rem;
    width: 2.25rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: var(--sf-radius);
    background: var(--sf-navy);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
}

.sf-biz-switcher__trigger.sf-biz-switcher--flash {
    animation: none;
}

@keyframes sf-switcher-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 92, 0, 0);
    }
    35% {
        box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.38);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 92, 0, 0);
    }
}

.sf-biz-switcher__item-avatar {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--sf-radius);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}

.sf-biz-switcher__item-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
}

.sf-biz-switcher__item-check {
    display: inline-flex;
    height: 1.35rem;
    width: 1.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--sf-orange);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 160ms var(--sf-ease), transform 160ms var(--sf-ease);
}

.sf-biz-switcher__item.is-active .sf-biz-switcher__item-check {
    opacity: 1;
    transform: scale(1);
}

.sf-biz-switcher__panel-hint {
    margin: 0.45rem 0.45rem 0.15rem;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--sf-steel);
}

.sf-biz-switcher__switching {
    position: absolute;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--sf-radius);
    background: rgb(255 255 255 / 0.82);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sf-ink);
    backdrop-filter: blur(2px);
}

.sf-biz-switcher__switching-spinner {
    height: 1rem;
    width: 1rem;
    border: 2px solid rgba(10, 22, 40, 0.12);
    border-top-color: var(--sf-orange);
    border-radius: 999px;
    animation: sf-spin 0.7s linear infinite;
}

@keyframes sf-spin {
    to {
        transform: rotate(360deg);
    }
}

.sf-biz-switcher--pos .sf-biz-switcher__trigger {
    width: 100%;
    max-width: none;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
}

.sf-biz-switcher--pos .sf-biz-switcher__trigger.sf-biz-switcher--interactive:hover {
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.16);
}

.sf-biz-switcher--pos .sf-biz-switcher__name {
    color: #fff;
}

.sf-biz-switcher--pos .sf-biz-switcher__meta {
    color: rgba(255, 255, 255, 0.7);
}

.sf-biz-switcher--pos .sf-biz-switcher__chevron {
    color: rgba(255, 255, 255, 0.72);
}

.sf-biz-switcher--pos .sf-biz-switcher__trigger.sf-biz-switcher--interactive:hover .sf-biz-switcher__chevron {
    color: #fff;
}

/* POS cart line items */
.pos-cart-line {
    border: 1px solid var(--sf-line, #e8e4dc);
    border-radius: 0.875rem;
    background: var(--sf-canvas, #f7f5f0);
    padding: 0.75rem 0.875rem;
}

.pos-cart-line__top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.pos-cart-line__remove {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    min-width: 2.75rem;
    border-radius: 0.625rem;
    color: var(--sf-muted, #6b7280);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pos-cart-line__remove:hover {
    background: rgba(10, 22, 40, 0.06);
    color: var(--sf-ink, #0a1628);
}

.pos-cart-line__remove:focus-visible {
    outline: 2px solid rgba(255, 92, 0, 0.45);
    outline-offset: 2px;
}

.pos-cart-line__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(10, 22, 40, 0.08);
}

.pos-cart-line__stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--sf-line, #e8e4dc);
    background: #fff;
    padding: 0.125rem;
}

.pos-cart-line__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    min-width: 2.75rem;
    border-radius: 0.5rem;
    color: var(--sf-ink, #0a1628);
    transition: background-color 0.15s ease;
}

.pos-cart-line__btn:hover {
    background: rgba(10, 22, 40, 0.06);
}

.pos-cart-line__btn:focus-visible {
    outline: 2px solid rgba(255, 92, 0, 0.45);
    outline-offset: 1px;
}

.pos-cart-line__qty {
    min-width: 2.25rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--sf-ink, #0a1628);
}

.pos-cart-line__total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sf-ink, #0a1628);
    white-space: nowrap;
}

/* POS toggle — receipt after sale */
.sf-toggle {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.sf-toggle__input {
    position: absolute;
    inset: 0;
    z-index: 1;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}

.sf-toggle__track {
    position: relative;
    display: block;
    width: 2.75rem;
    height: 1.625rem;
    border-radius: 999px;
    background: rgba(10, 22, 40, 0.14);
    transition: background-color 0.15s ease;
}

.sf-toggle__track::after {
    content: '';
    position: absolute;
    top: 0.1875rem;
    left: 0.1875rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(10, 22, 40, 0.18);
    transition: transform 0.15s ease;
}

.sf-toggle__input:checked + .sf-toggle__track {
    background: var(--sf-orange, #ff5c00);
}

.sf-toggle__input:checked + .sf-toggle__track::after {
    transform: translateX(1.125rem);
}

.sf-toggle__input:focus-visible + .sf-toggle__track {
    outline: 2px solid rgba(255, 92, 0, 0.45);
    outline-offset: 2px;
}

/* Checkout payment method — one-tap pills */
.sf-pay-method__label {
    margin: 0 0 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sf-muted, #64748b);
}

.sf-pay-method__pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.375rem;
}

.sf-pay-method__pill {
    min-height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--sf-line, #e2e8f0);
    background: var(--sf-canvas, #f8fafc);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sf-ink, #0f172a);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.sf-pay-method__pill--active {
    border-color: var(--sf-orange, #ff5c00);
    background: rgba(255, 92, 0, 0.08);
    color: var(--sf-orange, #ff5c00);
}

.sf-pay-method__pill:focus-visible {
    outline: 2px solid rgba(255, 92, 0, 0.4);
    outline-offset: 2px;
}

.sf-pay-method--compact .sf-pay-method__pill {
    min-height: 2.25rem;
    font-size: 0.75rem;
}

.sf-usage-loading {
    opacity: 0.5;
    animation: sf-pulse 1.2s ease-in-out infinite;
}

@keyframes sf-pulse {
    50% { opacity: 0.25; }
}

/* Plan upgrade celebration */
.sf-confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 95;
    pointer-events: none;
}

.sf-plan-upgraded {
    animation: sf-plan-glow 1.8s var(--sf-ease) 2;
    border-color: rgba(255, 92, 0, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(255, 92, 0, 0.2), 8px 8px 0 rgba(255, 92, 0, 0.1);
}

@keyframes sf-plan-glow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255, 92, 0, 0.15), 4px 4px 0 rgba(10, 22, 40, 0.06); }
    50% { box-shadow: 0 0 0 2px rgba(255, 92, 0, 0.45), 10px 10px 0 rgba(255, 92, 0, 0.14); }
}

.sf-usage--celebrate {
    animation: sf-usage-celebrate 1.2s var(--sf-ease) 2;
}

.sf-usage--celebrate .sf-usage-plan {
    color: var(--sf-orange);
    text-shadow: 0 0 12px rgba(255, 92, 0, 0.35);
}

@keyframes sf-usage-celebrate {
    0%, 100% { background: transparent; }
    50% { background: rgba(255, 92, 0, 0.08); }
}

.sf-upgrade-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 92, 0, 0.35);
    border-radius: var(--sf-radius);
    background: linear-gradient(120deg, rgba(255, 92, 0, 0.12), rgba(244, 240, 232, 0.95) 45%, #fff);
    box-shadow: 6px 6px 0 rgba(255, 92, 0, 0.1);
}

.sf-upgrade-banner__glow {
    position: absolute;
    inset: -40% auto auto -20%;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 92, 0, 0.25), transparent 70%);
    pointer-events: none;
}

.sf-upgrade-banner__content {
    position: relative;
    min-width: min(100%, 18rem);
}

.sf-upgrade-banner__eyebrow {
    margin: 0;
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sf-orange);
}

.sf-upgrade-banner__title {
    margin: 0.2rem 0 0;
    font-family: var(--sf-font-display);
    font-size: 1.55rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sf-navy);
}

.sf-upgrade-banner__summary {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--sf-ink-soft);
}

.sf-upgrade-banner__actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sf-upgrade-modal-host {
    position: fixed;
    inset: 0;
    z-index: 96;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.sf-upgrade-modal-host.is-visible .sf-upgrade-modal-backdrop {
    opacity: 1;
}

.sf-upgrade-modal-host.is-visible .sf-upgrade-modal {
    opacity: 1;
    transform: translateY(0);
}

.sf-upgrade-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(10 22 40 / 0.55);
    opacity: 0;
    transition: opacity 220ms var(--sf-ease);
}

.sf-upgrade-modal {
    position: relative;
    z-index: 1;
    width: min(100%, 28rem);
    margin: 0;
    padding: 1.35rem 1.35rem 1.15rem;
    border-radius: 1rem 1rem 0 0;
    background: #fff;
    box-shadow: 0 24px 60px rgb(10 22 40 / 0.28);
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 220ms var(--sf-ease), transform 220ms var(--sf-ease);
}

@media (min-width: 640px) {
    .sf-upgrade-modal-host {
        align-items: center;
        padding: 1rem;
    }

    .sf-upgrade-modal {
        border-radius: 1rem;
    }
}

.sf-upgrade-modal__stripe {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--sf-orange), var(--sf-kraft), var(--sf-orange));
}

.sf-upgrade-modal__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--sf-steel);
    cursor: pointer;
}

.sf-upgrade-modal__close:hover {
    background: var(--sf-paper);
    color: var(--sf-ink);
}

.sf-upgrade-modal__eyebrow {
    margin: 0.35rem 0 0;
    font-family: var(--sf-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sf-orange);
}

.sf-upgrade-modal__title {
    margin: 0.35rem 2rem 0 0;
    font-family: var(--sf-font-display);
    font-size: 2rem;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--sf-navy);
}

.sf-upgrade-modal__lead {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    color: var(--sf-ink-soft);
}

.sf-upgrade-modal__list {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.sf-upgrade-modal__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: var(--sf-ink);
}

.sf-upgrade-modal__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.1rem;
    border-radius: 50%;
    background: rgba(47, 158, 100, 0.15);
    color: var(--sf-live);
    flex-shrink: 0;
}

.sf-upgrade-modal__actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    margin-top: 1.15rem;
}

@media (min-width: 640px) {
    .sf-upgrade-modal__actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Loader */
.loader {
    width: 40px;
    aspect-ratio: 1;
    --loader-primary: var(--sf-navy);
    --loader-action: var(--sf-orange);
    --c: linear-gradient(var(--loader-action) 0 0);
    --m: radial-gradient(farthest-side, var(--loader-primary) 92%, transparent);
    background:
        var(--m) center / 12px 12px,
        var(--c) left 50% top -20px / 8px 16px,
        var(--c) left 50% bottom -20px / 8px 16px,
        var(--c) top 50% left -20px / 16px 8px,
        var(--c) top 50% right -20px / 16px 8px;
    background-repeat: no-repeat;
    animation: l18-1 1.5s infinite, l18-2 1.5s infinite;
}

@keyframes l18-1 {
    30%, 70% {
        background-position: center, left 50% top calc(50% - 8px), left 50% bottom calc(50% - 8px), top 50% left calc(50% - 8px), top 50% right calc(50% - 8px);
    }
}

@keyframes l18-2 {
    0%, 40% { transform: rotate(0); }
    60%, 100% { transform: rotate(90deg); }
}

/* PWA install prompt */
.sf-pwa-install-root {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 90;
    padding: 0 1rem max(1rem, env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.sf-pwa-install-root > * {
    pointer-events: auto;
}

.sf-pwa-install {
    margin: 0 auto;
    max-width: 42rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    background: #fff;
    box-shadow: 0 14px 34px rgb(10 22 40 / 0.14);
}

.sf-pwa-install-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--sf-navy);
}

.sf-pwa-install-text {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--sf-ink-soft);
}

.sf-pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sf-pwa-install-btn {
    min-height: 2.5rem;
    padding: 0 0.9rem;
    border: 0;
    border-radius: var(--sf-radius);
    background: var(--sf-orange);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.sf-pwa-install-btn:hover {
    background: var(--sf-orange-deep);
}

.sf-pwa-install-dismiss {
    min-height: 2.5rem;
    padding: 0 0.65rem;
    border: 0;
    background: transparent;
    color: var(--sf-steel);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.sf-pwa-connection {
    display: none;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-family: var(--sf-font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sf-pwa-connection:not([hidden]) {
    display: inline-flex;
}

.sf-pwa-connection--online {
    border: 1px solid rgb(255 255 255 / 0.25);
    background: rgb(255 255 255 / 0.12);
    color: #fff;
}

.sf-pwa-connection--offline {
    border: 1px solid rgb(255 92 0 / 0.45);
    background: rgb(255 92 0 / 0.2);
    color: #fff;
}

.sf-pwa-connection--offline::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--sf-orange);
}

/* Auth forms — live validation */
.sf-field-error:not(.hidden) {
    display: block;
}

button[type="submit"]:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

button[type="submit"]:disabled:hover {
    background-color: var(--sf-orange);
}
