@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/inter-700.woff2") format("woff2");
}

/* extracted from accounts/signup_firm.html */
.wrap { max-width: 800px; margin: 40px auto; padding: 0 24px 60px; }
    h1 { margin-top: 0; }
    .field { margin-bottom: 14px; }
    .field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
    .field input, .field select, .field textarea {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: #ffffff;
        color: var(--text);
    }
    .field textarea { min-height: 80px; resize: vertical; }
    .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
    .submit {
        margin-top: 20px;
        padding: 14px 22px;
        border: none;
        border-radius: 12px;
        background: linear-gradient(90deg, var(--brass), var(--brass));
        color: white;
        font-weight: 700;
        cursor: pointer;
    }
    .back { display: inline-block; margin-top: 20px; color: var(--navy); }

/* extracted from accounts/signup_user.html */
.wrap { max-width: 800px; margin: 40px auto; padding: 0 24px 60px; }
    h1 { margin-top: 0; }
    .field { margin-bottom: 14px; }
    .field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
    .field input, .field select {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: #ffffff;
        color: var(--text);
    }
    .hint { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
    .submit {
        margin-top: 10px;
        padding: 14px 22px;
        border: none;
        border-radius: 12px;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: white;
        font-weight: 700;
        cursor: pointer;
    }
    .back { display: inline-block; margin-top: 20px; color: var(--navy); }

/* extracted from accounts/verify_otp.html */
.wrap { max-width: 520px; margin: 48px auto; padding: 0 24px 60px; }
    .card {
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 28px;
    }
    .field { margin-bottom: 16px; }
    .field label { display: block; margin-bottom: 6px; font-weight: 600; }
    .field input {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: #ffffff;
        color: var(--text);
    }
    .err { color: var(--crimson); margin-bottom: 12px; font-size: 14px; }
    .submit {
        margin-top: 8px;
        padding: 14px 22px;
        border: none;
        border-radius: 12px;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: white;
        font-weight: 700;
        cursor: pointer;
        width: 100%;
    }

/* extracted from accounts/signup_user_password.html */
.wrap { max-width: 560px; margin: 48px auto; padding: 0 24px 60px; }
    .card {
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 28px;
    }
    .username-box {
        font-size: 18px;
        font-weight: 700;
        color: var(--navy);
        margin: 12px 0 20px;
        word-break: break-all;
    }
    .field { margin-bottom: 14px; }
    .field label { display: block; margin-bottom: 6px; font-weight: 600; }
    .field input {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: #ffffff;
        color: var(--text);
    }
    .submit {
        margin-top: 16px;
        padding: 14px 22px;
        border: none;
        border-radius: 12px;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: white;
        font-weight: 700;
        cursor: pointer;
        width: 100%;
    }

/* extracted from core/home.html */
.home-wrap {
        padding: 24px 32px 60px;
        background: #f0f2f5;
    }

    .home-inner {
        max-width: 900px;
        margin: 0 auto;
    }

    .home-top-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        margin-bottom: 16px;
    }

    .login-link {
        color: var(--navy);
        font-weight: 700;
        font-size: 16px;
    }

    .login-link:hover { color: var(--brass); }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 8px;
    }

    .rings-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 32px;
        margin-bottom: 28px;
        width: 100%;
    }

    .ring-card { width: 180px; text-align: center; }

    .ring {
        --p: 0;
        width: 160px;
        height: 160px;
        margin: 0 auto 12px;
        border-radius: 50%;
        background:
            conic-gradient(var(--navy) calc(var(--p) * 1%), #e2e8f0 0);
        display: grid;
        place-items: center;
        position: relative;
        box-shadow: 0 8px 24px rgba(30, 111, 255, 0.15);
    }

    .ring.orange {
        background:
            conic-gradient(var(--brass) calc(var(--p) * 1%), #e2e8f0 0);
        box-shadow: 0 8px 24px rgba(255, 138, 0, 0.15);
    }

    .ring::before {
        content: "";
        position: absolute;
        inset: 14px;
        border-radius: 50%;
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.08);
    }

    .ring-value {
        position: relative;
        z-index: 2;
        font-size: 34px;
        font-weight: 800;
        color: #0f172a;
    }

    .ring-label {
        font-size: 14px;
        color: #64748b;
        font-weight: 700;
    }

    .hero-main {
        text-align: center;
        margin: 0 auto;
        width: 100%;
        max-width: 820px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: clamp(40px, 8vw, 72px);
        line-height: 1;
        font-weight: 800;
        margin: 8px 0 14px;
    }

    .hero-title .white { color: #0f172a; }
    .hero-title .blue { color: var(--navy); }

    .hero-text {
        max-width: 680px;
        margin: 0 auto 28px;
        font-size: clamp(17px, 2.2vw, 22px);
        line-height: 1.55;
        color: #475569;
    }

    .search-stack {
        position: relative;
        max-width: 760px;
        width: 100%;
        margin: 0 auto 16px;
    }

    .search-wrap { width: 100%; }

    .search-box {
        display: flex;
        align-items: center;
        gap: 14px;
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 999px;
        padding: 18px 24px;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    }

    .search-icon { font-size: 22px; flex-shrink: 0; }

    .search-input {
        width: 100%;
        background: transparent;
        border: none;
        outline: none;
        color: #0f172a;
        font-size: 18px;
    }

    .search-input::placeholder { color: #94a3b8; }

    .autocomplete-host { width: 100%; }

    gmp-place-autocomplete {
        width: 100%;
        --gmpx-color-on-surface: #0f172a;
        --gmpx-color-surface: transparent;
        --gmpx-border-radius: 0px;
        --gmpx-font-size: 18px;
    }

    .sheriff-suggest {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        z-index: 40;
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 16px;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
        max-height: 280px;
        overflow-y: auto;
        text-align: left;
    }

    .sheriff-suggest-item {
        display: block;
        width: 100%;
        padding: 12px 16px;
        border: none;
        background: transparent;
        color: #334155;
        cursor: pointer;
        text-align: left;
        font-size: 15px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .sheriff-suggest-item:hover { background: rgba(30, 111, 255, 0.08); }

    .sheriff-suggest-item strong { display: block; color: #0f172a; font-weight: 700; }
    .sheriff-suggest-item span { display: block; font-size: 13px; color: #64748b; margin-top: 4px; }

    .sheriff-result-wrap {
        max-width: 760px;
        width: 100%;
        margin: 0 auto 28px;
        min-height: 28px;
        text-align: center;
    }

    .sheriff-link {
        display: inline-block;
        font-size: 20px;
        font-weight: 700;
        color: var(--navy);
        border-bottom: 2px solid transparent;
        transition: color 0.15s ease, border-color 0.15s ease;
    }

    .sheriff-link:hover {
        color: var(--brass);
        border-bottom-color: var(--brass);
    }

    .sheriff-muted { color: #64748b; font-size: 15px; }

    .feature-image {
        margin: 24px auto 32px;
        max-width: 720px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .feature-image img {
        width: 100%;
        max-width: 720px;
        height: auto;
        display: block;
        margin: 0 auto;
        border-radius: 24px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    }

    .features-grid {
        max-width: 1100px;
        width: 100%;
        margin: 10px auto 36px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .feature-card {
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 22px;
        padding: 22px 18px;
        text-align: left;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    }

    .feature-icon {
        width: 54px;
        height: 54px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 14px;
        font-size: 24px;
        color: white;
        background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    }

    .feature-icon svg { width: 28px; height: 28px; fill: currentColor; }

    .feature-card.orange .feature-icon {
        background: linear-gradient(135deg, var(--brass), var(--brass));
    }

    .feature-card.navy .feature-icon {
        background: linear-gradient(135deg, #334155, #1e293b);
    }

    .feature-card.sky .feature-icon {
        background: linear-gradient(135deg, var(--navy-mid), var(--navy));
    }

    .feature-card.green .feature-icon {
        background: linear-gradient(135deg, #12b886, #0a6b52);
    }

    .feature-card h3 {
        margin: 0 0 10px;
        font-size: 20px;
        color: #0f172a;
    }

    .feature-card p {
        margin: 0;
        color: #64748b;
        line-height: 1.5;
        font-size: 15px;
    }

    .footer-banner {
        margin-top: 30px;
        padding: 24px 0 10px;
        border-top: 1px solid rgba(15, 23, 42, 0.1);
    }

    .footer-inner {
        max-width: 980px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        gap: 20px;
        align-items: center;
        flex-wrap: wrap;
        text-align: center;
    }

    .footer-copy { color: #64748b; font-size: 14px; }

    .footer-links {
        display: flex;
        gap: 18px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-links a { color: var(--navy); font-size: 14px; }
    .footer-links a:hover { color: var(--brass); }

    .modal-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        align-items: center;
        justify-content: center;
        z-index: 1000;
        padding: 20px;
    }

    .modal-box {
        width: 100%;
        max-width: 460px;
        background: white;
        color: #1f2937;
        border-radius: 24px;
        padding: 28px;
        box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
    }

    .modal-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .modal-title {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 30px;
        font-weight: 700;
    }

    .modal-icon {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--navy), var(--brass));
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
    }

    .close-btn {
        border: none;
        background: transparent;
        font-size: 28px;
        cursor: pointer;
        color: #555;
    }

    .role-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border: 1px solid #e8edf5;
        border-radius: 14px;
        padding: 16px 18px;
        margin-bottom: 14px;
    }

    .role-left { font-size: 18px; font-weight: 600; }

    .radio-circle input {
        transform: scale(1.3);
        cursor: pointer;
    }

    .login-submit {
        width: 100%;
        margin-top: 8px;
        padding: 16px;
        border: none;
        border-radius: 14px;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: white;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
    }

    .pac-container {
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 14px;
        margin-top: 6px;
        font-family: Arial, Helvetica, sans-serif;
    }

    .pac-item {
        color: #334155;
        padding: 10px 14px;
    }

    .pac-item-query { color: #0f172a; }
    .pac-item:hover, .pac-item-selected { background: rgba(30, 111, 255, 0.1); }

    @media (max-width: 980px) {
        .features-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 640px) {
        .home-wrap { padding: 20px 18px 40px; }
        .features-grid { grid-template-columns: 1fr; }
        .rings-row { gap: 20px; }
    }

/* extracted from core/instruction_detail.html */
.wrap { max-width: 840px; margin: 24px auto 48px; padding: 0 24px; }
    .card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
    .row { margin-bottom: 10px; color: #334155; }
    .row strong { color: #0f172a; display: inline-block; min-width: 140px; }
    .actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
    .btn {
        display: inline-block;
        padding: 10px 14px;
        border-radius: 10px;
        border: 1px solid var(--border);
        color: #334155;
        background: #fff;
        font-weight: 700;
    }
    .btn.primary {
        background: var(--navy);
        border-color: var(--navy);
        color: #fff;
    }

/* extracted from core/sheriff_directory_detail.html */
.detail-wrap { max-width: 760px; margin: 40px auto; padding: 0 24px; }
    .detail-card {
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 24px;
        padding: 32px;
    }
    .detail-card h1 { margin-top: 0; font-size: 28px; }
    .meta { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
    .row { margin-bottom: 12px; font-size: 16px; }
    .row strong { color: var(--text); display: inline-block; min-width: 160px; }
    .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
    .btn-primary {
        display: inline-block;
        padding: 14px 22px;
        border-radius: 12px;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: white;
        font-weight: 700;
    }
    .btn-secondary {
        display: inline-block;
        padding: 14px 22px;
        border-radius: 12px;
        border: 1px solid var(--border);
        color: #334155;
        font-weight: 600;
    }

/* extracted from core/sheriff_detail.html */
.detail-wrap { max-width: 720px; margin: 40px auto; padding: 0 24px; }
    .detail-card {
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 24px;
        padding: 32px;
    }
    .detail-card h1 { margin-top: 0; font-size: 28px; }
    .meta { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
    .row { margin-bottom: 12px; font-size: 16px; }
    .row strong { color: var(--text); display: inline-block; min-width: 140px; }
    .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
    .btn-primary {
        display: inline-block;
        padding: 14px 22px;
        border-radius: 12px;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: white;
        font-weight: 700;
    }
    .btn-secondary {
        display: inline-block;
        padding: 14px 22px;
        border-radius: 12px;
        border: 1px solid var(--border);
        color: #334155;
        font-weight: 600;
    }
    .notice {
        margin-top: 20px;
        font-size: 13px;
        color: var(--muted);
    }

/* extracted from core/role_dashboard.html */
.dash-wrap { max-width: 1100px; margin: 24px auto 48px; padding: 0 24px; }
    .dash-title { margin: 0 0 8px; }
    .dash-sub { margin: 0 0 24px; color: var(--muted); }
    .mode-switch { display: flex; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; }
    .mode-link {
        border: 1px solid var(--border);
        border-radius: 999px;
        padding: 8px 12px;
        font-size: 13px;
        color: #334155;
        background: #fff;
    }
    .mode-link.active {
        border-color: rgba(30,111,255,0.4);
        color: var(--navy);
        font-weight: 700;
    }
    .dash-grid { display: grid; gap: 20px; grid-template-columns: 1.1fr 1fr; }
    .dash-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
    .field { margin-bottom: 12px; }
    .field label { display: block; margin-bottom: 6px; font-size: 13px; color: #334155; font-weight: 700; }
    .field input, .field select {
        width: 100%;
        padding: 11px 12px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: #fff;
        color: var(--text);
    }
    .submit-btn {
        padding: 12px 16px;
        border: none;
        border-radius: 10px;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: #fff;
        font-weight: 700;
        cursor: pointer;
    }
    .search-box {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 10px 12px;
    }
    .search-icon { font-size: 18px; }
    .dash-autocomplete-host { flex: 1; }
    .dash-autocomplete-host gmp-place-autocomplete {
        width: 100%;
        --gmpx-color-on-surface: #0f172a;
        --gmpx-color-surface: transparent;
        --gmpx-font-size: 15px;
    }
    .list { margin: 0; padding: 0; list-style: none; }
    .item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
    .item h4 { margin: 0 0 6px; font-size: 15px; }
    .meta { color: #64748b; font-size: 13px; }
    .empty { color: var(--muted); font-style: italic; }
    @media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }

/* extracted from core/dashboard.html */
.dashboard-shell { padding: 0; }
    .brand .white { color: var(--text); }
    .brand .blue { color: var(--navy); }
    .brand-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

    .dashboard-top {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        align-items: center;
        padding: 20px 30px;
        border-bottom: 1px solid var(--border);
        background: var(--bg-panel);
    }
    .dashboard-left, .dashboard-middle, .dashboard-right {
        display: flex;
        align-items: center;
    }
    .dashboard-left { gap: 14px; }
    .dashboard-middle { justify-content: center; }
    .dashboard-right { justify-content: flex-end; gap: 14px; flex-wrap: wrap; }

    .menu-icon {
        font-size: 22px;
        padding: 8px 10px;
        border-radius: 12px;
        border: 1px solid var(--border);
        cursor: default;
    }
    .icon-btn {
        font-size: 20px;
        padding: 8px 10px;
        border-radius: 12px;
        border: 1px solid var(--border);
        line-height: 1;
    }
    .profile-chip .avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--navy), var(--navy-mid));
        display: grid;
        place-items: center;
        font-weight: 800;
        overflow: hidden;
    }
    .profile-chip .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .dashboard-grid {
        display: grid;
        grid-template-columns: 290px 1fr 320px;
        gap: 24px;
        padding: 28px;
        align-items: start;
    }

    .side-card {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 16px;
        font-weight: 700;
        min-height: 76px;
        cursor: pointer;
    }
    .side-card.active { outline: 1px solid rgba(30,111,255,0.45); }

    .side-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: var(--text);
        flex-shrink: 0;
    }
    .blue-bg { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); }
    .orange-bg { background: linear-gradient(135deg, var(--brass), var(--brass)); }
    .navy-bg { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

    .instruction-panel {
        display: none;
        margin-top: 10px;
        padding: 12px 14px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid var(--border);
    }
    .instruction-panel.open { display: block; }
    .tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 10px;
    }
    .tab {
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        color: #334155;
        background: #ffffff;
        border: 1px solid var(--border);
        cursor: pointer;
    }
    .tab.active {
        background: rgba(30,111,255,0.25);
        border-color: rgba(30,111,255,0.5);
    }
    .sub-tabs { margin-left: 8px; border-left: 2px solid rgba(255,138,0,0.5); padding-left: 10px; }

    .create-card {
        border: 1px dashed var(--border);
        background: #f8fafc;
        border-radius: 20px;
        min-height: 320px;
        padding: 22px;
    }
    .create-idle {
        min-height: 260px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .create-idle button {
        background: none;
        border: none;
        color: var(--text);
        cursor: pointer;
        font: inherit;
        width: 100%;
    }
    .create-idle .plus { font-size: 60px; margin-bottom: 12px; color: var(--orange); }
    .create-idle .title { font-size: 26px; font-weight: 800; }

    .create-flow { display: none; text-align: left; }
    .create-flow.open { display: block; }
    .create-flow h3 { margin-top: 0; }
    .search-box-dash {
        display: flex;
        align-items: center;
        gap: 12px;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 12px 16px;
        margin-bottom: 12px;
    }
    .search-box-dash input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: var(--text);
        font-size: 16px;
    }
    .dash-autocomplete-host {
        flex: 1;
    }
    .dash-autocomplete-host gmp-place-autocomplete {
        width: 100%;
        --gmpx-color-on-surface: #0f172a;
        --gmpx-color-surface: transparent;
        --gmpx-font-size: 16px;
    }
    .sheriff-pick { margin: 12px 0; min-height: 24px; color: var(--muted); font-size: 14px; }
    .sheriff-pick a { color: var(--navy); font-weight: 700; }
    .sheriff-pick a:hover { color: var(--brass); }

    .wizard-step {
        margin-top: 20px;
        padding: 16px;
        border-radius: 16px;
        background: #ffffff;
        border: 1px solid var(--border);
    }
    .wizard-step h4 { margin: 0 0 12px; font-size: 16px; color: var(--text); }
    .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    @media (max-width: 720px) { .row2 { grid-template-columns: 1fr; } }
    .field-d {
        margin-bottom: 10px;
    }
    .field-d label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
    .field-d input, .field-d select {
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: #ffffff;
        color: var(--text);
    }
    .btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
    .btn-solid {
        padding: 12px 18px;
        border-radius: 12px;
        border: none;
        background: linear-gradient(90deg, var(--navy), var(--navy-mid));
        color: white;
        font-weight: 700;
        cursor: pointer;
    }
    .btn-ghost {
        padding: 12px 18px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: transparent;
        color: #334155;
        font-weight: 600;
        cursor: pointer;
    }

    .wallet-card h3, .stats-card h3 { margin-top: 0; }
    .wallet-amount { font-size: 34px; font-weight: 800; margin: 8px 0 18px; }
    .payments-due {
        margin-top: 18px;
        padding-top: 18px;
        border-top: 1px solid var(--border);
    }
    .link-line {
        color: var(--navy);
        font-size: 14px;
        display: inline-block;
        margin-top: 6px;
    }
    .topup-btn {
        margin-top: 18px;
        width: 100%;
        padding: 14px;
        border: none;
        border-radius: 12px;
        background: linear-gradient(90deg, var(--orange), var(--brass));
        color: white;
        font-weight: 700;
        cursor: pointer;
    }
    .stats-list {
        margin-top: 20px;
        padding-top: 18px;
        border-top: 1px solid var(--border);
    }
    .stats-item { display: flex; justify-content: space-between; margin-bottom: 12px; }

    @media (max-width: 1100px) {
        .dashboard-grid { grid-template-columns: 1fr; }
        .dashboard-top { grid-template-columns: 1fr; gap: 14px; }
        .dashboard-left, .dashboard-middle, .dashboard-right { justify-content: center; }
    }

/* extracted from instructions/instruction_detail.html */
.wrap { max-width: 1180px; margin: 20px auto 40px; padding: 0 20px; }
    .card { background:#fff; border:1px solid var(--border); border-radius:12px; padding:16px; margin-bottom:12px; }
    .grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:8px; }
    .grid4 { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:8px; }
    .muted { color: #64748b; font-size: 13px; }
    .btn { display:inline-block; padding:9px 12px; border:1px solid var(--border); border-radius:9px; color:#334155; background:#fff; font-weight:700; }
    .btn.primary { background:var(--navy); border-color:var(--navy); color:#fff; }
    input, select, textarea { width:100%; border:1px solid var(--border); border-radius:8px; padding:8px; }
    textarea { min-height: 80px; }
    .timeline-item { border-left:2px solid #cbd5e1; padding-left:10px; margin-bottom:10px; }
    .sticky-actions { position: sticky; bottom: 8px; background: #fff; border:1px solid var(--border); border-radius:10px; padding:8px; display:flex; gap:6px; flex-wrap:wrap; }
    @media (max-width: 980px) { .grid, .grid4 { grid-template-columns: 1fr; } }

/* extracted from instructions/instruction_dashboard.html */
.wrap { max-width: 1250px; margin: 20px auto 40px; padding: 0 20px; }
    .card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
    .filters { display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .filters input, .filters select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px; }
    table { width: 100%; border-collapse: collapse; font-size: 14px; }
    th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 10px 8px; vertical-align: top; }
    .btn { display:inline-block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; color: #334155; background: #fff; font-weight: 700; }
    .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
    .queue-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .queue-col { border: 1px dashed var(--border); border-radius: 10px; padding: 10px; }
    .status-badge { display:inline-block; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
    .priority-normal { background:#e5e7eb; color:#374151; }
    .priority-urgent { background:#fed7aa; color:#9a3412; }
    .priority-same_day { background:#fecaca; color:#991b1b; }
    .priority-after_hours { background:#e9d5ff; color:#6b21a8; }
    .status-submitted, .status-sent_to_sheriff { background:#dbeafe; color:#1e40af; }
    .status-accepted_by_sheriff { background:#c7d2fe; color:#1e3a8a; }
    .status-in_progress, .status-awaiting_payment { background:#fef3c7; color:#92400e; }
    .status-attempted { background:#ede9fe; color:#5b21b6; }
    .status-served, .status-executed { background:#dcfce7; color:#166534; }
    .status-not_served { background:#fee2e2; color:#b91c1c; }
    .status-awaiting_further_instructions { background:#ffedd5; color:#9a3412; }
    .status-completed { background:#bbf7d0; color:#14532d; }
    .status-cancelled { background:#e5e7eb; color:#374151; }
    .mobile-cards { display:none; }
    .mobile-card { border:1px solid var(--border); border-radius:10px; padding:10px; margin-bottom:10px; }
    .action-row { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
    @media (max-width: 1100px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .queue-grid { grid-template-columns: 1fr; } }
    @media (max-width: 800px) { table.desktop-table { display:none; } .mobile-cards { display:block; } }

/* extracted from instructions/attorney_instruction_wizard.html */
.wrap { max-width: 1180px; margin: 20px auto 80px; padding: 0 20px; }
    .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
    .stepper { display: grid; grid-template-columns: repeat(8, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }
    .step { padding: 8px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: 12px; text-align: center; }
    .step.active { border-color: var(--navy); color: var(--navy); font-weight: 700; }
    .card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
    .wizard-step { display: none; }
    .wizard-step.active { display: block; }
    .grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid2 { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field label { display: block; font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 5px; }
    .field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px; font: inherit; }
    .field textarea { min-height: 90px; resize: vertical; }
    .req::after { content: " *"; color: #dc2626; }
    .row { display: flex; gap: 8px; flex-wrap: wrap; }
    .btn { padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #334155; font-weight: 700; cursor: pointer; }
    .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
    .btn.orange { background: var(--brass); border-color: var(--brass); color: #fff; }
    .sticky { position: sticky; bottom: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .item { border: 1px dashed var(--border); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: #f8fafc; }
    .small { font-size: 12px; color: var(--muted); }
    @media (max-width: 980px) { .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid, .grid2 { grid-template-columns: 1fr; } }
/* GoSheriff design system.
   White surfaces, deep blue and deep orange. Older rules still say
   --navy and --brass; those names now point at the brand pair. */

:root {
    --blue: #0B3D91;
    --blue-dark: #072C6B;
    --blue-mid: #123E8C;
    --blue-soft: #F3F6FC;
    --orange: #C4470A;
    --orange-dark: #9A3608;
    --orange-bright: #E06A00;
    --ink: #122033;
    --text: #243044;
    --muted: #5C6B7A;
    --line: #E6E8EC;
    --line-strong: #D5D8DE;
    --border: var(--line);
    --bg: #FFFFFF;
    --bg-panel: #FFFFFF;
    --card: #FFFFFF;
    --parchment: #FFFFFF;
    --parchment-deep: #FFFFFF;
    --navy: var(--blue);
    --navy-mid: var(--blue-mid);
    --navy-deep: var(--blue-dark);
    --gold: var(--orange);
    --gold-soft: var(--orange);
    --brass: var(--orange);
    --crimson: #9F1239;
    --crimson-deep: #881337;
    --ok: #0E5C3A;
    --ok-bg: #E7F6EE;
    --warn: #92400E;
    --warn-bg: #FEF3C7;
    --bad: var(--crimson);
    --bad-bg: #FDE8EC;
    --info: var(--blue);
    --info-bg: var(--blue-soft);
    --sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --serif: var(--sans);
    --sidebar: 260px;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(18, 32, 51, 0.05);
}

* { box-sizing: border-box; }

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

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--orange-dark); text-decoration: underline; }
img { max-width: 100%; }

h1, h2, h3, h4, .top-title {
    font-family: var(--sans);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.02em;
}
h1 { font-size: 1.75rem; margin: 0 0 4px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
p { margin: 0 0 10px; }
.home-signup-note { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }
.home-signup-note a { font-weight: 600; }

.muted, .office-note, .hint, .lead { color: var(--muted); }
.hint, .office-note { display: block; font-size: 13px; margin-top: 6px; }

/* ----- App shell (authenticated portals) ----- */

.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.app-sidebar {
    width: var(--sidebar);
    flex: 0 0 var(--sidebar);
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 18px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    color: var(--text);
}

.brand-logo {
    display: flex;
    align-items: center;
    padding: 0 6px 4px;
    text-decoration: none;
}
.brand-logo img { height: 46px; width: auto; display: block; }
.app-sidebar .brand-logo {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 4px 6px 8px;
    justify-content: flex-start;
    box-shadow: none;
}
.app-sidebar .brand-logo img { height: 36px; }
.app-sidebar .brand-logo:hover { text-decoration: none; }

.workspace-pill {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 10px;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
}
.side-nav a:hover { background: var(--blue-soft); color: var(--blue); text-decoration: none; }
.side-nav a.active {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: transparent;
    box-shadow: inset 3px 0 0 var(--blue);
    font-weight: 750;
}
.side-icn { width: 18px; color: var(--muted); margin-right: 8px; display: inline-flex; }
.icon { width: 18px; height: 18px; display: block; }
.side-nav a.active .side-icn { color: var(--blue); }
.side-label { display: flex; align-items: center; }

.side-foot { margin-top: auto; padding: 8px 10px; font-size: 13px; color: var(--muted); }
.side-foot a { font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 8px; }
.side-foot a:hover { color: var(--orange-dark); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.top-utility-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 22px;
    position: sticky;
    top: 0;
    z-index: 5;
    color: var(--ink);
}
.top-title { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.utility-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 4px 12px 4px 4px;
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
}
.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    border: 0;
}
.notify-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}
.notify-link:hover { border-color: var(--brass); color: var(--navy); text-decoration: none; }

.page-container { padding: 20px 22px 48px; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 7px 10px;
    font-weight: 700;
    cursor: pointer;
}

/* ----- Page header, KPIs, cards ----- */

.portal-head, .page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}
.portal-head p, .page-head p { margin: 0; color: var(--muted); }

.stats, .kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.stat, .kpi {
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 16px 16px 14px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.stat::before, .kpi::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--navy);
}
.stat:nth-child(2)::before, .kpi:nth-child(2)::before { background: var(--brass); }
.stat:nth-child(3)::before { background: var(--blue-dark); }
.stat span, .kpi span { display: block; color: var(--muted); font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.stat strong, .kpi strong { font-family: var(--sans); font-size: 1.55rem; color: var(--ink); letter-spacing: -0.03em; }

.card {
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.layout-2 { display: grid; grid-template-columns: 1.45fr 0.9fr; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.banner, .errors, .error-box {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: var(--parchment-deep);
    color: var(--navy);
    border: 1px solid var(--line-strong);
    border-left: 4px solid var(--brass);
}
.banner.bad, .errors, .error-box { background: var(--bad-bg); color: var(--crimson); border-color: #E7C4C8; border-left-color: var(--crimson); }
.banner.ok { background: var(--ok-bg); color: var(--ok); border-color: #B7DCC8; border-left-color: var(--ok); }
.messages-wrap { max-width: 1100px; margin: 12px auto 0; padding: 0 22px; }
.message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--parchment-deep);
    border: 1px solid var(--line-strong);
    border-left: 4px solid var(--brass);
    color: var(--ink);
}

/* ----- Buttons and forms ----- */

.btn, button.submit, .login-button, .choice > a, button[type="submit"].btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    background: var(--navy);
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-family: var(--sans);
    border-color: var(--blue);
}
.btn:hover, button.submit:hover, .login-button:hover { background: var(--navy-mid); text-decoration: none; color: #fff; }
.btn.secondary, .btn-ghost { background: var(--card); color: var(--navy); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--parchment-deep); color: var(--navy); }
.btn.warn { background: var(--orange); color: #fff; border-color: var(--orange-dark); }
.btn.danger { background: var(--crimson); color: #fff; border-color: var(--crimson-deep); }
.btn.small { padding: 7px 10px; font-size: 13px; }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.timeline-item { border-left: 4px solid var(--brass); background: var(--parchment-deep); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
button.submit, .login-button { border: 0; }

.field { margin-bottom: 12px; }
.field label, form label { font-weight: 650; font-size: 14px; color: var(--ink); }
.field label { display: block; margin-bottom: 6px; }
.field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
.filters input,
.filters select,
.wrap input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.wrap select,
.wrap textarea,
.auth-card input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.auth-card select,
.auth-card textarea,
.card input[type="text"],
.card input[type="email"],
.card input[type="password"],
.card input[type="search"],
.card input[type="number"],
.card select,
.card textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 180px; }
.card input[type="checkbox"], .card input[type="radio"], .field input[type="checkbox"], .field input[type="radio"] { width: auto; }

/* ----- Tables, pills, empty states ----- */

.table-wrap { overflow-x: auto; }
table.requests, table.data {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
table.requests th, table.requests td, table.data th, table.data td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    vertical-align: top;
}
table.requests th, table.data th {
    background: var(--parchment-deep);
    color: var(--navy);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 750;
}
table.requests tr:hover td { background: #F8F3EA; }
table.requests a.ref { font-weight: 750; }

.pill, .status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 750;
    background: var(--parchment-deep);
    color: var(--navy);
    white-space: nowrap;
}
.pill.urgent, .pill.same_day, .status-rejected,
.priority-urgent, .priority-same_day { background: var(--bad-bg); color: var(--crimson); }
.pill.normal, .status-submitted, .status-sent_to_sheriff { background: var(--info-bg); color: var(--info); }
.status-accepted, .status-accepted_by_sheriff, .status-payment, .pay-due,
.status-in_progress, .status-awaiting_payment, .priority-after_hours { background: var(--warn-bg); color: var(--warn); }
.status-paid, .status-served, .status-executed, .status-completed, .status-return_uploaded { background: var(--ok-bg); color: var(--ok); }
.status-out_with_deputy, .status-return_preparing, .status-awaiting_signature, .status-non_service,
.status-attempted, .status-not_served, .status-cancelled, .status-awaiting_further_instructions { background: #ECEFF3; color: #3D4A59; }

.empty-state {
    text-align: center;
    padding: 28px 16px;
    color: var(--muted);
}
.empty-state strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ----- Status rail and event timeline ----- */

.status-rail {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0 0 16px;
    padding: 0;
}
.status-rail li {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 750;
    color: var(--muted);
    position: relative;
    padding-top: 18px;
}
.status-rail li::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    height: 4px;
    background: #D9D0C2;
}
.status-rail li::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid #CDBFA8;
}
.status-rail li.is-current { color: var(--brass); }
.status-rail li.is-current::before { background: var(--brass); }
.status-rail li.is-current::after { background: var(--brass); border-color: var(--brass); }
.status-rail li.is-done { color: var(--ok); }
.status-rail li.is-done::before { background: var(--ok); }
.status-rail li.is-done::after { background: var(--ok); border-color: var(--ok); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    position: relative;
    margin: 0 0 12px;
    padding: 10px 12px 10px 16px;
    background: var(--parchment-deep);
    border: 1px solid var(--line);
    border-radius: 10px;
    border-left: 4px solid var(--brass);
}
.timeline time { display: block; color: var(--muted); font-size: 12px; }
.timeline strong { display: block; color: var(--ink); }

/* ----- Wizard ----- */

.wizard-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
}
.wizard-progress span {
    flex: 1 0 72px;
    min-height: 0;
    height: auto;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-align: center;
    padding: 8px 4px;
}
.wizard-progress span.on {
    background: var(--blue-soft);
    border-color: var(--blue);
    color: var(--blue);
}
.step[hidden] { display: none !important; }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.choice {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 96px;
    border: 1px solid var(--line-strong);
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    font-weight: 750;
    color: var(--ink);
}
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice:hover { border-color: var(--blue); }
.choice:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.16);
}
.choice .muted, .choice .pill { font-weight: 600; }

/* ----- Drop zone ----- */

.gs-drop {
    position: relative;
    min-height: 280px;
    border: 2px dashed var(--line-strong);
    border-radius: 16px;
    background: #fff;
    padding: 28px 18px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.gs-drop.is-drag {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: inset 0 0 0 3px rgba(11, 61, 145, 0.16);
}
.gs-drop-stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.gs-drop-plus {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 112px;
    height: 112px;
    margin: 0;
    transform: translate(-50%, -50%);
    color: var(--blue);
    font-size: 0;
    line-height: 0;
}
.gs-drop-plus::before,
.gs-drop-plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    border-radius: 4px;
    transform: translate(-50%, -50%);
}
.gs-drop-plus::before { width: 12px; height: 112px; }
.gs-drop-plus::after { width: 112px; height: 12px; }
.gs-drop-hint {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(50% + 68px);
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}
.gs-drop:has(.gs-drop-files li) .gs-drop-stage { display: none; }
.gs-drop-files {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    width: min(100%, 520px);
}
.gs-drop-files li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 6px;
    font-size: 13px;
}
.gs-drop-name { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.gs-drop-size { color: var(--muted); }
.gs-drop-remove {
    border: 0;
    background: transparent;
    color: var(--bad);
    font-weight: 750;
    cursor: pointer;
    font: inherit;
    padding: 0;
}
.gs-drop-upload {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 750;
    pointer-events: none;
}
.field .gs-drop-input,
.card .gs-drop-input,
.gs-drop-input {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 92px;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    background: transparent;
}

/* ----- Auth and public pages ----- */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px 1fr;
}
.auth-brand {
    background: #fff;
    color: var(--ink);
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-right: 1px solid var(--line);
    box-shadow: inset 4px 0 0 var(--blue);
}
.auth-brand img { height: 44px; width: auto; background: transparent; border: 0; border-radius: 0; padding: 0; }
.auth-brand h2 { color: var(--blue); margin: 0; font-size: 1.6rem; }
.auth-brand p { color: var(--muted); }
.auth-panel { display: flex; align-items: flex-start; justify-content: center; padding: 36px 20px 64px; }
.auth-card { width: min(760px, 100%); }
.auth-card h1 { margin-top: 0; }
.back, .back-link { display: inline-block; margin-top: 16px; font-weight: 700; }
.login-role, .register-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 750;
    font-size: 13px;
    text-decoration: none;
}
.signup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.signup-grid .choice { min-height: 180px; text-decoration: none; color: inherit; }
.signup-grid .choice a, .signup-grid .choice .btn { margin-top: auto; align-self: flex-start; }

.public-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 -3px 0 var(--blue);
}
.page, .wrap, .page-narrow { max-width: 1100px; margin: 0 auto; padding: 28px 22px 60px; }

.locked-preview { position: relative; border-radius: 12px; overflow: hidden; min-height: 180px; }
.fake-doc {
    background: #fff;
    border: 1px solid var(--line);
    padding: 22px;
    filter: blur(6px);
    user-select: none;
}
.lock-note { margin-top: 10px; color: var(--muted); }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

.home-wrap { background: var(--bg); }
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-list li {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--parchment-deep);
}

@media (max-width: 960px) {
    .app-sidebar {
        position: fixed;
        z-index: 20;
        transform: translateX(-105%);
        transition: transform 0.18s ease;
        box-shadow: var(--shadow);
    }
    .nav-toggle:checked ~ .app-shell .app-sidebar { transform: none; }
    .nav-burger { display: inline-flex; }
    .stats, .kpi-grid, .layout-2, .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .status-rail { flex-direction: column; gap: 8px; }
    .status-rail li { text-align: left; padding: 0 0 0 22px; }
    .status-rail li::before { left: 5px; top: 0; bottom: 0; right: auto; width: 3px; height: auto; }
    .status-rail li::after { left: 0; top: 4px; margin: 0; }
    .page-container, .public-top { padding-left: 14px; padding-right: 14px; }
    .dl { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; align-items: flex-start; }
}

/* Layout repair: older templates dumped global rules with 8px gaps and a 900px home cap. */
.home-wrap { background: #fff; }
.home-wrap.home-inner { max-width: 1120px; padding: 36px 32px 72px; }
.hero-title, .hero-title .white, .hero-title .blue { font-family: var(--sans); letter-spacing: -0.03em; color: var(--blue); }
.brand .white, .brand .blue { color: var(--blue); }
.search-icon { color: var(--blue); display: flex; }
.search-icon .icon { width: 22px; height: 22px; }
.gs-drop .gs-drop-input { width: 92px; height: 32px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 28px; }
.feature-icon .icon { width: 26px; height: 26px; }
.feature-card.green .feature-icon,
.feature-card.navy .feature-icon,
.feature-card.sky .feature-icon { background: var(--blue); }
.feature-card.orange .feature-icon { background: var(--orange); }
.modal-icon .icon { width: 26px; height: 26px; }
.grid, .grid2, .grid4 { gap: 16px 18px; }
.grid > div, .grid2 > div, .grid4 > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.wrap .filters { gap: 12px; }
.card:has(table) { overflow-x: auto; }
table.desktop-table th, table.desktop-table td { padding: 12px 10px; }
input[type="radio"], input[type="checkbox"], input[type="file"], input[type="hidden"] { width: auto; }
.instruction-panel { background: #fff; }
.blue-bg, .orange-bg, .navy-bg { color: #fff; }
.navy-bg { background: var(--blue); }
.side-icon .icon, .icon-btn .icon, .menu-icon .icon { width: 20px; height: 20px; }
.empty-state::before {
    content: "";
    display: block;
    width: 80px;
    height: 64px;
    margin: 0 auto 12px;
    background: url("../images/empty-state.svg") center / contain no-repeat;
}
.empty-state { padding: 28px 16px; }
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 28px 36px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.dashboard-top { background: #fff; }
.field { margin-bottom: 16px; }
.portal-head { margin-bottom: 20px; }
.stats { margin-bottom: 20px; }
.auth-brand h2 { display: flex; align-items: center; gap: 10px; }
.auth-brand h2 .icon { width: 26px; height: 26px; color: var(--blue); }
.forgot-row { display: flex; justify-content: flex-end; margin: -6px 0 16px; }
.forgot-link { color: var(--blue); font-weight: 650; font-size: 14px; }
.otp-input { letter-spacing: 0.35em; font-size: 1.5rem; text-align: center; font-weight: 700; }
.resend-form { margin-top: 12px; }
.field .errorlist { color: var(--crimson); margin: 6px 0 0; padding-left: 18px; }
.verify-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: inset 4px 0 0 var(--orange);
    color: var(--ink);
}
.verify-banner .icon { width: 20px; height: 20px; color: var(--orange); flex: none; }
.verify-banner span { flex: 1; }
.firm-signup { display: flex; flex-direction: column; gap: 18px; max-width: 920px; }
.firm-signup .card h2 { margin: 0 0 6px; color: var(--blue); font-size: 1.25rem; }
.firm-signup .card > .muted { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .field { margin-bottom: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
.check-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.check-list .check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-weight: 650;
    line-height: 1.4;
}
.check-list .check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.address-block.is-locked input,
.address-block.is-locked select { background: #f4f6fa; color: var(--muted); }
.address-block .copied-note { display: none; margin: 0 0 12px; color: var(--blue); font-weight: 650; }
.address-block.is-locked .copied-note { display: block; }
.password-field { position: relative; }
.password-field input { padding-right: 88px; }
.password-field .show-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 32px;
    padding: 4px 10px;
}
.password-rules { margin: 0 0 16px; padding-left: 18px; color: var(--ink); }
.password-rules li { margin: 4px 0; }
.address-lines { white-space: pre-line; }
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
}
