﻿/* ============================================================
   NOMAD â€” Global Stylesheet
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   CSS Variables
     --brand-*          brand / accent colours
     --nav-*            navigation chrome colours
     --surface-*        background surfaces (page, card, subtleâ€¦)
     --text-*           text colours
     --border-*         border colours
     --danger-*         destructive-action colours
     --radius-*         border-radius scale
     --shadow-*         box-shadow tokens
     --space-*          spacing scale (4 px increments)
     --font-*           font-size scale
     --transition       shared animation timing
     --layout-*         structural dimensions (header, sidebar)

   Class naming  (BEM â€” __ element, -- modifier)
     Block              .edit-pane   .table-card   .sidebar
     Element            .edit-pane__body   .edit-pane__footer
     Modifier           .tab-btn--active   .form-group--check
     Utilities          .u-text-muted   (sparingly)
   ============================================================ */


/* â”€â”€â”€ Fonts â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@import url("https://use.typekit.net/ebm2xgr.css");


/* â”€â”€â”€ Blazor framework styles (do not remove) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
    font-size: 0.72rem;
    white-space: nowrap;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--brand);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text::after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    font-size: var(--font-base);
    font-weight: 400;
    opacity: 1;
}

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

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


/* â”€â”€â”€ Design tokens â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
    /* Brand */
    --brand:                #F6B020;
    --brand-hover:          #DD9F1C;

    /* Navigation chrome */
    --nav-bg:               #253A43;
    --nav-bg-alt:           #3B4E56;

    /* Surfaces */
    --surface-page:         #F5F5F5;
    --surface-card:         #ffffff;
    --surface-subtle:       #FAFAFA;
    --surface-muted:        #EEEEEE;
    --surface-hover:        #E0E0E0;

    /* Text */
    --text-primary:         #212121;
    --text-secondary:       #424242;
    --text-subtle:          #616161;
    --text-muted:           #9E9E9E;

    /* Borders */
    --border:               #E0E0E0;
    --border-strong:        #BDBDBD;

    /* Accent */
    --ace-blue:             #1A688A;

    /* Alert & status */
    --success:              #00C247;
    --success-surface:      #dcfce7;
    --success-border:       #86efac;
    --info:                 #004CEB;
    --info-surface:         #dbeafe;
    --info-border:          #93c5fd;
    --warning:              #FFC341;
    --warning-surface:      #fef9c3;
    --warning-border:       #fde047;

    /* Danger / destructive */
    --danger:               #FF3333;
    --danger-hover:         #e62e2e;
    --danger-dark:          #cc2929;
    --danger-surface:       #fee2e2;
    --danger-border:        #fca5a5;

    /* Border radius */
    --radius-sm:            4px;
    --radius-md:            6px;
    --radius-lg:            10px;
    --radius-pill:          20px;

    /* Shadows */
    --shadow-card:          0 1px 3px rgba(0, 0, 0, 0.07);

    /* Spacing (4 px base unit) */
    --space-1:              4px;
    --space-2:              8px;
    --space-3:              12px;
    --space-4:              16px;
    --space-5:              20px;
    --space-6:              24px;
    --space-7:              28px;
    --space-8:              32px;

    /* Typography */
    --font-xs:              11px;
    --font-sm:              12px;
    --font-base:            13px;
    --font-md:              14px;
    --font-lg:              15px;

    /* Transitions */
    --transition:           0.15s;

    /* Layout dimensions */
    --layout-header-h:      58px;
    --layout-sidebar-w:     88px;
}


/* â”€â”€â”€ Reset â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'proxima-nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--font-md);
    color: var(--text-primary);
}


/* â”€â”€â”€ App shell â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}


/* â”€â”€â”€ Header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-header {
    height: var(--layout-header-h);
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    padding: 0 var(--space-5);
    gap: var(--space-4);
    flex-shrink: 0;
}

.app-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    user-select: none;
}

.app-logo__img {
    height: 28px;
    width: auto;
    display: block;
}

.app-search {
    flex: 1;
    max-width: min(600px, 60vw);
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

    .app-search input {
        width: 100%;
        background: rgba(255, 255, 255, 0.11);
        border: none;
        border-radius: var(--radius-md);
        padding: 7px 40px 7px 14px;
        color: white;
        font-size: var(--font-md);
        outline: none;
        transition: background var(--transition);
    }

        .app-search input:focus {
            background: rgba(255, 255, 255, 0.18);
        }

    .app-search .search-icon {
        position: absolute;
        right: 11px;
        pointer-events: none;
    }


/* â”€â”€â”€ Body row â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}


/* â”€â”€â”€ Sidebar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar {
    width: var(--layout-sidebar-w);
    background-color: var(--nav-bg-alt);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-5) 0;
    gap: var(--space-1);
    flex-shrink: 0;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 70px;
    padding: 10px var(--space-2);
    border-radius: var(--radius-lg);
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: var(--font-xs);
    font-weight: 500;
    text-align: center;
    transition: color var(--transition), background var(--transition);
}

    .sidebar-item:hover {
        color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.06);
    }

    .sidebar-item.active {
        color: white;
    }

    .sidebar-item i {
        font-size: 20px;
    }


/* â”€â”€â”€ Main content â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    background: var(--surface-page);
    padding: calc(clamp(var(--space-4), 2.5vw, 36px) - 15px) clamp(var(--space-5), 3vw, 36px) clamp(var(--space-4), 2.5vw, 36px);
}


/* ─── Dashboard ──────────────────────────────────────────────── */
.dashboard-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.company-location-selector {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.dashboard-filter-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

/* Labeled select (Company / Location dropdowns) */
.labeled-select {
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

.labeled-select__wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.labeled-select__chevron {
    position: absolute;
    right: 10px;
    font-size: 11px;
    color: var(--text-subtle);
    pointer-events: none;
}

.labeled-select__label {
    position: absolute;
    top: 0;
    left: 10px;
    transform: translateY(-50%);
    background: var(--surface-card);
    padding: 0 3px;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-subtle);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    transition: color var(--transition);
}

.labeled-select__control {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 7px 32px 7px 12px;
    font-size: var(--font-base);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 160px;
}

.labeled-select__control:focus {
    outline: none;
    border-color: var(--brand);
}

/* ─── Breadcrumb ──────────────────────────────────────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-base);
    color: var(--text-muted);
    margin-bottom: 18px;
}

    .breadcrumb a {
        color: var(--text-muted);
        text-decoration: none;
    }
    
        .breadcrumb a:hover {
            color: var(--text-subtle);
        }

    .breadcrumb .sep {
        color: var(--border-strong);
        font-size: 1.8rem;
        line-height: 1;
        padding: 0 var(--space-1);
        margin-bottom: 4px;
    }

.breadcrumb-active {
    color: var(--brand);
    font-weight: 500;
}


/* â”€â”€â”€ Tab bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tab-bar {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-7);
}

.tab-btn {
    padding: 7px 22px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border-strong);
    background: var(--surface-card);
    font-family: inherit;
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

    .tab-btn:hover {
        border-color: var(--text-muted);
    }

    .tab-btn.active,
    .tab-btn--active {
        background: var(--brand);
        border-color: var(--brand);
        color: white;
    }


/* â”€â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 30px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), opacity var(--transition);
    white-space: nowrap;
}

    .btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.btn-primary {
    background: var(--nav-bg);
    color: #FFFFFF;
    border: none;
}

    .btn-primary:hover:not(:disabled) {
        background: var(--nav-bg-alt);
    }

.btn-secondary {
    background: transparent;
    color: var(--nav-bg);
    border: 1.5px solid var(--nav-bg);
}

    .btn-secondary:hover:not(:disabled) {
        background: var(--surface-muted);
    }

.btn-brand {
    background: var(--brand);
    color: #FFFFFF;
    border: none;
}

    .btn-brand:hover:not(:disabled) {
        background: var(--brand-hover);
    }

.btn-danger {
    background: var(--danger);
    color: #FFFFFF;
    border: none;
}

    .btn-danger:hover:not(:disabled) {
        background: var(--danger-hover);
    }


/* â”€â”€â”€ Table card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.table-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.table-scroll {
    overflow-x: auto;
}

.sipp-no-location {
    padding: var(--space-8) var(--space-6);
    color: var(--text-muted);
    font-size: var(--font-base);
}

.placeholder-tab {
    padding: var(--space-8);
    color: var(--text-muted);
    font-size: var(--font-md);
}

/* ── Location Info ──────────────────────────────────────────── */

.location-selector-select:focus {
    outline: none;
    border-color: var(--brand);
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.location-subtab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface-page);
    padding: 0 var(--space-4);
    margin-bottom: var(--space-4);
}

.location-subtab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: var(--space-3) var(--space-4);
    font-family: inherit;
    font-weight: 600;
    font-size: var(--font-base);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition), border-color var(--transition);
    margin-bottom: -1px;
}

.location-subtab:hover {
    color: var(--text-primary);
}

.location-subtab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 600;
}

.location-details-layout {
    display: flex;
    gap: 0;
    align-items: flex-start;
    padding: var(--space-4);
}

.location-details-layout > *:first-child {
    padding-right: var(--space-6);
    border-right: 1px solid var(--border);
}

.location-details-layout > * + * {
    padding-left: var(--space-6);
}

/* ─── SIPP Codes tab ──────────────────────────────────────────────────── */

.sipp-codes-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    padding: var(--space-4);
    min-height: calc(100vh - 220px);
}

.sipp-codes-layout > .multi-select {
    flex: 0 0 160px;
    width: 160px;
    align-self: flex-start;
    margin-top: 8px;
    margin-right: var(--space-4);
}

.sipp-codes-layout > .edit-pane {
    flex: 0 0 260px;
    width: 260px;
    border-left: 2px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Coverage page split layout */
.coverage-page-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    padding: var(--space-4) 0;
}

.coverage-grid-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .coverage-grid-area .table-card {
        flex: 0 0 auto;
        border-radius: var(--radius-lg) 0 0 0;
    }


.coverage-edit-area {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--border);
}

    .coverage-edit-area .edit-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 0 var(--radius-lg) 0 0;
        overflow: hidden;
    }

/* Add Ons page split layout */
.addons-page-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    padding: var(--space-4) 0;
}

.addons-grid-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .addons-grid-area .table-card {
        flex: 0 0 auto;
        border-radius: var(--radius-lg) 0 0 0;
    }

.addons-edit-area {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--border);
}

    .addons-edit-area .edit-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 0 var(--radius-lg) 0 0;
        overflow: hidden;
    }

/* Middle: SIPP code grid */
.sipp-grid-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sipp-grid-area .sipp-grid-card {
    flex: 0 0 auto;
}

.sipp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-base);
}

.sipp-table th {
    text-align: left;
    padding: 7px 10px;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-subtle);
    border-bottom: 1.5px solid var(--border);
    white-space: nowrap;
}

.sipp-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    color: var(--text-primary);
}

.sipp-table tr.row-click {
    cursor: pointer;
    transition: background var(--transition);
}

.sipp-table tr.row-click:hover {
    background: var(--surface-subtle);
}

.sipp-table tr.row-selected td {
    background: var(--brand);
    color: white;
}

.sipp-table__empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-6) !important;
}

.location-form {
    flex: 1;
    min-width: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 14px;
    column-gap: 12px;
    padding: 1.25rem 0;
}

.form-grid .form-group,
.form-grid .field {
    margin-top: 8px;
}

.form-grid .field {
    position: relative;
}

.form-grid .field > label {
    position: absolute;
    top: -6px;
    left: 10px;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-subtle);
    background: var(--surface-card);
    padding: 0 3px;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.form-group--compact > input:not([type=checkbox]):not([type=radio]),
.form-group--compact > select {
    font-size: var(--font-xs);
    padding: 3px 8px;
}


.form-group--short {
    min-width: 100px;
    max-width: 140px;
}

.form-group--wide {
    flex: 2;
}

.form-group--xs {
    min-width: 70px;
    max-width: 90px;
}

.form-group--wide {
    flex: 2;
}


/* Business Hours */
.biz-hours {
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 17px;
    margin-top: 20px;
}

.biz-hours-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-bottom: var(--space-2);
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.biz-hours-title {
    flex: 1;
}

.biz-hours-col-label {
    width: 48px;
    text-align: center;
}

.biz-hours-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.biz-hours-day {
    width: 34px;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.biz-hours-select-group {
    width: 100px;
}


.biz-hours-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 4px 8px;
    font-size: var(--font-sm);
    color: var(--text-primary);
    background: var(--surface-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 6px center;
    padding-right: 24px;
    cursor: pointer;
    width: 100px;
}

.biz-hours-row input[type="checkbox"] {
    width: 48px;
    text-align: center;
    margin: 0 auto;
    cursor: pointer;
    accent-color: var(--brand);
}


/* â”€â”€â”€ Data table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Hide QuickGrid placeholder/padding rows that contain no real content */
.data-table tbody tr:not(:has(.row-click)),
.user-table tbody tr:not(:has(.row-click)),
.sipp-table tbody tr:not(:has(.row-click)) {
    display: none;
}


.data-table,
.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-md);
}

    .data-table thead th,
    .user-table thead th {
        padding: clamp(10px, 1.2vw, 14px) clamp(var(--space-3), 1.5vw, 18px);
        text-align: left;
        font-weight: 600;
        font-size: clamp(var(--font-xs), 0.9vw, var(--font-base));
        color: var(--text-primary);
        border-bottom: 1.5px solid var(--border);
        white-space: nowrap;
        cursor: pointer;
        user-select: none;
    }

    .data-table thead th button,
    .user-table thead th button {
        width: 100%;
        padding: 0;
        text-align: left;
        justify-content: flex-start;
    }

        .data-table thead th:hover,
        .user-table thead th:hover {
            background: var(--surface-subtle);
        }

    .data-table tbody td,
    .user-table tbody td {
        padding: clamp(9px, 1.1vw, var(--space-3)) clamp(var(--space-3), 1.5vw, 18px);
        color: var(--text-secondary);
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
        font-size: clamp(var(--font-sm), 0.95vw, var(--font-md));
        text-align: left;
    }

    .data-table tbody tr:last-child td,
    .user-table tbody tr:last-child td {
        border-bottom: none;
    }

    .data-table tbody tr:nth-child(odd),
    .user-table tbody tr:nth-child(odd) {
        background: var(--surface-subtle);
    }

    .data-table tbody tr:nth-child(even),
    .user-table tbody tr:nth-child(even) {
        background: var(--surface-card);
    }

    .data-table tbody tr:hover,
    .user-table tbody tr:hover {
        background: var(--surface-hover);
    }

.td-center,
.member-cell {
    text-align: center;
}

.checkmark {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--text-primary);
}


/* â”€â”€â”€ Row click & selection â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.user-table tbody tr,
.data-table tbody tr {
    cursor: pointer;
}

.user-table .row-click,
.data-table .row-click {
    display: block;
    margin:  calc(-1 * clamp(9px, 1.1vw, var(--space-3)))  calc(-1 * clamp(var(--space-3), 1.5vw, 18px));
    padding: clamp(9px, 1.1vw, var(--space-3)) clamp(var(--space-3), 1.5vw, 18px);
    text-align: left;
}

.user-table tbody tr.row-selected td,
.data-table tbody tr.row-selected td {
    background: var(--brand) !important;
    color: white !important;
}


/* â”€â”€â”€ Pagination bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pagination-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: var(--space-3) 18px;
    border-top: 1px solid var(--border);
    background: var(--surface-card);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    font-size: var(--font-base);
    color: var(--text-secondary);
}

    .pagination-bar a,
    .pagination-bar button {
        padding: var(--space-1) 10px;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background: var(--surface-card);
        color: var(--text-secondary);
        cursor: pointer;
        font-size: var(--font-base);
        text-decoration: none;
        transition: background var(--transition), border-color var(--transition);
    }

        .pagination-bar a:hover,
        .pagination-bar button:hover {
            border-color: var(--brand);
            color: var(--brand);
        }

        .pagination-bar a[aria-current="page"],
        .pagination-bar button[aria-current="page"] {
            background: var(--brand);
            border-color: var(--brand);
            color: white;
        }


/* ─── Pagination bar inline add button ─────────────────────────────────────── */
.pagination-add-btn {
    margin-right: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color var(--transition), color var(--transition);
}

    .pagination-add-btn:hover {
        border-color: var(--brand);
        color: var(--brand);
    }

    .pagination-add-btn svg {
        width: 16px;
        height: 16px;
    }


/* ─── User grid add button ─────────────────────────────────────────────────── */
.user-add-btn {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), color var(--transition);
    z-index: 1;
}

    .user-add-btn:hover {
        border-color: var(--brand);
        color: var(--brand);
    }

    .user-add-btn svg {
        width: 18px;
        height: 18px;
    }


/* â”€â”€â”€ User page split layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.user-page-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.user-grid-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .user-grid-area .table-card {
        flex: 1;
        border-radius: var(--radius-lg) 0 0 0;
    }

.user-edit-area {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #e5e7eb;
}

    .user-edit-area .edit-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 0 var(--radius-lg) 0 0;
        overflow: hidden;
    }

    .user-edit-area .edit-pane-body {
        flex: 1;
        overflow-y: auto;
    }

.fleet-outer {
    display: flex;
    flex-direction: column;
}

.fleet-page-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.fleet-grid-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .fleet-grid-area .table-card {
        flex: 1;
        border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    }

.fleet-edit-area {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #e5e7eb;
}

    .fleet-edit-area .edit-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .fleet-edit-area .edit-pane-body {
        flex: 1;
        overflow-y: auto;
    }

.fleet-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
}

.fleet-status-filter select {
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.btn-export {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: color var(--transition), background var(--transition);
}

    .btn-export:hover {
        color: var(--text-secondary);
        background: var(--surface-muted);
    }

    .btn-export svg {
        width: 18px;
        height: 18px;
    }

.btn-add-float {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--text-muted);
    cursor: pointer;
    margin: 10px auto;
    transition: border-color var(--transition), color var(--transition);
}

    .btn-add-float:hover {
        border-color: var(--brand);
        color: var(--brand);
    }

    .btn-add-float svg {
        width: 18px;
        height: 18px;
    }


/* â”€â”€â”€ System Setup 3-pane layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.setup-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
}

.setup-nav {
    width: 190px;
    flex-shrink: 0;
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    padding: var(--space-3) 0;
    overflow: hidden;
}

.setup-nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px var(--space-4);
    font-size: clamp(var(--font-xs), 0.9vw, var(--font-base));
    font-weight: 600;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.setup-nav-link:hover {
    background: var(--surface-muted);
    color: var(--text-primary);
}

.setup-nav-link.active {
    background: #212121 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.setup-nav-link.active:hover {
    background: #212121 !important;
    color: #ffffff !important;
}

/* ─── Taxes/Fees tab ─────────────────────────────────────────────────────── */

.taxfee-page-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    padding: var(--space-4) 0;
}

.taxfee-grid-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.taxfee-edit-area {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--border);
}

    .taxfee-edit-area .edit-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 0 var(--radius-lg) 0 0;
        overflow: hidden;
    }

.taxfee-matrix-area {
    padding: var(--space-4);
}

.taxfee-add-row {
    min-width: 120px;
    width: 120px;
    display: flex;
    justify-content: center;
    margin-top: var(--space-3);
}

.taxfee-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), color var(--transition);
}

    .taxfee-add-btn:hover {
        border-color: var(--brand);
        color: var(--brand);
    }

    .taxfee-add-btn svg {
        width: 18px;
        height: 18px;
    }

.taxfee-matrix-scroll {
    overflow-x: auto;
}

.taxfee-matrix {
    border-collapse: collapse;
    font-size: var(--font-base);
}

.taxfee-corner {
    min-width: 120px;
}

.taxfee-col-header {
    padding: 6px 12px;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
    user-select: none;
}

    .taxfee-col-header.col-selected {
        color: var(--brand);
        border-bottom-color: var(--brand);
    }

    .taxfee-col-header:hover:not(.col-selected) {
        background: var(--surface-subtle);
    }

.taxfee-col-name {
    font-weight: 600;
    font-size: var(--font-base);
    color: inherit;
}

.taxfee-col-sub {
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

    .taxfee-col-header.col-selected .taxfee-col-sub {
        color: var(--brand);
        opacity: 0.8;
    }

.taxfee-row-label {
    padding: 0 12px 0 0;
    white-space: nowrap;
    font-size: var(--font-base);
    color: var(--text-primary);
    text-align: right;
    height: 36px;
    vertical-align: middle;
}

.taxfee-cell {
    width: 60px;
    height: 36px;
    border: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
}

.taxfee-cell-diagonal {
    background: var(--surface-muted);
    cursor: default;
}

.taxfee-cell-active {
    cursor: pointer;
    transition: background var(--transition);
}

    .taxfee-cell-active:hover {
        background: var(--surface-subtle);
    }

.taxfee-dot {
    font-size: 18px;
    line-height: 1;
    color: var(--text-primary);
}

.setup-grid-area {
    flex: 1;
    min-width: 0;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .setup-grid-area .setup-table-card {
        flex: 1;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .setup-grid-area .setup-pagination {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

.setup-edit-area {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #e5e7eb;
}

    .setup-edit-area .edit-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 0 var(--radius-lg) 0 0 !important;
        overflow: hidden;
    }

    .setup-edit-area .edit-pane-body {
        flex: 1;
        overflow-y: auto;
    }


.setup-add-btn {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: var(--surface-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), color var(--transition);
    z-index: 1;
}

    .setup-add-btn:hover {
        border-color: var(--brand);
        color: var(--brand);
    }

    .setup-add-btn svg {
        width: 18px;
        height: 18px;
    }



/* â”€â”€â”€ Edit pane â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.edit-pane {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.edit-pane__toolbar,
.edit-pane-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: var(--space-2) 10px 0;
}

.edit-pane__body,
.edit-pane-body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.edit-pane__footer,
.edit-pane-footer {
    display: flex;
    justify-content: flex-end;
    padding: 10px var(--space-4) 14px;
    border-top: 1px solid var(--border);
}


/* â”€â”€â”€ Edit pane â€” cancel button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn-cancel-pane {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    transition: color var(--transition), background var(--transition);
}

    .btn-cancel-pane:hover {
        color: var(--text-secondary);
        background: var(--surface-muted);
    }

    .btn-cancel-pane svg {
        width: 20px;
        height: 20px;
    }


/* â”€â”€â”€ Edit pane â€” footer actions â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.footer-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.btn-save {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    transition: color var(--transition), background var(--transition);
}

    .btn-save:hover {
        color: var(--brand);
        background: #fff8e6;
    }

    .btn-save svg {
        width: 18px;
        height: 18px;
    }

/* â”€â”€â”€ Edit pane â€” delete button & confirm strip â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    transition: color var(--transition), background var(--transition);
}

    .btn-delete:hover {
        color: var(--danger);
        background: var(--danger-surface);
    }

    .btn-delete svg {
        width: 18px;
        height: 18px;
    }

.delete-confirm {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
}

.delete-confirm__label,
.delete-confirm-label {
    font-size: var(--font-sm);
    color: var(--text-muted);
    margin-left: auto;
}

.btn-confirm-delete {
    font-size: var(--font-sm);
    padding: var(--space-1) var(--space-3);
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition);
}

    .btn-confirm-delete:hover {
        background: var(--danger-hover);
    }

.btn-cancel-delete {
    font-size: var(--font-sm);
    padding: var(--space-1) var(--space-3);
    background: var(--surface-muted);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition);
}

    .btn-cancel-delete:hover {
        background: var(--border);
    }


/* â”€â”€â”€ Form groups â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-group {
    position: relative;
}

.form-group-row {
    display: flex;
    gap: var(--space-3);
}

    .form-group-row .form-group {
        flex: 1;
    }

/* Floating notch label */
.form-group > label {
    position: absolute;
    top: -6px;
    left: 10px;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-subtle);
    background: var(--surface-card);
    padding: 0 3px;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
    transition: color var(--transition);
}

.form-group:focus-within > label {
    color: var(--brand);
}

/* Text-like inputs */
.form-group > input:not([type=checkbox]):not([type=radio]),
.form-group > select,
.form-group > textarea {
    font-size: var(--font-base);
    color: var(--text-primary);
    padding: var(--space-2) 10px;
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    width: 100%;
    outline: none;
    transition: border-color var(--transition);
    font-family: inherit;
}

.form-group > select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

.biz-hours .biz-hours-select-group > select {
    padding: 4px 24px 4px 8px;
    font-size: var(--font-sm);
}

    .form-group > input:not([type=checkbox]):not([type=radio]):focus,
    .form-group > select:focus,
    .form-group > textarea:focus {
        border-color: var(--brand);
    }

/* Read-only display value */
.form-readonly {
    font-size: var(--font-base);
    color: var(--text-muted);
    padding: var(--space-2) 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-height: 34px;
}

/* Checkbox / radio row */
.form-group--check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    cursor: pointer;
}

    .form-group--check > span,
    .form-group--check > label {
        position: static;
        background: none;
        padding: 0;
        font-size: var(--font-base);
        font-weight: 500;
        color: var(--text-primary);
        pointer-events: auto;
    }

    .form-group--check > input[type=checkbox],
    .form-group--check > input[type=radio] {
        width: 16px;
        height: 16px;
        accent-color: var(--brand);
        cursor: pointer;
        flex-shrink: 0;
    }


/* â”€â”€â”€ Multi-select â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.multi-select {
    position: relative;
    display: inline-block;
    min-width: 200px;
    width: 100%;
}

.multi-select__backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}

.multi-select__label {
    position: absolute;
    top: 0;
    left: 10px;
    padding: 0 3px;
    background: var(--surface-card);
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-subtle);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    transform: translateY(-50%);
    transition: color var(--transition);
}

.multi-select__trigger {
    display: flex;
    align-items: center;
    padding: var(--space-2) 32px var(--space-2) 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    cursor: pointer;
    user-select: none;
    font-size: var(--font-base);
    color: var(--text-primary);
    transition: border-color var(--transition);
}

.multi-select__display {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-select__placeholder {
    color: var(--text-primary);
    font-size: var(--font-base);
    font-weight: 400;
}

.multi-select__chevron {
    position: absolute;
    right: 10px;
    font-size: 12px;
    color: var(--text-subtle);
    transition: transform var(--transition);
}

/* Open state */
.multi-select--open .multi-select__trigger {
    border-color: var(--brand);
}

.multi-select--open .multi-select__label {
    color: var(--brand);
}

.multi-select--open .multi-select__chevron {
    transform: rotate(180deg);
}

.payment-type-dropdown {
    display: grid;
    grid-template-columns: 1fr;
    padding: var(--space-2);
    gap: 2px;
    max-height: 40vh;
    overflow-y: auto;
}

.multi-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 200;
    overflow: hidden;
    max-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.multi-select__search-wrap {
    position: relative;
    padding: var(--space-2);
}

.multi-select__search {
    width: 100%;
    padding: 6px 28px 6px var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--font-base);
    color: var(--text-primary);
    background: var(--surface-subtle);
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color var(--transition);
}

    .multi-select__search:focus {
        border-color: var(--brand);
    }

.multi-select__search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.multi-select__divider {
    margin: 0;
    border: none;
    border-top: 1px solid var(--border);
}

.multi-select__checked-list {
    padding: var(--space-1) 0;
    flex-shrink: 0;
}

.multi-select__unchecked-list {
    padding: var(--space-1) 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.multi-select__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px var(--space-3);
    font-size: var(--font-base);
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

    .multi-select__item:hover {
        background: var(--surface-hover);
    }

    .multi-select__item input[type=checkbox] {
        width: 16px;
        height: 16px;
        accent-color: var(--brand);
        cursor: pointer;
        flex-shrink: 0;
    }

.multi-select__empty {
    padding: 10px var(--space-3);
    font-size: var(--font-base);
    color: var(--text-muted);
}


/* â”€â”€â”€ Feedback messages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Server-side error banner */
.server-error-banner {
    font-size: var(--font-sm);
    color: var(--danger-dark);
    background: var(--danger-surface);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-2);
}

/* Temporary PIN success banner (shown after user creation) */
.pin-success-banner {
    background: var(--success-surface, #f0fdf4);
    border: 1px solid var(--success-border, #86efac);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.pin-success-label {
    font-size: var(--font-sm);
    color: var(--success-dark, #166534);
}

.pin-success-pin-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pin-success-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--success-dark, #166534);
}

.btn-copy-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    background: transparent;
    border: 1px solid var(--success-border, #86efac);
    border-radius: var(--radius-sm);
    color: var(--success-dark, #166534);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.btn-copy-pin:hover {
    background: var(--success-border, #86efac);
}

.btn-copy-pin svg {
    width: 1rem;
    height: 1rem;
}

.pin-success-expiry {
    font-size: var(--font-xs);
    color: var(--text-secondary);
}

/* Inline field validation error */
.field-error {
    display: block;
    color: red;
    font-size: 0.72rem;
    white-space: nowrap;
}

.field-hint {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
    padding-left: 2px;
}

/* â”€â”€â”€ Phone input â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.phone-input {
    display: flex;
    gap: 0;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.phone-country-select {
    flex: 0 0 46%;
    min-width: 0;
    width: 46%;
    font-size: var(--font-base);
    color: var(--text-primary);
    padding: var(--space-2) var(--space-2);
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-local-input {
    flex: 1 1 0;
    min-width: 0;
    font-size: var(--font-base);
    color: var(--text-primary);
    padding: var(--space-2) 10px;
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    outline: none;
    font-family: inherit;
    transition: border-color var(--transition);
}

.phone-country-select:focus,
.phone-local-input:focus {
    border-color: var(--brand);
    z-index: 1;
}

.has-error .phone-country-select,
.has-error .phone-local-input {
    border-color: var(--danger);
}

/* Success state */
.form-group.has-success > label {
    color: var(--success);
}

.form-group.has-success > input:not([type=checkbox]):not([type=radio]),
.form-group.has-success > select,
.form-group.has-success > textarea {
    border-color: var(--success);
}

.field-success {
    display: block;
    font-size: var(--font-xs);
    color: var(--success);
    margin-top: var(--space-1);
    padding-left: 2px;
}

/* Warning state */
.form-group.has-warning > label {
    color: var(--warning);
}

.form-group.has-warning > input:not([type=checkbox]):not([type=radio]),
.form-group.has-warning > select,
.form-group.has-warning > textarea {
    border-color: var(--warning);
}

.field-warning {
    display: block;
    font-size: var(--font-xs);
    color: var(--warning);
    margin-top: var(--space-1);
    padding-left: 2px;
}

/* Error state â€” label and input border turn red */
.form-group.has-error > label {
    color: var(--danger);
}

.form-group.has-error > input:not([type=checkbox]):not([type=radio]),
.form-group.has-error > select,
.form-group.has-error > textarea {
    border-color: var(--danger);
}

.form-group.has-error > input:not([type=checkbox]):not([type=radio]):focus,
.form-group.has-error > select:focus,
.form-group.has-error > textarea:focus {
    border-color: var(--danger);
}


/* â”€â”€â”€ Login page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.login-page {
    position: fixed;
    inset: 0;
    background-color: #3B4E56;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1000;
}

.login-watermark {
    position: absolute;
    left: calc(-12vw - 52px);
    top: 54%;
    transform: translateY(calc(-50% - 5px));
    pointer-events: none;
    opacity: 0.12;
}

    .login-watermark img {
        width: 116vh;
        height: auto;
        filter: brightness(10);
    }

.login-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    width: 325px;
}

.login-logo {
    width: 94%;
    height: auto;
    margin-bottom: var(--space-2);
}

.login-card form {
    width: 100%;
}

.login-field {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

.login-input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-md);
    font-family: inherit;
    background: white;
    color: var(--text-primary);
    outline: none;
    box-sizing: border-box;
}


.login-btn {
    width: 100%;
    padding: 8px 30px;
    background: var(--brand);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
}

    .login-btn:hover:not(:disabled) {
        background: var(--brand-hover);
    }

    .login-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.login-error {
    width: 100%;
    font-size: var(--font-sm);
    color: #fca5a5;
    text-align: center;
}

.login-forgot {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-top: var(--space-1);
}

    .login-forgot:hover {
        color: white;
    }


/* â”€â”€â”€ Responsive breakpoints â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Standard laptop (â‰¤ 1280 px): tighten sidebar */
@media (max-width: 1280px) {
    :root {
        --layout-sidebar-w: 78px;
    }
}

/* Small laptop / tablet landscape (â‰¤ 1024 px): icon-only sidebar */
@media (max-width: 1024px) {
    :root {
        --layout-sidebar-w: 54px;
    }

    .sidebar-item {
        width: 40px;
        padding: 10px 0;
    }

    .sidebar-item span {
        display: none;
    }

    .tab-btn {
        padding: 6px 14px;
        font-size: var(--font-sm);
    }
}

/* ─── SearchFilter ───────────────────────────────────────── */

/* Wrapper — positions the dropdown relative to the trigger */
.sf-wrapper {
    position: relative;
    display: inline-block;
}

/* Collapsed trigger pill */
.sf-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px var(--space-4) 6px var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: var(--font-base);
    color: var(--text-primary);
    user-select: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.sf-trigger:hover,
.sf-trigger--open {
    border-color: var(--text-primary);
}

.sf-trigger-sep {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: var(--border);
    flex-shrink: 0;
}

.sf-trigger-range {
    font-weight: 600;
}

.sf-trigger-type,
.sf-trigger-date {
    color: var(--text-secondary, var(--text-muted));
}

.sf-trigger-chevron {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: var(--space-1);
    transition: transform var(--transition);
}

.sf-trigger--open .sf-trigger-chevron {
    transform: rotate(180deg);
}

/* Transparent backdrop to catch outside clicks */
.sf-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
}

/* Dropdown panel */
.sf-dropdown {
    position: fixed;
    top: calc(50% + 40px);
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: sf-fade-in 120ms ease;
}

@keyframes sf-fade-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 2px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* Inner shell (left + right panels side by side) */
.sf-shell {
    display: flex;
    gap: 0;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: var(--font-base);
}

/* Left panel */
.sf-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-4);
    border-right: 1px solid var(--border);
    min-width: 148px;
}

.sf-radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sf-radio {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--font-base);
    color: var(--text-primary);
}

.sf-radio input[type="radio"] {
    accent-color: var(--text-primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.sf-range-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
}

.nav-select-btn {
    text-align: left;
    background: none;
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: var(--font-base);
    color: var(--text-primary);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.nav-select-btn:hover {
    background: var(--surface-muted);
}

.nav-select-btn.active {
    background: var(--text-primary);
    color: #ffffff;
}


/* Right panel */
.sf-right {
    display: flex;
    flex-direction: column;
    padding: var(--space-5) var(--space-5) var(--space-4);
    gap: var(--space-4);
    min-width: 320px;
}

.sf-date-inputs {
    display: flex;
    gap: var(--space-4);
}

.sf-date-field {
    position: relative;
    flex: 1;
}

.sf-date-field label {
    position: absolute;
    top: -8px;
    left: 10px;
    background: var(--surface-card);
    padding: 0 4px;
    font-size: var(--font-xs);
    color: var(--text-muted);
    pointer-events: none;
}

.sf-date-field input {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    color: var(--text-primary);
    background: var(--surface-card);
    outline: none;
}

/* Scrollable calendar */
.sf-calendar-scroll {
    overflow-y: auto;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding-right: var(--space-2);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sf-month-title {
    text-align: center;
    font-weight: 600;
    font-size: var(--font-md);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.sf-dow-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: var(--space-1);
}

.sf-dow {
    text-align: center;
    font-size: var(--font-sm);
    color: var(--text-muted);
    font-weight: 500;
    padding: var(--space-1) 0;
}

.sf-day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px 0;
}

.sf-day {
    text-align: center;
    padding: 6px 0;
    font-size: var(--font-base);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    user-select: none;
}

.sf-day:hover {
    background: var(--surface-muted);
}

.sf-day--empty {
    cursor: default;
}

.sf-day--empty:hover {
    background: none;
}

.sf-day--today {
    font-weight: 700;
    color: var(--brand);
}

.sf-day--start,
.sf-day--end {
    background: var(--text-primary);
    color: #ffffff;
    border-radius: var(--radius-sm);
}

.sf-day--start.sf-day--end {
    background: var(--text-primary);
    color: #ffffff;
    border-radius: var(--radius-md);
}

.sf-day--in-range {
    background: var(--surface-muted);
    border-radius: 0;
}

/* ─── Contract Builder ─────────────────────────────────────────────── */

.contract-builder {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 240px);
    min-height: 0;
}

.cb-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
}

.cb-col-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    cursor: pointer;
    color: var(--text-secondary);
    padding: 5px;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.cb-col-btn:hover { border-color: var(--brand); color: var(--brand); }

.cb-col-btn--active {
    border-color: var(--brand);
    background: var(--brand);
    color: white;
}

.cb-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Palette */
.cb-palette {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: var(--space-4);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    align-content: start;
    overflow-y: auto;
    background: var(--surface-card);
    border-radius: 0 0 0 var(--radius-lg);
}

.cb-tile {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-2);
    font-size: var(--font-sm);
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    cursor: grab;
    user-select: none;
    background: var(--surface-card);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.3;
}

.cb-tile:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.cb-tile:active { cursor: grabbing; }

/* Canvas */
.cb-canvas {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--space-5);
    background: var(--surface-subtle);
    gap: var(--space-4);
    border-radius: 0 0 var(--radius-lg) 0;
}

.cb-document {
    flex-shrink: 0;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    background: var(--surface-card);
    min-height: 300px;
}

.cb-document__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--font-md);
    min-height: 200px;
}

/* Block containers */
.cb-blocks--one-col {
    display: flex;
    flex-direction: column;
}

.cb-blocks--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.cb-block-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.cb-block-wrapper--end {
    min-height: 32px;
}

/* Drop zones */
.cb-drop-zone {
    height: 6px;
    border-radius: var(--radius-sm);
    transition: height 120ms ease, background 120ms ease, border 120ms ease;
    flex-shrink: 0;
}

.cb-drop-zone--active {
    height: 36px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    border: 2px dashed var(--brand);
    border-radius: var(--radius-sm);
}

/* Blocks */
.cb-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    overflow: hidden;
    margin-bottom: var(--space-2);
    width: 100%;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.cb-block--dragging { opacity: 0.35; }

.cb-block--editing { border-color: var(--brand); }

.cb-block--spacer {
    min-height: 84px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 6px,
        var(--border) 6px,
        var(--border) 7px
    );
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    position: relative;
    cursor: grab;
}

.cb-block--spacer__remove {
    position: absolute;
    top: 50%;
    right: var(--space-2);
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.cb-block--spacer:hover .cb-block--spacer__remove { opacity: 1; }

.cb-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px var(--space-3);
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--border);
    cursor: grab;
}

.cb-block__title {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.cb-block__actions { display: flex; gap: 2px; }

.cb-block-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: color var(--transition), background var(--transition);
}

.cb-block-btn svg { width: 13px; height: 13px; }

.cb-block-btn:hover { color: var(--text-primary); background: var(--surface-hover); }

.cb-block-btn--remove:hover { color: #ef4444; }

.cb-block__body { padding: var(--space-3); }

.cb-block__preview-header {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.5;
    margin-bottom: var(--space-1);
}

.cb-block__preview {
    font-size: var(--font-sm);
    color: var(--text-primary);
    white-space: pre-wrap;
    min-height: 24px;
    line-height: 1.5;
}

.cb-block__hint {
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-style: italic;
}

.cb-block__editor {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    font-family: inherit;
    font-size: var(--font-sm);
    color: var(--text-primary);
    background: var(--surface-card);
    resize: vertical;
    outline: none;
    line-height: 1.5;
    display: block;
}

.cb-block__editor--header {
    font-weight: 700;
    min-height: 48px;
    margin-bottom: var(--space-2);
}

.cb-block__editor--body {
    min-height: 90px;
}

.cb-block__editor:focus { border-color: var(--brand); }

/* Footer */
.cb-document__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-4);
    margin-top: var(--space-3);
    border-top: 1px solid var(--border);
}

.cb-footer__logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-footer__logo-img {
    height: 40px;
    width: auto;
}

.cb-footer__contact {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-primary);
}

/* Signature pad */

.signature-pad-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.signature-canvas {
    width: 100%;
    height: 120px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: crosshair;
    display: block;
    touch-action: none;
}

.signature-clear-btn {
    align-self: flex-start;
    padding: 3px 12px;
    font-size: var(--font-xs);
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}

.signature-clear-btn:hover { border-color: var(--brand); color: var(--brand); }
