:root {
    --navy: #101d33;
    --navy-soft: #1b2d49;
    --green: #116149;
    --green-dark: #0b4936;
    --ink: #172235;
    --muted: #68758a;
    --line: #dce3ec;
    --surface: #ffffff;
    --background: #f3f6f9;
    --yellow: #f3b61f;
    --red: #c9362b;
    --shadow: 0 22px 70px rgba(16, 29, 51, 0.11);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--background);
    font-family: "Manrope", Aptos, "Segoe UI", sans-serif;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.portal-page { min-height: 100vh; }

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.12fr) minmax(420px, 0.88fr);
}

.welcome-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 6vw, 78px);
    color: white;
    background:
        radial-gradient(circle at 82% 18%, rgba(41, 181, 139, 0.24), transparent 30%),
        linear-gradient(145deg, var(--navy), #152c4d 62%, #0c5843 140%);
    overflow: hidden;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-lockup strong, .brand-lockup span { display: block; }
.brand-lockup strong { font-size: 17px; }
.brand-lockup span { margin-top: 2px; color: #91a0b6; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: var(--green);
    font-weight: 800;
    overflow: hidden;
}

.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.welcome-copy { max-width: 650px; margin: 90px 0; }
.eyebrow { display: block; margin-bottom: 12px; color: #2b9a76; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.welcome-panel .eyebrow { color: #62d6b0; }
.welcome-copy h1 { margin: 0; font-size: clamp(42px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -.045em; }
.welcome-copy p { max-width: 540px; margin: 26px 0 0; color: #bdc9d8; font-size: 18px; line-height: 1.65; }
.support-copy { margin: 0; color: #8fa1b8; font-size: 13px; }

.login-card {
    align-self: center;
    width: min(470px, calc(100% - 64px));
    display: grid;
    gap: 20px;
    margin: 40px auto;
    padding: clamp(30px, 4vw, 50px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-card h2 { margin: 0 0 8px; font-size: 35px; letter-spacing: -.035em; }
.login-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.login-card label { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
.login-card label small { color: var(--muted); font-weight: 400; }

.login-card input, .login-card select {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid #cdd6e2;
    border-radius: 11px;
    outline: none;
    color: var(--ink);
    background: #fbfcfe;
    transition: border-color .18s, box-shadow .18s;
}

.login-card input:focus, .login-card select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(17, 97, 73, .11); }
.login-card button, .view-invoice-button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    color: white;
    background: var(--green);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.login-card button:hover, .view-invoice-button:hover { background: var(--green-dark); }
.login-card button:disabled { cursor: wait; opacity: .65; }
.login-card .privacy-note { text-align: center; font-size: 12px; }
.form-error { padding: 11px 13px; border-radius: 9px; color: #9d231b; background: #fcebea; font-size: 13px; }

.dashboard { min-height: 100vh; }
.portal-header {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 14px clamp(22px, 5vw, 72px);
    color: white;
    background: var(--navy);
}

.header-actions { display: flex; align-items: center; gap: 20px; }
.signed-in-as { display: grid; gap: 2px; text-align: right; }
.signed-in-as span { color: #91a0b6; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.signed-in-as strong { font-size: 14px; }
.secondary-button { min-height: 39px; padding: 0 16px; border: 1px solid #ccd5e0; border-radius: 9px; color: var(--ink); background: white; font-weight: 700; cursor: pointer; }
.portal-header .secondary-button { border-color: #43536b; color: white; background: transparent; }
.portal-header .secondary-button:hover { background: var(--navy-soft); }

.dashboard-content { width: min(1460px, calc(100% - 44px)); margin: 0 auto; padding: 44px 0 70px; }
.dashboard-intro { display: grid; grid-template-columns: minmax(340px, 1fr) 180px 180px; align-items: end; gap: 16px; margin-bottom: 26px; }
.dashboard-intro h1 { margin: 0 0 9px; font-size: clamp(31px, 4vw, 48px); letter-spacing: -.04em; }
.dashboard-intro p { margin: 0; color: var(--muted); line-height: 1.5; }
.summary-card, .content-panel { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 10px 35px rgba(16, 29, 51, .055); }
.summary-card { display: grid; gap: 7px; padding: 18px 20px; }
.summary-card span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.summary-card strong { font-size: 30px; }
.content-panel { margin-top: 16px; padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.panel-heading h2 { margin: 0 0 5px; font-size: 20px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 13px; }

.driver-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 11px; }
.driver-card { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.driver-initial { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--green); font-weight: 800; }
.driver-card strong, .driver-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-card span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.driver-card .branch-pill { max-width: 140px; margin: 0; padding: 6px 9px; border-radius: 999px; color: #46556b; background: #edf1f6; font-size: 11px; font-weight: 700; }

.invoice-list { display: grid; gap: 9px; }
.invoice-card { display: grid; grid-template-columns: 1.15fr 1.35fr 1fr .8fr .8fr auto minmax(250px, auto); align-items: center; gap: 15px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdff; }
.invoice-primary, .invoice-detail { min-width: 0; display: grid; gap: 3px; }
.invoice-card span:not(.status-badge), .invoice-card small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.invoice-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.invoice-primary strong { color: var(--green); font-size: 14px; }
.status-badge { padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; text-align: center; }
.status-badge.pending { color: #725000; background: #fff1bd; }
.status-badge.accepted { color: #0c573f; background: #d8f2e8; }
.status-badge.disputed { color: #962b23; background: #fbe0de; }
.view-invoice-button { min-height: 36px; padding: 0 13px; border-radius: 8px; font-size: 12px; }
.invoice-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.invoice-decision-button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 8px; color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.invoice-decision-button.accept { background: #168353; }
.invoice-decision-button.accept:hover:not(:disabled) { background: #0f6841; }
.invoice-decision-button.dispute { background: #c53b35; }
.invoice-decision-button.dispute:hover:not(:disabled) { background: #9f2e2a; }
.invoice-decision-button:disabled { opacity: .42; cursor: not-allowed; }
.invoice-dispute-reason { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-left: 3px solid var(--red); border-radius: 7px; color: #7e2b26; background: #fff4f3; font-size: 12px; line-height: 1.5; }
.empty-state { padding: 36px 16px; border: 1px dashed #cbd5e1; border-radius: 12px; color: var(--muted); text-align: center; background: #fafbfd; }

.portal-modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; background: rgba(8, 18, 33, .62); backdrop-filter: blur(3px); }
.portal-modal { width: min(560px, 100%); display: grid; gap: 20px; padding: 26px; border-radius: 18px; background: var(--surface); box-shadow: 0 28px 90px rgba(8, 18, 33, .32); }
.portal-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.portal-modal-header h2 { margin: 0 0 6px; font-size: 24px; }
.portal-modal-header p { margin: 0; color: var(--muted); font-size: 13px; }
.portal-modal-header .eyebrow { margin-bottom: 7px; }
.modal-close { width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 9px; color: var(--muted); background: #eef2f6; font-size: 24px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--ink); background: #e3e9f0; }
.dispute-reason-field { display: grid; gap: 8px; font-size: 13px; font-weight: 750; }
.dispute-reason-field textarea { width: 100%; resize: vertical; min-height: 140px; padding: 13px 14px; border: 1px solid #cdd6e2; border-radius: 11px; outline: none; color: var(--ink); background: #fbfcfe; line-height: 1.5; }
.dispute-reason-field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(201, 54, 43, .1); }
.dispute-reason-field small { color: var(--muted); font-size: 11px; font-weight: 500; text-align: right; }
.portal-modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.submit-dispute-button { min-height: 39px; padding: 0 17px; border: 0; border-radius: 9px; color: #fff; background: var(--red); font-weight: 800; cursor: pointer; }
.submit-dispute-button:hover { background: #a92d25; }
.submit-dispute-button:disabled { opacity: .55; cursor: wait; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: min(390px, calc(100% - 44px)); padding: 13px 16px; border-radius: 10px; color: white; background: var(--green); box-shadow: var(--shadow); font-size: 13px; }
.toast.error { background: var(--red); }

@media (max-width: 1040px) {
    .login-layout { grid-template-columns: 1fr; }
    .welcome-panel { min-height: 360px; padding: 34px; }
    .welcome-copy { margin: 55px 0 30px; }
    .welcome-copy h1 { font-size: 48px; }
    .login-card { margin: 55px auto; }
    .dashboard-intro { grid-template-columns: 1fr 150px 150px; }
    .invoice-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .status-badge, .invoice-actions { justify-self: start; }
}

@media (max-width: 700px) {
    .welcome-panel { min-height: 320px; }
    .welcome-copy { margin: 42px 0 24px; }
    .welcome-copy h1 { font-size: 38px; }
    .welcome-copy p { font-size: 15px; }
    .login-card { width: calc(100% - 28px); margin: 26px auto; padding: 25px; }
    .portal-header { align-items: flex-start; padding: 16px; }
    .portal-header .brand-lockup span { display: none; }
    .signed-in-as { display: none; }
    .dashboard-content { width: calc(100% - 26px); padding-top: 28px; }
    .dashboard-intro { grid-template-columns: 1fr 1fr; }
    .dashboard-intro > div:first-child { grid-column: 1 / -1; }
    .summary-card { padding: 15px; }
    .summary-card strong { font-size: 25px; }
    .panel-heading { align-items: flex-start; }
    .invoice-card { grid-template-columns: 1fr 1fr; }
    .invoice-primary { grid-column: 1 / -1; }
    .amount-detail { text-align: left; }
}

.invoice-details-modal { width: min(1000px, 94vw); max-height: 85vh; overflow: auto; border: 0; color: var(--ink); }
.invoice-details-modal:not([open]) { display: none; }
.invoice-details-modal::backdrop { background: rgba(8, 18, 33, .62); }
.invoice-details-table { overflow-x: auto; }
.invoice-details-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.invoice-details-table th, .invoice-details-table td { padding: 10px; border-bottom: 1px solid #dce2e8; text-align: left; overflow-wrap: anywhere; }

/* Keep long names and invoice references inside their layout tracks. */
.brand-mark { flex-shrink: 0; }
.brand-lockup, .brand-lockup > div, .header-actions, .dashboard-intro > div,
.panel-heading > div, .portal-modal-header > div, #invoiceDetailsContent { min-width: 0; }
.portal-modal-header h2, .dashboard-intro h1, .signed-in-as strong { overflow-wrap: anywhere; }
.portal-modal { max-height: calc(100vh - 44px); max-height: calc(100dvh - 44px); overflow-y: auto; }
.invoice-details-modal { max-height: 85vh; max-height: 85dvh; }
.invoice-details-table { max-width: 100%; overscroll-behavior-x: contain; }
.invoice-details-table table { min-width: 540px; }
button:focus-visible, a:focus-visible { outline: 3px solid #2b9a76; outline-offset: 3px; }

@media (max-width: 1040px) {
    .invoice-actions { grid-column: 1 / -1; justify-self: stretch; justify-content: flex-start; }
}

@media (max-width: 700px) {
    .welcome-panel { min-height: auto; padding: 24px 20px; }
    .welcome-copy { margin: 24px 0 18px; }
    .welcome-copy h1 { font-size: clamp(28px, 7vw, 38px); }
    .welcome-copy p { margin-top: 14px; }
    .login-card { padding: 22px 18px; margin: 18px auto; }
    .login-card input, .dispute-reason-field textarea { font-size: 16px; }
    .portal-header { flex-wrap: wrap; gap: 12px; align-items: center; }
    .portal-header .brand-lockup { flex: 1 1 180px; }
    .portal-header .brand-lockup strong { overflow-wrap: anywhere; }
    .header-actions { margin-left: auto; }
    .dashboard-content { width: calc(100% - 24px); padding: 24px 0 36px; }
    .dashboard-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .content-panel { padding: 14px; }
    .panel-heading { flex-wrap: wrap; gap: 12px; }
    .driver-list { grid-template-columns: minmax(0, 1fr); }
    .driver-card { grid-template-columns: 42px minmax(0, 1fr); }
    .driver-card strong, .driver-card span { white-space: normal; overflow-wrap: anywhere; }
    .driver-card .branch-pill { grid-column: 2; max-width: 100%; justify-self: start; }
    .invoice-card { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; padding: 14px; }
    .invoice-card strong { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
    .invoice-card .status-badge { max-width: 100%; }
    .invoice-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .invoice-actions > * { width: 100%; min-width: 0; text-align: center; }
    .view-invoice-button, .invoice-decision-button, .secondary-button, .submit-dispute-button { min-height: 44px; padding: 10px 12px; font-size: 14px; }
    .portal-modal-backdrop { padding: 12px; }
    .portal-modal { padding: 18px; gap: 16px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    .invoice-details-modal { width: calc(100% - 24px); max-width: none; }
    .portal-modal-header { gap: 10px; }
    .portal-modal-header h2 { font-size: 20px; }
    .modal-close { width: 44px; height: 44px; }
    .portal-modal-actions { flex-wrap: wrap; }
    .portal-modal-actions > button { flex: 1 1 110px; }
    .invoice-dispute-reason { overflow-wrap: anywhere; }
    .toast { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
}

/* Internet Express sign-in: continuous charcoal background and yellow accents. */
#portalLogin {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 24px clamp(16px, 4vw, 48px) 40px;
    background:
        radial-gradient(ellipse at 90% 0%, rgba(242, 221, 21, .09), transparent 45%),
        linear-gradient(135deg, #080c10, #141b22);
    border-top: 4px solid #f2dd15;
}
.login-header { width: 100%; color: white; }
.login-header .brand-lockup span { color: #bdc9d8; }
#portalLogin .login-card {
    width: min(470px, 100%);
    align-self: center;
    margin: 0;
    padding: clamp(22px, 4vw, 36px);
}
@media (max-width: 700px) {
    #portalLogin { gap: 20px; padding: 20px 16px 32px; }
    #portalLogin .login-card { border-radius: 18px; }
    #portalLogin .login-card h2 { font-size: 30px; }
}

#portalLogin .login-header { max-width: 1120px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
#portalLogin .brand-lockup { gap: 12px; }
#portalLogin .brand-mark { background: #f2dd15; color: #101418; border-radius: 10px; }
#portalLogin .brand-mark:has(img) { background: transparent; }
#portalLogin .brand-lockup strong { color: #fff; font-size: 19px; }
#portalLogin .brand-lockup span { color: #ccd3db; letter-spacing: .12em; font-size: 10px; }
#portalLogin .login-card {
    color: #f4f6f8;
    background: #151e27;
    border: 1px solid #34404b;
    border-top: 3px solid #f2dd15;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
#portalLogin .login-card .eyebrow { color: #f2dd15; font-size: 11px; letter-spacing: .14em; }
#portalLogin .login-card h2 { color: #fff; }
#portalLogin .login-card p, #portalLogin .login-card label small { color: #b9c5d1; }
#portalLogin .login-card label { color: #edf2f7; }
#portalLogin .login-card input { color: #f4f6f8; background: #0d141b; border-color: #526171; font-size: 16px; }
#portalLogin .login-card input:focus { border-color: #f2dd15; box-shadow: 0 0 0 3px rgba(242, 221, 21, .16); }
#portalLogin .login-card button { color: #101418; background: #f2dd15; min-height: 50px; }
#portalLogin .login-card button:hover { background: #fff06a; }
#portalLogin .login-card button:focus-visible { outline-color: #fff; }
#portalLogin .privacy-note { padding-top: 16px; border-top: 1px solid #34404b; line-height: 1.6; }
#portalLogin .form-error { color: #ffd8d4; background: #472322; border: 1px solid #99534e; }

/* Match the signed-in portal and its dialogs to the Internet Express sign-in. */
.dashboard, .portal-modal {
    --ink: #f4f6f8;
    --muted: #b9c5d1;
    --line: #34404b;
    --surface: #151e27;
    color: var(--ink);
}
.dashboard {
    background: radial-gradient(ellipse at 90% 0%, rgba(242, 221, 21, .09), transparent 45%),
                linear-gradient(135deg, #080c10, #141b22);
    border-top: 4px solid #f2dd15;
}
.dashboard .portal-header { background: rgba(8, 12, 16, .8); border-bottom: 1px solid var(--line); }
.dashboard .brand-mark, .dashboard .driver-initial { background: #f2dd15; color: #101418; }
.dashboard .brand-mark:has(img) { background: transparent; }
.dashboard .brand-lockup span, .dashboard .signed-in-as span { color: #b9c5d1; }
.dashboard .eyebrow, .portal-modal .eyebrow { color: #f2dd15; }
.dashboard .summary-card { border-top: 3px solid #f2dd15; }
.dashboard .summary-card strong { color: #f2dd15; }
.dashboard .content-panel, .dashboard .summary-card { box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }
.dashboard .driver-card, .dashboard .invoice-card { background: #101820; }
.dashboard .driver-card .branch-pill { background: #263442; color: #dce6ef; }
.dashboard .invoice-primary strong { color: #f2dd15; }
.dashboard .secondary-button, .portal-modal .secondary-button {
    color: #f4f6f8; background: #202c37; border-color: #647383;
}
.dashboard .secondary-button:hover, .portal-modal .secondary-button:hover { background: #30404e; border-color: #f2dd15; }
.dashboard .view-invoice-button { background: #f2dd15; color: #101418; }
.dashboard .view-invoice-button:hover { background: #fff06a; }
.dashboard .status-badge.pending { color: #ffed7c; background: #453d18; }
.dashboard .status-badge.accepted { color: #9deac5; background: #193c30; }
.dashboard .status-badge.disputed { color: #ffbbb5; background: #482724; }
.dashboard .invoice-dispute-reason { color: #ffd8d4; background: #382322; }
.dashboard .empty-state { color: var(--muted); background: #101820; border-color: #526171; }
.portal-modal { border: 1px solid #34404b; border-top: 3px solid #f2dd15; }
.portal-modal .modal-close { color: #edf2f7; background: #293745; }
.portal-modal .modal-close:hover { color: #101418; background: #f2dd15; }
.portal-modal .dispute-reason-field textarea { color: #f4f6f8; background: #0d141b; border-color: #647383; }
.portal-modal .dispute-reason-field textarea::placeholder { color: #aab8c6; }
.portal-modal .form-error { color: #ffd8d4; background: #472322; }
.invoice-details-table th, .invoice-details-table td { border-color: #34404b; }
.invoice-details-table th { color: #f2dd15; background: #101820; }
.invoice-details-table tbody tr:nth-child(even) { background: #1b2732; }
.dashboard :is(button, a):focus-visible, .portal-modal :is(button, a):focus-visible { outline-color: #f2dd15; }

/* Match portal controls to the shared charcoal action style. */
body :is(button, .view-invoice-button),
#portalLogin .login-card button,
.dashboard :is(button, .view-invoice-button),
.portal-modal button {
    --control-accent: #f2dd15;
    --control-border: rgba(242, 221, 21, .42);
    color: #f4f6f8;
    background: linear-gradient(135deg, #25313a, #141e26);
    border: 1px solid var(--control-border);
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    font-weight: 600;
    letter-spacing: .02em;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
body :is(button, .view-invoice-button):not(:disabled):hover,
#portalLogin .login-card button:hover,
.dashboard :is(button, .view-invoice-button):not(:disabled):hover,
.portal-modal button:not(:disabled):hover {
    color: #fff;
    border-color: var(--control-accent);
    background: linear-gradient(135deg, #333d30, #1b2732);
    box-shadow: 0 0 16px rgba(242, 221, 21, .12);
}
.dashboard button.invoice-decision-button.accept { --control-accent: #9deac5; --control-border: #418b69; color: #9deac5; }
.dashboard button.invoice-decision-button.dispute,
.portal-modal button.submit-dispute-button { --control-accent: #ff9990; --control-border: #99534e; color: #ffbbb5; }
body button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
body :is(button, .view-invoice-button):not(:disabled):active { background: #101820; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
    body :is(button, .view-invoice-button), #portalLogin .login-card button,
    .dashboard :is(button, .view-invoice-button), .portal-modal button { transition: none; }
}

@font-face { font-family: "Manrope"; src: url("fonts/Manrope-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
:root { --control-bg: #24282f; --control-line: #454c56; --control-hover: #30353d; --control-hover-line: #747d88; --action-bg: #e9d943; --action-hover: #f5e76a; --action-ink: #1a1c12; --accent-text: #e9d943; --ink: #edf0f3; }
body { -webkit-font-smoothing: antialiased; background: #101216; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
:is(h1, h2, h3) { text-wrap: balance; }
p { text-wrap: pretty; }
.portal-page, .login-layout { min-height: 100dvh; }
#portalLogin { background: radial-gradient(ellipse at 15% 10%, rgb(233 217 67 / 5%), transparent 60%), #101216; }
#portalLogin .login-card { border: 1px solid #30353d; border-radius: 20px; background: #191c21; box-shadow: 0 16px 60px rgb(0 0 0 / 15%); padding: clamp(24px, 4vw, 42px); }
#portalLogin .login-card h2 { font-weight: 600; letter-spacing: -.04em; }
#portalLogin .login-card :is(input, select) { min-height: 48px; border-radius: 9px; border: 1px solid #454c56; color: #edf0f3; background: #13161b; padding: 12px; font-size: 16px; }
#portalLogin .login-card label { font-size: 12px; font-weight: 600; }
.brand-lockup strong { letter-spacing: -.025em; font-weight: 600; }
.dashboard, .portal-modal { --surface: #191c21; --line: #30353d; --muted: #a2aab5; }
.dashboard { background: #101216; border-top: 0; }
.dashboard .portal-header { background: #14171b; }
.dashboard .summary-card { border-top: 1px solid #454c56; border-radius: 14px; }
.dashboard .content-panel { border-radius: 18px; box-shadow: none; }
.dashboard :is(.driver-card, .invoice-card) { background: #13161b; border-radius: 12px; }
.dashboard :is(.summary-card, .invoice-primary, .invoice-details-table) { font-variant-numeric: tabular-nums; }
.portal-modal { background: #191c21; border: 1px solid #30353d; border-radius: 20px; }
@media (pointer: coarse) { input, select, textarea { font-size: 16px; } }
@media (max-width: 700px) {
    .login-header, .portal-header { padding-top: max(24px, env(safe-area-inset-top)); }
    .dashboard-content { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

.passkey-setup { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 26px; }
.passkey-setup > div { max-width: 680px; }
.passkey-setup h2 { margin: 8px 0; font-size: 22px; letter-spacing: -.025em; }
.passkey-setup p { margin: 0; color: var(--muted); line-height: 1.6; }
.passkey-setup button { flex-shrink: 0; min-height: 44px; }
@media (max-width: 700px) {
    .passkey-setup { flex-direction: column; align-items: stretch; gap: 18px; }
}
