
        /* === EZ TITLE THEME VARIABLES === */
        :root {
            --ez-yellow: #ffe300;
            --ez-yellow-soft: #fff7bf;
            --ez-black: #111;
            --ez-dark: #333;
            --ez-bg: #f5f5f7;
            --ez-border: #d8d8d8;
            
            --metric-good: #0a7a2f;
            --metric-warn: #c27d00;
            --metric-bad: #b00020;
            --metric-blue: #2563eb;
        }

        * { box-sizing: border-box; }
        body {
            margin: 0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
            background: var(--ez-bg);
            color: #222;
            overflow-x: hidden;
        }

        /* --- LAYOUT --- */
        .topbar {
            position: fixed; top: 0; left: 0; right: 0; height: 56px;
            background: #fff; border-bottom: 2px solid var(--ez-yellow);
            display: flex; justify-content: space-between; align-items: center;
            padding: 0 18px; z-index: 900;
        }
        .topbar-title { font-size: 18px; font-weight: 700; color: var(--ez-black); display: flex; align-items: center; gap: 10px; }
        .topbar-user { font-size: 13px; font-weight: 600; background: var(--ez-bg); padding: 4px 12px; border-radius: 20px; }

        .sidebar {
            position: fixed; top: 56px; left: 0; width: 230px; bottom: 0;
            background: var(--ez-dark); color: #fff; padding-top: 12px; z-index: 800;
            transition: transform .25s ease;
        }
        .sidebar-header { padding: 10px 18px; font-size: 12px; font-weight: 700; color: var(--ez-yellow); text-transform: uppercase; letter-spacing: 1px; }
        .nav-link {
            display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 14px;
            color: #fff; border-left: 4px solid transparent; cursor: pointer; text-decoration: none;
        }
        .nav-link:hover { background: #444; }
        .nav-link.active { background: #444; border-left-color: var(--ez-yellow); }
        .nav-link i { width: 20px; text-align: center; color: var(--ez-yellow); }

        .main { margin-top: 56px; margin-left: 230px; padding: 22px; }

        /* --- CARDS & GRIDS --- */
        .card {
            background: #fff; border-radius: 10px; padding: 20px;
            margin-bottom: 18px; border: 1px solid var(--ez-border);
            box-shadow: 0 3px 10px rgba(0,0,0,0.06);
        }
        .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
        .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        
        /* Stats Cards */
        .stat-card { display: flex; justify-content: space-between; align-items: center; }
        .stat-label { font-size: 11px; font-weight: 700; color: #666; text-transform: uppercase; }
        .stat-val { font-size: 28px; font-weight: 700; color: var(--ez-black); margin-top: 5px; }
        .stat-icon { font-size: 24px; opacity: 0.2; }

        /* --- FORMS & INPUTS --- */
        input, select, textarea {
            width: 100%; padding: 10px; border-radius: 6px;
            border: 1px solid var(--ez-border); font-size: 14px; outline: none;
            background: #fff; transition: border 0.2s;
        }
        input:focus, select:focus, textarea:focus { border-color: var(--ez-black); }
        label { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 6px; margin-top: 14px; text-transform: uppercase; }
        label:first-child { margin-top: 0; }
        
        /* --- BUTTONS --- */
        button {
            background: var(--ez-black); color: var(--ez-yellow); border: none;
            padding: 10px 20px; border-radius: 6px; cursor: pointer;
            font-weight: 600; font-size: 13px; transition: all 0.2s;
        }
        button:hover { background: #000; transform: translateY(-1px); }
        button.btn-secondary { background: #eee; color: #333; }
        button.btn-secondary:hover { background: #ddd; }
        button.btn-danger { background: var(--metric-bad); color: white; }
        button.btn-success { background: var(--metric-good); color: white; }
        button.btn-icon { padding: 6px 10px; background: transparent; color: #555; font-size: 16px; }
        button.btn-icon:hover { background: #f0f0f0; color: var(--ez-black); transform: none; }

        /* --- TABLES --- */
        .table-container { overflow-x: auto; }
        table { border-collapse: collapse; width: 100%; font-size: 13px; }
        th {
            background: var(--ez-dark); color: var(--ez-yellow); padding: 12px;
            text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
        }
        td { padding: 12px; border-bottom: 1px solid var(--ez-border); vertical-align: middle; }
        tr:hover td { background: #fafafa; }
        
        /* Status Pills */
        .pill { display: inline-block; padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
        .pill-new { background: #eee; color: #555; }
        .pill-process { background: var(--ez-yellow-soft); color: #8a6d0b; border: 1px solid #eecd08; }
        .pill-pay { background: #dcfce7; color: var(--metric-good); border: 1px solid #86efac; }
        .pill-done { background: var(--ez-black); color: var(--ez-yellow); }
        .pill-fail { background: #fee2e2; color: var(--metric-bad); border: 1px solid #fca5a5; }

        /* --- MODALS --- */
        .modal-overlay {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100vh;
            height: 100dvh;
            background: rgba(0,0,0,0.6);
            z-index: 1000;
            backdrop-filter: blur(2px);
            justify-content: center;
            align-items: flex-start;
            display: none;
            overflow-y: auto;
            overscroll-behavior: contain;
            padding: 24px 16px;
        }
        .modal-box {
            background: #fff;
            width: 90%;
            max-width: 900px;
            max-height: calc(100vh - 48px);
            max-height: calc(100dvh - 48px);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin: 0 auto;
        }
        .modal-box > form {
            display: flex;
            flex-direction: column;
            max-height: inherit;
            min-height: 0;
        }
        .modal-body {
            padding: 40px;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
        }

        /* --- UTILITIES --- */
        .hidden { display: none !important; }
        .search-wrapper { position: relative; }
        .search-results {
            position: absolute; top: 100%; left: 0; width: 100%;
            background: #fff; border: 1px solid var(--ez-border); border-top: none;
            max-height: 200px; overflow-y: auto; z-index: 100;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .search-item { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; font-size: 13px; }
        .search-item:hover { background: var(--ez-yellow-soft); }
        
        /* Toast Container */
#toast-container { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    z-index: 9999; /* Ensure it's above modals */
}

/* Base Toast Style */
.toast { 
    background: var(--ez-black); 
    color: #fff; 
    padding: 14px 20px; 
    border-radius: 10px; 
    margin-top: 10px; 
    font-size: 14px; 
    font-weight: 500;
    border-left: 5px solid var(--ez-yellow); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: slideIn 0.3s ease forwards; 
    display: flex; 
    align-items: flex-start; /* Align to top for multi-line lists */
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
}

/* Content & Layout Fixes */
.toast-content { flex: 1; line-height: 1.5; }
.toast-content strong { color: #fff; display: block; margin-bottom: 3px; }
.toast-close { cursor: pointer; opacity: 0.5; font-size: 12px; margin-top: 3px; }
.toast-close:hover { opacity: 1; }

/* Type Variations */
.toast.error { border-left-color: var(--metric-bad); }
.toast.error i:first-child { color: #ff8a8a; }
/* Ensure these exist in your <style> section */
.toast.error { border-left-color: var(--metric-bad); }
.toast.warning { 
    border-left-color: var(--ez-yellow); 
    background: #fffdf0; 
    color: #856404; 
}
.toast.warning { 
    border-left-color: var(--ez-yellow); 
    background: #fffdf0; 
    color: #856404; 
    border: 1px solid #ffeeba;
}
.toast.warning i:first-child { color: #d97706; }
.toast.warning .toast-content strong { color: #856404; }

@keyframes slideIn { 
    from { transform: translateX(120%); opacity: 0; } 
    to { transform: translateX(0); opacity: 1; } 
}
        @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

        /* Responsive */
        @media(max-width: 900px) {
            .sidebar { transform: translateX(-100%); }
            .sidebar.open { transform: translateX(0); }
            .main { margin-left: 0; padding: 16px; }
            .hamburger { display: block; font-size: 20px; cursor: pointer; margin-right: 15px; }
            .grid-4, .grid-2 { grid-template-columns: 1fr; }
        }
        @media(min-width: 901px) { .hamburger { display: none; } }
    


        .step-check {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            font-weight: 600;
            padding: 8px 0;
            cursor: pointer;
            margin: 0;
            text-transform: none;
        }
        .step-check input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
        .step-check small { font-weight: 400; color: #999; }
    


    .form-opt {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important; /* Forces left alignment */
        gap: 12px !important;
        padding: 12px 16px !important;
        border-bottom: 1px solid #eaeaea !important;
        margin: 0 !important;
        cursor: pointer !important;
        font-size: 13px !important;
        font-weight: 500 !important; /* Removes the heavy bolding */
        text-transform: none !important; /* Removes the ALL CAPS */
        color: #222 !important;
        background: #fff;
        transition: background 0.2s ease;
    }
    .form-opt:hover { 
        background: #f4f4f5 !important; 
    }
    .form-opt input[type="checkbox"] { 
        width: 18px !important; 
        height: 18px !important; 
        margin: 0 !important; 
        cursor: pointer;
    }
/* WordPress portal hardening */
#wpadminbar ~ .ez-bond-admin-offset .topbar { top: 32px; }
body.admin-bar .topbar { top: 32px; }
body.admin-bar .sidebar { top: 88px; }
body.admin-bar .main { margin-top: 88px; }
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:15px 25px; border-bottom:1px solid var(--ez-border); }
.modal-title { font-size:16px; font-weight:700; display:flex; align-items:center; gap:8px; }
.modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:15px 25px; border-top:1px solid var(--ez-border); background:#fff; }
#ez-bond-login { max-width:460px; margin:50px auto; background:#fff; border:1px solid var(--ez-border); border-radius:12px; padding:24px; box-shadow:0 8px 25px rgba(0,0,0,.08); font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
#ez-bond-login h2 { margin:0 0 8px; }
#ez-bond-login p { color:#555; margin:0 0 20px; }
.ez-bond-login-error { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; padding:10px 12px; border-radius:8px; margin-bottom:14px; }
.ez-bond-login-note { background:#fff7bf; color:#4a3b00; border:1px solid #ffe300; padding:10px 12px; border-radius:8px; margin-top:14px; font-size:13px; }
/* Modal scroll hardening for long forms and WordPress/admin-bar pages */
body.ez-bond-modal-open { overflow: hidden; }
.modal-header, .modal-footer { flex: 0 0 auto; }
#startModal .modal-box,
#processModal .modal-box,
#financeModal .modal-box,
#formsModal .modal-box,
#confirmModal .modal-box {
    overflow: hidden !important;
}
#startModal .modal-body,
#processModal .modal-body,
#financeModal .modal-body,
#formsModal .modal-body,
#confirmModal .modal-body {
    overflow-y: auto !important;
}
body.admin-bar .modal-overlay { padding-top: 56px; }
body.admin-bar .modal-box {
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
}
@media(max-width: 900px) {
    .modal-overlay { padding: 12px; }
    .modal-box { width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    .modal-body { padding: 20px !important; }
    body.admin-bar .modal-overlay { padding-top: 46px; }
    body.admin-bar .modal-box { max-height: calc(100vh - 58px); max-height: calc(100dvh - 58px); }
}

/* ===== 2026-08-31 workflow / resource-optimized UI ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.sidebar-cheat {
    margin: 16px 12px 18px;
    padding: 12px;
    border: 1px solid rgba(255,227,0,.38);
    border-radius: 10px;
    background: rgba(0,0,0,.16);
    font-size: 11px;
    line-height: 1.42;
    color: #eee;
}
.sidebar-cheat-title {
    color: var(--ez-yellow);
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    gap: 7px;
    align-items: center;
}
.sidebar-cheat-summary { color: #f4f4f4; }
.sidebar-cheat details { margin-top: 10px; }
.sidebar-cheat summary { color: var(--ez-yellow); cursor: pointer; font-weight: 700; }
.sidebar-cheat-details { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.15); color: #ddd; }

.kpi-card {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
    background: #fff;
    padding: 20px;
    border: 1px solid var(--ez-border);
    margin: 0;
}
.kpi-card:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.10); }
.kpi-card.active { outline: 3px solid var(--ez-yellow); outline-offset: -3px; }
.kpi-card .stat-icon { pointer-events: none; }

.start-modal-box { max-width: 1240px !important; width: min(96vw, 1240px) !important; }
.start-modal-header { background: var(--ez-black); color:#fff; padding: 12px 18px !important; }
.start-modal-body { padding: 14px 16px !important; background:#f7f7f8 !important; }
.start-modal-grid { display:grid; grid-template-columns: .95fr 1.12fr 1.28fr; gap: 14px; align-items:start; }
.start-column { display:flex; flex-direction:column; gap:12px; min-width:0; }
.start-section { background:#fff; padding:13px; border-radius:8px; border:1px solid var(--ez-border); box-shadow:0 1px 4px rgba(0,0,0,.025); }
.start-section-title { color:var(--metric-blue); border-bottom:1px solid #eee; padding-bottom:6px; margin-bottom:9px; font-size:11px; font-weight:800; text-transform:uppercase; }
.start-section label { margin: 7px 0 3px; font-size:9.5px; color:#777; }
.start-section input, .start-section select, .start-section textarea { padding:7px 8px; font-size:12px; border-radius:5px; }
.compact-grid { gap:8px !important; }
.address-grid { display:grid; grid-template-columns:2fr .65fr 1fr; gap:7px; margin-top:7px; }
.vehicle-grid { display:grid; grid-template-columns:.7fr 1fr 1fr .85fr; gap:7px; margin-top:7px; }
.odometer-grid { display:grid; grid-template-columns:1fr .75fr 1.35fr; gap:7px; margin-top:7px; }
.vin-input { border:2px solid var(--ez-yellow) !important; background:var(--ez-yellow-soft) !important; font-family:monospace; letter-spacing:1px; font-weight:800; text-transform:uppercase; font-size:14px !important; }
.start-check-row { display:flex; flex-wrap:wrap; gap:10px 16px; margin:4px 0 9px; padding-bottom:8px; border-bottom:1px dashed #eee; }
.inline-check { text-transform:none !important; margin:0 !important; display:flex !important; align-items:center; gap:6px; cursor:pointer; color:#444 !important; font-size:11px !important; }
.inline-check input { width:16px !important; height:16px; }
.inline-check small { color:#999; }
.required-star { color:var(--metric-bad); }
.fee-options { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; background:#f7f7f7; padding:7px; border:1px solid #e8e8e8; border-radius:6px; }
.fee-options label { margin:0 !important; text-transform:none !important; display:flex; align-items:center; gap:4px; font-size:10px !important; color:#444 !important; white-space:nowrap; }
.fee-options input { width:14px !important; height:14px; }
.fee-total-row { display:grid; grid-template-columns:.8fr 1.2fr; gap:10px; align-items:end; margin-top:9px; padding:9px; background:#f0fdf4; border:1px solid #bbf7d0; border-radius:7px; }
.fee-total-row span { font-size:9px; text-transform:uppercase; font-weight:700; color:#166534; display:block; }
.fee-total-row strong { font-size:17px; color:#15803d; display:block; margin-top:2px; }
.fee-total-row label { color:#166534 !important; margin:0 0 3px !important; }
.fee-total-row input { text-align:right; font-weight:800; color:#15803d; border-color:#86efac; }
.start-modal-footer { justify-content:space-between !important; align-items:center; padding:10px 16px !important; }
.start-footer-note { font-size:11px; color:#555; background:#eff6ff; border:1px solid #bfdbfe; padding:7px 10px; border-radius:6px; max-width:68%; }
.start-footer-actions { display:flex; gap:8px; }
.start-modal-footer button { padding:8px 16px; }

.research-stage { padding:14px !important; }
.research-stage-title { font-weight:800; font-size:10px; color:#999; margin-bottom:10px; text-transform:uppercase; letter-spacing:.5px; }
.vehicle-confirm-panel { margin-top:10px; padding:10px; background:#f8fafc; border:1px solid #dbe3ec; border-radius:7px; }
.vehicle-confirm-title { font-size:10px; font-weight:800; color:#334155; text-transform:uppercase; margin-bottom:6px; }
.vehicle-confirm-panel label:not(.step-check) { font-size:9px; margin:5px 0 2px; }
.vehicle-confirm-panel input, .vehicle-confirm-panel select { padding:5px; font-size:11px; }
.research-vin { font-family:monospace; font-weight:700; text-transform:uppercase; }
.research-vehicle-grid { display:grid; grid-template-columns:.65fr 1fr 1fr .8fr; gap:4px; margin-top:4px; }
.research-odo-grid { display:grid; grid-template-columns:1fr .9fr 1.45fr; gap:4px; margin-top:5px; }
.vehicle-confirm-check { margin-top:7px !important; padding:6px 0 0 !important; border-top:1px dashed #dbe3ec; }
.research-help-btn { background:#222; color:var(--ez-yellow); padding:7px 10px; font-size:11px; }
.research-help-btn:hover { background:#000; }
.help-text { white-space:pre-wrap; font-size:13px; line-height:1.6; color:#333; }

.quote-request-meta { margin-top:8px; padding:7px 9px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:6px; color:#1d4ed8; font-size:11px; font-weight:600; }

.form-prep-intro { background:#eff6ff; border:1px solid #bfdbfe; border-radius:8px; padding:11px 13px; font-size:12px; color:#334155; margin-bottom:14px; }
.form-prep-section { border:1px solid #e5e7eb; border-radius:9px; padding:13px; margin-bottom:12px; background:#fff; }
.form-prep-section h4 { margin:0 0 10px; font-size:13px; color:#111; }
.form-prep-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; }
.form-prep-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.form-prep-field label { margin:0 0 3px; font-size:9px; color:#777; }
.form-prep-field input, .form-prep-field select, .form-prep-field textarea { padding:7px; font-size:12px; }
.form-prep-field.full { grid-column:1 / -1; }
.form-prep-checks { display:flex; flex-wrap:wrap; gap:8px 14px; }
.form-prep-checks label { text-transform:none; margin:0; display:flex; gap:6px; align-items:center; font-size:11px; font-weight:600; }
.form-prep-checks input { width:16px; height:16px; }
.form-prep-required { color:var(--metric-bad); font-weight:700; }

.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.settings-card { border:1px solid #e5e7eb; border-radius:9px; padding:15px; background:#fff; }
.settings-card h4 { margin:0 0 10px; font-size:13px; color:#111; }
.settings-card label { font-size:9px; margin:8px 0 3px; }
.settings-card input, .settings-card textarea { padding:7px; font-size:12px; }
.grid-3-admin { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.admin-default-forms { display:grid; grid-template-columns:1fr 1fr; gap:5px 10px; }
.admin-default-forms label { text-transform:none; margin:0; display:flex; gap:6px; align-items:center; font-size:10px; }
.admin-default-forms input { width:15px; height:15px; }
.office-settings-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.office-setting { border:1px solid #eee; border-radius:7px; padding:9px; }
.office-setting strong { font-size:11px; }
.office-setting .office-input-grid { display:grid; grid-template-columns:2fr 1fr; gap:6px; margin-top:6px; }


/* Admin settings tabs + editable state MVR reference */
.admin-settings-modal-box { max-width:1180px !important; width:min(96vw,1180px) !important; }
.admin-settings-tabs { display:flex; gap:4px; padding:8px 14px 0; background:#f8fafc; border-bottom:1px solid #e5e7eb; flex:0 0 auto; }
.admin-settings-tab { appearance:none; border:0; background:transparent; color:#64748b; font:inherit; font-size:12px; font-weight:800; padding:10px 13px; border-radius:7px 7px 0 0; cursor:pointer; display:flex; align-items:center; gap:7px; }
.admin-settings-tab:hover { color:#111827; background:#eef2f7; }
.admin-settings-tab.active { color:#111827; background:#fff; box-shadow:0 -2px 0 var(--ez-yellow) inset; }
.admin-settings-panel { display:none; }
.admin-settings-panel.active { display:block; }
.state-settings-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; padding:11px 13px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:9px; }
.state-settings-intro strong { display:block; font-size:13px; color:#111827; }
.state-settings-intro span { display:block; font-size:11px; color:#64748b; margin-top:3px; line-height:1.4; }
.state-settings-intro .state-settings-count { flex:0 0 auto; margin:0; background:#fff; border:1px solid #dbe3ec; border-radius:999px; padding:5px 8px; font-size:10px; font-weight:800; color:#475569; }
.state-settings-layout { display:grid; grid-template-columns:270px minmax(0,1fr); gap:12px; min-height:520px; }
.state-settings-sidebar { border:1px solid #e2e8f0; border-radius:9px; background:#f8fafc; padding:9px; display:flex; flex-direction:column; min-height:0; }
.state-settings-search { position:relative; margin-bottom:8px; flex:0 0 auto; }
.state-settings-search i { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:#94a3b8; font-size:11px; }
.state-settings-search input { width:100%; padding:9px 10px 9px 29px; font-size:11px; border-radius:7px; border:1px solid #dbe3ec; background:#fff; }
.state-settings-list { display:flex; flex-direction:column; gap:4px; overflow-y:auto; min-height:0; padding-right:2px; }
.state-settings-item { width:100%; border:1px solid transparent; background:transparent; padding:8px; border-radius:7px; display:flex; align-items:center; justify-content:space-between; gap:8px; text-align:left; cursor:pointer; }
.state-settings-item:hover { background:#fff; border-color:#e2e8f0; }
.state-settings-item.active { background:#fff; border-color:#f4cf00; box-shadow:0 0 0 1px rgba(244,207,0,.2); }
.state-settings-item-name { min-width:0; }
.state-settings-item-name strong { display:block; font-size:11px; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.state-settings-item-name small { display:block; margin-top:2px; color:#64748b; font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.state-flow-badge { flex:0 0 auto; padding:3px 6px; border-radius:999px; font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.02em; }
.state-flow-badge.request { color:#166534; background:#dcfce7; }
.state-flow-badge.reject { color:#991b1b; background:#fee2e2; }
.state-settings-empty { padding:18px 8px; text-align:center; font-size:11px; color:#64748b; }
.state-settings-editor { border:1px solid #e2e8f0; border-radius:9px; background:#fff; padding:15px; min-width:0; }
.state-editor-header { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding-bottom:12px; margin-bottom:12px; border-bottom:1px solid #eef2f7; }
.state-editor-header h4 { display:inline-block; margin:0 0 0 7px; font-size:16px; color:#0f172a; vertical-align:middle; }
.state-editor-header p { margin:5px 0 0; color:#64748b; font-size:10px; }
.state-code-chip { display:inline-flex; align-items:center; justify-content:center; min-width:29px; padding:3px 7px; border-radius:6px; background:#111827; color:#fff; font-size:10px; font-weight:900; vertical-align:middle; }
.state-reset-btn { flex:0 0 auto; padding:7px 9px !important; font-size:10px !important; }
.state-editor-grid { display:grid; grid-template-columns:1.25fr 1fr 1fr 1.2fr; gap:10px; align-items:end; }
.state-field label { display:block; margin:0 0 4px; font-size:9px; color:#64748b; font-weight:800; text-transform:uppercase; letter-spacing:.02em; }
.state-field input, .state-field select, .state-field textarea { width:100%; padding:8px; border:1px solid #dbe3ec; border-radius:6px; font-size:11px; background:#fff; color:#111827; }
.state-field textarea { resize:vertical; line-height:1.4; }
.state-field small { display:block; margin-top:4px; font-size:9px; color:#64748b; line-height:1.35; }
.two-fees { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.state-flow-notice { margin:12px 0; padding:9px 10px; border-radius:7px; font-size:10px; line-height:1.4; border:1px solid; }
.state-flow-notice.request { background:#f0fdf4; border-color:#bbf7d0; color:#166534; }
.state-flow-notice.reject { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.state-editor-section { padding-top:12px; margin-top:12px; border-top:1px solid #eef2f7; }
.state-editor-section h5 { margin:0 0 9px; font-size:11px; color:#111827; }
.state-link-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px 12px; margin-top:10px; }

@media (min-width: 1000px) and (min-height: 720px) {
    #startModal .modal-box { max-height: calc(100dvh - 28px) !important; }
    #startModal { padding-top:14px; padding-bottom:14px; }
    #startModal .modal-body { overflow-y:hidden !important; }
}
@media(max-width: 1150px) {
    .start-modal-grid { grid-template-columns:1fr 1fr; }
    .start-column:first-child { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; }
    #startModal .modal-body { overflow-y:auto !important; }
}
@media(max-width: 900px) {
    .start-modal-grid, .settings-grid, .office-settings-grid { grid-template-columns:1fr; }
    .start-column:first-child { grid-column:auto; display:flex; }
    .vehicle-grid, .odometer-grid, .research-vehicle-grid, .research-odo-grid, .grid-3-admin { grid-template-columns:1fr 1fr; }
    .start-footer-note { display:none; }
    .start-modal-footer { justify-content:flex-end !important; }
}

/* Form Prep generated controls */
.kpi-card.active-filter { outline: 3px solid var(--ez-yellow); outline-offset: -3px; background: var(--ez-yellow-soft); }
.prep-section { border:1px solid #e5e7eb; border-radius:9px; padding:13px; margin-bottom:12px; background:#fff; }
.prep-section h4 { margin:0 0 10px; font-size:13px; color:#111; }
.prep-note { margin:0 0 10px; font-size:11px; line-height:1.45; color:#64748b; }
.prep-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; }
.prep-field { min-width:0; }
.prep-field.prep-wide { grid-column:1 / -1; }
.prep-field label { display:block; margin:0 0 3px; font-size:9px; color:#777; }
.prep-field input, .prep-field select, .prep-field textarea { width:100%; padding:7px; font-size:12px; }
.prep-check-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 12px; margin:8px 0 12px; }
.prep-check { display:flex !important; align-items:flex-start; gap:6px; margin:0 !important; text-transform:none !important; font-size:11px !important; color:#334155 !important; line-height:1.35; }
.prep-check input { width:16px !important; height:16px; margin-top:1px; flex:0 0 auto; }
.prep-summary { background:#f8fafc; }
.prep-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 12px; }
.prep-summary-grid div { min-width:0; padding:7px 8px; background:#fff; border:1px solid #e5e7eb; border-radius:6px; }
.prep-summary-grid span { display:block; color:#94a3b8; font-size:9px; font-weight:700; text-transform:uppercase; margin-bottom:2px; }
.prep-summary-grid strong { display:block; color:#111827; font-size:11px; overflow-wrap:anywhere; }
.office-setting h5 { margin:0 0 8px; font-size:11px; }
@media(max-width:900px) {
    .prep-grid, .prep-check-grid, .prep-summary-grid { grid-template-columns:1fr; }
}

.office-address-row { display:grid; grid-template-columns:minmax(0,2fr) minmax(64px,.7fr) minmax(90px,1fr); gap:8px; }
.office-address-row > div { min-width:0; }
@media(max-width:700px) { .office-address-row { grid-template-columns:1fr; } }


/* ===== 2026-08-31.3 compact research + optional odometer adjustments ===== */
@media (min-width: 901px) {
    #startModal {
        align-items: center;
    }
    body.admin-bar #startModal {
        padding-top: 40px;
        padding-bottom: 16px;
    }
    #processModal {
        padding: 12px 10px;
    }
    body.admin-bar #processModal {
        padding-top: 40px;
        padding-bottom: 8px;
    }
    #processModal .modal-box {
        width: min(98vw, 1500px) !important;
        max-width: 1500px !important;
        max-height: calc(100dvh - 54px) !important;
    }
    #processModal .modal-header {
        padding: 10px 18px !important;
    }
    #processModal .modal-body {
        padding: 12px 16px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scrollbar-gutter: stable;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    #processModal .modal-footer {
        padding: 9px 16px !important;
    }
    .research-workflow-grid {
        display: grid;
        grid-template-columns: 1.22fr 1.08fr .92fr .9fr;
        gap: 12px;
        align-items: start;
    }
    #processModal .card {
        padding: 10px !important;
    }
    #processModal .research-stage {
        padding: 10px !important;
    }
    #processModal .research-workflow-grid > .card {
        min-width: 0;
    }
    #processModal #section_az_owner {
        scroll-margin-bottom: 24px;
    }
    #processModal .step-check {
        padding: 5px 0;
        gap: 7px;
        font-size: 12px;
    }
    #processModal .step-check input[type="checkbox"] {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }
    #processModal input, #processModal select {
        min-height: 30px;
    }
    #processModal textarea {
        min-height: 128px;
        height: 128px;
    }
    #processModal #status_prediction_box {
        margin-top: 12px !important;
        padding: 11px !important;
    }
    .vehicle-confirm-panel {
        margin-top: 7px;
        padding: 8px;
    }
    .research-stage-title {
        margin-bottom: 6px;
    }
}
.research-odometer-label {
    display: block;
    margin: 6px 0 2px !important;
}
.research-odometer-label small {
    color: #94a3b8;
    font-weight: 500;
}
.research-option-line {
    display: grid !important;
    grid-template-columns: 18px minmax(0,1fr) auto;
    align-items: center;
    column-gap: 7px !important;
    white-space: nowrap;
}
.research-option-line span {
    min-width: 0;
    white-space: nowrap;
}
.research-option-line small {
    white-space: nowrap;
    font-size: 10px;
}
@media (max-width: 1180px) {
    #processModal .modal-body { overflow-y: auto !important; }
    .research-workflow-grid { grid-template-columns: 1fr 1fr; }
    .research-option-line { white-space: normal; }
    .research-option-line span { white-space: normal; }
}

/* 2026-09-10 Bond workflow / OOS MVR guidance */
.oos-mvr-guidance{margin-top:10px;padding:10px;border:1px solid #bfdbfe;border-radius:7px;background:#eff6ff;font-size:11px;color:#1f2937}
.oos-mvr-guidance.oos-reject{background:#fef2f2;border-color:#fecaca;color:#7f1d1d}
.oos-mvr-title{font-size:12px;font-weight:800;margin-bottom:7px}
.oos-mvr-alert{padding:7px 8px;border-radius:5px;background:#fee2e2;margin-bottom:7px}
.oos-mvr-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:7px}
.oos-mvr-grid>div{background:#fff;border:1px solid #e5e7eb;border-radius:5px;padding:6px}
.oos-mvr-grid span{display:block;font-size:9px;text-transform:uppercase;color:#6b7280;font-weight:700;margin-bottom:2px}
.oos-mvr-grid strong{font-size:11px;word-break:break-word}
.oos-mvr-note{white-space:normal;line-height:1.35;margin:6px 0}
.oos-mvr-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.oos-link-btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:10px;padding:6px 9px;min-height:30px}
.bond-ssn-panel{margin-top:12px;padding:10px;border:1px solid #f59e0b;border-radius:7px;background:#fffbeb}
.bond-ssn-panel small{display:block;margin-top:5px;color:#92400e;line-height:1.35}
.bond-received-ack{margin-top:12px;padding:10px;border:1px solid #86efac;border-radius:7px;background:#f0fdf4}
.bond-received-check{font-weight:700;color:#166534}
.bond-received-ack small{display:block;margin-top:5px;color:#166534;line-height:1.35}
@media (max-width:700px){.oos-mvr-grid{grid-template-columns:1fr}.oos-mvr-actions{flex-direction:column}.oos-link-btn{width:100%}}


@media(max-width: 900px) {
    .admin-settings-modal-box { width:100% !important; }
    .state-settings-layout { grid-template-columns:1fr; min-height:0; }
    .state-settings-sidebar { max-height:220px; }
    .state-editor-grid { grid-template-columns:1fr 1fr; }
}
@media(max-width: 620px) {
    .admin-settings-tabs { overflow-x:auto; }
    .admin-settings-tab { white-space:nowrap; }
    .state-settings-intro, .state-editor-header { flex-direction:column; }
    .state-editor-grid, .state-link-grid { grid-template-columns:1fr; }
    .state-reset-btn { width:100%; }
}

/* ===== 2026-10-01 DMV123 / Auto Data Direct MVR workflow ===== */
.state-flow-badge.dmv123 { color:#854d0e; background:#fef3c7; }
.state-flow-notice.dmv123 { background:#fffbeb; border-color:#fde68a; color:#92400e; }
.oos-mvr-guidance.oos-dmv123 { background:#fffbeb; border-color:#fde68a; color:#78350f; }
.oos-mvr-alert.dmv123-alert { background:#fef3c7; color:#78350f; }
.dmv123-mvr-panel { margin-top:10px; padding:10px; border:1px solid #fde68a; border-radius:8px; background:#fffdf5; }
.dmv123-mvr-head { display:flex; gap:10px; justify-content:space-between; align-items:flex-start; }
.dmv123-mvr-head>div { min-width:0; }
.dmv123-mvr-head strong { display:block; color:#713f12; font-size:11px; }
.dmv123-mvr-head span { display:block; margin-top:3px; color:#6b7280; font-size:9px; line-height:1.35; }
.dmv123-mvr-head .dmv123-ok { color:#166534; font-weight:700; }
.dmv123-view-btn { padding:5px 8px !important; font-size:9px !important; white-space:nowrap; }
.dmv123-upload-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; align-items:center; margin-top:9px; }
.dmv123-upload-row input[type="file"] { min-width:0; padding:5px; font-size:10px; border:1px solid #e5e7eb; border-radius:6px; background:#fff; }
.dmv123-upload-row .btn-success { padding:7px 10px; font-size:10px; white-space:nowrap; }
.dmv123-parse-summary { margin-top:8px; padding:7px 8px; border:1px solid #bbf7d0; border-radius:6px; background:#f0fdf4; color:#166534; font-size:9px; line-height:1.4; }
.dmv123-parse-summary strong { font-size:10px; }
@media (max-width:700px){ .dmv123-upload-row{grid-template-columns:1fr}.dmv123-upload-row .btn-success{width:100%}.dmv123-mvr-head{flex-direction:column}.dmv123-view-btn{width:100%} }

.dmv123-manual-note { color:#92400e; font-weight:600; }


/* Separately saved Admin→CSR and CSR→Admin bond handoffs. */
.bond-handoff-panel{margin-top:16px;padding:13px;border:1px solid #d9b64d;border-radius:9px;background:#fffdf5}
.bond-handoff-title{font-size:13px;font-weight:800;color:#171717;margin-bottom:5px}
.bond-handoff-intro{font-size:11px;line-height:1.5;color:#46505d;margin:0 0 12px}
.bond-handoff-row{padding:12px 10px;margin-top:10px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}
.bond-handoff-row strong{display:block;font-size:12px;color:#181818}
.bond-handoff-row label{display:block;margin-top:9px;font-size:10px;color:#4b5563}
.bond-handoff-row input,.bond-handoff-row select{width:100%;font-size:12px;padding:7px 8px}
.bond-handoff-meta{font-size:11px;line-height:1.5;color:#974b19;font-weight:650;margin-top:5px;overflow-wrap:anywhere}
.bond-handoff-meta.saved{color:#166534}
.bond-handoff-save{margin-top:12px;width:100%;font-size:12px;padding:9px 10px}
.bond-handoff-row small{display:block;margin-top:9px;color:#475569;font-size:10px;line-height:1.4}

.bond-handoff-chips{display:flex;flex-wrap:wrap;gap:3px;margin-top:5px;font-size:9px;font-weight:750}
.bond-handoff-chips span{border-radius:5px;padding:3px 5px}
.bond-handoff-chips .done{color:#166534;background:#dcfce7}
.bond-handoff-chips .missing{color:#854d0e;background:#fef3c7}
.bond-handoff-row.handoff-readonly input,.bond-handoff-row.handoff-readonly select{background:#f3f4f6;color:#64748b}

/* Manager-only weekly stale-bond audit manual send */
.bond-weekly-manual { margin:14px 0; padding:16px; border:1px solid #d6bb60; border-left:4px solid #d4a72c; border-radius:8px; background:#fffaf0; }
.bond-weekly-manual > strong { display:block; font-size:14px; color:#171717; margin-bottom:7px; }
.bond-weekly-manual p { margin:0 0 11px; color:#303030; font-size:12px; line-height:1.5; }
.bond-weekly-manual .bond-weekly-last { font-size:12px; color:#414141; margin:10px 0; line-height:1.45; overflow-wrap:anywhere; }
.bond-weekly-manual button { margin:4px 0 10px; font-weight:700; }
.bond-weekly-manual button:disabled { opacity:.62; cursor:wait; }
.bond-weekly-manual small { display:block; line-height:1.45; color:#5c5141; }

/* Manager Clover receipt audit, intentionally high-contrast and readable for reconciliation. */
.clover-audit-modal-box{width:min(1300px,96vw)!important;max-width:1300px!important;max-height:93vh!important;display:flex;flex-direction:column}
.clover-audit-modal-box .modal-body{overflow:auto;min-height:0}
.clover-audit-hint{padding:12px 14px;border-left:4px solid #d7ae3c;background:#fffaf0;color:#303030;font-size:12px;line-height:1.5;margin-bottom:14px}
#cloverAuditStatus{font-size:12px;padding:10px 0;color:#353535}
.clover-audit-summary{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:15px}
.clover-audit-summary>div{padding:11px 14px;background:#f8f8f8;border:1px solid #dedede;border-radius:7px;font-size:12px;min-width:130px}
.clover-audit-summary strong{display:block;color:#151515;font-size:17px}
.clover-audit-scroll{overflow-x:auto;border:1px solid #dedede;border-radius:8px}
.clover-audit-table{width:100%;border-collapse:collapse;min-width:1000px;font-size:11px}
.clover-audit-table th{background:#171717;color:#edc953;text-align:left;padding:10px;position:sticky;top:0}
.clover-audit-table td{border-bottom:1px solid #e5e7eb;padding:10px;vertical-align:top;overflow-wrap:anywhere;color:#222;line-height:1.5}
.clover-audit-table td small{color:#555;display:block;line-height:1.4}
.clover-audit-status{display:inline-block;border-radius:5px;padding:3px 6px;font-weight:800;background:#fef3c7;color:#713f12}
.clover-audit-status.verified{background:#dcfce7;color:#166534}
.clover-audit-status.mismatch,.clover-audit-status.not_found{background:#fee2e2;color:#991b1b}
.clover-audit-status.partial,.clover-audit-status.cash_only{background:#fef3c7;color:#854d0e}
.clover-audit-table tr:hover td{background:#fafafa}

/* Archived receipt audit: in Archives view only, independent of commission actions. */
.archive-audit-controls{display:flex;align-items:end;flex-wrap:wrap;gap:12px}
.archive-audit-intro{flex:1 1 260px;min-width:220px}
.archive-audit-intro strong{display:block;color:#1b1b1b;font-size:14px}
.archive-audit-intro small{display:block;font-size:11px;color:#565656;line-height:1.5;margin-top:5px}
.archive-audit-controls label{display:block;font-size:11px;font-weight:700;margin-bottom:5px}
.archive-audit-controls input[type=date]{height:39px;min-width:138px;padding:6px;border:1px solid #ccc;border-radius:5px;background:#fff}
.archive-audit-count{font-size:12px;color:#555;margin-top:10px}
.archive-audit-footer{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
#archiveAuditControls.hidden,#archiveSelectedAuditButton.hidden,#archiveAuditCsvButton.hidden,#archiveAuditPdfButton.hidden{display:none!important}

/* Distinguish inferred 3% fee reconciliation from exact payment verification. */
.clover-audit-status.fee_adjusted {background:#e9f6e9;color:#245d2e;border-color:#b4dbb9;}
.clover-audit-status.tender_review {background:#fff2d5;color:#815200;border-color:#f1cf85;}

/* Full Clover receipt drill-down from either payout or archive audits. */
.clover-receipt-view-button{margin-top:9px;display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 9px;border:1px solid #ad842a;border-radius:5px;background:#fff6d9;color:#392b05;font-size:11px;font-weight:750;cursor:pointer}
.clover-receipt-view-button:hover,.clover-receipt-view-button:focus-visible{background:#f2d16b;outline-offset:2px}
.clover-receipt-detail-box{width:min(1100px,96vw)!important;max-width:1100px!important;max-height:93vh!important}
.clover-receipt-detail-box .modal-body{padding:22px!important;overflow:auto}
#cloverReceiptDetailStatus{font-size:13px;margin-bottom:12px;color:#333}
.clover-receipt-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:10px;margin-bottom:16px}
.clover-receipt-info>div{border:1px solid #e2e2e2;border-radius:6px;padding:10px 12px;overflow-wrap:anywhere;background:#f9f9f9;font-size:13px}
.clover-receipt-info small{display:block;font-size:11px;color:#606060;margin-bottom:4px}
.clover-receipt-section{padding:15px 0;border-top:1px solid #ddd}
.clover-receipt-section h4{margin:0 0 12px;font-size:15px;color:#191919}
.clover-receipt-section h5{font-size:13px;margin:16px 0 8px}
.clover-receipt-table-wrap{overflow-x:auto}
.clover-receipt-table{width:100%;border-collapse:collapse;min-width:620px;font-size:12px}
.clover-receipt-table th{text-align:left;background:#191919;color:#f5d16a;padding:10px}
.clover-receipt-table td{vertical-align:top;border-bottom:1px solid #e2e2e2;padding:9px;overflow-wrap:anywhere}
.clover-receipt-table .right{text-align:right;white-space:nowrap}
.clover-receipt-table small{display:block;color:#5a5a5a;line-height:1.5}
.clover-receipt-flag{font-size:11px;font-weight:700;padding:2px 5px;border-radius:4px;background:#f3ead6;white-space:nowrap}
.clover-receipt-flag.bond{color:#20633a;background:#e3f7e8}
.clover-receipt-note{font-size:12px;color:#555;margin:8px 0;overflow-wrap:anywhere}
.clover-receipt-warning{background:#fff3d8;border-left:3px solid #d4a02e;padding:9px 12px;margin:8px 0;font-size:12px;overflow-wrap:anywhere}
.clover-receipt-error{color:#9b2424}

/* Clover audit: persistent, instant result filters and stacked bond file review. */
.clover-audit-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin:12px 0 16px;padding:12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}
.clover-audit-filters>div{flex:1 1 170px;min-width:145px}
.clover-audit-filters label{display:block;font-size:11px;font-weight:700;margin-bottom:5px;color:#444}
.clover-audit-filters select{width:100%;min-height:36px;border:1px solid #ccd2d8;border-radius:6px;background:white;color:#222;padding:5px 8px;font-size:12px}
#cloverAuditVisibleCount{font-size:12px;color:#45515f;white-space:nowrap;margin:0 4px 8px auto;font-weight:700}
.clover-bond-file-button{display:block;margin:9px 0 2px;border:1px solid #d4b249;background:#fff8dd;color:#433409;padding:6px 9px;font-weight:700;font-size:11px;border-radius:5px;cursor:pointer}
.clover-bond-file-button:hover{background:#fbe9a6}
.clover-audit-empty{text-align:center;padding:24px!important;color:#64748b!important;font-size:13px}
.clover-bond-file-box{width:min(1050px,96vw)!important;max-width:1050px!important;max-height:93vh!important}
.clover-bond-file-box .modal-body{overflow-y:auto;padding:20px!important}
.clover-bond-section{border:1px solid #e5e7eb;border-radius:8px;margin:0 0 14px;overflow:hidden}
.clover-bond-section h4{background:#1c1c1c;color:#edd05f;font-weight:700;font-size:14px;padding:10px 14px;margin:0}
.clover-bond-grid{padding:12px 14px;display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:12px}
.clover-bond-field{min-width:0;overflow-wrap:anywhere}
.clover-bond-field span{display:block;font-size:11px;color:#697386;text-transform:uppercase;margin-bottom:4px}
.clover-bond-field strong{font-size:13px;white-space:pre-wrap;color:#111827;font-weight:600}
/* Native editing dialogs should remain above the bond file, which stays above audit. */
body:has(#cloverBondFileModal[style*="display: flex"]) #processModal,
body:has(#cloverBondFileModal[style*="display: flex"]) #financeModal,
body:has(#cloverBondFileModal[style*="display: flex"]) #startModal{z-index:2850}
body:has(#cloverBondFileModal[style*="display: flex"]) #confirmModal{z-index:3200}
@media(max-width:600px){.clover-audit-filters>div{flex-basis:100%}.clover-bond-grid{grid-template-columns:1fr}.clover-bond-file-box .modal-footer{flex-wrap:wrap}}
