/* SalonCloud Design System */
:root {
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-secondary: #8b5cf6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    --color-text: #0f172a;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;

    --sidebar-width: 260px;
    --topbar-height: 64px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition: 150ms cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100%;
}

/* ---- SPLASH ---- */
.splash-screen {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100vh; gap: 16px;
}
.splash-logo { animation: pulse 1.5s infinite; }
.splash-text { color: var(--color-text-secondary); font-size: 14px; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ---- LAYOUT ---- */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
    width: var(--sidebar-width); flex-shrink: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden;
    transition: width var(--transition);
    z-index: 100;
}

.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 12px;
    text-decoration: none;
}
.logo-icon {
    width: 36px; height: 36px; border-radius: 9px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.logo-text { font-weight: 700; font-size: 16px; color: var(--color-text); line-height: 1.2; }
.logo-sub { font-size: 10px; color: var(--color-text-muted); font-weight: 400; }

.sidebar-section { padding: 12px 12px 4px; }
.sidebar-section-label {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--color-text-muted);
    padding: 0 8px 6px;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-md);
    color: var(--color-text-secondary); text-decoration: none;
    font-weight: 500; font-size: 13.5px;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px; cursor: pointer;
}
.nav-item:hover { background: var(--color-border-light); color: var(--color-text); }
.nav-item.active {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
    margin-top: auto; padding: 12px;
    border-top: 1px solid var(--color-border);
}

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
    height: var(--topbar-height); flex-shrink: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.page-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ---- AUTH PAGES ---- */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f0f0ff 0%, #faf5ff 100%);
    padding: 24px;
}
.auth-card {
    background: var(--color-surface); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); padding: 40px;
    width: 100%; max-width: 420px;
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { color: var(--color-text-secondary); font-size: 13.5px; margin-bottom: 28px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md); font-size: 14px;
    background: var(--color-surface); color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: var(--font-sans);
}
.form-control:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.form-control::placeholder { color: var(--color-text-muted); }
select.form-control { appearance: none; cursor: pointer; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 18px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500; font-family: var(--font-sans);
    border: none; cursor: pointer; text-decoration: none;
    transition: all var(--transition); white-space: nowrap;
}
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary {
    background: var(--color-primary); color: white;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary {
    background: var(--color-border-light); color: var(--color-text);
}
.btn-secondary:hover { background: var(--color-border); }
.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { filter: brightness(.9); }
.btn-ghost {
    background: transparent; color: var(--color-text-secondary);
}
.btn-ghost:hover { background: var(--color-border-light); color: var(--color-text); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-full { width: 100%; }
.btn-primary-action {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 18px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500; font-family: var(--font-sans);
    border: none; cursor: pointer; text-decoration: none;
    background: var(--color-primary); color: white;
    transition: all var(--transition);
}
.btn-primary-action:hover { background: var(--color-primary-dark); }

/* ---- CARDS ---- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 600; }

/* ---- STAT CARDS ---- */
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px; position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.stat-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 0; }
.stat-label { font-size: 12px; color: var(--color-text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.stat-change { font-size: 12px; color: var(--color-text-muted); }
.stat-icon {
    position: absolute; right: 16px; top: 16px;
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}

/* ---- TABLE ---- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 2px solid var(--color-border); }
thead th {
    padding: 10px 16px; text-align: left;
    font-size: 11.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--color-text-muted);
    white-space: nowrap;
}
tbody tr {
    border-bottom: 1px solid var(--color-border-light);
    transition: background var(--transition);
}
tbody tr:hover { background: var(--color-border-light); }
tbody td { padding: 12px 16px; font-size: 13.5px; }
tbody tr:last-child { border-bottom: none; }

/* ---- BADGES ---- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 99px;
    font-size: 11.5px; font-weight: 600;
}
.badge-success { background: color-mix(in srgb, var(--color-success) 12%, transparent); color: #065f46; }
.badge-warning { background: color-mix(in srgb, var(--color-warning) 12%, transparent); color: #92400e; }
.badge-danger  { background: color-mix(in srgb, var(--color-danger)  12%, transparent); color: #991b1b; }
.badge-info    { background: color-mix(in srgb, var(--color-info)    12%, transparent); color: #1e40af; }
.badge-neutral { background: var(--color-border); color: var(--color-text-secondary); }
.badge-primary { background: color-mix(in srgb, var(--color-primary) 12%, transparent); color: var(--color-primary-dark); }

/* ---- PAGE HEADER ---- */
.page-header { margin-bottom: 24px; }
.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { color: var(--color-text-secondary); font-size: 13.5px; margin-top: 2px; }

/* ---- EMPTY STATE ---- */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 20px; text-align: center;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--color-text-secondary); font-size: 14px; margin-bottom: 20px; }

/* ---- LOADING SPINNER ---- */
.spinner-wrapper { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- TOASTS ---- */
.toast-container {
    position: fixed; bottom: 24px; right: 24px;
    display: flex; flex-direction: column; gap: 10px; z-index: 9999;
}
.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; background: var(--color-surface);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--color-primary);
    min-width: 300px; max-width: 400px;
    animation: slideUp .2s ease-out;
}
.toast-success { border-left-color: var(--color-success); }
.toast-error   { border-left-color: var(--color-danger); }
.toast-warning { border-left-color: var(--color-warning); }
.toast-message { flex: 1; font-size: 13.5px; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--color-text-muted); padding: 0; font-size: 14px; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- MODAL ---- */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 24px;
    animation: fadeIn .15s ease-out;
}
.modal {
    background: var(--color-surface); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    animation: scaleIn .15s ease-out;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 0; margin-bottom: 16px;
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-body { padding: 0 24px; }
.modal-footer { padding: 20px 24px; display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ---- GRID ---- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px) { .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; } }

/* ---- SEARCH ---- */
.search-box {
    position: relative; display: flex; align-items: center;
}
.search-icon {
    position: absolute; left: 10px; color: var(--color-text-muted);
    pointer-events: none; width: 15px; height: 15px;
}
.search-input {
    padding-left: 34px;
    background: var(--color-border-light);
    border: 1px solid transparent;
}
.search-input:focus { background: var(--color-surface); }

/* ---- AVATAR ---- */
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }

/* ---- UTILITIES ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 12.5px; }
.text-muted { color: var(--color-text-secondary); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }

/* ---- ERROR ---- */
.validation-message { color: var(--color-danger); font-size: 12px; margin-top: 4px; }
.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 13.5px; margin-bottom: 16px; }
.alert-danger { background: color-mix(in srgb, var(--color-danger) 10%, transparent); color: #991b1b; border: 1px solid color-mix(in srgb, var(--color-danger) 25%, transparent); }
.alert-warning { background: color-mix(in srgb, var(--color-warning) 12%, transparent); color: #92400e; border: 1px solid color-mix(in srgb, var(--color-warning) 30%, transparent); }
.alert-success { background: color-mix(in srgb, var(--color-success) 10%, transparent); color: #065f46; border: 1px solid color-mix(in srgb, var(--color-success) 25%, transparent); }

/* ---- BLAZOR ERROR ---- */
#blazor-error-ui {
    background: #fef2f2; color: #991b1b;
    padding: 12px 20px; text-align: center;
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 9999; display: none; font-size: 13.5px;
    border-top: 1px solid #fca5a5;
}
#blazor-error-ui a { color: #991b1b; font-weight: 600; }
.loading-progress { position: absolute; display: block; width: 8rem; height: 8rem; inset: 20vh 0 auto 0; margin: 0 auto; }
.loading-progress circle { fill: none; stroke: var(--color-border); stroke-width: .6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--color-primary); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage,0%) * .8), 500%; transition: stroke-dasharray .05s ease; }
.loading-progress-text { position: absolute; text-align: center; font-weight: bold; inset: calc(20vh + 3.25rem) 0 auto .2rem; }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

/* ---- EXTRA VARIABLES ---- */
:root { --color-surface-2: #f1f5f9; }

/* ---- PROFILE GRID (2-col on desktop, 1-col on mobile) ---- */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

/* ---- SIDEBAR HEADER (logo + close btn row) ---- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
}
.sidebar-header .sidebar-logo { flex: 1; }

/* ---- SIDEBAR OVERLAY (backdrop when open on mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
    animation: fadeIn .15s ease-out;
}

/* ---- HAMBURGER (hidden on desktop) ---- */
.hamburger-btn { display: none !important; }

/* ---- SIDEBAR CLOSE BUTTON (hidden on desktop) ---- */
.sidebar-close-btn { display: none !important; }

/* ---- EXTRA UTILITIES ---- */
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.w-auto { width: auto; }
.shrink-0 { flex-shrink: 0; }

/* ======================================================
   NOTIFICATION BELL + DROPDOWN
   ====================================================== */
.notif-bell-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
}

.notif-dropdown {
    position: fixed;
    top: var(--topbar-height);
    right: 16px;
    width: 360px;
    max-height: 480px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.notif-empty {
    padding: 40px 16px;
    text-align: center;
}

.notif-list {
    overflow-y: auto;
    flex: 1;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border-light);
    transition: background var(--transition);
}

.notif-item:last-child { border-bottom: none; }

.notif-item:hover { background: var(--color-bg); }

.notif-item--failed { background: #fff5f5; }
.notif-item--failed:hover { background: #fff0f0; }

.notif-item-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
    margin-top: 2px;
}

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-subject {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text);
    margin-bottom: 2px;
}

.notif-item-text {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

.notif-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ======================================================
   MOBILE RESPONSIVE  (≤ 768px)
   ====================================================== */
@media (max-width: 768px) {

    /* Sidebar becomes a fixed overlay drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100dvh;
        width: 280px;
        transform: translateX(-100%);
        transition: transform .25s cubic-bezier(.4,0,.2,1);
        z-index: 200;
        box-shadow: var(--shadow-lg);
    }

    /* Slide sidebar in when open */
    .app-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Show overlay when sidebar is open */
    .app-shell.sidebar-open .sidebar-overlay {
        display: block;
    }

    /* Hamburger button visible on mobile */
    .hamburger-btn { display: inline-flex !important; }

    /* Sidebar close button visible on mobile */
    .sidebar-close-btn { display: inline-flex !important; }

    /* Reduce page padding */
    .page-content { padding: 12px; }

    /* Topbar adjustments */
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar-email { display: none; }
    .topbar-signout-label { display: none; }

    /* Auth card — tighter padding on mobile */
    .auth-card { padding: 28px 20px; }

    /* Toast — full-width bottom strip */
    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    .toast { min-width: auto; max-width: 100%; }

    /* Modal — bottom sheet on mobile */
    .modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }
    .modal {
        max-height: 92dvh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-width: 100%;
    }

    /* Profile 2-col → single column */
    .profile-grid { grid-template-columns: 1fr; }

    /* Page header actions stack below title */
    .page-header-row { flex-direction: column; align-items: stretch; gap: 12px; }

    /* Stat cards — 2-up on mobile instead of stacking completely */
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    /* Search + button row wrap on small screens */
    .flex.gap-2 { flex-wrap: wrap; }

    /* Notification dropdown — full-width on mobile */
    .notif-dropdown {
        right: 8px;
        left: 8px;
        width: auto;
    }
}

/* ---- ADMIN: charts, filters ---- */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; width: 100%; padding-top: 8px; }
.bar-col { flex: 1; height: 100%; min-width: 0; display: flex; align-items: flex-end; }
.bar { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; opacity: .85; transition: height .2s ease, opacity .15s ease; }
.bar-col:hover .bar { opacity: 1; }
.bar-labels { display: flex; gap: 3px; margin-top: 6px; }
.bar-label { flex: 1; min-width: 0; text-align: center; font-size: 10px; color: var(--color-text-muted); white-space: nowrap; }

.filters-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters-bar select.form-control { width: auto; min-width: 140px; padding-right: 28px; }

.text-right { text-align: right; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.hbar-track { height: 8px; border-radius: 4px; background: var(--color-border-light); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 4px; }

.kv-grid { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv-grid dt { color: var(--color-text-muted); }
.kv-grid dd { margin: 0; word-break: break-word; }

.secret-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px; letter-spacing: .03em; padding: 12px 14px; border-radius: var(--radius-md);
    background: var(--color-border-light); border: 1px dashed var(--color-border); user-select: all; word-break: break-all;
}

/* ======================================================
   PUBLIC SITE (signed-out): header, landing, directory, salon cards
   ====================================================== */

/* ---- Header ---- */
.public-header { position: sticky; top: 0; z-index: 100; height: 64px;
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--color-border); }
.public-header-inner { max-width: 1160px; height: 100%; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.public-header-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.public-header-actions { display: flex; align-items: center; gap: 8px; }
.public-header-link { padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--color-text-secondary);
    text-decoration: none; border-radius: var(--radius-md); transition: color var(--transition), background var(--transition); }
.public-header-link:hover { color: var(--color-text); background: var(--color-border-light); }
@media (max-width: 760px) { .public-header-owner { display: none; } }
@media (max-width: 520px) { .public-header-inner { padding: 0 12px; } .public-header-link { display: none; } }

/* ---- Landing hero ---- */
.lp-hero { position: relative; overflow: hidden; padding: 64px 20px 44px; text-align: center;
    background:
        radial-gradient(60% 80% at 15% 0%, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent 70%),
        radial-gradient(50% 70% at 90% 10%, color-mix(in srgb, var(--color-secondary) 16%, transparent), transparent 70%),
        var(--color-surface);
    border-bottom: 1px solid var(--color-border); }
.lp-hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.lp-eyebrow { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; color: var(--color-primary-dark);
    background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
    border: 1px solid color-mix(in srgb, var(--color-primary) 22%, transparent); }
.lp-hero h1 { margin: 18px 0 12px; font-size: clamp(32px, 6vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; }
.lp-accent { background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero p { margin: 0 auto 28px; max-width: 480px; font-size: 17px; line-height: 1.55; color: var(--color-text-secondary); }

.lp-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto;
    padding: 8px 8px 8px 18px; background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 999px; box-shadow: var(--shadow-lg);
    transition: border-color var(--transition), box-shadow var(--transition); }
.lp-search:focus-within { border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent); }
.lp-search-icon { flex-shrink: 0; color: var(--color-text-muted); }
.lp-search-input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: none;
    font: inherit; font-size: 16px; color: var(--color-text); }
.lp-search-btn { flex-shrink: 0; height: 44px; padding: 0 26px; border-radius: 999px; }

.lp-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.lp-cat { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px;
    font-size: 14px; font-weight: 500; color: var(--color-text); text-decoration: none;
    background: var(--color-surface); border: 1px solid var(--color-border);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.lp-cat:hover { transform: translateY(-2px); border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.lp-trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 24px 0 0; padding: 0;
    font-size: 13px; font-weight: 500; color: var(--color-text-secondary); }
@media (max-width: 600px) {
    .lp-hero { padding: 40px 16px 32px; }
    .lp-hero p { font-size: 15.5px; }
    .lp-search { border-radius: var(--radius-xl); flex-wrap: wrap; padding: 10px 12px; }
    .lp-search-input { flex-basis: calc(100% - 40px); }
    .lp-search-btn { width: 100%; border-radius: var(--radius-lg); }
}

/* ---- Page container + section header ---- */
.dir { max-width: 1160px; margin: 0 auto; padding: 32px 20px 56px; }
.lp-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.lp-section-head h1, .lp-section-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.lp-section-head p { margin: 4px 0 0; font-size: 14px; color: var(--color-text-secondary); }
.lp-section-head a { font-size: 14px; font-weight: 600; color: var(--color-primary); text-decoration: none; white-space: nowrap; }
.lp-section-head a:hover { text-decoration: underline; }
.lp-more { text-align: center; margin-top: 28px; }

/* ---- Directory: search + filters ---- */
.dir-search-bar { position: sticky; top: 64px; z-index: 50; margin: -8px -20px 8px; padding: 12px 20px 10px;
    background: color-mix(in srgb, var(--color-bg) 92%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dir-search { position: relative; }
.dir-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.dir-search-input { width: 100%; height: 54px; padding: 0 48px 0 50px; font: inherit; font-size: 16px; color: var(--color-text);
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition); }
.dir-search-input:focus { outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent); }
.dir-search-clear { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px;
    border: 0; border-radius: 50%; background: var(--color-border-light); color: var(--color-text-secondary); font-size: 12px; cursor: pointer; }
.dir-search-clear:hover { background: var(--color-border); }
.dir-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.dir-filters .form-control { width: auto; min-width: 150px; height: 38px; padding: 0 12px; font-size: 13.5px; border-radius: 999px; }
.dir-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.dir-chips::-webkit-scrollbar { display: none; }
.dir-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 999px;
    font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--color-text-secondary);
    background: var(--color-surface); border: 1px solid var(--color-border);
    transition: border-color var(--transition), color var(--transition), background var(--transition); }
.dir-chip:hover { border-color: var(--color-primary); color: var(--color-text); }
.dir-chip.active { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
.dir-meta { min-height: 22px; padding: 10px 2px 0; font-size: 13px; color: var(--color-text-secondary); }
@media (max-width: 600px) {
    .dir { padding: 20px 16px 40px; }
    .dir-search-bar { margin: -4px -16px 8px; padding: 10px 16px 8px; top: 64px; }
    .dir-filters .form-control { flex: 1 1 140px; }
}

/* ---- Salon cards ---- */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.sc { display: flex; flex-direction: column; overflow: hidden; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: 18px;
    transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms, border-color 220ms; }
.sc:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -12px rgba(15,23,42,.18); border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border)); }
.sc-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; --hue: 250;
    background: linear-gradient(135deg, hsl(var(--hue) 72% 60%), hsl(calc(var(--hue) + 45) 70% 46%)); }
.sc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.2,.8,.2,1); }
.sc:hover .sc-media img { transform: scale(1.05); }
.sc-initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: rgba(255,255,255,.92); text-shadow: 0 4px 20px rgba(0,0,0,.18); }
.sc-open, .sc-rating { position: absolute; top: 12px; display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.sc-open { left: 12px; }
.sc-open i { width: 7px; height: 7px; border-radius: 50%; background: var(--color-text-muted); }
.sc-open.is-open { color: #065f46; } .sc-open.is-open i { background: var(--color-success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-success) 25%, transparent); }
.sc-open.is-closed { color: var(--color-text-secondary); }
.sc-rating { right: 12px; color: #92400e; }
.sc-body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 16px 18px 18px; }
.sc-head { display: flex; align-items: flex-start; gap: 10px; }
.sc-logo { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-surface); box-shadow: var(--shadow-sm); }
.sc-title { flex: 1; min-width: 0; }
.sc-title h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -.005em; }
.sc-title h3 a { color: inherit; text-decoration: none; }
.sc-title h3 a:hover { color: var(--color-primary); }
.sc-sub { margin-top: 2px; font-size: 12.5px; color: var(--color-text-muted); }
.sc-new { color: var(--color-primary); font-weight: 500; }
.sc-price { flex-shrink: 0; text-align: right; font-size: 15px; font-weight: 700; line-height: 1.1; }
.sc-price small { display: block; font-size: 11px; font-weight: 500; color: var(--color-text-muted); }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-tags span { padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--color-text-secondary); background: var(--color-border-light); }
.sc-tags .more { color: var(--color-primary); font-weight: 600; }
.sc-desc { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--color-text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--color-text-secondary); }
.sc-facts li { display: flex; gap: 8px; align-items: baseline; }
.sc-facts span { flex-shrink: 0; }
.sc-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: auto; padding-top: 4px; }
.sc-actions .btn { justify-content: center; text-align: center; }
.sc-skeleton { pointer-events: none; }
.sc-skeleton .sc-media { background: var(--color-border-light); }
.sk-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--color-border-light), var(--color-border), var(--color-border-light)); background-size: 200% 100%; animation: sk-shimmer 1.2s infinite linear; }
.sk-line.w60 { width: 60%; } .sk-line.w90 { width: 90%; } .sk-line.w40 { width: 40%; }
@keyframes sk-shimmer { to { background-position: -200% 0; } }
@media (max-width: 600px) { .sc-grid { grid-template-columns: 1fr; gap: 18px; } }
@media (prefers-reduced-motion: reduce) { .sc, .sc-media img, .lp-cat { transition: none; } .sc:hover, .lp-cat:hover { transform: none; } .sk-line { animation: none; } }

/* ---- How it works / owner CTA / footer ---- */
.lp-how { margin-top: 64px; text-align: center; }
.lp-how h2 { margin: 0 0 24px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.lp-how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; text-align: left; }
.lp-how-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; }
.lp-how-grid span { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 10px;
    font-weight: 700; font-size: 14px; color: var(--color-primary-dark); background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface)); }
.lp-how-grid small { font-size: 13.5px; color: var(--color-text-secondary); line-height: 1.5; }
.lp-owner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding: 32px;
    border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--color-primary-dark), var(--color-secondary)); }
.lp-owner h2 { margin: 0 0 6px; font-size: 22px; }
.lp-owner p { margin: 0; max-width: 460px; font-size: 14.5px; opacity: .92; }
.lp-owner .btn { background: #fff; color: var(--color-primary-dark); border: 0; font-weight: 600; padding: 12px 24px; }
.lp-owner .btn:hover { background: #f1f5f9; }
.lp-owner-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lp-owner-link { color: #fff; font-weight: 500; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.lp-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 1160px; margin: 0 auto; padding: 24px 20px 40px;
    border-top: 1px solid var(--color-border); font-size: 13px; color: var(--color-text-muted); }
.lp-footer nav { display: flex; gap: 18px; }
.lp-footer a { color: var(--color-text-secondary); text-decoration: none; }
.lp-footer a:hover { color: var(--color-primary); }

/* Phone input with fixed +27 prefix */
.phone-field { display: flex; align-items: stretch; }
.phone-prefix { display: inline-flex; align-items: center; padding: 0 12px; white-space: nowrap; font-size: 14px; font-weight: 500;
    color: var(--color-text-secondary); background: var(--color-border-light);
    border: 1px solid var(--color-border); border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.phone-field .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-hint { display: block; margin-top: 4px; font-size: 12px; color: var(--color-text-muted); }

/* ---- ACCESSIBILITY & POLISH ---- */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn:focus-visible, .nav-item:focus-visible, .form-control:focus-visible { outline-offset: 1px; }
.btn:disabled { cursor: not-allowed; }
::selection { background: color-mix(in srgb, var(--color-primary) 22%, transparent); }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
td a:not(.btn) { text-decoration: none; }
td a:not(.btn):hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
    .sidebar, .topbar, .sidebar-overlay, .filters-bar, #blazor-error-ui { display: none !important; }
    .main-content { margin: 0 !important; }
}

/* ---- AUTH & FORM POLISH ---- */
.auth-logo, .sidebar-logo { text-decoration: none; color: inherit; }
.auth-card { padding: 40px 36px; }
@media (max-width: 480px) { .auth-card { padding: 28px 20px; } .auth-page { padding: 12px; align-items: flex-start; } }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--color-text-secondary); }
.auth-switch a { color: var(--color-primary); font-weight: 500; }
.auth-guest { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--color-border); text-align: center; }
.auth-guest p { font-size: 12px; color: var(--color-text-muted); margin-bottom: 10px; }
.field-error, .validation-message { display: block; margin-top: 4px; font-size: 12px; color: var(--color-danger); }
.form-control.invalid, .form-control.invalid:focus { border-color: var(--color-danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 15%, transparent); }
.password-field { position: relative; }
.password-field .form-control { padding-right: 64px; }
.password-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; padding: 6px 8px; font: inherit; font-size: 12px; font-weight: 500;
    color: var(--color-primary); cursor: pointer; border-radius: var(--radius-sm);
}
.password-toggle:hover { background: var(--color-border-light); }
.btn .spinner-sm { margin-right: 6px; }
.btn svg { flex-shrink: 0; }

/* ---- AUTH FORM EXTRAS ---- */
.alert-info { background: color-mix(in srgb, var(--color-info) 10%, transparent); color: #1e40af; border: 1px solid color-mix(in srgb, var(--color-info) 25%, transparent); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label-row .form-label { margin-bottom: 6px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--color-primary); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.help-box { background: var(--color-surface-2); border-radius: var(--radius-md); padding: 8px 10px; line-height: 1.5; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-secondary); margin-bottom: 16px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--color-primary); }
.form-section { border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
.form-section legend { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); margin-bottom: 10px; padding: 0; }
.hint-ok { color: var(--color-success); font-weight: 500; }
.auth-card { max-width: 460px; }

/* ---- SEGMENTED CONTROL ---- */
.seg { display: inline-flex; background: var(--color-surface-2); border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.seg-btn { border: 0; background: none; padding: 6px 14px; border-radius: calc(var(--radius-md) - 2px); font: inherit; font-size: 13px; color: var(--color-text-secondary); cursor: pointer; }
.seg-btn:hover { color: var(--color-text); }
.seg-btn.is-active { background: var(--color-surface); color: var(--color-primary); font-weight: 600; box-shadow: var(--shadow-sm); }
.text-right { text-align: right; }
