:root {
    color-scheme: dark;
    --md-sys-color-primary: #f45612;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #ff7a3d;
    --md-sys-color-on-primary-container: #ffffff;
    --md-sys-color-secondary: #f5b51b;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #193754;
    --md-sys-color-on-secondary-container: #ffffff;
    --md-sys-color-tertiary: #f45612;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-tertiary-container: #2a4568;
    --md-sys-color-on-tertiary-container: #ffffff;
    --md-sys-color-error: #ff8c8c;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-error-container: rgba(255, 140, 140, 0.12);
    --md-sys-color-on-error-container: #ffb8b8;
    --md-sys-color-background: #0d2a4c;
    --md-sys-color-on-background: #ffffff;
    --md-sys-color-surface: #0d2a4c;
    --md-sys-color-on-surface: #ffffff;
    --md-sys-color-surface-variant: #193754;
    --md-sys-color-on-surface-variant: rgba(255, 255, 255, 0.62);
    --md-sys-color-outline: rgba(255, 255, 255, 0.24);
    --md-sys-color-outline-variant: rgba(255, 255, 255, 0.12);
    --md-sys-color-surface-container-lowest: #152a45;
    --md-sys-color-surface-container-low: #152a45;
    --md-sys-color-surface-container: #193754;
    --md-sys-color-surface-container-high: #203e60;
    --md-sys-color-surface-container-highest: #274b72;
    --tirhal-brand: #f45612;
    --tirhal-on-brand: #ffffff;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --elevation-1: 0 14px 36px rgba(4, 18, 34, 0.18);
    --elevation-2: 0 22px 64px rgba(4, 18, 34, 0.28);
}

.agent-notifications {
    margin-bottom: 18px;
    padding: 20px;
    border-color: color-mix(in srgb, var(--md-sys-color-error) 28%, var(--md-sys-color-outline-variant));
}

.returned-review-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding: 15px 16px;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-error) 35%, var(--md-sys-color-outline-variant));
    border-radius: var(--radius-md);
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.returned-review-notice > span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
    font-weight: 900;
}

.returned-review-notice strong,
.returned-review-notice small {
    display: block;
}

.returned-review-notice p {
    margin: 4px 0;
    font-weight: 800;
}

.returned-review-notice__label {
    margin-top: 8px;
    color: var(--md-sys-color-on-error-container);
    font-size: 0.68rem;
    font-weight: 900;
    opacity: 0.76;
}

.returned-review-notice__action {
    min-height: 42px;
    margin-top: 13px;
    padding: 8px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    cursor: pointer;
}

.returned-review-notice__action:hover,
.returned-review-notice__action:focus-visible {
    filter: brightness(1.06);
    outline: 3px solid color-mix(in srgb, var(--md-sys-color-error) 25%, transparent);
    outline-offset: 2px;
}

.returned-review-notice__action[hidden],
.returned-case-workspace[hidden] {
    display: none;
}

.review-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.review-tab {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 16px;
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface-variant);
    box-shadow: 0 7px 20px rgba(4, 18, 34, 0.04);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.review-tab:hover {
    border-color: var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface);
    transform: translateY(-2px);
}

.review-tab__label {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    line-height: 1.45;
}

.review-tab__label i {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: var(--md-sys-color-outline);
    box-shadow: 0 0 0 5px var(--md-sys-color-surface-container-high);
}

.review-tab__count {
    display: grid;
    min-width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    padding-inline: 7px;
    border-radius: 10px;
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
    font-size: 0.82rem;
}

.review-tab--active {
    border-color: color-mix(in srgb, var(--md-sys-color-primary) 72%, var(--md-sys-color-outline));
    background: #12365d;
    color: #fff;
    box-shadow: 0 12px 30px rgba(6, 41, 76, 0.16);
}

.review-tab--active .review-tab__label i {
    background: var(--md-sys-color-primary);
    box-shadow: 0 0 0 5px rgba(244, 86, 18, 0.18);
}

.review-tab--active .review-tab__count {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.review-tab--activated .review-tab__label i {
    background: #2d9f72;
}

.review-tab--failed .review-tab__label i,
.review-tab--cancelled .review-tab__label i {
    background: var(--md-sys-color-error);
}

.review-tab--returned_to_agent .review-tab__label i {
    background: #d89a25;
}

.review-empty {
    display: grid;
    max-width: 580px;
    justify-items: center;
    gap: 16px;
    margin: 22px auto 8px;
    padding: clamp(32px, 7vw, 58px) 24px;
    text-align: center;
}

.review-empty__icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 22%, var(--md-sys-color-outline-variant));
    border-radius: 24px;
    background: color-mix(in srgb, var(--md-sys-color-primary) 8%, var(--md-sys-color-surface-container-low));
    color: var(--md-sys-color-primary);
}

.review-empty__icon svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.review-empty h3 {
    margin: 0 0 7px;
    color: var(--md-sys-color-on-surface);
    font-size: 1.06rem;
}

.review-empty p {
    max-width: 480px;
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.82rem;
    line-height: 1.9;
}

.review-empty .quiet-button {
    width: auto;
    min-width: 210px;
}

.review-search {
    margin: 0 0 18px;
    padding: 20px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 20px;
    background: var(--md-sys-color-surface-container-low);
}

.review-search__field {
    display: grid;
    min-width: 0;
    gap: 9px;
}

.review-search__field label {
    color: var(--md-sys-color-on-surface);
    font-size: 0.82rem;
    font-weight: 900;
}

.review-search__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
}

.review-search__controls--with-clear {
    grid-template-columns: minmax(0, 1fr) 116px 132px;
}

.review-search__field input {
    width: 100%;
    min-height: 52px;
    padding: 11px 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 13px;
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    font-family: "Cairo", sans-serif;
}

.review-search__field small {
    color: var(--md-sys-color-on-surface-variant);
    padding-inline: 2px;
    font-size: 0.68rem;
    line-height: 1.7;
}

.review-search__submit,
.review-search__clear {
    display: inline-flex;
    min-width: 0;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding-inline: 14px;
    white-space: nowrap;
}

.review-search__submit .live-data-loading {
    color: inherit;
}

.review-search [hidden] {
    display: none !important;
}

.review-search__notice {
    margin-bottom: 18px;
}

.table-action {
    color: var(--md-sys-color-primary);
    font-weight: 900;
    white-space: nowrap;
}

.live-data-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.75rem;
    white-space: nowrap;
}

.live-data-loading i {
    width: 14px;
    height: 14px;
    border: 2px solid var(--md-sys-color-outline-variant);
    border-top-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: live-data-spin 700ms linear infinite;
}

.live-data-row--ready [data-live-name],
.live-data-row--ready [data-live-plate],
.live-data-row--ready [data-live-phone] {
    animation: live-data-reveal 220ms ease-out;
}

.live-data-row--error [data-live-name] {
    color: var(--md-sys-color-error);
    font-size: 0.75rem;
    font-weight: 800;
}

.review-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-data-retry {
    padding: 6px 10px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 999px;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.review-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 18px 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.78rem;
    font-weight: 800;
}

.review-pagination a {
    min-width: 84px;
    padding: 9px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 999px;
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    text-align: center;
    text-decoration: none;
}

@keyframes live-data-spin {
    to { transform: rotate(360deg); }
}

@keyframes live-data-reveal {
    from { opacity: 0.35; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

.review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    align-items: start;
    gap: 18px;
}

.review-main,
.review-sidebar {
    display: grid;
    gap: 18px;
}

.review-sidebar {
    position: sticky;
    top: 18px;
}

.admin-driver-media {
    margin-top: 0;
}

.review-copy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.review-copy-grid > div {
    padding: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    background: var(--md-sys-color-surface-container-low);
}

.review-copy-grid span,
.review-agent-data dt {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.74rem;
    font-weight: 800;
}

.review-copy-grid p {
    margin: 6px 0 0;
    line-height: 1.8;
}

.review-documents {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.review-documents a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    color: var(--md-sys-color-primary);
}

.review-documents small {
    color: var(--md-sys-color-on-surface-variant);
}

.review-agent-data {
    display: grid;
    gap: 12px;
    margin: 0;
}

.review-agent-data div {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.review-agent-data dd {
    margin: 4px 0 0;
    font-weight: 900;
}

.review-decision-card form {
    display: grid;
    gap: 12px;
}

.decision-help {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.78rem;
    line-height: 1.7;
}

.decision-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.75rem;
}

.decision-divider::before,
.decision-divider::after {
    height: 1px;
    flex: 1;
    background: var(--md-sys-color-outline-variant);
    content: "";
}

.danger-button {
    min-height: 48px;
    border: 1px solid var(--md-sys-color-error);
    border-radius: 999px;
    background: transparent;
    color: var(--md-sys-color-error);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.media-tile > a[data-image-viewer-trigger] {
    cursor: zoom-in;
}

.image-viewer {
    width: min(94vw, 980px);
    max-width: none;
    max-height: 94vh;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
}

.image-viewer::backdrop {
    background: rgba(3, 16, 31, 0.88);
    backdrop-filter: blur(8px);
}

.image-viewer__surface {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: #0d2a4c;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.image-viewer__surface img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(94vh - 76px);
    border-radius: 12px;
    object-fit: contain;
}

.image-viewer__surface figcaption {
    min-height: 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    font-weight: 800;
}

.image-viewer__close {
    position: absolute;
    z-index: 2;
    top: 10px;
    inset-inline-end: 10px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0 0 3px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(6, 41, 76, 0.9);
    color: #fff;
    font: 500 2rem/1 Cairo, sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.image-viewer__close:hover,
.image-viewer__close:focus-visible {
    background: var(--md-sys-color-primary);
    outline: 3px solid rgba(255, 255, 255, 0.28);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .review-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-layout,
    .review-copy-grid {
        grid-template-columns: 1fr;
    }

    .review-sidebar {
        position: static;
    }
}

@media (max-width: 560px) {
    .review-tabs {
        grid-template-columns: 1fr;
    }

    .review-tab {
        min-height: 58px;
    }

    .review-search {
        padding: 16px;
    }

    .review-search__controls,
    .review-search__controls--with-clear {
        grid-template-columns: minmax(0, 1fr);
    }

    .review-search__submit,
    .review-search__clear {
        width: 100%;
    }
}

:root[data-theme="light"] {
    color-scheme: light;
    --md-sys-color-primary: #f45612;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #fff0e8;
    --md-sys-color-on-primary-container: #6f2100;
    --md-sys-color-secondary: #0d2a4c;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #e8eef6;
    --md-sys-color-on-secondary-container: #0d2a4c;
    --md-sys-color-tertiary: #f45612;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-tertiary-container: #fff0e8;
    --md-sys-color-on-tertiary-container: #6f2100;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-error-container: #ffdad6;
    --md-sys-color-on-error-container: #410002;
    --md-sys-color-background: #fbfbfb;
    --md-sys-color-on-background: #06294c;
    --md-sys-color-surface: #fbfbfb;
    --md-sys-color-on-surface: #06294c;
    --md-sys-color-surface-variant: #eef3f8;
    --md-sys-color-on-surface-variant: rgba(6, 41, 76, 0.62);
    --md-sys-color-outline: rgba(6, 41, 76, 0.26);
    --md-sys-color-outline-variant: rgba(6, 41, 76, 0.12);
    --md-sys-color-surface-container-lowest: #ffffff;
    --md-sys-color-surface-container-low: #ffffff;
    --md-sys-color-surface-container: #f2f6fa;
    --md-sys-color-surface-container-high: #e8eef6;
    --md-sys-color-surface-container-highest: #dde7f2;
    --tirhal-on-brand: #06294c;
    --elevation-1: 0 10px 28px rgba(13, 42, 76, 0.08);
    --elevation-2: 0 20px 54px rgba(13, 42, 76, 0.12);
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--md-sys-color-background);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    font-family: Cairo, "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0;
    transition: background-color 180ms ease, color 180ms ease;
}

button,
input {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: inherit;
}

.page-shell {
    width: min(100% - 32px, 700px);
    margin: 0 auto;
    padding: 88px 0 32px;
}

body > .theme-toggle {
    position: fixed !important;
    z-index: 1000;
    top: max(14px, env(safe-area-inset-top)) !important;
    right: auto !important;
    bottom: auto !important;
    left: max(18px, env(safe-area-inset-left)) !important;
    margin: 0 !important;
    transform: none !important;
    display: inline-flex;
    width: 92px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 92%, transparent);
    color: var(--md-sys-color-on-surface);
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(4, 18, 34, 0.1);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--md-sys-color-outline);
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
}

.theme-toggle [data-theme-icon] {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-primary);
    font-size: 0.9rem;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2.2vw, 10px);
    margin-bottom: 32px;
}

.brand-logo,
.brand-mark {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--tirhal-on-brand);
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: none;
}

.brand-divider {
    width: 2px;
    height: 78px;
    flex: 0 0 2px;
    border-radius: 999px;
    background: var(--tirhal-brand);
}

.brand-logo__img,
.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo__img--light {
    display: none;
}

:root[data-theme="light"] .brand-logo__img--dark {
    display: none;
}

:root[data-theme="light"] .brand-logo__img--light {
    display: block;
}

.brand-copy {
    display: flex;
    min-width: 128px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    line-height: 1;
    text-align: right;
}

.brand-copy strong {
    display: block;
    font-size: clamp(2rem, 5.5vw, 2.62rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.brand-copy small {
    display: block;
    padding-inline-end: 0.12em;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.36em;
    line-height: 1.1;
    text-transform: uppercase;
}

.hero {
    margin-bottom: 22px;
}

.hero h1,
.topbar h1 {
    margin: 0 0 6px;
    color: var(--md-sys-color-on-surface);
    font-size: clamp(1.28rem, 3vw, 1.58rem);
    line-height: 1.25;
    font-weight: 800;
}

.hero p,
.topbar p {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.9rem;
}

.eyebrow {
    color: var(--md-sys-color-primary) !important;
    font-size: 0.8rem;
    font-weight: 900;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.agent-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.agent-heading__copy {
    min-width: 0;
}

.agent-heading__copy h1,
.agent-heading__copy p {
    overflow-wrap: anywhere;
}

.agent-avatar {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 50%;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent), transparent 58%),
        var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: none;
}

.agent-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logout-action {
    display: flex;
    flex: 0 0 auto;
    align-self: center;
    justify-content: flex-start;
    margin: 0;
    margin-inline-start: auto;
}

.card {
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-lg);
    background: var(--md-sys-color-surface-container-lowest);
    box-shadow: var(--elevation-1);
}

.form-card,
.search-card {
    padding: 22px;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.field label {
    color: var(--md-sys-color-on-surface);
    font-size: 0.86rem;
    font-weight: 800;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    min-height: 46px;
    padding: 9px 14px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--radius-md);
    outline: none;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    font-size: 0.92rem;
}

.field select {
    appearance: none;
    min-height: 52px;
    padding-inline: 16px 48px;
    border-color: var(--md-sys-color-outline-variant);
    background-color: var(--md-sys-color-surface-container);
    background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
        left 21px center,
        left 15px center;
    background-repeat: no-repeat;
    background-size: 7px 7px;
    color: var(--md-sys-color-on-surface);
    font-weight: 800;
    cursor: pointer;
}

.field select:hover {
    border-color: var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface-container-high);
}

.field select option {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
}

.field textarea {
    min-height: 104px;
    resize: vertical;
}

.field input[type="file"] {
    padding: 10px 12px;
    cursor: pointer;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
}

.field-help,
.field-error {
    margin: 0;
    font-size: 0.78rem;
}

.field-help {
    color: var(--md-sys-color-on-surface-variant);
}

.field-error,
.form-error {
    color: var(--md-sys-color-error);
}

.form-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-button,
.quiet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.primary-button {
    width: 100%;
    border: 0;
    padding: 10px 18px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--elevation-1);
}

.quiet-button {
    border: 0;
    padding: 10px 16px;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.icon-button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 999px;
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    box-shadow: none;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.icon-button svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button--logout {
    color: var(--md-sys-color-primary);
}

.icon-button:hover,
.icon-button:focus-visible {
    border-color: color-mix(in srgb, var(--md-sys-color-primary) 44%, var(--md-sys-color-outline-variant));
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-primary);
    outline: none;
}

.icon-button:active {
    transform: translateY(1px);
}

.primary-button:hover {
    background: #ff6a2b;
}

.activation-form {
    display: grid;
    gap: 2px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-lg);
    background: var(--md-sys-color-surface-container-low);
}

.activation-form .field {
    margin-bottom: 12px;
}

.profile-edit-toggle {
    display: inline-flex;
    width: fit-content;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 42%, var(--md-sys-color-outline-variant));
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-sys-color-primary) 10%, var(--md-sys-color-surface-container-lowest));
    color: var(--md-sys-color-primary);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.profile-edit-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.profile-edit-toggle:hover,
.profile-edit-toggle:focus-visible,
.profile-edit-toggle--open {
    border-color: var(--md-sys-color-primary);
    background: color-mix(in srgb, var(--md-sys-color-primary) 17%, var(--md-sys-color-surface-container-lowest));
    outline: none;
}

.profile-edit-toggle:active {
    transform: translateY(1px);
}

.profile-editor-dialog {
    width: min(94vw, 880px);
    max-width: none;
    max-height: 92dvh;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--md-sys-color-on-surface);
}

.profile-editor-dialog::backdrop {
    background: rgba(3, 18, 36, 0.72);
    backdrop-filter: blur(6px);
}

.profile-editor-dialog__surface {
    position: relative;
    max-height: 92dvh;
    overflow: auto;
    padding: 26px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 24px;
    background: var(--md-sys-color-surface-container-lowest);
    box-shadow: 0 28px 90px rgba(3, 18, 36, 0.34);
    scrollbar-width: thin;
}

.profile-editor-dialog__close {
    position: sticky;
    z-index: 3;
    top: 0;
    display: grid;
    width: 42px;
    height: 42px;
    float: left;
    place-items: center;
    padding: 0 0 3px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 50%;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    font: 500 1.75rem/1 Cairo, sans-serif;
    cursor: pointer;
}

.profile-editor-dialog__close:hover,
.profile-editor-dialog__close:focus-visible {
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
    outline: 3px solid color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
    outline-offset: 2px;
}

.onde-profile-editor {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.onde-profile-editor legend {
    padding: 0;
    color: var(--md-sys-color-on-surface);
    font-size: 1.15rem;
    font-weight: 900;
}

.onde-profile-editor__intro {
    max-width: 680px;
    margin: 6px 0 20px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.76rem;
    line-height: 1.8;
}

.onde-profile-editor__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.onde-profile-editor__uploads {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.onde-profile-editor .field {
    min-width: 0;
    margin: 0;
}

.onde-profile-editor input:not([type="file"]) {
    width: 100%;
}

.profile-save-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
}

.profile-editor-actions {
    position: sticky;
    bottom: -26px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px -26px -26px;
    padding: 14px 26px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 94%, transparent);
    backdrop-filter: blur(10px);
}

.profile-editor-back {
    min-height: 46px;
    padding: 10px 22px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 999px;
    background: transparent;
    color: var(--md-sys-color-on-surface);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
}

.profile-editor-back:hover,
.profile-editor-back:focus-visible {
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
    outline: none;
}

.onde-profile-editor__section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.onde-profile-editor__section-heading strong {
    font-size: 0.88rem;
}

.onde-profile-editor__section-heading small {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.68rem;
}

.profile-save-button:hover,
.profile-save-button:focus-visible {
    filter: brightness(1.06);
    outline: 3px solid color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent);
    outline-offset: 2px;
}

.onde-image-field {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 15px;
    background: var(--md-sys-color-surface-container-low);
}

.onde-image-field__title {
    width: 100%;
    overflow: hidden;
    color: var(--md-sys-color-on-surface);
    font-size: 0.67rem;
    line-height: 1.55;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.onde-image-field__preview {
    display: grid;
    width: 100%;
    height: 92px;
    place-items: center;
    overflow: hidden;
    border-radius: 11px;
    background: var(--md-sys-color-surface-container);
}

.onde-image-field__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.onde-image-field__preview span {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.65rem;
}

.onde-image-field__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.onde-image-field__edit {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 35%, var(--md-sys-color-outline-variant));
    border-radius: 999px;
    background: transparent;
    color: var(--md-sys-color-primary);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 900;
    cursor: pointer;
}

.onde-image-field__edit svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.onde-image-field__edit:hover,
.onde-image-field__edit:focus-visible {
    background: color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent);
    outline: none;
}

.onde-image-field__source-menu[hidden] {
    display: none;
}

.onde-image-field__source-menu {
    display: grid;
    width: 100%;
    gap: 6px;
    padding: 7px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 12px;
    background: var(--md-sys-color-surface-container-lowest);
    box-shadow: 0 10px 24px rgba(3, 18, 36, 0.12);
    scroll-margin-block: 110px;
}

.onde-image-field__source-menu button {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--md-sys-color-on-surface);
    font: inherit;
    font-size: 0.65rem;
    font-weight: 800;
    text-align: start;
    cursor: pointer;
}

.onde-image-field__source-menu button:hover,
.onde-image-field__source-menu button:focus-visible {
    background: color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent);
    color: var(--md-sys-color-primary);
    outline: none;
}

.onde-image-field__source-menu svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.onde-image-field__filename {
    width: 100%;
    overflow: hidden;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.61rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.onde-image-field__preview-error {
    width: 100%;
    margin: 0;
    font-size: 0.62rem;
    line-height: 1.6;
    text-align: center;
}

.onde-image-field__preview-error[hidden] {
    display: none;
}

.check-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 14px;
    color: var(--md-sys-color-on-surface);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.7;
}

.check-field input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--md-sys-color-primary);
}

.primary-button--approve {
    margin-top: 2px;
}

.quiet-button:hover {
    background: var(--md-sys-color-surface-container-highest);
}

.button-link {
    text-decoration: none;
}

.result {
    margin-top: 22px;
}

.driver-card,
.empty-state {
    padding: 24px;
}

.driver-choice-card {
    padding: 24px;
}

.driver-choice-card__heading {
    margin-bottom: 18px;
}

.driver-choice-card__heading h2 {
    margin: 5px 0 7px;
    color: var(--md-sys-color-on-surface);
    font-size: 1.3rem;
}

.driver-choice-card__heading p:last-child,
.driver-choice-card__privacy {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.8rem;
    line-height: 1.75;
}

.driver-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
    gap: 14px;
}

.driver-choice-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-lg);
    background: var(--md-sys-color-surface-container-low);
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.driver-choice-item:hover {
    border-color: color-mix(in srgb, var(--md-sys-color-primary) 42%, var(--md-sys-color-outline-variant));
    background: var(--md-sys-color-surface-container);
    transform: translateY(-1px);
}

.driver-choice-item__photo {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 0;
    place-items: center;
    overflow: hidden;
    border: 2px solid var(--md-sys-color-surface-container-highest);
    border-radius: 50%;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    font-size: 1.35rem;
    font-weight: 900;
}

.driver-choice-item__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.driver-choice-item__copy {
    min-width: 0;
}

.driver-choice-item__copy h3,
.driver-choice-item__copy p,
.driver-choice-item__copy small {
    overflow-wrap: anywhere;
}

.driver-choice-item__copy h3 {
    margin: 0 0 4px;
    color: var(--md-sys-color-on-surface);
    font-size: 0.96rem;
    font-weight: 900;
}

.driver-choice-item__copy p {
    margin: 0 0 2px;
    color: var(--md-sys-color-on-surface);
    font-size: 0.78rem;
    font-weight: 800;
}

.driver-choice-item__copy small {
    display: block;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.7rem;
    line-height: 1.6;
}

.driver-choice-item .quiet-button {
    grid-column: 1 / -1;
    width: 100%;
}

.driver-choice-card__privacy {
    margin-top: 14px;
    text-align: center;
}

.driver-card h2,
.empty-state h2 {
    margin: 12px 0;
    color: var(--md-sys-color-on-surface);
    font-size: 1.35rem;
}

.driver-name-block {
    margin: 16px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    background: var(--md-sys-color-surface-container-low);
}

.driver-name-block__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.driver-name-block__copy {
    min-width: 0;
}

.driver-name-block__copy > span {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.76rem;
    font-weight: 800;
}

.driver-name-block h2 {
    margin: 4px 0 7px;
}

.empty-state {
    text-align: center;
}

.empty-state p {
    margin-bottom: 0;
    color: var(--md-sys-color-on-surface-variant);
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-badge {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
    font-size: 0.78rem;
    font-weight: 900;
}

.status-badge--waiting_for_activation,
.status-badge--active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.status-badge--suspended {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.empty-state .status-badge {
    margin-bottom: 8px;
}

.muted {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.82rem;
}

.driver-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.media-tile {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    background: var(--md-sys-color-surface-container);
}

.media-tile a {
    display: block;
    color: inherit;
}

.media-tile img,
.media-placeholder {
    display: grid;
    width: 100%;
    aspect-ratio: 4 / 3;
    place-items: center;
    object-fit: cover;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.84rem;
}

.media-tile--document img,
.media-tile--document .media-placeholder {
    aspect-ratio: 16 / 10;
    object-fit: contain;
}

.media-tile figcaption {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.78rem;
    font-weight: 900;
}

.media-tile figcaption strong {
    color: var(--md-sys-color-on-surface);
    font-size: 0.8rem;
}

.media-tile figcaption small {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.65;
}

.agent-guidance {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 28%, var(--md-sys-color-outline-variant));
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent), transparent 62%),
        var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
}

.agent-guidance__icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 999px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
}

.agent-guidance strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.88rem;
    font-weight: 900;
}

.agent-guidance p {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.8;
}

.driver-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    background: var(--md-sys-color-outline-variant);
}

.driver-details div {
    min-width: 0;
    padding: 12px 14px;
    background: var(--md-sys-color-surface-container-lowest);
}

.driver-details dt {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.76rem;
}

.driver-details dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    font-weight: 900;
}

.data-guidance {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.75;
}

.driver-name-block .data-guidance span {
    display: inline-grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    font-size: 0.68rem;
    line-height: 1;
}

.driver-details .data-guidance {
    display: block;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.notice {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.86rem;
}

.notice--success {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.agent-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.agent-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 92px;
    padding: 18px 20px;
}

.agent-metric span {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.82rem;
    font-weight: 700;
}

.agent-metric strong {
    color: var(--md-sys-color-primary);
    font-size: 1.7rem;
}

.agent-metric--success strong {
    color: #52b788;
}

.agent-metric--failed strong {
    color: var(--md-sys-color-error);
}

.recent-agent-cases {
    margin-top: 16px;
    padding: 22px;
}

.case-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.case-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 14px;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.case-list__item:hover {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-surface-container);
}

.case-list__item > span:first-child {
    display: grid;
    gap: 3px;
}

.case-list__item small {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.72rem;
}

.case-status {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.72rem;
    font-weight: 800;
}

.case-status--activated {
    color: #52b788;
}

.case-status--failed {
    color: var(--md-sys-color-error);
}

.activation-outcome {
    display: grid;
    justify-items: center;
    gap: 10px;
    max-width: 680px;
    margin-inline: auto;
    padding: clamp(28px, 5vw, 48px);
    text-align: center;
}

.activation-outcome__icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    font-size: 1.7rem;
    font-weight: 900;
}

.activation-outcome--activated .activation-outcome__icon {
    background: rgba(82, 183, 136, 0.14);
    color: #52b788;
}

.activation-outcome--failed .activation-outcome__icon {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.activation-outcome h2,
.activation-outcome p {
    margin: 0;
}

.activation-outcome small {
    color: var(--md-sys-color-on-surface-variant);
}

.messages {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.message {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.message--error {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.support {
    margin-top: 34px;
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.78rem;
}

.support a {
    color: var(--md-sys-color-primary);
    font-weight: 900;
    text-decoration: none;
}

.support p {
    margin: 4px 0 0;
}

.admin-page .page-shell {
    width: min(100% - 32px, 1180px);
}

.admin-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.admin-hero h1 {
    margin: 0 0 6px;
    font-size: clamp(1.42rem, 3vw, 1.95rem);
    line-height: 1.2;
    font-weight: 800;
}

.admin-hero p {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-actions form {
    margin: 0;
}

.connection-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 16px 18px;
    box-shadow: none;
}

.connection-strip > a,
.panel-heading > a {
    color: var(--md-sys-color-primary);
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
}

.connection-state {
    display: flex;
    align-items: center;
    gap: 12px;
}

.connection-state > div {
    display: grid;
}

.connection-state small {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.74rem;
}

.connection-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent);
}

.connection-dot--off {
    background: var(--md-sys-color-error);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--md-sys-color-error) 16%, transparent);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metric-card {
    display: grid;
    align-content: space-between;
    min-height: 138px;
    padding: 18px;
    box-shadow: none;
}

.metric-card strong {
    align-self: end;
    margin-top: 12px;
    font-size: 2.1rem;
    line-height: 1;
}

.metric-card small,
.metric-label {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.74rem;
}

.metric-label {
    min-height: 38px;
    font-weight: 900;
}

.metric-card--accent {
    border-color: color-mix(in srgb, var(--tirhal-brand) 54%, var(--md-sys-color-outline-variant));
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
}

.metric-card--accent .metric-label,
.metric-card--accent small {
    color: color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 76%, transparent);
}

.metric-card .metric-word {
    color: inherit;
    font-size: 1.35rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 18px;
    margin-bottom: 18px;
}

.admin-layout--lower {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-panel {
    min-width: 0;
    padding: 20px;
    box-shadow: none;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 1.02rem;
}

.panel-heading p {
    margin: 0;
}

.panel-total {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.74rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.quick-actions a {
    position: relative;
    display: grid;
    min-width: 0;
    padding: 14px 44px 14px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-md);
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface-container-low);
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.quick-actions a:hover {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.quick-actions strong {
    font-size: 0.88rem;
}

.quick-actions span {
    overflow: hidden;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-actions a:hover span {
    color: inherit;
}

.quick-actions b {
    position: absolute;
    top: 50%;
    right: 16px;
    color: var(--md-sys-color-primary);
    transform: translateY(-50%);
}

.status-list {
    display: grid;
    gap: 8px;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--md-sys-color-surface-container-low);
}

.status-item span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.82rem;
}

.status-item i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
}

.status-item strong {
    font-size: 1.16rem;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.admin-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    font-size: 0.8rem;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-status {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    font-size: 0.68rem;
    font-weight: 900;
}

.table-status--active,
.table-status--activated {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.table-status--suspended,
.table-status--failed,
.table-status--cancelled {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.table-status--pending_onde {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.activity-list {
    display: grid;
}

.activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-mark {
    width: 9px;
    height: 9px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--tirhal-brand);
}

.activity-item > div {
    display: grid;
    min-width: 0;
}

.activity-item strong {
    overflow: hidden;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-item small {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.7rem;
}

.empty-inline,
.empty-cell {
    padding: 18px 10px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.82rem;
    text-align: center;
}

.recent-cases {
    margin-bottom: 4px;
}

.admin-empty {
    padding: 24px;
    box-shadow: none;
}

.admin-empty h3 {
    margin: 0;
    font-size: 0.98rem;
}

.admin-empty p {
    margin: 4px 0 0;
}

@media (max-width: 980px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-layout,
    .admin-layout--lower {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .agent-metrics {
        grid-template-columns: 1fr;
    }

    .agent-metric {
        min-height: 72px;
    }

    .page-shell {
        width: min(100% - 24px, 760px);
        padding-top: 84px;
    }

    body > .theme-toggle {
        top: max(12px, env(safe-area-inset-top)) !important;
        left: max(12px, env(safe-area-inset-left)) !important;
        width: 86px;
        min-height: 40px;
        padding-inline: 10px;
        font-size: 0.72rem;
    }

    .admin-hero,
    .connection-strip {
        display: grid;
        align-items: stretch;
    }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        margin-bottom: 18px;
    }

    .agent-heading {
        min-width: 0;
        gap: 10px;
    }

    .agent-avatar {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        font-size: 1.1rem;
    }

    .agent-heading__copy h1 {
        font-size: 1.16rem;
        line-height: 1.3;
    }

    .agent-heading__copy p {
        font-size: 0.78rem;
        line-height: 1.55;
    }

    .logout-action {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        margin-inline-start: 0;
    }

    .icon-button {
        width: 46px;
        height: 46px;
    }

    .admin-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-actions,
    .driver-media,
    .driver-details {
        grid-template-columns: 1fr;
    }

    .quiet-button {
        width: 100%;
    }

    .metric-card {
        min-height: 124px;
    }

    .form-card,
    .search-card,
    .driver-card,
    .empty-state {
        padding: 18px;
    }

    .activation-form {
        padding: 14px;
    }

    .profile-editor-dialog {
        width: min(96vw, 880px);
        max-height: 94dvh;
    }

    .profile-editor-dialog__surface {
        max-height: 94dvh;
        padding: 18px;
        border-radius: 20px;
    }

    .onde-profile-editor {
        padding: 0;
    }

    .onde-profile-editor__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .onde-profile-editor__uploads {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .profile-editor-actions {
        bottom: -18px;
        margin: 20px -18px -18px;
        padding: 12px 18px;
    }
}

@media (max-width: 430px) {
    .page-shell {
        width: min(100% - 18px, 760px);
    }

    .driver-name-block {
        padding: 12px;
    }

    .driver-name-block__heading {
        gap: 10px;
    }

    .profile-edit-toggle {
        min-height: 38px;
        padding: 7px 11px;
        font-size: 0.7rem;
    }

    .profile-editor-dialog {
        width: calc(100vw - 16px);
    }

    .profile-editor-dialog__surface {
        padding: 14px;
        border-radius: 18px;
    }

    .onde-profile-editor legend {
        font-size: 1rem;
    }

    .onde-profile-editor__section-heading {
        display: grid;
        gap: 3px;
    }

    .profile-editor-actions {
        bottom: -14px;
        margin: 18px -14px -14px;
        padding: 11px 14px;
    }

    .profile-editor-actions > button {
        flex: 1;
        padding-inline: 12px;
    }

    .brand {
        gap: 12px;
    }

    .brand-logo,
    .brand-mark {
        width: 70px;
        height: 70px;
        flex-basis: 70px;
    }

    .brand-divider {
        height: 76px;
    }

    .brand-copy {
        min-width: 118px;
        gap: 5px;
    }

    .brand-copy strong {
        font-size: clamp(1.88rem, 9vw, 2.25rem);
        line-height: 1.08;
    }

    .brand-copy small {
        font-size: 0.64rem;
        letter-spacing: 0.31em;
    }

    .topbar {
        gap: 10px;
    }

    .agent-avatar {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .agent-heading__copy h1 {
        font-size: 1.05rem;
    }

    .icon-button {
        width: 44px;
        height: 44px;
    }

    .admin-actions {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}
