:root {
    --sb-bg-ink: #15100e;
    --sb-bg-wine: #261319;
    --sb-bg-cocoa: #3c2027;
    --sb-bg-glow: #c49060;
    --sb-text-primary: #faf4ed;
    --sb-text-muted: #c4a98e;
    --sb-accent: #dba870;
    --sb-accent-strong: #f3c685;
    --sb-danger: #e87070;
    --sb-success: #7dc598;
    --sb-surface: rgba(255, 240, 220, 0.09);
    --sb-surface-strong: rgba(255, 240, 220, 0.17);
    --sb-border: rgba(255, 215, 180, 0.28);
    --sb-border-soft: rgba(255, 215, 180, 0.14);
    --sb-shadow-lg: 0 24px 64px rgba(10, 4, 7, 0.58);
    --sb-shadow-md: 0 10px 32px rgba(10, 4, 7, 0.4);
    --sb-shadow-sm: 0 4px 16px rgba(10, 4, 7, 0.28);
    --sb-radius-xl: 22px;
    --sb-radius-lg: 16px;
    --sb-radius-md: 10px;
    --sb-radius-sm: 6px;
    --sb-blur-lg: blur(22px);
    --sb-blur-md: blur(14px);
    --sb-blur-sm: blur(8px);
    --sb-transition-fast: 150ms ease;
    --sb-transition: 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
    --sb-bottom-nav-h: 62px;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--sb-text-primary);
    background:
        radial-gradient(ellipse at 12% 0%, rgba(200, 148, 88, 0.2) 0%, transparent 52%),
        radial-gradient(ellipse at 88% 12%, rgba(175, 118, 72, 0.15) 0%, transparent 48%),
        radial-gradient(ellipse at 50% 100%, rgba(88, 38, 52, 0.42) 0%, transparent 52%),
        linear-gradient(135deg, var(--sb-bg-ink) 0%, var(--sb-bg-wine) 42%, #2e1820 100%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
.navbar-brand {
    font-family: "Fraunces", "Times New Roman", serif;
    letter-spacing: 0.01em;
}

a,
.btn-link {
    color: var(--sb-accent-strong);
}

a:hover,
.btn-link:hover {
    color: #ffe1ba;
}

.content {
    padding-top: 1.4rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--sb-success);
}

.invalid {
    outline: 1px solid var(--sb-danger);
}

.validation-message {
    color: #ffd8d4;
}

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

.btn {
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.015em;
    transition:
        transform var(--sb-transition-fast),
        box-shadow var(--sb-transition-fast),
        background-color var(--sb-transition-fast),
        border-color var(--sb-transition-fast);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn-success,
.btn-secondary,
.btn-outline-primary,
.btn-outline-danger,
.btn-outline-secondary {
    border: 1px solid var(--sb-border);
    color: var(--sb-text-primary);
    background: linear-gradient(140deg, rgba(255, 233, 208, 0.22), rgba(255, 233, 208, 0.07));
    backdrop-filter: var(--sb-blur-md);
    -webkit-backdrop-filter: var(--sb-blur-md);
    box-shadow: var(--sb-shadow-sm), inset 0 1px 0 rgba(255, 245, 230, 0.1);
}

.btn-primary,
.btn-success {
    background: linear-gradient(140deg, rgba(235, 182, 110, 0.44) 0%, rgba(185, 130, 76, 0.28) 100%);
    border-color: rgba(240, 198, 148, 0.52);
    color: #fff6e6;
    box-shadow: var(--sb-shadow-sm), inset 0 1px 0 rgba(255, 248, 235, 0.14);
}

.btn-primary:hover,
.btn-success:hover {
    background: linear-gradient(140deg, rgba(245, 192, 120, 0.52) 0%, rgba(200, 145, 88, 0.38) 100%);
    border-color: rgba(250, 210, 165, 0.65);
    color: #fff8ed;
}

.btn-secondary {
    background: linear-gradient(140deg, rgba(255, 233, 208, 0.18), rgba(120, 80, 88, 0.32));
}

.btn-outline-danger {
    border-color: rgba(232, 112, 112, 0.48);
    color: #ffe4e4;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.14rem rgba(22, 10, 14, 0.92), 0 0 0 0.3rem rgba(240, 195, 135, 0.42);
    border-color: rgba(255, 232, 196, 0.8);
}

/* ─────────────────────────────────────────────
   Cards & Surfaces
───────────────────────────────────────────── */

.card,
.table,
.alert,
.account-auth-card {
    border: 1px solid var(--sb-border-soft);
    background: linear-gradient(155deg, rgba(255, 242, 225, 0.13) 0%, rgba(255, 242, 225, 0.04) 100%);
    border-radius: var(--sb-radius-lg);
    box-shadow: var(--sb-shadow-lg), inset 0 1px 0 rgba(255, 248, 235, 0.1);
    backdrop-filter: var(--sb-blur-lg);
    -webkit-backdrop-filter: var(--sb-blur-lg);
}

.card {
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 218, 178, 0.32);
    box-shadow: 0 28px 72px rgba(10, 4, 7, 0.62), inset 0 1px 0 rgba(255, 248, 235, 0.14);
}

.card-title {
    color: #ffe8cc;
}

.card-text,
.text-muted {
    color: var(--sb-text-muted) !important;
}

/* ─────────────────────────────────────────────
   Forms
───────────────────────────────────────────── */

.form-control,
.form-select,
.form-control:disabled,
.form-select:disabled {
    background: rgba(255, 243, 230, 0.1);
    border: 1px solid var(--sb-border-soft);
    color: var(--sb-text-primary);
    border-radius: var(--sb-radius-md);
    transition: border-color var(--sb-transition-fast), box-shadow var(--sb-transition-fast);
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 243, 230, 0.14);
}

.form-control::placeholder {
    color: rgba(220, 195, 170, 0.65);
}

.form-label,
.form-check-label {
    color: var(--sb-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ─────────────────────────────────────────────
   Tables
───────────────────────────────────────────── */

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--sb-text-primary);
    --bs-table-striped-bg: rgba(255, 230, 198, 0.05);
    --bs-table-striped-color: var(--sb-text-primary);
    --bs-table-hover-bg: rgba(255, 230, 198, 0.1);
    --bs-table-hover-color: var(--sb-text-primary);
    overflow: hidden;
}

.table thead th {
    color: #ffe4c4;
    border-bottom-color: rgba(255, 215, 180, 0.2);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    padding-top: 1rem;
    padding-bottom: 0.75rem;
}

.table td,
.table th {
    border-color: rgba(255, 215, 180, 0.1);
    vertical-align: middle;
}

/* ─────────────────────────────────────────────
   Alerts
───────────────────────────────────────────── */

.alert-danger {
    color: #fff0ee;
    border-color: rgba(232, 112, 112, 0.5);
    background: linear-gradient(120deg, rgba(155, 55, 55, 0.42), rgba(115, 44, 58, 0.32));
}

.alert-success {
    color: #f2fff4;
    border-color: rgba(125, 197, 152, 0.6);
    background: linear-gradient(120deg, rgba(40, 112, 72, 0.58), rgba(22, 78, 55, 0.45));
}

.alert-success a {
    color: #e3ffea;
}

/* ─────────────────────────────────────────────
   Blazor Error
───────────────────────────────────────────── */

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, linear-gradient(120deg, rgba(132, 40, 42, 0.85), rgba(89, 23, 42, 0.78));
    padding: 1rem 1rem 1rem 3.7rem;
    color: #fff6f2;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: rgba(255, 215, 180, 0.55);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ─────────────────────────────────────────────
   Page Header Surface
───────────────────────────────────────────── */

.surface-intro {
    margin-bottom: 1.35rem;
    padding: 1.5rem 1.75rem;
    border-radius: var(--sb-radius-xl);
    border: 1px solid var(--sb-border-soft);
    background: linear-gradient(130deg, rgba(255, 233, 208, 0.15) 0%, rgba(255, 233, 208, 0.04) 100%);
    box-shadow: var(--sb-shadow-lg), inset 0 1px 0 rgba(255, 248, 232, 0.1);
    animation: sb-rise-in 440ms var(--sb-transition) both;
}

.surface-intro h1 {
    margin-bottom: 0.3rem;
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    color: #fff0dc;
}

.surface-intro p {
    margin-bottom: 0;
    color: var(--sb-text-muted);
    font-size: 0.95rem;
}

/* ─────────────────────────────────────────────
   Dashboard
───────────────────────────────────────────── */

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.dashboard-kpi-card {
    animation: sb-rise-in 480ms var(--sb-transition) both;
}

.dashboard-kpi-card .card-body {
    padding: 1.25rem 1.35rem;
}

.dashboard-kpi-card__label {
    margin-bottom: 0.45rem;
    color: var(--sb-text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.dashboard-kpi-card__value {
    margin-bottom: 0;
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    color: #fff0da;
    line-height: 1.1;
}

.dashboard-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-upcoming-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.dashboard-upcoming-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--sb-border-soft);
    border-radius: var(--sb-radius-md);
    background: rgba(255, 240, 220, 0.06);
    transition: background var(--sb-transition-fast), border-color var(--sb-transition-fast);
}

.dashboard-upcoming-item:hover {
    background: rgba(255, 240, 220, 0.1);
    border-color: rgba(255, 215, 180, 0.22);
}

.dashboard-upcoming-item__time {
    margin-bottom: 0.18rem;
    font-weight: 600;
    color: #ffe4c4;
}

.dashboard-upcoming-item__meta {
    color: var(--sb-text-muted);
    font-size: 0.9rem;
}

.dashboard-quickstart-card {
    animation: sb-rise-in 540ms var(--sb-transition) both;
}

.dashboard-quickstart-card__cta {
    width: 100%;
}

/* ─────────────────────────────────────────────
   Glass Grid
───────────────────────────────────────────── */

.glass-grid .card {
    animation: sb-rise-in 520ms var(--sb-transition) both;
}

.glass-grid .col-md-4:nth-child(2) .card {
    animation-delay: 65ms;
}

.glass-grid .col-md-4:nth-child(3) .card {
    animation-delay: 130ms;
}

/* ─────────────────────────────────────────────
   Tables
───────────────────────────────────────────── */

.table-responsive {
    border-radius: var(--sb-radius-lg);
    overflow-x: auto;
    overflow-y: visible;
}

.table-responsive .table {
    margin-bottom: 0;
}

.table-responsive .team-table {
    overflow: visible;
}

/* ─────────────────────────────────────────────
   Page Toolbar
───────────────────────────────────────────── */

.page-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ─────────────────────────────────────────────
   Empty State
───────────────────────────────────────────── */

.empty-state {
    padding: 1.25rem 1.25rem;
    border-radius: var(--sb-radius-md);
    border: 1px dashed rgba(255, 215, 180, 0.28);
    background: rgba(255, 240, 220, 0.05);
    text-align: center;
    color: var(--sb-text-muted);
}

/* ─────────────────────────────────────────────
   Action Cells & Dropdown
───────────────────────────────────────────── */

.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn {
    min-width: 96px;
}

.sb-action-dropdown {
    position: relative;
    display: inline-block;
}

.sb-action-dropdown__toggle {
    min-width: 0 !important;
    padding-inline: 0.55rem;
}

.sb-action-dropdown__backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
}

.sb-action-dropdown__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 901;
    min-width: 185px;
    max-width: min(280px, calc(100dvw - 2rem));
    max-height: min(60dvh, 320px);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    border-radius: var(--sb-radius-md);
    border: 1px solid var(--sb-border-soft);
    background: rgba(28, 13, 20, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--sb-shadow-lg);
    overflow-y: auto;
    animation: sb-rise-in 180ms var(--sb-transition) both;
}

.sb-action-dropdown__item {
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    background: none;
    border: none;
    text-align: left;
    color: var(--sb-text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background var(--sb-transition-fast);
}

.sb-action-dropdown__item:hover {
    background: rgba(255, 215, 180, 0.08);
}

.sb-action-dropdown__item--warn {
    color: #f0ad4e;
}

.sb-action-dropdown__item--danger {
    color: #e06868;
}

/* ─────────────────────────────────────────────
   Form Shell Animation
───────────────────────────────────────────── */

.form-shell {
    animation: sb-rise-in 300ms var(--sb-transition) both;
}

/* ─────────────────────────────────────────────
   Appointment Slot Picker
───────────────────────────────────────────── */

.appointment-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.appointment-slots-grid .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-inline: 0.3rem;
}

/* ─────────────────────────────────────────────
   Appointment Modal
───────────────────────────────────────────── */

.appointment-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.appointment-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 7, 10, 0.68);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.appointment-modal__card {
    position: relative;
    width: min(100%, 520px);
    margin: 0;
    border: 1px solid var(--sb-border);
    animation: sb-rise-in 210ms var(--sb-transition) both;
}

.wh-dialog-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}

.wh-dialog-header {
    flex-shrink: 0;
    padding: 1.25rem 1.35rem 1rem;
    border-bottom: 1px solid var(--sb-border-soft);
}

.wh-dialog-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem 1.35rem 1.35rem;
}

.invite-link {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ─────────────────────────────────────────────
   Public Shell
───────────────────────────────────────────── */

.public-shell {
    min-height: 100vh;
    padding: 1.5rem;
}

.public-shell__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: min(1120px, 100%);
    margin: 0 auto 1.25rem;
    padding: 0.5rem 0;
}

.public-shell__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-shell__nav a:not(.btn) {
    color: var(--sb-text-muted);
    text-decoration: none;
}

.public-shell__nav a:not(.btn):hover {
    color: var(--sb-text-primary);
}

.public-shell__body {
    width: min(1120px, 100%);
    margin: 0 auto;
}

/* ─────────────────────────────────────────────
   Public Footer
───────────────────────────────────────────── */

.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-end;
    width: min(1120px, 100%);
    margin: 2.5rem auto 0;
    padding: 1.35rem 0 0.5rem;
    border-top: 1px solid var(--sb-border-soft);
}

.public-footer__brand {
    margin-bottom: 0.15rem;
    font-family: "Fraunces", "Times New Roman", serif;
    color: #ffe8cc;
    font-size: 1.15rem;
}

.public-footer__copy {
    margin-bottom: 0;
    color: var(--sb-text-muted);
    max-width: 42rem;
    font-size: 0.88rem;
}

.public-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.public-footer__links a {
    color: var(--sb-text-muted);
    text-decoration: none;
    font-size: 0.88rem;
}

.public-footer__links a:hover {
    color: var(--sb-text-primary);
}

/* ─────────────────────────────────────────────
   Landing Page
───────────────────────────────────────────── */

.landing-shell {
    display: grid;
    gap: 1.5rem;
}

.landing-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.75rem, 4vw, 3rem);
}

.landing-hero::after {
    content: "";
    position: absolute;
    inset: auto -5rem -6rem auto;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 195, 130, 0.25), rgba(240, 195, 130, 0));
    pointer-events: none;
}

.landing-kicker {
    margin-bottom: 0.55rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--sb-accent-strong);
}

.landing-lead {
    max-width: 44rem;
    font-size: 1.06rem;
    color: var(--sb-text-muted);
    line-height: 1.65;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.landing-actions--compact {
    margin-top: 1.1rem;
}

.landing-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.landing-metric-card,
.landing-feature-card,
.landing-story-card,
.landing-cta-card,
.legal-card {
    animation: sb-rise-in 500ms var(--sb-transition) both;
}

.landing-metric-card__value {
    margin-bottom: 0.55rem;
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: clamp(1.65rem, 4vw, 2.5rem);
    color: #fff0d8;
}

.landing-metric-card h2,
.landing-feature-card h3,
.landing-story-card h2,
.landing-cta-card h2,
.legal-copy h2 {
    margin-bottom: 0.55rem;
    color: #ffe8cc;
}

.landing-section {
    display: grid;
    gap: 1rem;
}

.landing-section__intro {
    max-width: 42rem;
}

.landing-section--split {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: stretch;
}

.landing-feature-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0.85rem;
}

/* ─────────────────────────────────────────────
   Legal Pages
───────────────────────────────────────────── */

.legal-hero {
    margin-bottom: 1rem;
}

.legal-copy {
    display: grid;
    gap: 0.8rem;
}

.legal-copy p {
    margin-bottom: 0;
}

/* ─────────────────────────────────────────────
   Public Booking
───────────────────────────────────────────── */

.public-booking-shell {
    display: grid;
    gap: 1.25rem;
}

.public-booking-hero {
    margin-bottom: 0;
}

.public-booking-kicker {
    margin-bottom: 0.5rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--sb-accent-strong);
}

.public-booking-card,
.settings-card {
    animation: sb-rise-in 500ms var(--sb-transition) both;
}

.public-booking-section {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.public-booking-step {
    display: inline-flex;
    width: 2.1rem;
    height: 2.1rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(235, 182, 110, 0.2);
    border: 1px solid rgba(240, 198, 148, 0.32);
    color: #fff4e3;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.public-booking-slots {
    margin-top: 0.25rem;
}

/* ─────────────────────────────────────────────
   Settings
───────────────────────────────────────────── */

.settings-url-shell {
    padding: 1.1rem 1.25rem;
    border-radius: var(--sb-radius-lg);
    border: 1px solid var(--sb-border-soft);
    background: rgba(255, 240, 220, 0.07);
}

.settings-url-label {
    margin-bottom: 0.2rem;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--sb-text-muted);
}

.settings-url-title {
    margin-bottom: 0.35rem;
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: 1.15rem;
    color: #ffe8cc;
}

.settings-url-link {
    word-break: break-all;
}

/* ─────────────────────────────────────────────
   Focus Styles
───────────────────────────────────────────── */

button:focus-visible,
.btn:focus-visible,
a:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(240, 210, 165, 0.85);
    outline-offset: 2px;
}

/* ─────────────────────────────────────────────
   Auth Pages
───────────────────────────────────────────── */

body.account-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.account-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 1.75rem;
    animation: sb-rise-in 380ms var(--sb-transition) both;
}

.account-auth-title {
    text-align: center;
    margin-bottom: 0.35rem;
    font-size: 2rem;
    color: #ffead0;
}

.account-auth-subtitle {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--sb-text-muted);
    font-size: 0.92rem;
}

.account-auth-card hr {
    border-color: rgba(255, 215, 180, 0.18);
}

/* ─────────────────────────────────────────────
   Fallback (no backdrop-filter support)
───────────────────────────────────────────── */

@supports not ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
    .card,
    .table,
    .alert,
    .account-auth-card,
    .btn-primary,
    .btn-success,
    .btn-secondary,
    .btn-outline-primary,
    .btn-outline-danger,
    .btn-outline-secondary {
        background: rgba(68, 36, 44, 0.95);
    }
}

/* ─────────────────────────────────────────────
   Mobile Overrides (≤ 640px)
───────────────────────────────────────────── */

@media (max-width: 640.98px) {
    body {
        font-size: 0.96rem;
    }

    .public-shell {
        padding: 1rem;
    }

    .public-shell__header,
    .public-footer,
    .landing-section--split,
    .landing-metrics {
        grid-template-columns: 1fr;
        display: grid;
    }

    .public-shell__header {
        justify-content: initial;
    }

    .public-shell__nav {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .public-footer {
        align-items: flex-start;
        padding-top: 1rem;
    }

    .public-booking-section {
        gap: 0.75rem;
    }

    .content {
        padding-top: 1rem;
    }

    .surface-intro {
        padding: 1.1rem 1.25rem;
    }

    .card,
    .table,
    .account-auth-card {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .table td,
    .table th {
        padding-top: 0.72rem;
        padding-bottom: 0.72rem;
    }

    .actions-cell {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .actions-cell .btn {
        min-width: 0;
        flex: 1 1 auto;
        margin-right: 0 !important;
    }

    .page-toolbar .btn {
        width: 100%;
    }

    .surface-intro h1 {
        font-size: clamp(1.6rem, 7vw, 1.95rem);
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.55rem;
    }

    .dashboard-kpi-card .card-body {
        padding: 0.85rem 0.95rem;
    }

    .dashboard-kpi-card__value {
        font-size: 1.45rem;
    }

    .dashboard-kpi-card__label {
        font-size: 0.68rem;
    }

    .dashboard-section-head,
    .dashboard-upcoming-item {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-upcoming-item .btn {
        width: 100%;
    }

    .appointment-modal {
        align-items: end;
        padding: 0;
    }

    .appointment-modal__card {
        width: 100%;
        border-radius: var(--sb-radius-xl) var(--sb-radius-xl) 0 0;
    }
}

/* ─────────────────────────────────────────────
   Reduced Motion
───────────────────────────────────────────── */

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

/* ─────────────────────────────────────────────
   Keyframes
───────────────────────────────────────────── */

@keyframes sb-rise-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =====================================================================
   Appointment Calendar
   ===================================================================== */

.appt-view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.appt-calendar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.appt-calendar__nav {
    display: flex;
    flex-direction: column;
}

.appt-calendar__nav-row {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.appt-calendar__nav-label {
    font-weight: 600;
    color: var(--sb-text-primary);
    text-align: center;
    flex: 1;
}

.appt-calendar__scroll {
    overflow-y: auto;
    max-height: 72vh;
    border-radius: var(--sb-radius-lg);
    border: 1px solid var(--sb-border-soft);
    background: rgba(255, 240, 220, 0.02);
}

.appt-calendar__inner {
    display: flex;
    min-width: 0;
}

.appt-cal-time-col {
    flex: 0 0 48px;
    width: 48px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: linear-gradient(to right, rgba(21, 16, 14, 0.97), rgba(38, 19, 25, 0.94));
}

.appt-cal-header-cell {
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 3;
    background: inherit;
    border-bottom: 1px solid var(--sb-border-soft);
}

.appt-cal-time-body {
    position: relative;
    height: 780px;
}

.appt-cal-time-label {
    position: absolute;
    right: 6px;
    font-size: 0.67rem;
    color: var(--sb-text-muted);
    white-space: nowrap;
    line-height: 1;
    transform: translateY(-50%);
}

.appt-cal-day {
    flex: 1;
    min-width: 0;
    border-left: 1px solid var(--sb-border-soft);
}

@media (max-width: 991.98px) {
    .appt-cal-day:not(.tablet-vis) {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .appt-cal-day:not(.mobile-vis) {
        display: none;
    }
}

.appt-cal-day-header {
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 0.2rem;
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(60, 32, 39, 0.97) 0%, rgba(38, 19, 25, 0.93) 100%);
    border-bottom: 1px solid var(--sb-border-soft);
}

.appt-cal-day-header.is-today {
    background: linear-gradient(180deg, rgba(210, 162, 100, 0.36) 0%, rgba(180, 128, 74, 0.2) 100%);
    border-bottom-color: rgba(240, 195, 135, 0.42);
}

.appt-cal-day-name {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sb-text-muted);
}

.appt-cal-day-date {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sb-text-primary);
}

.appt-cal-day-header.is-today .appt-cal-day-name,
.appt-cal-day-header.is-today .appt-cal-day-date {
    color: var(--sb-accent-strong);
}

.appt-cal-day-body {
    position: relative;
    height: 780px;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 59px,
        rgba(255, 215, 180, 0.08) 59px,
        rgba(255, 215, 180, 0.08) 60px
    );
}

.appt-cal-event {
    position: absolute;
    left: 3px;
    right: 3px;
    border-radius: var(--sb-radius-md);
    background: linear-gradient(135deg, rgba(235, 182, 110, 0.3), rgba(185, 130, 76, 0.18));
    border: 1px solid rgba(240, 198, 148, 0.35);
    padding: 3px 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
    box-sizing: border-box;
    cursor: default;
    transition: border-color var(--sb-transition-fast), background var(--sb-transition-fast);
    z-index: 0;
}

.appt-cal-event:hover {
    background: linear-gradient(135deg, rgba(235, 182, 110, 0.46), rgba(185, 130, 76, 0.34));
    border-color: rgba(240, 198, 148, 0.62);
    z-index: 1;
}

.appt-cal-event__time {
    font-size: 0.63rem;
    color: var(--sb-text-muted);
    white-space: nowrap;
    line-height: 1.2;
}

.appt-cal-event__service {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--sb-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.appt-cal-event__employee {
    font-size: 0.67rem;
    color: var(--sb-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.appt-cal-event__status {
    display: inline-flex;
    width: fit-content;
    font-size: 0.61rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 238, 222, 0.8);
}

.appt-cal-event--planned {
    border-color: rgba(240, 198, 148, 0.35);
}

.appt-cal-event--confirmed {
    border-color: rgba(125, 197, 152, 0.62);
    background: linear-gradient(135deg, rgba(88, 152, 116, 0.32), rgba(62, 118, 88, 0.22));
}

.appt-cal-event--cancelled {
    border-color: rgba(175, 110, 110, 0.5);
    background: linear-gradient(135deg, rgba(108, 70, 70, 0.24), rgba(85, 54, 54, 0.2));
    opacity: 0.72;
}

.appt-cal-event--completed {
    border-color: rgba(132, 140, 158, 0.48);
    background: linear-gradient(135deg, rgba(90, 98, 118, 0.26), rgba(70, 76, 95, 0.2));
}

/* ─────────────────────────────────────────────
   Status Badges
───────────────────────────────────────────── */

.appt-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.14rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.appt-status--planned {
    color: #f3e3cc;
    background: rgba(180, 132, 80, 0.22);
    border-color: rgba(210, 162, 105, 0.5);
}

.appt-status--confirmed {
    color: #d9f3df;
    background: rgba(65, 120, 90, 0.32);
    border-color: rgba(112, 188, 145, 0.52);
}

.appt-status--cancelled {
    color: #f4d5d5;
    background: rgba(120, 68, 68, 0.32);
    border-color: rgba(175, 110, 110, 0.58);
}

.appt-status--completed {
    color: #d7deea;
    background: rgba(78, 86, 108, 0.32);
    border-color: rgba(130, 140, 158, 0.54);
}

/* ─────────────────────────────────────────────
   Appointment Status Page
───────────────────────────────────────────── */

.appointment-status-card {
    text-align: center;
    gap: 0.9rem;
    display: flex;
    flex-direction: column;
}

.appointment-status-icon {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
}

.appointment-status-icon.is-success {
    color: #d9f3df;
    background: rgba(65, 120, 90, 0.32);
    border: 1px solid rgba(112, 188, 145, 0.52);
}

.appointment-status-icon.is-error {
    color: #f4d5d5;
    background: rgba(120, 68, 68, 0.32);
    border: 1px solid rgba(175, 110, 110, 0.58);
}

.appointment-status-title {
    margin-bottom: 0;
}

.appointment-status-message {
    margin-bottom: 0.4rem;
}

/* ═══════════════════════════════════════════════════
   Customer Card Grid
   ═══════════════════════════════════════════════════ */

.cust-search {
    display: flex;
    align-items: center;
}

.cust-search__input {
    width: 220px;
    font-size: 0.88rem;
}

.cust-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
    animation: sb-rise-in 360ms var(--sb-transition) both;
}

.cust-card {
    position: relative;
    border: 1px solid var(--sb-border-soft);
    border-radius: var(--sb-radius-lg);
    background: linear-gradient(155deg, rgba(255, 240, 225, 0.14) 0%, rgba(255, 240, 225, 0.05) 100%);
    box-shadow: var(--sb-shadow-md);
    backdrop-filter: var(--sb-blur-lg);
    -webkit-backdrop-filter: var(--sb-blur-lg);
    cursor: pointer;
    transition: transform var(--sb-transition-fast), box-shadow var(--sb-transition-fast), border-color var(--sb-transition-fast);
    overflow: hidden;
}

.cust-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 64px rgba(10, 4, 7, 0.58);
    border-color: rgba(255, 215, 180, 0.28);
}

.cust-card__header {
    padding: 0.9rem 1.05rem 0.65rem;
    border-bottom: 1px solid var(--sb-border-soft);
    background: rgba(255, 240, 220, 0.05);
}

.cust-card__name {
    font-weight: 700;
    color: #ffe8cc;
    font-size: 1.05rem;
    display: block;
}

.cust-card__body {
    padding: 0.75rem 1.05rem 0.9rem;
    display: grid;
    gap: 0.38rem;
}

.cust-card__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.87rem;
    color: var(--sb-text-muted);
}

.cust-card__row--last {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--sb-border-soft);
}

.cust-card__icon {
    flex-shrink: 0;
    width: 1.1rem;
    text-align: center;
    opacity: 0.6;
}

.cust-card__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.65;
    flex-shrink: 0;
}

.cust-card__value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   Customer Detail Side-Panel
   ═══════════════════════════════════════════════════ */

.cust-detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 5, 8, 0.58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 400;
    animation: sb-fade-in 220ms ease both;
}

.cust-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(460px, 100vw);
    z-index: 401;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--sb-border);
    background: linear-gradient(168deg, rgba(38, 19, 25, 0.98), rgba(21, 16, 14, 0.98));
    backdrop-filter: var(--sb-blur-lg);
    -webkit-backdrop-filter: var(--sb-blur-lg);
    box-shadow: -16px 0 64px rgba(8, 3, 5, 0.68);
    animation: sb-slide-in-right 270ms var(--sb-transition) both;
    overflow: hidden;
}

@keyframes sb-slide-in-right {
    from { transform: translateX(100%); opacity: 0.3; }
    to   { transform: translateX(0);    opacity: 1; }
}

.cust-detail-panel__inner {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 180, 0.18) transparent;
}

.cust-detail-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.15rem 1.35rem 0.95rem;
    border-bottom: 1px solid var(--sb-border-soft);
    position: sticky;
    top: 0;
    background: rgba(21, 16, 14, 0.97);
    z-index: 1;
}

.cust-detail-panel__title {
    margin: 0;
    font-size: 1.25rem;
    color: #ffe8cc;
    font-weight: 700;
}

.cust-detail-panel__head-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.cust-detail-section {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--sb-border-soft);
}

.cust-detail-section--appts {
    border-bottom: none;
}

.cust-detail__section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--sb-text-muted);
    font-weight: 700;
}

.cust-detail__contact-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--sb-text-primary);
    margin-bottom: 0.3rem;
}

.cust-detail__icon {
    opacity: 0.55;
    width: 1rem;
    text-align: center;
}

.cust-detail__notes-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--sb-text-primary);
    white-space: pre-wrap;
    line-height: 1.58;
}

.cust-detail__notes-textarea {
    font-size: 0.9rem;
    line-height: 1.58;
}

.cust-detail__quick-form {
    display: grid;
    gap: 0;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--sb-text-muted);
    cursor: pointer;
    padding: 0.1rem 0.35rem;
    border-radius: var(--sb-radius-md);
    font-size: 0.85rem;
    line-height: 1;
    transition: color var(--sb-transition-fast), background var(--sb-transition-fast);
}

.btn-icon:hover {
    color: var(--sb-accent-strong);
    background: rgba(255, 215, 180, 0.1);
}

.cust-detail-appts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.cust-detail-appt {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--sb-border-soft);
    border-radius: var(--sb-radius-md);
    background: rgba(255, 240, 220, 0.05);
}

.cust-detail-appt__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.cust-detail-appt__date {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffe8cc;
}

.cust-detail-appt__meta {
    font-size: 0.85rem;
    color: var(--sb-text-muted);
}

.cust-detail-appt__notes {
    margin-top: 0.3rem;
    font-size: 0.82rem;
    color: rgba(220, 195, 168, 0.68);
    font-style: italic;
}

@media (max-width: 575.98px) {
    .cust-search__input {
        width: 140px;
    }

    .cust-card-grid {
        grid-template-columns: 1fr;
    }

    .cust-detail-panel {
        width: 100vw;
    }
}
