/* ═══════════════════════════════════════════════════════════════
   SalonApp — Design System
   Primary:  #4A6741  Deep Olive Green
   Gold:     #C9A84C  Warm Gold
   Surface:  #F4F6EE  Warm Off-White
   Dark:     #2C3A1E  Deep Forest
   ═══════════════════════════════════════════════════════════════ */

/* ── Color Tokens ─────────────────────────────────────────────── */
:root {
    --color-primary: #4A6741;
    --color-primary-dark: #3A5232;
    --color-primary-deeper: #2C3A1E;
    --color-primary-light: #6B8F61;
    --color-gold: #C9A84C;
    --color-gold-light: #F0D98A;
    --color-gold-dark: #A8852C;
    --color-bg-app: #F4F6EE;
    --color-bg-card: #FFFFFF;
    --color-bg-card-alt: #FAFDF6;
    --color-bg-input: #F7F9F2;
    --color-bg-muted: #EEF2E6;
    --color-text: #1A2410; /* canonical primary text — use this for body copy */
    --color-text-dark: #1A2410; /* same value, kept for backward compat */
    --color-text-mid: #3A4A2A; /* defined but reserved — use --color-text-soft instead */
    --color-text-soft: #5A6E4A;
    --color-text-muted: #5A6E4A;
    --color-border: #D4DEC0;
    --color-border-light: #E8EDDA;
    --color-scheduled: #1565C0;
    --color-scheduled-bg: #E3F2FD;
    --color-inprogress: #B5841A; /* warm amber — between gold-dark and orange, stays in olive/gold family */
    --color-inprogress-bg: #FBF3E0;
    --color-completed: #2E7D32;
    --color-completed-bg: #E8F5E9;
    --color-cancelled: #C0392B;
    --color-cancelled-bg: #FFEBEE;
    --color-noshow: #6A1B9A;
    --color-noshow-bg: #F3E5F5;
    --color-paid: #2E7D32;
    --color-paid-bg: #E8F5E9;
    --color-unpaid: #C62828;
    --color-unpaid-bg: #FFEBEE;
    --color-partial: #E65100;
    --color-partial-bg: #FFF3E0;
    --shadow-xs: 0 1px 2px rgba(44,58,30,0.08);
    --shadow-sm: 0 1px 4px rgba(44,58,30,0.10);
    --shadow-md: 0 4px 12px rgba(44,58,30,0.13);
    --shadow-lg: 0 8px 24px rgba(44,58,30,0.16);
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;
    --text-xs: clamp(10px,2.5vw,11px);
    --text-sm: clamp(12px,3vw,13px);
    --text-base: clamp(13px,3.5vw,15px);
    --text-md: clamp(15px,4vw,17px);
    --text-lg: clamp(17px,4.5vw,19px);
    --text-xl: clamp(20px,5vw,24px);
    --text-2xl: clamp(24px,6vw,28px);
    --keyboard-height: 0px;
    --viewport-height: 100vh;
    /* ── Legacy aliases — do not use in new code ─────────────────
       These exist only for backward compat. Use the --color-* tokens above. */
    --olive-primary: var(--color-primary);
    --olive-dark: var(--color-primary-dark);
    --olive-deeper: var(--color-primary-deeper);
    --olive-light: var(--color-primary-light);
    --olive-surface: var(--color-bg-app);
    --olive-white: var(--color-bg-card-alt);
    --text-primary: var(--color-text);
    --text-secondary: var(--color-text-soft);
    --text-muted: var(--color-text-muted);
    --border-color: var(--color-border);
    /* ── Snackbar / Alert severity — theme-aligned ── */
    --mud-palette-success: #3E7A3F;
    --mud-palette-success-text: #FFFFFF;
    --mud-palette-success-darken: #2E5C2F;
    --mud-palette-success-lighten: #E8F3E8;
    --mud-palette-error: #B23A2E;
    --mud-palette-error-text: #FFFFFF;
    --mud-palette-error-darken: #8C2C22;
    --mud-palette-error-lighten: #FBEAE8;
    --mud-palette-warning: #B5841A;
    --mud-palette-warning-text: #FFFFFF;
    --mud-palette-warning-darken: #8F6714;
    --mud-palette-warning-lighten: #FBF3E0;
    --mud-palette-info: #4A6741;
    --mud-palette-info-text: #FFFFFF;
    --mud-palette-info-darken: #384F31;
    --mud-palette-info-lighten: #EEF2EC;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html, body {
    font-family: 'Roboto','Segoe UI',system-ui,-apple-system,sans-serif;
    background: var(--color-bg-app);
    color: var(--color-text-dark);
    height: 100%;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased
}

/* MudBlazor */
.mud-theme-primary {
    background-color: var(--color-primary) !important
}

.mud-button-root.mud-button-filled-primary {
    background-color: var(--color-primary) !important
}

    .mud-button-root.mud-button-filled-primary:hover {
        background-color: var(--color-primary-dark) !important
    }

.mud-input-label.mud-input-label-inputcontrol {
    color: var(--color-text-soft) !important
}

.mud-input.mud-input-underline:after {
    border-bottom-color: var(--color-primary) !important
}

.mud-input-outlined:focus-within fieldset {
    border-color: var(--color-primary) !important
}

.mud-chip.mud-chip-color-primary {
    background-color: var(--color-primary) !important
}

.mud-tab-active {
    color: var(--color-primary) !important;
    border-bottom-color: var(--color-primary) !important
}

.mud-tabs-tabbar {
    background: white !important;
    border-bottom: 1px solid var(--color-border) !important
}

.mud-progress-linear-bar {
    background-color: var(--color-primary) !important
}

.mud-icon-root.mud-primary-text {
    color: var(--color-primary) !important
}

.mud-snackbar {
    border-radius: var(--radius-md, 10px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.14) !important;
    font-weight: 600 !important;
    letter-spacing: .1px;
}

    .mud-snackbar .mud-snackbar-content-message {
        font-size: var(--text-sm, 13px);
    }

    .mud-snackbar .mud-icon-root {
        opacity: .92;
    }

/* App Shell */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    background: var(--color-bg-app);
    overflow: hidden
}

/* Top Bar */
.top-bar {
    background: linear-gradient(135deg,var(--color-primary) 0%,var(--color-primary-deeper) 100%);
    color: white;
    padding: 0 clamp(12px,4vw,20px);
    height: clamp(52px,14vw,62px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
    flex-shrink: 0
}

.top-bar-title {
    font-size: var(--text-md);
    font-weight: 800;
    letter-spacing: -0.3px
}

.top-bar-subtitle {
    font-size: var(--text-xs);
    opacity: .72;
    font-weight: 400;
    margin-top: 1px
}

.top-bar-icon {
    color: rgba(255,255,255,.9) !important
}

/* Page scroll */
.page-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: clamp(10px,3vw,16px);
    padding-bottom: clamp(80px,20vw,100px)
}

    .page-scroll::-webkit-scrollbar {
        display: none
    }

/* List page shell */
.list-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden
}

.list-topbar {
    padding: clamp(8px,3vw,14px) clamp(12px,4vw,16px) clamp(6px,2vw,10px);
    background: var(--color-bg-app);
    flex-shrink: 0;
    border-bottom: 1px solid var(--color-border-light)
}

.list-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 clamp(12px,4vw,16px) clamp(80px,20vw,96px)
}

    .list-scroll::-webkit-scrollbar {
        display: none
    }

/* Bottom Nav — pill active */
.bottom-nav {
    height: clamp(60px,16vw,72px);
    background: white;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-shrink: 0;
    box-shadow: 0 -2px 12px rgba(44,58,30,.08);
    z-index: 200;
    padding: 0 4px
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: clamp(4px,1.5vw,8px) clamp(10px,3vw,16px);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .18s ease;
    min-width: 52px
}

    .nav-item .nav-icon {
        font-size: clamp(20px,5.5vw,24px);
        transition: transform .18s ease;
        font-variation-settings: 'FILL' 0
    }

    .nav-item .nav-label {
        font-size: clamp(9px,2.5vw,10px);
        font-weight: 600;
        letter-spacing: .2px
    }

    .nav-item.active {
        color: var(--color-primary);
        background: var(--color-bg-muted)
    }

        .nav-item.active .nav-icon {
            font-variation-settings: 'FILL' 1;
            transform: scale(1.08)
        }

        .nav-item.active .nav-label {
            font-weight: 800
        }

/* Search bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 0 clamp(12px,3vw,16px);
    height: clamp(40px,11vw,48px);
    gap: 8px;
    transition: border-color .2s
}

    .search-bar:focus-within {
        border-color: var(--color-primary)
    }

    .search-bar input {
        flex: 1;
        border: none;
        outline: none;
        font-size: var(--text-sm);
        color: var(--color-text-dark);
        background: transparent
    }

.search-icon {
    color: var(--color-text-muted);
    font-size: clamp(16px,4.5vw,20px)
}

/* Filter chips */
.chip-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none
}

    .chip-row::-webkit-scrollbar {
        display: none
    }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: clamp(4px,1.5vw,6px) clamp(10px,3vw,14px);
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-soft);
    white-space: nowrap;
    cursor: pointer;
    transition: all .15s ease;
    flex-shrink: 0
}

    .chip:active {
        transform: scale(.96)
    }

    .chip.active {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: white
    }

    .chip.chip-warn.active {
        background: #E65100;
        border-color: #E65100
    }

/* Small bordered action button — for secondary topbar actions like "Manage Categories"
   that need to read as a tappable button, not blend in as plain text. */
.btn-pill-outline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: clamp(6px,2vw,8px) clamp(12px,3vw,14px);
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all .15s ease;
    flex-shrink: 0
}

    .btn-pill-outline:active {
        transform: scale(.96);
        background: var(--color-bg-muted)
    }

/* Date group header */
.date-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: clamp(10px,3vw,14px) 0 clamp(6px,2vw,8px);
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--color-bg-app);
}

.date-group-line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
    min-width: 0;
}

.date-group-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: fit-content;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 3px 13px 3px 12px;
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: var(--shadow-xs);
    white-space: nowrap;
}

/* List card */
.list-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-border);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform .12s ease,box-shadow .12s ease;
}

    .list-card:active {
        transform: scale(.985);
        box-shadow: var(--shadow-xs)
    }

    .list-card.border-scheduled {
        border-left-color: var(--color-scheduled)
    }

    .list-card.border-inprogress {
        border-left-color: var(--color-inprogress)
    }

    .list-card.border-completed {
        border-left-color: var(--color-completed)
    }

    .list-card.border-cancelled {
        border-left-color: var(--color-cancelled)
    }

    .list-card.border-paid {
        border-left-color: var(--color-paid)
    }

    .list-card.border-unpaid {
        border-left-color: var(--color-unpaid)
    }

    .list-card.border-partial {
        border-left-color: var(--color-partial)
    }

    .list-card.border-gold {
        border-left-color: var(--color-gold)
    }

    .list-card.border-olive {
        border-left-color: var(--color-primary)
    }

.list-card-inner {
    padding: clamp(10px,3vw,14px) clamp(12px,3.5vw,16px);
    display: flex;
    align-items: center;
    gap: clamp(8px,3vw,12px)
}

/* Avatar */
.avatar {
    width: clamp(38px,10vw,46px);
    height: clamp(38px,10vw,46px);
    border-radius: 50%;
    background: linear-gradient(135deg,var(--color-primary),var(--color-primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(15px,4vw,18px);
    font-weight: 800;
    flex-shrink: 0
}

.avatar-gold {
    background: linear-gradient(135deg,var(--color-gold-dark),var(--color-gold))
}

.avatar-dark {
    background: linear-gradient(135deg,var(--color-primary-deeper),var(--color-primary))
}

.avatar-sm {
    width: clamp(30px,8vw,36px);
    height: clamp(30px,8vw,36px);
    font-size: clamp(12px,3.5vw,14px)
}

.avatar-lg {
    width: clamp(48px,13vw,56px);
    height: clamp(48px,13vw,56px);
    font-size: clamp(19px,5vw,22px)
}

/* Skeleton */
@keyframes skel-pulse {
    0%,100% {
        opacity: 1
    }

    50% {
        opacity: .4
    }
}

.skel {
    background: var(--color-border-light);
    border-radius: var(--radius-xs);
    animation: skel-pulse 1.4s ease-in-out infinite
}

.skel-circle {
    border-radius: 50%
}

.skel-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-border-light);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    padding: clamp(10px,3vw,14px) clamp(12px,3.5vw,16px);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px
}

.skel-date-pill {
    height: 22px;
    width: 80px;
    border-radius: var(--radius-full);
    margin: 12px auto 8px
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(32px,10vw,56px) clamp(16px,5vw,28px);
    text-align: center
}

.empty-icon-wrap {
    width: clamp(64px,18vw,80px);
    height: clamp(64px,18vw,80px);
    border-radius: 50%;
    background: var(--color-bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(14px,4vw,20px)
}

    .empty-icon-wrap .material-symbols-rounded {
        font-size: clamp(30px,8vw,36px);
        color: var(--color-text-muted)
    }

.empty-title {
    font-size: var(--text-md);
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: 6px
}

.empty-sub {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 260px
}

.empty-icon {
    font-size: 48px;
    opacity: .22;
    margin-bottom: 12px
}

/* List footer */
.list-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: clamp(14px,4vw,20px) 0 clamp(8px,2vw,12px);
    color: var(--color-text-muted)
}

.list-footer-line {
    flex: 1;
    height: 1px;
    background: var(--color-border-light)
}

.list-footer-text {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: .4px;
    white-space: nowrap
}

.list-footer-spinner {
    display: flex;
    justify-content: center;
    padding: 16px 0
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: clamp(2px,.8vw,3px) clamp(8px,2.5vw,10px);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: .2px;
    white-space: nowrap
}

.badge-scheduled {
    background: var(--color-scheduled-bg);
    color: var(--color-scheduled)
}

.badge-inprogress {
    background: var(--color-inprogress-bg);
    color: var(--color-inprogress)
}

.badge-completed {
    background: var(--color-completed-bg);
    color: var(--color-completed)
}

.badge-cancelled {
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled)
}

.badge-noshow {
    background: var(--color-noshow-bg);
    color: var(--color-noshow)
}

.badge-paid {
    background: var(--color-paid-bg);
    color: var(--color-paid)
}

.badge-unpaid {
    background: var(--color-unpaid-bg);
    color: var(--color-unpaid)
}

.badge-partial {
    background: var(--color-partial-bg);
    color: var(--color-partial)
}

/* FAB */
.fab {
    position: fixed;
    bottom: calc(clamp(60px,16vw,72px) + clamp(14px,4vw,20px) + var(--keyboard-height,0px));
    right: clamp(14px,4vw,20px);
    width: clamp(50px,13vw,58px);
    height: clamp(50px,13vw,58px);
    border-radius: 50%;
    background: linear-gradient(135deg,var(--color-gold),var(--color-gold-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(201,168,76,.45);
    cursor: pointer;
    font-size: clamp(22px,6vw,26px);
    z-index: 150;
    border: none;
    transition: transform .18s ease,box-shadow .18s ease
}

    .fab:active {
        transform: scale(.92)
    }

.fab-secondary {
    background: var(--color-bg-card);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--color-primary)
}

.fab-row {
    position: fixed;
    bottom: calc(clamp(60px,16vw,72px) + clamp(14px,4vw,20px));
    right: clamp(14px,4vw,20px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 150
}

/* Cards */
.salon-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    margin-bottom: 12px;
    overflow: hidden
}

    .salon-card:active {
        transform: scale(.985)
    }

.salon-card-header {
    background: linear-gradient(135deg,var(--color-primary),var(--color-primary-deeper));
    color: white;
    padding: clamp(12px,3.5vw,16px) clamp(14px,4vw,18px)
}

.salon-card-body {
    padding: clamp(12px,3.5vw,16px) clamp(14px,4vw,18px)
}

.salon-card-footer {
    padding: clamp(8px,2.5vw,12px) clamp(14px,4vw,18px);
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-card-alt)
}

/* Auth */
.auth-screen {
    height: 100dvh;
    background: linear-gradient(160deg,var(--color-primary-deeper) 0%,var(--color-primary) 45%,var(--color-primary-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end
}

.auth-card {
    width: 100%;
    background: white;
    border-radius: 28px 28px 0 0;
    padding: clamp(24px,7vw,36px) clamp(20px,6vw,32px) clamp(32px,8vw,48px)
}

.auth-logo {
    font-size: 52px;
    color: white;
    margin-bottom: 12px
}

.auth-brand {
    color: white;
    font-size: clamp(22px,6vw,30px);
    font-weight: 900;
    letter-spacing: -.5px;
    margin-bottom: 4px
}

    .auth-brand span {
        color: var(--color-gold-light)
    }

.auth-tagline {
    color: rgba(255,255,255,.72);
    font-size: var(--text-sm);
    margin-bottom: clamp(28px,8vw,44px)
}

.auth-title {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: 6px
}

.auth-sub {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: clamp(20px,6vw,32px)
}

/* OTP */
.otp-container {
    display: flex;
    gap: clamp(8px,2.5vw,12px);
    justify-content: center;
    margin: clamp(18px,5vw,28px) 0
}

.otp-box {
    width: clamp(42px,11vw,50px);
    height: clamp(52px,14vw,60px);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: clamp(20px,5.5vw,24px);
    font-weight: 800;
    text-align: center;
    outline: none;
    transition: border-color .18s,box-shadow .18s;
    color: var(--color-text-dark);
    background: var(--color-bg-input)
}

    .otp-box:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(74,103,65,.15);
        background: white
    }

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg,var(--color-primary),var(--color-primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    height: clamp(48px,13vw,56px);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s,box-shadow .15s;
    box-shadow: 0 4px 12px rgba(74,103,65,.35);
    letter-spacing: .2px
}

    .btn-primary:active {
        transform: scale(.98)
    }

    .btn-primary:disabled {
        opacity: .52;
        cursor: not-allowed
    }

.btn-gold {
    background: linear-gradient(135deg,var(--color-gold),var(--color-gold-dark));
    box-shadow: 0 4px 12px rgba(201,168,76,.38);
    color: white
}

/* Ghost icon button — 44px min tap target, used anywhere an icon sits alone in a list row.
   Replaces the scattered inline style="background:none;border:none;cursor:pointer;padding:4px"
   pattern that produced ~26-28px tap targets. */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    transition: background .15s
}

    .icon-btn:active {
        background: var(--color-bg-muted)
    }

    .icon-btn.danger {
        color: var(--color-cancelled)
    }

    .icon-btn.muted {
        color: var(--color-text-muted)
    }

.btn-secondary {
    width: 100%;
    background: var(--color-bg-muted);
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-md);
    height: clamp(44px,12vw,52px);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all .15s
}

.btn-danger {
    background: #C62828;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: clamp(10px,3vw,14px) 20px;
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: transform .15s
}

    .btn-danger:active {
        transform: scale(.98)
    }

.btn-full {
    width: 100%;
    justify-content: center
}

/* Loading */
.loading-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(32px,10vw,56px)
}

.full-loading {
    position: fixed;
    inset: 0;
    background: rgba(244,246,238,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(2px)
}

/* Forms */
.form-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm)
}

.form-section-title {
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 10px
}

.form-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    border: 1px solid var(--color-border)
}

/* Thin separator between grouped fields inside a single form-section.
   Replaces the current pattern of one form-card per field. */
.form-field-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: clamp(10px,3vw,14px) 0
}

.form-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
    display: block
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px
}

.form-action-link {
    font-size: var(--text-xs);
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    display: inline-block
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.three-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px
}

/* Stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px
}

.stat-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden
}

    .stat-card.accent {
        background: linear-gradient(135deg,var(--color-primary),var(--color-primary-deeper));
        color: white;
        border: none
    }

.stat-value {
    font-size: clamp(22px,6vw,28px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.8px
}

    .stat-value.gold {
        color: var(--color-gold)
    }

.stat-label {
    font-size: var(--text-xs);
    font-weight: 600;
    opacity: .65;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .5px
}

.stat-icon {
    font-size: clamp(24px,7vw,30px);
    opacity: .2;
    position: absolute;
    right: 10px;
    top: 10px
}

/* Dashboard */
.dashboard-header {
    background: linear-gradient(135deg,var(--color-primary) 0%,var(--color-primary-deeper) 100%);
    border-radius: var(--radius-lg);
    color: white;
    padding: clamp(16px,4.5vw,22px);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden
}

    .dashboard-header::before {
        content: '';
        position: absolute;
        right: -24px;
        top: -24px;
        width: 110px;
        height: 110px;
        border-radius: 50%;
        background: rgba(255,255,255,.06)
    }

    .dashboard-header::after {
        content: '';
        position: absolute;
        right: 20px;
        bottom: -30px;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(201,168,76,.12)
    }

.dashboard-greeting {
    font-size: var(--text-xs);
    opacity: .75;
    font-weight: 500
}

.dashboard-name {
    font-size: var(--text-xl);
    font-weight: 900;
    margin: 3px 0 4px
}

.dashboard-date {
    font-size: var(--text-xs);
    opacity: .6
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 10px
}

.section-title {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text-dark)
}

.section-link {
    font-size: var(--text-sm);
    color: var(--color-primary);
    font-weight: 700
}

/* Appointment */
.appt-time-block {
    min-width: clamp(44px,12vw,54px);
    text-align: center;
    background: var(--color-bg-muted);
    border-radius: var(--radius-sm);
    padding: clamp(6px,2vw,10px) clamp(4px,1.5vw,8px);
    flex-shrink: 0
}

.appt-time {
    font-size: var(--text-sm);
    font-weight: 900;
    color: var(--color-primary)
}

.appt-dur {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 1px
}

.appt-info {
    flex: 1;
    min-width: 0
}

.appt-name {
    font-size: var(--text-base);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.appt-detail {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.appt-amount {
    font-size: var(--text-base);
    font-weight: 900;
    color: var(--color-gold-dark);
    white-space: nowrap
}

.appt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    cursor: pointer
}

    .appt-item:active {
        transform: scale(.985)
    }

/* Customer */
.customer-avatar {
    width: clamp(38px,10vw,46px);
    height: clamp(38px,10vw,46px);
    border-radius: 50%;
    background: linear-gradient(135deg,var(--color-primary),var(--color-primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(15px,4vw,18px);
    font-weight: 800;
    flex-shrink: 0
}

.customer-name {
    font-size: var(--text-base);
    font-weight: 700
}

.customer-phone {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.customer-visits {
    font-size: var(--text-xs);
    background: var(--color-bg-muted);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
    white-space: nowrap
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: transform .12s
}

    .customer-item:active {
        transform: scale(.985)
    }

/* Staff */
.staff-avatar {
    width: clamp(42px,11vw,50px);
    height: clamp(42px,11vw,50px);
    border-radius: 50%;
    background: linear-gradient(135deg,var(--color-primary-deeper),var(--color-primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px,4.5vw,20px);
    font-weight: 800;
    flex-shrink: 0
}

.staff-active {
    box-shadow: 0 0 0 2.5px var(--color-primary-light)
}

.staff-inactive {
    opacity: .55
}

.staff-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--color-border-light);
    cursor: pointer
}

.staff-avatar-sm {
    width: clamp(28px,8vw,34px);
    height: clamp(28px,8vw,34px);
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(11px,3vw,13px);
    font-weight: 900
}

/* Staff detail — calendar */
.staff-cal-grid-wrap {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 12px
}

.staff-cal-weekday-row {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    margin-bottom: 6px
}

.staff-cal-weekday {
    text-align: center;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase
}

.staff-cal-grid {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 3px
}

.staff-cal-cell {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    background: var(--color-bg-card-alt)
}

    .staff-cal-cell--blank {
        cursor: default;
        background: transparent
    }

    .staff-cal-cell.off {
        opacity: .45
    }

    .staff-cal-cell.selected {
        background: var(--color-primary);
    }

    .staff-cal-cell.selected .staff-cal-daynum {
        color: #fff
    }

.staff-cal-daynum {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text)
}

    .staff-cal-daynum.today {
        color: var(--color-primary);
        text-decoration: underline
    }

.staff-cal-leave-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-inprogress)
}

.staff-cal-count {
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    background: var(--color-gold-dark);
    border-radius: var(--radius-full);
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    margin-top: 1px
}

.staff-cal-legend {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 10.5px;
    color: var(--color-text-muted)
}

    .staff-cal-legend span {
        display: flex;
        align-items: center;
        gap: 5px
    }

.staff-cal-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%
}

    .staff-cal-legend-dot.off {
        background: var(--color-text-muted);
        opacity: .45
    }

    .staff-cal-legend-dot.leave {
        background: var(--color-inprogress)
    }

/* Service */
.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--color-border-light)
}

.service-name {
    font-size: var(--text-base);
    font-weight: 700
}

.service-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.service-price {
    font-size: var(--text-md);
    font-weight: 900;
    color: var(--color-gold-dark)
}

/* Appointment Detail */
.detail-card {
    background: linear-gradient(145deg,var(--color-primary-deeper),var(--color-primary));
    border-radius: var(--radius-lg);
    color: white;
    padding: clamp(14px,4vw,18px);
    margin-bottom: 14px
}

.detail-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px
}

.detail-customer {
    display: flex;
    align-items: center;
    gap: 12px
}

.customer-avatar-lg {
    width: clamp(46px,12vw,56px);
    height: clamp(46px,12vw,56px);
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(19px,5vw,23px);
    font-weight: 900
}

.detail-name {
    font-size: var(--text-md);
    font-weight: 800
}

.detail-phone {
    font-size: var(--text-sm);
    opacity: .82;
    margin-top: 2px
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(0,0,0,.15);
    border-radius: var(--radius-sm);
    padding: clamp(10px,3vw,14px)
}

.detail-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.meta-label {
    font-size: var(--text-xs);
    opacity: .68;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px
}

.meta-value {
    font-size: var(--text-sm);
    font-weight: 700
}

.detail-notes {
    background: rgba(255,255,255,.14);
    border-radius: var(--radius-xs);
    padding: 8px 10px;
    font-size: var(--text-xs);
    margin-top: 10px
}

.staff-assignment-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    padding: clamp(10px,3vw,14px);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--color-primary)
}

.staff-assignment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px
}

.staff-assignment-name {
    font-size: var(--text-sm);
    font-weight: 700
}

.service-row-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: var(--text-sm)
}

.service-row-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.action-section {
    margin-top: 16px
}

/* Invoice */
.invoice-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(14px,4vw,18px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px
}

.invoice-number {
    font-size: var(--text-lg);
    font-weight: 900;
    color: var(--color-primary-deeper)
}

.invoice-date {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.invoice-client-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light)
}

.invoice-client-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: var(--color-primary)
}

.invoice-client-name {
    font-size: var(--text-base);
    font-weight: 700
}

.invoice-client-phone {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.invoice-items-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px
}

.invoice-items-header {
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 10px
}

.invoice-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light)
}

.invoice-line-name {
    font-size: var(--text-sm);
    font-weight: 600
}

.invoice-line-qty {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.invoice-line-amount {
    font-size: var(--text-base);
    font-weight: 700;
    white-space: nowrap
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: var(--text-sm)
}

.total-label {
    color: var(--color-text-soft)
}

.total-value {
    font-weight: 600
}

.discount-row .total-value {
    color: var(--color-completed)
}

.grand-total-row {
    padding-top: 10px;
    border-top: 2px solid var(--color-border-light);
    margin-top: 4px
}

.grand-total-label {
    font-size: var(--text-base);
    font-weight: 800
}

.grand-total-value {
    font-size: var(--text-xl);
    font-weight: 900;
    color: var(--color-gold-dark)
}

.balance-row {
    background: var(--color-inprogress-bg);
    border-radius: var(--radius-xs);
    padding: 6px 8px;
    margin-top: 4px
}

.balance-label {
    font-weight: 800;
    font-size: var(--text-sm)
}

.balance-value {
    font-size: var(--text-lg);
    font-weight: 900;
    color: var(--color-cancelled)
}

.zero-balance {
    color: var(--color-completed) !important
}

.paid-row .total-value {
    color: var(--color-completed);
    font-weight: 700
}

.payment-history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-xs)
}

.payment-method-icon {
    font-size: 22px
}

.payment-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1
}

.payment-method {
    font-size: var(--text-sm);
    font-weight: 700
}

.payment-date {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.payment-ref {
    font-size: var(--text-xs);
    color: var(--color-primary)
}

.payment-amount {
    font-size: var(--text-md);
    font-weight: 800;
    color: var(--color-gold-dark);
    white-space: nowrap
}

.payment-form-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px
}

.quick-amount-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap
}

.quick-amount-btn {
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-card);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    color: var(--color-text-soft)
}

    .quick-amount-btn.active {
        background: var(--color-primary);
        color: white;
        border-color: var(--color-primary)
    }

.invoice-preview-card {
    background: linear-gradient(135deg,var(--color-bg-card-alt),#EDF5E0);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    margin-bottom: 12px;
    border: 1.5px solid var(--color-primary)
}

.invoice-preview-title {
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px
}

.preview-line {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    padding: 4px 0
}

.preview-divider {
    border-top: 1px solid rgba(0,0,0,.08);
    margin: 6px 0
}

.preview-total {
    font-size: var(--text-md);
    font-weight: 900;
    color: var(--color-gold-dark);
    padding-top: 8px;
    border-top: 2px solid var(--color-primary);
    margin-top: 4px;
    display: flex;
    justify-content: space-between
}

.discount-line {
    color: var(--color-cancelled)
}

.inv-category-label {
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin: 10px 0 4px;
    letter-spacing: .6px
}

.inv-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light)
}

.inv-service-name {
    font-size: var(--text-sm);
    font-weight: 600
}

.inv-service-price {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 8px
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center
}

.qty-minus {
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled)
}

.qty-plus {
    background: var(--color-bg-muted);
    color: var(--color-primary)
}

.qty-display {
    font-size: var(--text-base);
    font-weight: 800;
    min-width: 20px;
    text-align: center
}

.inv-status-paid {
    background: var(--color-paid-bg);
    color: var(--color-paid);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

.inv-status-partial {
    background: var(--color-partial-bg);
    color: var(--color-partial);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

.inv-status-unpaid {
    background: var(--color-unpaid-bg);
    color: var(--color-unpaid);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

/* Inventory */
.inv-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px
}

.inv-stat-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
    box-shadow: var(--shadow-xs)
}

    .inv-stat-card.inv-stat-warn {
        background: var(--color-inprogress-bg);
        border: 1px solid var(--color-inprogress)
    }

.inv-stat-value {
    font-size: clamp(20px,6vw,26px);
    font-weight: 900;
    color: var(--color-primary)
}

.inv-stat-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: 600;
    margin-top: 2px
}

.inv-item-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: transform .12s ease
}

    .inv-item-card:active {
        transform: scale(.985)
    }

.inv-item-low {
    border-left-color: var(--color-inprogress);
    background: var(--color-inprogress-bg)
}

.inv-item-inactive {
    opacity: .5
}

.inv-item-name {
    font-size: var(--text-base);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px
}

.inv-item-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.inv-item-desc {
    font-size: var(--text-xs);
    color: var(--color-text-soft);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px
}

.inv-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px
}

.inv-stock-num {
    font-size: clamp(20px,6vw,24px);
    font-weight: 900;
    line-height: 1
}

.inv-stock-unit {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.low-stock-badge {
    background: var(--color-inprogress-bg);
    color: var(--color-inprogress);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: var(--text-xs);
    font-weight: 800
}

.in-use-badge {
    background: var(--color-scheduled-bg);
    color: var(--color-scheduled);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: var(--text-xs);
    font-weight: 800
}

.chip-scroll-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 10px;
    scrollbar-width: none
}

    .chip-scroll-row::-webkit-scrollbar {
        display: none
    }

.search-filter-row {
    margin-bottom: 10px
}

.inv-detail-name {
    font-size: var(--text-lg);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px
}

.inv-stock-big {
    font-size: clamp(32px,9vw,40px);
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1
}

    .inv-stock-big.low {
        color: var(--color-inprogress)
    }

.inv-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px
}

.inv-action-btn {
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-soft);
    cursor: pointer
}

    .inv-action-btn .material-symbols-rounded {
        font-size: 24px;
        color: var(--color-primary)
    }

    .inv-action-btn.active {
        border-color: var(--color-primary);
        background: var(--color-bg-card-alt);
        color: var(--color-primary)
    }

.adj-type-btn {
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-card);
    border-radius: var(--radius-xs);
    padding: 8px;
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    color: var(--color-text-soft)
}

    .adj-type-btn.active {
        background: var(--color-primary);
        color: white;
        border-color: var(--color-primary)
    }

.inv-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0
}

.inv-info-cell {
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px
}

.inv-info-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 700
}

.inv-info-val {
    font-size: var(--text-sm);
    font-weight: 700
}

.warn-text {
    color: var(--color-inprogress)
}

.usage-log-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--color-bg-card);
    border-radius: var(--radius-xs);
    padding: 8px 12px;
    margin-bottom: 6px;
    font-size: var(--text-sm)
}

.usage-log-qty {
    font-weight: 800;
    color: var(--color-cancelled)
}

.usage-log-notes {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.usage-log-date {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    white-space: nowrap
}

/* Purchase Orders */
.po-header-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(14px,4vw,18px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px
}

.po-number {
    font-size: var(--text-lg);
    font-weight: 900;
    font-family: monospace
}

.po-supplier {
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    margin-top: 3px
}

.po-eta {
    font-size: var(--text-xs);
    color: var(--color-primary);
    margin-top: 2px
}

.po-items-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    margin-bottom: 10px
}

.po-items-title {
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 10px
}

.po-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light)
}

.po-item-name {
    font-size: var(--text-sm);
    font-weight: 700
}

.po-item-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.po-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px
}

.po-item-total {
    font-size: var(--text-base);
    font-weight: 800
}

.po-grand-total {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-base);
    font-weight: 800;
    padding-top: 10px;
    color: var(--color-primary-deeper)
}

.po-notes {
    background: var(--color-bg-muted);
    border-radius: var(--radius-xs);
    padding: 10px;
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    margin-bottom: 12px
}

.po-list-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    border-left: 3px solid transparent
}

.po-list-draft {
    border-left-color: #9E9E9E
}

.po-list-ordered {
    border-left-color: var(--color-scheduled)
}

.po-list-partial {
    border-left-color: var(--color-inprogress)
}

.po-list-number {
    font-size: var(--text-sm);
    font-weight: 800;
    font-family: monospace
}

.po-list-supplier {
    font-size: var(--text-xs);
    color: var(--color-text-soft)
}

.po-list-total {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-primary)
}

.po-list-main {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.po-list-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px
}

.po-list-date {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.po-add-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light)
}

.po-add-name {
    flex: 1;
    font-size: var(--text-sm);
    font-weight: 600
}

.btn-icon-remove {
    background: none;
    border: none;
    color: var(--color-cancelled);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px
}

.po-preview-total {
    background: var(--color-bg-muted);
    border-radius: var(--radius-xs);
    padding: 8px 12px;
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-primary);
    margin-top: 8px;
    text-align: right
}

.receive-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light)
}

.receive-item-name {
    flex: 1;
    font-size: var(--text-sm);
    font-weight: 600
}

.receive-pending {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    white-space: nowrap
}

.po-badge-draft {
    background: var(--color-bg-muted);
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

.po-badge-ordered {
    background: var(--color-scheduled-bg);
    color: var(--color-scheduled);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

.po-badge-partial {
    background: var(--color-partial-bg);
    color: var(--color-partial);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

.po-badge-received {
    background: var(--color-completed-bg);
    color: var(--color-completed);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

.po-badge-cancelled {
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: var(--text-xs);
    font-weight: 700
}

.po-receive-progress {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

    .po-receive-progress.complete {
        color: var(--color-completed);
        font-weight: 700
    }

.po-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start
}

.po-add-item-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px
}

/* Multi-staff */
.btn-add-staff {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 4px 14px;
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer
}

    .btn-add-staff:disabled {
        opacity: .4
    }

.loading-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    color: var(--color-text-muted);
    font-size: var(--text-sm)
}

.staff-slot {
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    background: var(--color-bg-card)
}

.staff-slot-filled {
    border-color: var(--color-primary);
    background: var(--color-bg-card-alt)
}

.staff-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px
}

.slot-number {
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase
}

.btn-remove-slot {
    background: none;
    border: none;
    color: var(--color-cancelled);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%
}

.service-assign-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer
}

    .service-assign-row.selected {
        background: var(--color-bg-card-alt);
        border-radius: var(--radius-xs);
        padding: 8px 6px
    }

    .service-assign-row.assigned-elsewhere {
        opacity: .4;
        cursor: not-allowed
    }

.service-assign-name {
    font-size: var(--text-sm);
    font-weight: 600
}

.service-assign-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.already-assigned-tag {
    font-size: var(--text-xs);
    color: var(--color-inprogress);
    background: var(--color-inprogress-bg);
    border-radius: 4px;
    padding: 1px 5px;
    width: fit-content
}

.booking-summary {
    background: linear-gradient(135deg,var(--color-bg-card-alt),#E8F5E9);
    border: 1px solid var(--color-primary)
}

.summary-staff-name {
    font-size: var(--text-sm);
    font-weight: 700
}

.summary-services {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0 0
}

.summary-total-amount {
    font-size: var(--text-xl);
    font-weight: 900;
    color: var(--color-gold-dark)
}

.summary-staff-row {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,.06)
}

.time-summary {
    background: var(--color-bg-muted);
    border-radius: var(--radius-xs);
    padding: 8px 10px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-soft);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px
}

.duration-badge {
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-size: var(--text-xs);
    font-weight: 800
}

.customer-chip {
    background: var(--color-bg-muted);
    border-radius: var(--radius-xs);
    padding: 6px 10px;
    font-size: var(--text-xs);
    color: var(--color-text-soft);
    margin-top: 6px;
    display: flex;
    gap: 8px
}

.visit-badge {
    background: var(--color-primary);
    color: white;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: var(--text-xs);
    font-weight: 700
}

.info-chip {
    background: var(--color-scheduled-bg);
    border-radius: var(--radius-xs);
    padding: 6px 10px;
    font-size: var(--text-xs);
    color: var(--color-scheduled);
    margin-top: 6px
}

.empty-state-sm {
    text-align: center;
    padding: 12px;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-style: italic
}

/* Misc */
.invoice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light)
}

    .invoice-row:last-child {
        border-bottom: none
    }

.invoice-total {
    background: var(--color-bg-muted);
    border-radius: var(--radius-xs);
    padding: 12px;
    margin-top: 8px
}

    .invoice-total .amount {
        font-size: var(--text-xl);
        font-weight: 900;
        color: var(--color-primary)
    }

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0
}

.timeline-line {
    width: 2px;
    background: var(--color-border);
    flex: 1;
    margin: 2px auto
}

.inv-detail-header {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(14px,4vw,18px);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px
}

.inv-detail-meta {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: 2px
}

.inv-detail-sku {
    font-size: var(--text-xs);
    color: var(--color-primary);
    margin-top: 2px;
    font-family: monospace
}

.inv-stock-unit-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.inv-detail-stock-block {
    text-align: center
}

.inv-cost {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.inv-detail-name {
    font-size: var(--text-lg);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px
}

/* Transitions */
.fade-in {
    animation: fadeIn .22s ease
}

.slide-up {
    animation: slideUp .28s ease
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(18px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* ── Service selection (NewAppointmentPage) ── */
.service-select-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    border: 1.5px solid var(--color-border);
    transition: all .15s
}

    .service-select-row.selected {
        border-color: var(--color-primary);
        background: var(--color-bg-card-alt)
    }

.service-select-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text-dark)
}

.service-select-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.service-select-price {
    font-size: var(--text-sm);
    font-weight: 800;
    color: var(--color-gold-dark)
}

.service-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0
}

    .service-check.checked {
        background: var(--color-primary);
        border-color: var(--color-primary)
    }

/* ── Invoice status extras ── */
.inv-status-refund {
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-size: var(--text-xs);
    font-weight: 800
}

.badge-cancelled {
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled)
}

.badge-completed {
    background: var(--color-completed-bg);
    color: var(--color-completed)
}

.border-cancelled {
    border-left-color: var(--color-cancelled) !important
}

.border-completed {
    border-left-color: var(--color-completed) !important
}

/* ═══════════════════════════════════════════════════════════════
   LOADING STATES
   ═══════════════════════════════════════════════════════════════ */

/* Full-page loader — used while page data loads */
.page-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 14px;
}

.page-loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(85,107,47,0.15);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

.page-loader-text {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: .4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Inline button spinner — replaces MudProgressCircular inside buttons */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .65s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.btn-spinner-dark {
    border-color: rgba(85,107,47,0.2);
    border-top-color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════════
   SKELETON SCREENS
   ═══════════════════════════════════════════════════════════════ */

@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.skeleton {
    background: linear-gradient( 90deg, var(--color-border-light) 25%, #eef0e8 50%, var(--color-border-light) 75% );
    background-size: 800px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* Skeleton card — full list item skeleton */
.skeleton-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 12px;
}

.skeleton-line-short {
    width: 55%;
}

.skeleton-line-long {
    width: 85%;
}

.skeleton-line-tiny {
    height: 10px;
    width: 40%;
}

/* Skeleton stat card */
.skeleton-stat {
    height: 72px;
    border-radius: var(--radius-md);
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATES — improved
   ═══════════════════════════════════════════════════════════════ */

.empty-state-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(32px,10vw,56px) clamp(16px,5vw,28px);
    text-align: center;
    min-height: 260px;
}

.empty-state-v2-icon {
    width: 72px;
    height: 72px;
    background: var(--color-bg-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

    .empty-state-v2-icon .material-symbols-rounded {
        font-size: 32px;
        color: var(--color-text-muted);
        font-variation-settings: 'FILL' 1;
    }

.empty-state-v2-title {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: 6px;
}

.empty-state-v2-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 240px;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

/* Header */
/* ── Dashboard ──────────────────────────────────────────────────────────────── */

/* Top bar — date, salon name, alert bell */
.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px,3.5vw,16px) clamp(12px,3.5vw,16px) 0;
    flex-shrink: 0
}

.dash-topbar-date {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text)
}

.dash-topbar-salon {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

/* Bell button with badge */
.dash-bell-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-primary);
    box-shadow: var(--shadow-xs);
    transition: box-shadow .15s
}

    .dash-bell-btn:active {
        box-shadow: var(--shadow-md)
    }

.dash-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--color-cancelled);
    color: white;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--color-bg-app)
}

/* Stat grid — all cards identical */
.dash-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px,2.5vw,10px);
    margin: clamp(12px,3.5vw,16px) 0 clamp(8px,2.5vw,10px)
}

.dash-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: clamp(88px,23vw,104px);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px) clamp(12px,3.5vw,16px);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow .15s;
    position: relative;
    overflow: hidden
}

    .dash-stat-card:active {
        box-shadow: var(--shadow-md)
    }

.dash-stat-icon {
    position: absolute;
    top: clamp(10px,3vw,14px);
    right: clamp(10px,3vw,14px);
    font-size: clamp(20px,5.5vw,24px);
    color: var(--color-primary);
    font-variation-settings: 'FILL' 1;
}

.dash-stat-value {
    font-size: clamp(22px,6vw,28px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.5px;
    color: var(--color-gold-dark)
}

.dash-stat-label {
    font-size: clamp(9px,2.5vw,11px);
    font-weight: 700;
    color: var(--color-text-muted);
    margin-top: clamp(3px,1vw,5px);
    text-transform: uppercase;
    letter-spacing: .5px
}

/* Quick action row */
.dash-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: clamp(8px,2.5vw,10px);
    margin-bottom: clamp(10px,3vw,14px)
}

.dash-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: clamp(10px,3vw,14px) 4px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s;
    color: var(--color-primary)
}

    .dash-action-btn:active {
        box-shadow: var(--shadow-md);
        background: var(--color-bg-muted)
    }

    .dash-action-btn .material-symbols-rounded {
        font-size: clamp(20px,5.5vw,24px);
        font-variation-settings: 'FILL' 1
    }

    .dash-action-btn span:last-child {
        font-size: clamp(9px,2.5vw,11px);
        font-weight: 700;
        color: var(--color-text-muted);
        text-align: center;
        white-space: nowrap
    }

/* Alert bottom sheet rows */
.dash-alert-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: clamp(10px,3vw,14px) 0;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer
}

    .dash-alert-row:last-child {
        border-bottom: none
    }

    .dash-alert-row:active {
        opacity: .7
    }

.dash-alert-row-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.dash-alert-row-text {
    flex: 1;
    min-width: 0
}

.dash-alert-row-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text)
}

.dash-alert-row-sub {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

/* InProgress pill */
.dash-inprogress-pill {
    display: flex;
    align-items: center;
    gap: clamp(6px,2vw,8px);
    background: var(--color-inprogress-bg);
    border: 1px solid var(--color-inprogress);
    border-radius: var(--radius-md);
    padding: clamp(8px,2.5vw,12px) clamp(12px,3.5vw,16px);
    margin-bottom: clamp(4px,1.5vw,8px);
    cursor: pointer;
    color: var(--color-inprogress);
    font-size: var(--text-sm);
    font-weight: 700;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255,167,38,0);
    }

    50% {
        box-shadow: 0 0 0 3px rgba(255,167,38,.18);
    }
}

/* Empty state */
.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(28px,8vw,44px) clamp(16px,5vw,24px);
    text-align: center;
}

.dash-empty-icon {
    width: clamp(56px,16vw,72px);
    height: clamp(56px,16vw,72px);
    background: var(--color-bg-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(12px,3.5vw,16px);
}

.dash-empty-title {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: clamp(4px,1.5vw,6px);
}

.dash-empty-sub {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* View more row */
.dash-view-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px,1.5vw,6px);
    padding: clamp(12px,3.5vw,16px);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius-md);
    background: var(--color-bg-muted);
    margin-top: 4px;
}

    .dash-view-more:active {
        opacity: .75;
    }

/* ── Stat card tappable state ── */
.dash-stat-card {
    cursor: pointer;
    transition: transform .12s, box-shadow .12s;
}

    .dash-stat-card:active {
        transform: scale(.97);
        box-shadow: none;
    }

/* ── Dashboard — scroll container top padding (topbar already has its own spacing) ── */
.dash-scroll {
    padding-top: clamp(10px,3vw,14px)
}

/* ── Dashboard — loading skeleton ── */
.dash-skel-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px
}

.dash-skel-header-col {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.skel-line-title {
    height: 14px;
    width: 140px
}

.skel-line-sub {
    height: 12px;
    width: 90px
}

.skel-avatar-sm {
    width: 40px;
    height: 40px
}

.skel-stat-card {
    height: clamp(80px,21vw,96px);
    border-radius: var(--radius-md)
}

.skel-action-btn {
    height: 72px;
    border-radius: var(--radius-md)
}

.skel-appt-card {
    height: 96px;
    border-radius: var(--radius-md);
    margin-bottom: 8px
}

/* ── Dashboard — empty/error state icon + button ── */
.dash-empty-icon-symbol {
    font-size: clamp(28px,8vw,34px);
    font-variation-settings: 'FILL' 1
}

.dash-empty-icon-symbol--error {
    color: var(--color-cancelled)
}

.dash-empty-icon-symbol--info {
    color: var(--color-primary)
}

.dash-empty-btn {
    margin-top: clamp(12px,3.5vw,16px);
    height: clamp(38px,10vw,44px);
    padding: 0 clamp(20px,5vw,28px);
    font-size: var(--text-sm)
}

/* ── Dashboard — Up Next card details ── */
.dash-up-next-icon {
    font-size: 13px;
    vertical-align: -2px;
    margin-right: 3px
}

.dash-up-next-muted {
    opacity: .6
}

.dash-up-next-staff--warning {
    color: var(--color-inprogress)
}

.dash-up-next-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: .3
}

/* ── Appointment card row icons ── */
.appt-card-icon {
    font-size: 13px
}

.appt-card-icon--primary {
    color: var(--color-primary)
}

.appt-card-icon--muted {
    color: var(--color-text-muted)
}

/* ── Dashboard — view more row icon ── */
.dash-view-more-icon {
    font-size: clamp(16px,4.5vw,18px)
}

/* ── Dashboard — alert sheet row icon variants ── */
.dash-alert-row-icon--refund {
    background: var(--color-cancelled-bg)
}

.dash-alert-row-icon--inprogress {
    background: var(--color-inprogress-bg)
}

.dash-alert-row-icon--invoice {
    background: var(--color-bg-muted)
}

.dash-alert-row-icon--stock {
    background: var(--color-gold-light);
    opacity: .6
}

.dash-alert-icon-symbol {
    font-size: 18px;
    font-variation-settings: 'FILL' 1
}

.dash-alert-icon-symbol--refund {
    color: var(--color-cancelled)
}

.dash-alert-icon-symbol--inprogress {
    color: var(--color-inprogress)
}

.dash-alert-icon-symbol--invoice {
    color: var(--color-primary)
}

.dash-alert-icon-symbol--stock {
    color: var(--color-gold-dark)
}

.dash-alert-chevron {
    font-size: 18px;
    color: var(--color-text-muted)
}

/* ── Dashboard — filled bell icon in top bar ── */
.dash-bell-icon {
    font-size: 21px;
    font-variation-settings: 'FILL' 1
}

/* Bell button sits inside the dark top-bar here, not on a light card —
   strip the light-card chrome so the white icon is actually visible. */
.top-bar .dash-bell-btn {
    background: none;
    border: none;
    box-shadow: none
}

    .top-bar .dash-bell-btn:active {
        background: rgba(255,255,255,.12);
        box-shadow: none
    }

/* Badge offset/border were tuned for a light card background — on the dark
   top-bar, pull it inward and match its border to the bar so it doesn't
   crowd the top-bar's edge. */
.top-bar .dash-bell-badge {
    top: 0;
    right: 0;
    border-color: var(--color-primary-deeper)
}

/* ── Dashboard — alert sheet "all clear" state ── */
.dash-alerts-clear {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    text-align: center
}

.dash-alerts-clear-icon {
    font-size: 42px;
    color: var(--color-completed);
    font-variation-settings: 'FILL' 1
}

.dash-alerts-clear-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-text)
}

.dash-alerts-clear-sub {
    font-size: var(--text-sm);
    color: var(--color-text-muted)
}

/* ── Section header — extra top spacing variant, used between stacked dashboard sections ── */
.section-header--spaced {
    margin-top: clamp(18px,5vw,24px)
}

/* ── Alert pills ── */
.dash-alert-pill {
    display: flex;
    align-items: center;
    gap: clamp(6px,2vw,8px);
    border-radius: var(--radius-md);
    padding: clamp(8px,2.5vw,12px) clamp(12px,3.5vw,16px);
    margin-bottom: clamp(6px,2vw,8px);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 700;
    border: 1px solid;
}

    .dash-alert-pill:active {
        opacity: .8;
    }

.dash-alert-inprogress {
    background: var(--color-inprogress-bg);
    border-color: var(--color-inprogress);
    color: var(--color-inprogress);
    animation: pulse-border 2s ease-in-out infinite;
}

.dash-alert-invoice {
    background: var(--color-scheduled-bg);
    border-color: var(--color-scheduled);
    color: var(--color-scheduled);
}

.dash-alert-refund {
    background: var(--color-cancelled-bg);
    border-color: var(--color-cancelled);
    color: var(--color-cancelled);
}

/* ── Bottom Sheet ─────────────────────────────────────────────────────────────
   Used for quick-add forms (client, service, category) invoked mid-flow.
   Sits above bottom nav (z 200) and FABs (z 150).
   Nested sheets (Add Category inside Add Service) use .bs-sheet--nested.
   ─────────────────────────────────────────────────────────────────────────── */
.bs-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 300;
    animation: bs-fade-in .2s ease
}

@keyframes bs-fade-in {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.bs-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 310;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    animation: bs-slide-up .28s cubic-bezier(.22,1,.36,1) forwards;
    box-shadow: 0 -4px 32px rgba(0,0,0,.18)
}

.bs-sheet--nested {
    z-index: 420
}

@keyframes bs-slide-up {
    from {
        transform: translateY(100%)
    }

    to {
        transform: translateY(0)
    }
}

.bs-handle {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0
}

.bs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px,3.5vw,16px) clamp(16px,4vw,20px) 2px;
    flex-shrink: 0
}

.bs-title {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text)
}

.bs-body {
    overflow-y: auto;
    padding: clamp(12px,3.5vw,16px) clamp(16px,4vw,20px) clamp(28px,7vw,36px);
    flex: 1
}

.bs-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px
}

/* Filled OTP box — distinct background so you can glance and see progress */
.otp-box.filled {
    background: var(--color-bg-muted);
    border-color: var(--color-primary);
    color: var(--color-primary)
}

/* OTP shake animation for wrong code */
@keyframes otp-shake {
    0%,100% {
        transform: translateX(0)
    }

    20% {
        transform: translateX(-6px)
    }

    40% {
        transform: translateX(6px)
    }

    60% {
        transform: translateX(-4px)
    }

    80% {
        transform: translateX(4px)
    }
}

.otp-container.shake {
    animation: otp-shake .4s ease
}

.auth-back-link {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 600;
    cursor: pointer
}

    .auth-back-link:active {
        opacity: .6
    }

.auth-resend-link {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer
}

    .auth-resend-link:active {
        opacity: .6
    }

/* ── Dashboard — Up Next card ──────────────────────────────────────────────── */
.dash-up-next {
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px) clamp(36px,9vw,42px) clamp(12px,3.5vw,16px) clamp(14px,4vw,18px);
    margin-bottom: clamp(8px,2.5vw,12px);
    position: relative;
    cursor: pointer;
    transition: box-shadow .15s
}

    .dash-up-next:active {
        box-shadow: var(--shadow-md)
    }

/* Pulsing green ring when starting within 15 min */
.dash-up-next--soon {
    border-color: var(--color-inprogress);
    animation: pulse-border 1.8s ease-in-out infinite
}

.dash-up-next-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 5px
}

.dash-up-next--soon .dash-up-next-label {
    color: var(--color-inprogress)
}

.dash-up-next-name {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 2px
}

.dash-up-next-detail {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: 4px
}

.dash-up-next-staff {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary)
}

/* ── Dashboard — All done banner ───────────────────────────────────────────── */
.dash-all-done {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-completed-bg, #F1F8F1);
    border: 1px solid var(--color-completed);
    border-radius: var(--radius-md);
    padding: clamp(10px,3vw,14px) clamp(14px,4vw,18px);
    margin-bottom: clamp(8px,2.5vw,12px);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-completed)
}

/* ── Dashboard — Group label ────────────────────────────────────────────────── */
.dash-group-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: clamp(8px,2.5vw,12px) 0 clamp(6px,2vw,8px)
}

/* ── Dashboard — Low stock alert pill ──────────────────────────────────────── */
.dash-alert-stock {
    background: #FFF8E1;
    border-color: #F9A825;
    color: #F57F17
}

/* ── Appointment List — day summary footer ──────────────────────────────────── */
.appt-day-summary {
    display: flex;
    align-items: center;
    gap: clamp(10px,3vw,16px);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: clamp(10px,3vw,14px) clamp(14px,4vw,18px);
    margin-top: clamp(6px,2vw,10px);
    box-shadow: var(--shadow-sm)
}

.appt-day-summary-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-soft)
}

.appt-day-summary-revenue {
    margin-left: auto;
    color: var(--color-gold-dark)
}

/* ── Date strip button — extracted from inline ──────────────────────────────── */
.date-strip-btn {
    flex-shrink: 0;
    min-width: 48px;
    padding: 6px 4px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all .15s;
    background: transparent;
    color: var(--color-text-muted)
}

    .date-strip-btn.selected {
        background: var(--color-primary);
        color: white
    }

    .date-strip-btn.today:not(.selected) {
        color: var(--color-primary)
    }

    .date-strip-btn:active {
        opacity: .75
    }

.date-strip-day {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px
}

.date-strip-num {
    font-size: 16px;
    font-weight: 900;
    line-height: 1
}

.date-strip-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%
}

.date-strip-btn.today:not(.selected) .date-strip-dot {
    background: var(--color-primary)
}

/* ── Appointment List — new card design ─────────────────────────────────────
   Four-row layout: customer name + status / time / services / staff + amount
   ─────────────────────────────────────────────────────────────────────────── */
.appt-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    border-left: 4px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: clamp(10px,3vw,14px) clamp(12px,3.5vw,16px);
    margin-bottom: clamp(6px,2vw,8px);
    cursor: pointer;
    transition: box-shadow .15s, transform .12s;
    position: relative
}

    .appt-card:active {
        transform: scale(.988);
        box-shadow: var(--shadow-md)
    }

    /* Scheduled — olive border, clean, no urgency */
    .appt-card.status-scheduled {
        border-left-color: var(--color-primary)
    }

    /* InProgress — palette-resonant amber, happening now */
    .appt-card.status-inprogress {
        border-left-color: var(--color-inprogress)
    }

    /* Completed — neutral border, slightly dimmed, done and requires nothing */
    .appt-card.status-completed {
        border-left-color: var(--color-border);
        opacity: .7
    }

    /* Cancelled / NoShow — no color, visibly dimmed, archived */
    .appt-card.status-cancelled {
        border-left-color: var(--color-border);
        opacity: .45
    }

    .appt-card.status-noshow {
        border-left-color: var(--color-border);
        opacity: .45
    }

/* Row 1: customer name + status badge */
.appt-card-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px
}

.appt-card-name {
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1
}

/* Row 2: time */
.appt-card-row2 {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px
}

.appt-card-time {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-primary)
}

.appt-card-dur {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

/* Row 3: services */
.appt-card-row3 {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px
}

.appt-card-services {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

/* Row 4: staff + amount */
.appt-card-row4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
}

.appt-card-staff {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

    .appt-card-staff.unassigned {
        color: var(--color-inprogress);
        font-weight: 700
    }

.appt-card-amount {
    font-size: var(--text-sm);
    font-weight: 900;
    color: var(--color-gold-dark);
    white-space: nowrap;
    flex-shrink: 0
}

/* ── Appointment List — date filter pill ────────────────────────────────────── */
.appt-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    padding: 4px 10px 4px 12px;
    font-size: var(--text-xs);
    font-weight: 700;
    margin-left: 8px;
    flex-shrink: 0
}

.appt-date-pill-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    font-size: 12px;
    line-height: 1
}

/* ── Appointment date picker — icon-only trigger ────────────────── */
.appt-date-trigger {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-left: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .appt-date-trigger input {
        display: none;
    }

    .appt-date-trigger .mud-input-root {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .appt-date-trigger .mud-input-outlined-border {
        border: none !important;
    }

    .appt-date-trigger .mud-input-adornment {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
    }

        .appt-date-trigger .mud-input-adornment button {
            color: var(--color-primary) !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

    .appt-date-trigger .mud-icon-root {
        font-size: 28px !important;
    }

/* ── Extended FAB ───────────────────────────────────────────────────────────── */
.fab-extended {
    position: fixed;
    bottom: clamp(72px,18vw,88px);
    right: clamp(14px,4vw,20px);
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    height: clamp(48px,13vw,56px);
    padding: 0 clamp(18px,5vw,24px) 0 clamp(14px,4vw,18px);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform .15s, box-shadow .15s
}

    .fab-extended:active {
        transform: scale(.94);
        box-shadow: var(--shadow-md)
    }

    .fab-extended .material-symbols-rounded {
        font-size: 22px;
        font-variation-settings: 'FILL' 1
    }

/* ── Booking — staff assignment info hint ───────────────────────────────────── */
.booking-info-hint {
    margin: 0 0 12px;
    padding: clamp(10px,3vw,12px) clamp(12px,3.5vw,14px);
    background: var(--color-bg-muted);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    line-height: 1.5
}

/* ── Booking — past time warning ────────────────────────────────────────────── */
.booking-time-warn {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--color-inprogress-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-inprogress);
    font-size: var(--text-xs);
    color: var(--color-inprogress);
    font-weight: 600
}



/* ═══════════════════════════════════════════════════════════════
   ADDITIONS TO app.css — append at the bottom
   All classes are generic and reusable across the entire app.
   Zero changes to existing classes.
   ═══════════════════════════════════════════════════════════════ */

/* ── Section label — icon pill + bold title ── */
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--color-text-dark);
    letter-spacing: -0.1px;
    margin-bottom: 12px;
}

.section-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--color-bg-muted);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Gradient action button — + add, person_add etc ── */
.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74,103,65,0.30);
    transition: opacity .15s, transform .15s;
}

    .action-btn:active {
        opacity: .85;
        transform: scale(.95);
    }

    .action-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
        box-shadow: none;
    }

    .action-btn .material-symbols-rounded {
        display: block;
        line-height: 1;
    }

/* ── Input row — any input + action-btn side by side ── */
.input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

/* ── Client search field — match action-btn height (44px) ── */
.client-search-field .mud-input-root {
    background: var(--color-bg-input) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0 8px !important;
    min-height: 44px !important;
    height: 44px !important;
}

.client-search-field .mud-input-slot {
    font-size: var(--text-sm) !important;
    padding: 0 2px !important;
}

.client-search-field .mud-input-outlined-border {
    border-radius: var(--radius-sm) !important;
}

/* ── Shared boxed field style — used on all plain form fields
   (MudTextField / MudSelect / MudNumericField / MudAutocomplete)
   so every input in the app matches the picker / client-search look.
   Pair with Label="" + an external <label class="form-label"> above it. ── */
.form-input-field .mud-input-root {
    background: var(--color-bg-input) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0 8px !important;
    min-height: 44px !important;
    height: 44px !important;
}

/* MudSelect's visible value is rendered in a plain <div>, not a real <input>,
   so it needs explicit flex-centering — a real <input> centers text on its
   own once height is fixed, a div does not. */
.form-input-field .mud-select-input {
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    height: 44px !important;
}

.form-input-field .mud-input-slot {
    font-size: var(--text-sm) !important;
    padding: 0 16px !important;
}

.form-input-field .mud-input-outlined-border {
    border-radius: var(--radius-sm) !important;
    border-color: var(--color-border) !important;
}

.form-input-field .mud-input-root:focus-within .mud-input-outlined-border {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74,103,65,.10) !important;
}

/* Adornment icons stay visible on plain fields (unlike .picker-compact) */
.form-input-field .mud-input-adornment {
    color: var(--color-text-soft) !important;
}

/* Multiline variant — for fields using Lines="2"+ (Bio, Description, Notes) */
.form-input-field.multiline .mud-input-root {
    height: auto !important;
    min-height: 72px !important;
    padding: 10px 8px !important;
    align-items: flex-start !important;
}

.form-input-field.multiline .mud-input-slot {
    padding: 0 16px !important;
    white-space: normal !important;
}

/* ── Search panel — collapsible search + dropdown ── */
.search-panel {
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-bg-card);
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    background: var(--color-bg-input);
    cursor: text;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: var(--text-sm);
    color: var(--color-text-dark);
    padding: 11px 4px;
    min-width: 0;
}

    .search-input::placeholder {
        color: var(--color-text-muted);
    }

/* ── Dropdown list ── */
.search-dropdown {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--color-border);
}

    .search-dropdown::-webkit-scrollbar {
        display: none;
    }

.dropdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background .12s;
}

    .dropdown-row:last-child {
        border-bottom: none;
    }

    .dropdown-row:active,
    .dropdown-row.selected {
        background: var(--color-bg-muted);
    }

.dropdown-row-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-dark);
    flex: 1;
}

.dropdown-row-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s;
}

    .dropdown-row-check.checked {
        background: var(--color-primary);
        border-color: var(--color-primary);
    }

/* ── Selected items table ── */
.selected-wrap {
    margin-top: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    animation: fadeIn .2s ease;
}

.selected-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .selected-table thead tr {
        background: var(--color-bg-muted);
    }

    .selected-table th {
        font-size: var(--text-xs);
        font-weight: 700;
        color: var(--color-text-muted);
        text-transform: uppercase;
        letter-spacing: .05em;
        padding: 7px 12px;
        text-align: left;
        border-bottom: 1px solid var(--color-border);
    }
        .selected-table th.inv-col-qty {
            text-align: center;
        }

        .selected-table th.inv-col-price {
            text-align: right;
        }

    .selected-table td {
        font-size: var(--text-sm);
        color: var(--color-text-dark);
        padding: 9px 12px;
        border-bottom: 1px solid var(--color-border-light);
        vertical-align: middle;
    }

        .selected-table td.inv-col-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .selected-table td.inv-col-price {
            text-align: right;
        }

    .selected-table tbody tr:last-child td {
        border-bottom: none;
    }

.total-row td {
    border-top: 1.5px solid var(--color-border) !important;
    border-bottom: none !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    background: var(--color-bg-muted);
}

.total-price {
    font-size: var(--text-base) !important;
    font-weight: 900 !important;
    color: var(--color-gold-dark) !important;
    text-align: right !important;
}

/* ── Delete button — per row in tables ── */
.del-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: rgba(198,40,40,.08);
    color: var(--color-cancelled);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    transition: background .13s;
}

    .del-btn:active {
        background: rgba(198,40,40,.18);
    }

/* ── MudPicker overrides — compact fit for three-col grid ── */
.picker-compact .mud-input-outlined-border {
    border-radius: var(--radius-sm) !important;
    border-color: var(--color-border) !important;
}

.picker-compact .mud-input-root {
    background: var(--color-bg-input) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0 8px !important;
    min-height: 44px !important;
    height: 44px !important;
}

.picker-compact .mud-input-slot {
    font-size: var(--text-sm) !important;
    padding: 0 16px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide the adornment icon to save space in tight columns */
.picker-compact .mud-input-adornment {
    display: none !important;
}

.picker-compact .mud-input-root:focus-within .mud-input-outlined-border {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74,103,65,.10) !important;
}

.picker-disabled .mud-input-root {
    opacity: .45 !important;
    cursor: not-allowed !important;
}

/* MudPicker dialog — sized and colored for this app */
.mud-picker-container {
    border-radius: var(--radius-lg) !important;
    overflow: hidden !important;
    max-width: calc(100vw - 32px) !important;
}

.mud-picker-content {
    background: var(--color-bg-card) !important;
}

.mud-time-picker-clock-pin,
.mud-time-picker-clock-hand {
    background-color: var(--color-primary) !important;
}

.mud-time-picker-clock-number.mud-time-picker-clock-number-selected {
    background-color: var(--color-primary) !important;
}

.mud-day.mud-selected {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.mud-day:hover {
    background-color: var(--color-bg-muted) !important;
}

.mud-button-text-primary {
    color: var(--color-primary) !important;
}



/* ── Appointment Detail Page ────────────────────────────────────────────────── */

/* Dark olive header */
.appt-detail-header {
    background: linear-gradient(160deg, var(--color-primary-deeper), var(--color-primary-dark));
    padding: clamp(14px,4vw,18px) clamp(16px,4.5vw,20px) clamp(16px,4.5vw,20px);
    flex-shrink: 0
}

/* Row 1 — person icon + name/phone + status badge */
.appt-detail-header-row1 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: clamp(10px,3vw,14px)
}

.appt-detail-header-icon-col {
    display: flex;
    align-items: center;
    padding-top: 2px;
    flex-shrink: 0
}

.appt-detail-header-name-group {
    flex: 1;
    min-width: 0
}

.appt-detail-header-name {
    font-size: clamp(18px,5vw,22px);
    font-weight: 900;
    color: white;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.appt-detail-header-phone {
    font-size: var(--text-xs);
    color: rgba(255,255,255,.55);
    margin-top: 3px;
    font-weight: 500
}

/* Row 2 — calendar + date */
.appt-detail-header-row2 {
    display: flex;
    align-items: center;
    margin-bottom: clamp(6px,2vw,8px)
}

/* Row 3 — clock + time + amount */
.appt-detail-header-row3 {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.appt-detail-header-meta {
    font-size: var(--text-sm);
    color: rgba(255,255,255,.8);
    font-weight: 600
}

.appt-detail-header-amount {
    font-size: clamp(18px,5vw,22px);
    font-weight: 900;
    color: var(--color-gold);
    letter-spacing: -.3px
}

/* Scrollable content area */
/* Web note: this used to be flex:1; overflow-y:auto with a 220px
   bottom-padding reserve for a position:fixed action bar. Both are stale
   here now — .se-content (AppShellLayout.razor) is the one scroll region
   on Web, and the action bar is docked separately via SePageFooter's
   SectionOutlet, not padding-reserved space in the flow. Mobile still
   uses its own copy of this file with the original rule (own full-screen
   scroll region + fixed bottom bar), so this divergence is intentional. */
.appt-detail-scroll {
    padding: clamp(12px,3.5vw,16px) clamp(14px,4vw,18px);
}

/* Notes */
.appt-detail-notes {
    display: flex;
    align-items: flex-start;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: clamp(10px,3vw,14px) clamp(12px,3.5vw,16px);
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    line-height: 1.5;
    margin-bottom: clamp(6px,2vw,8px);
    box-shadow: var(--shadow-xs)
}

/* Services card — one card, all services inside */
.appt-detail-services-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden
}

.appt-detail-service-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: clamp(10px,3vw,14px) clamp(12px,3.5vw,16px) clamp(4px,1.5vw,6px)
}

.appt-detail-service-staff {
    display: flex;
    align-items: center;
    padding: clamp(4px,1.5vw,5px) clamp(12px,3.5vw,16px) clamp(10px,3vw,14px)
}

.appt-detail-service-divider {
    border-bottom: 1px solid var(--color-border-light)
}

.appt-detail-service-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 2px
}

.appt-detail-service-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted)
}

.appt-detail-service-price {
    font-size: var(--text-sm);
    font-weight: 900;
    color: var(--color-gold-dark);
    white-space: nowrap;
    flex-shrink: 0
}

/* Fixed action bar */
.appt-detail-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: clamp(60px,16vw,72px);
    z-index: 200;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border-light);
    padding: clamp(10px,3vw,14px) clamp(14px,4vw,18px) max(clamp(10px,3vw,14px), env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(44,58,30,.08);
    display: flex;
    flex-direction: column;
    gap: clamp(6px,2vw,8px)
}

/* Row of 2 equal buttons in action bar */
.appt-detail-action-row {
    display: flex;
    gap: clamp(6px,2vw,8px)
}

/* Secondary outlined button */
.appt-detail-btn-secondary {
    flex: 1;
    height: clamp(42px,11vw,48px);
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s
}

    .appt-detail-btn-secondary:active {
        background: var(--color-bg-muted)
    }

/* Destructive outlined button */
.appt-detail-btn-destructive {
    flex: 1;
    height: clamp(42px,11vw,48px);
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-cancelled);
    border-radius: var(--radius-md);
    color: var(--color-cancelled);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s
}

    .appt-detail-btn-destructive:active {
        background: var(--color-cancelled-bg)
    }

/* ── Manage Staff Bottom Sheet ───────────────────────────────────────────────── */
.staff-sheet-service {
    padding: clamp(10px,3vw,14px) 0
}

.staff-sheet-service-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text)
}

.staff-sheet-service-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

/* Timeline strip */
.staff-sheet-timeline {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 4px rgba(44,58,30,.10);
    padding: 14px 14px 10px;
    margin-bottom: 14px
}

.staff-sheet-timeline-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px
}

.staff-sheet-timeline-track {
    position: relative;
    height: 54px;
    background: var(--color-bg-muted);
    border-radius: 8px
}

.staff-sheet-timeline-block {
    position: absolute;
    top: 4px;
    height: 26px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    transition: left .2s ease, width .2s ease, top .2s ease, background .2s ease
}

    .staff-sheet-timeline-block.olive { background: var(--color-primary) }
    .staff-sheet-timeline-block.gold { background: var(--color-gold); color: var(--color-primary-deeper) }

.staff-sheet-timeline-legend {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 10.5px;
    color: var(--color-text-muted)
}

    .staff-sheet-timeline-legend span {
        display: flex;
        align-items: center;
        gap: 5px
    }

.staff-sheet-timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%
}

/* Expandable row */
.staff-sheet-row {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 4px rgba(44,58,30,.10);
    margin-bottom: 10px;
    overflow: hidden
}

.staff-sheet-row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    cursor: pointer
}

.staff-sheet-row-head-text {
    flex: 1;
    min-width: 0
}

.staff-sheet-row-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap
}

    .staff-sheet-row-time.overlap { color: var(--color-gold-dark) }
    .staff-sheet-row-time.unassigned { color: var(--color-inprogress) }

.staff-sheet-row-chevron {
    color: var(--color-text-muted);
    font-size: 18px;
    transition: transform .2s;
    margin-left: 2px
}

.staff-sheet-row.open .staff-sheet-row-chevron { transform: rotate(180deg) }

.staff-sheet-row-body {
    display: none;
    padding: 0 14px 16px;
    border-top: 1px solid var(--color-border-light)
}

.staff-sheet-row.open .staff-sheet-row-body {
    display: block;
    padding-top: 12px
}

.staff-sheet-pill {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-card);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-text-soft);
    cursor: pointer
}

    .staff-sheet-pill.selected {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff
    }

.staff-sheet-stepper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px
}

.staff-sheet-stepper {
    display: flex;
    align-items: center;
    gap: 10px
}

.staff-sheet-stepper button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-card);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

    .staff-sheet-stepper button:disabled {
        opacity: .4;
        cursor: default
    }

.staff-sheet-stepper .val {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    min-width: 62px;
    text-align: center
}

.staff-sheet-row-conflict {
    margin-top: 12px;
    background: var(--color-cancelled-bg);
    border-left: 3px solid var(--color-cancelled);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11.5px;
    color: var(--color-cancelled);
    font-weight: 600;
    line-height: 1.4
}

.staff-sheet-save-error {
    background: var(--color-cancelled-bg);
    border-left: 3px solid var(--color-cancelled);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--color-cancelled);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 14px
}

/* ═══════════════════════════════════════════════════════════════
   Invoice Detail Page
   ═══════════════════════════════════════════════════════════════ */

/* Page container — full height flex column */
.inv-detail-page {
    display: flex;
    flex-direction: column;
    height: var(--viewport-height);
    overflow: hidden;
    background: var(--color-bg-app)
}

/* Avatar in header — two-letter initials, gold tinted */
.inv-detail-avatar {
    width: clamp(36px,10vw,42px);
    height: clamp(36px,10vw,42px);
    border-radius: 50%;
    background: rgba(201,168,76,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(13px,3.5vw,15px);
    font-weight: 900;
    color: var(--color-gold);
    flex-shrink: 0
}

/* Status badge in header */
.inv-detail-status-badge {
    border-radius: var(--radius-full);
    padding: clamp(3px,1vw,4px) clamp(10px,3vw,14px);
    font-size: var(--text-xs);
    font-weight: 800;
    flex-shrink: 0;
    white-space: nowrap
}

/* Booking chip in header row 3 — tappable */
.inv-detail-booking-chip {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-full);
    padding: clamp(3px,1vw,4px) clamp(8px,2.5vw,12px);
    font-size: var(--text-xs);
    font-weight: 700;
    color: rgba(255,255,255,.9);
    cursor: pointer;
    transition: background .15s
}

    .inv-detail-booking-chip:active {
        background: rgba(255,255,255,.25)
    }

/* Scrollable content area */
/* Web note: same fix as .appt-detail-scroll above — .se-content is the
   one scroll region on Web, so this no longer needs its own flex:1/
   overflow-y:auto, and the payment/receipt padding-bottom variants (sized
   to clear the old position:fixed action bar) are stale now that the
   action bar is docked separately via SePageFooter. Mobile keeps the
   original rule in its own copy of this file. */
.inv-detail-scroll {
    padding: clamp(12px,3.5vw,16px) clamp(14px,4vw,18px)
}

/* Payment mode — extra bottom padding for fixed collect button */
.inv-detail-scroll--payment {
    padding-bottom: clamp(16px,4vw,20px)
}

/* Receipt mode — natural bottom padding */
.inv-detail-scroll--receipt {
    padding-bottom: clamp(16px,4vw,20px)
}

/* Document zone card — items + totals */
.inv-detail-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    box-shadow: var(--shadow-sm);
    margin-bottom: clamp(8px,2.5vw,12px);
    border: 1px solid var(--color-border-light)
}

/* Section label inside card */
.inv-detail-section-label {
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: .5px;
    margin-bottom: clamp(8px,2.5vw,12px)
}

/* Partition label — Services / Products divider */
.inv-detail-partition-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    padding: clamp(6px,2vw,8px) 0 clamp(4px,1.5vw,6px);
    border-bottom: 1px solid var(--color-border-light)
}

/* Line item row */
.inv-detail-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(8px,2.5vw,10px) 0;
    border-bottom: 1px solid var(--color-border-light)
}

    .inv-detail-line:last-of-type {
        border-bottom: none
    }

.inv-detail-line-left {
    flex: 1;
    min-width: 0
}

.inv-detail-line-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.inv-detail-line-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.inv-detail-line-amount {
    font-size: var(--text-sm);
    font-weight: 800;
    color: var(--color-text-dark);
    white-space: nowrap;
    flex-shrink: 0
}

/* Totals block — sits at bottom of items card */
.inv-detail-totals {
    border-top: 2px solid var(--color-border-light);
    margin-top: clamp(10px,3vw,14px);
    padding-top: clamp(8px,2.5vw,12px)
}

.inv-detail-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(3px,1vw,5px) 0;
    font-size: var(--text-sm)
}

.inv-detail-total-label {
    color: var(--color-text-soft);
    font-weight: 500
}

.inv-detail-total-value {
    font-weight: 600
}

/* Grand total row — bold, larger */
.inv-detail-grand-total {
    padding: clamp(8px,2.5vw,12px) 0 clamp(6px,2vw,8px);
    border-top: 2px solid var(--color-border-light);
    margin-top: clamp(4px,1.5vw,6px);
    font-size: var(--text-md);
    font-weight: 900;
    color: var(--color-gold-dark)
}

/* Balance Due row — contextual color */
.text-due {
    color: var(--color-unpaid)
}

.text-paid {
    color: var(--color-paid)
}

/* Notes card */
.inv-detail-notes {
    display: flex;
    align-items: flex-start;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: clamp(10px,3vw,12px) clamp(12px,3.5vw,16px);
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    line-height: 1.5;
    margin-bottom: clamp(8px,2.5vw,12px);
    box-shadow: var(--shadow-xs)
}

/* Refund banners */
.inv-detail-refund-banner {
    border-radius: var(--radius-md);
    padding: clamp(12px,3.5vw,16px);
    margin-bottom: clamp(8px,2.5vw,12px)
}

.inv-detail-refund-banner--required {
    background: var(--color-cancelled-bg);
    border-left: 4px solid var(--color-cancelled)
}

.inv-detail-refund-banner--completed {
    background: var(--color-completed-bg);
    border-left: 4px solid var(--color-completed)
}

.inv-detail-refund-banner--voided {
    background: var(--color-cancelled-bg);
    border-left: 4px solid var(--color-cancelled)
}

.inv-detail-refund-title {
    font-size: var(--text-sm);
    font-weight: 800;
    margin-bottom: 6px
}

.inv-detail-refund-banner--required .inv-detail-refund-title {
    color: var(--color-cancelled)
}

.inv-detail-refund-banner--completed .inv-detail-refund-title {
    color: var(--color-completed)
}

.inv-detail-refund-banner--voided .inv-detail-refund-title {
    color: var(--color-cancelled)
}

.inv-detail-refund-body {
    font-size: var(--text-xs);
    line-height: 1.55
}

.inv-detail-refund-banner--required .inv-detail-refund-body {
    color: var(--color-cancelled)
}

.inv-detail-refund-banner--completed .inv-detail-refund-body {
    color: var(--color-completed)
}

.inv-detail-refund-banner--voided .inv-detail-refund-body {
    color: var(--color-cancelled)
}

/* ── Visual separator between document and action zones ── */
.inv-detail-zone-separator {
    height: 1px;
    background: var(--color-border-light);
    margin: clamp(14px,4vw,20px) calc(-1 * clamp(14px,4vw,18px));
    position: relative
}

    .inv-detail-zone-separator::before {
        content: 'PAYMENT';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        background: var(--color-bg-app);
        padding: 0 12px;
        font-size: 10px;
        font-weight: 800;
        color: var(--color-text-muted);
        letter-spacing: 1px
    }

/* ── Action zone — payment collection area ── */
.inv-detail-action-zone {
    padding-top: clamp(4px,1.5vw,6px)
}

/* Balance due hero block */
.inv-detail-balance-hero {
    text-align: center;
    padding: clamp(16px,4.5vw,22px) 0 clamp(14px,4vw,18px)
}

.inv-detail-balance-hero-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px
}

.inv-detail-balance-hero-amount {
    font-size: clamp(36px,10vw,44px);
    font-weight: 900;
    color: var(--color-primary-deeper);
    letter-spacing: -1px;
    line-height: 1
}

.inv-detail-balance-hero-sub {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 8px;
    font-weight: 500
}

/* Payment method label */
.inv-detail-method-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: clamp(8px,2.5vw,10px)
}

/* Payment method icon buttons row */
.inv-detail-method-row {
    display: flex;
    gap: clamp(8px,2.5vw,10px)
}

/* Individual method button */
.inv-detail-method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: clamp(10px,3vw,14px) clamp(6px,2vw,8px);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    cursor: pointer;
    transition: all .15s;
    box-shadow: var(--shadow-xs)
}

    .inv-detail-method-btn.active {
        border-color: var(--color-primary);
        background: var(--color-bg-muted);
        box-shadow: 0 0 0 2px rgba(74,103,65,.15)
    }

    .inv-detail-method-btn:active {
        transform: scale(.97)
    }

.inv-detail-method-icon {
    font-size: clamp(20px,5.5vw,24px);
    color: var(--color-text-muted)
}

.inv-detail-method-btn.active .inv-detail-method-icon {
    color: var(--color-primary)
}

.inv-detail-method-label-text {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-muted)
}

.inv-detail-method-btn.active .inv-detail-method-label-text {
    color: var(--color-primary)
}

/* Bottom spacer — prevents fixed bar covering content */
.inv-detail-bottom-spacer {
    height: clamp(80px,20vw,100px)
}

/* ═══════════════════════════════════════════════════════════════
   New Invoice Page — Missing Classes
   ═══════════════════════════════════════════════════════════════ */

/* Tab switcher */
.inv-tab-wrap {
    display: flex;
    gap: 6px;
    margin-bottom: clamp(10px,3vw,14px);
    background: var(--color-bg-muted);
    border-radius: var(--radius-sm);
    padding: 4px
}

.inv-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: clamp(7px,2vw,9px);
    border: none;
    border-radius: var(--radius-xs);
    background: transparent;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all .15s
}

    .inv-tab-btn .material-symbols-rounded {
        font-size: 16px
    }

    .inv-tab-btn.active {
        background: var(--color-bg-card);
        color: var(--color-primary);
        font-weight: 800;
        box-shadow: var(--shadow-xs)
    }

/* Dropdown row meta — muted subtext below name */
.dropdown-row-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

/* Dropdown row right side — qty buttons */
.dropdown-row-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0
}

/* Quantity badge in dropdown — ×2 */
.dropdown-qty-badge {
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-primary);
    min-width: 20px;
    text-align: center
}

/* Stock status pills */
.stock-pill {
    display: inline-block;
    border-radius: var(--radius-full);
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700
}

.stock-ok {
    background: var(--color-completed-bg);
    color: var(--color-completed)
}

.stock-low {
    background: var(--color-inprogress-bg);
    color: var(--color-inprogress)
}

.stock-out {
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled)
}

/* Table partition rows */
.table-partition-row td {
    padding: clamp(6px,2vw,8px) 0 clamp(4px,1.5vw,5px)
}

.table-partition-label {
    display: flex;
    align-items: center;
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px
}

    .table-partition-label .material-symbols-rounded {
        font-size: 13px;
        margin-right: 5px
    }

/* Custom item fields row */
.custom-item-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
    padding: clamp(8px,2.5vw,10px) 0 clamp(4px,1.5vw,6px);
    border-top: 1px solid var(--color-border-light);
}

    .custom-item-toggle .material-symbols-rounded {
        font-size: 16px
    }

.custom-item-fields {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: clamp(8px,2.5vw,10px)
}

/* Tbl qty cell inside selected table */
.tbl-qty-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px
}

.tbl-qty-btn {
    width: clamp(24px,7vw,28px);
    height: clamp(22px,6vw,26px);
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-card);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-soft);
    transition: all .12s
}

    .tbl-qty-btn:active {
        background: var(--color-bg-muted)
    }

    .tbl-qty-btn:disabled {
        opacity: .35;
        cursor: not-allowed
    }

.tbl-qty-num {
    font-size: var(--text-sm);
    font-weight: 800;
    min-width: 18px;
    text-align: center;
    color: var(--color-text-dark)
}

/* ═══════════════════════════════════════════════════════════════
   Customer Detail Page — APPEND THIS TO THE END OF YOUR app.css
   ═══════════════════════════════════════════════════════════════ */

/* Empty-state variant of the visit count badge — dash when zero visits */
.customer-visits--empty {
    background: var(--color-bg-muted);
    color: var(--color-text-muted);
    font-weight: 800
}

/* Profile card — light card replacing the dark salon-card pattern
   that was previously (incorrectly) reused on this page */
.customer-profile-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: clamp(14px,4vw,18px);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    margin-bottom: clamp(12px,3.5vw,16px)
}

/* Stats row inside profile card */
.customer-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    text-align: center;
    margin-top: clamp(12px,3.5vw,16px);
    padding-top: clamp(12px,3.5vw,16px);
    border-top: 1px solid var(--color-border-light)
}

.customer-stat-cell {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.customer-stat-value {
    font-size: clamp(18px,5vw,22px);
    font-weight: 900;
    color: var(--color-primary)
}

.customer-stat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .4px
}

/* Notes block inside profile card */
.customer-notes-block {
    margin-top: clamp(10px,3vw,12px);
    background: var(--color-bg-muted);
    padding: clamp(8px,2.5vw,10px) clamp(10px,3vw,12px);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--color-text-soft);
    line-height: 1.5;
    display: flex;
    align-items: flex-start
}

/* Tab switcher — Appointments / Invoices */
.customer-tab-wrap {
    display: flex;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 3px;
    margin-bottom: clamp(10px,3vw,12px);
    box-shadow: var(--shadow-sm)
}

.customer-tab-btn {
    flex: 1;
    padding: clamp(7px,2vw,9px);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 700;
    background: transparent;
    color: var(--color-text-muted);
    transition: all .15s
}

    .customer-tab-btn.active {
        background: var(--color-primary);
        color: white
    }

/* ── Customer Detail — APPEND TO END OF app.css ── */

.customer-header-edit-btn {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-sm);
    padding: clamp(6px,2vw,8px) clamp(8px,2.5vw,10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.85);
    flex-shrink: 0;
    transition: background .15s
}

    .customer-header-edit-btn:active {
        background: rgba(255,255,255,.22)
    }

.customer-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: clamp(10px,3vw,12px)
}

.customer-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-full);
    padding: clamp(4px,1.5vw,6px) clamp(10px,3vw,12px);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-soft);
    box-shadow: var(--shadow-xs)
}

    .customer-meta-chip .material-symbols-rounded {
        font-size: 14px;
        color: var(--color-primary)
    }

/* ── Web-only addition: whole-row click affordance for MudTable list pages ──
   Matches Mobile's tap-anywhere-on-card behavior via MudTable's OnRowClick. */
.cursor-pointer {
    cursor: pointer;
}
