@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --page-bg: #eef4fb;
    --page-bg-strong: #e4edf8;
    --surface-bg: #ffffff;
    --surface-alt: #f6fafe;
    --surface-raised: #ffffff;
    --text-primary: #12263a;
    --text-secondary: #36566f;
    --text-muted: #5f7a91;
    --brand-blue: #0f6fae;
    --brand-cyan: #2aa7c9;
    --brand-deep: #0e4f78;
    --card-border: #cfe0ee;
    --card-border-strong: #b9d0e4;
    --shadow-soft: 0 10px 24px rgba(19, 53, 80, 0.08);
    --ok: #2d7d46;
    --warn: #b26b00;
    --danger: #9f1239;
    --safe: #1f7a3d;
}

:root[data-theme="dark"] {
    --page-bg: #101a24;
    --page-bg-strong: #162433;
    --surface-bg: #1d2e3f;
    --surface-alt: #263a4f;
    --surface-raised: #2b4158;
    --text-primary: #eef6ff;
    --text-secondary: #c1d7ea;
    --text-muted: #9ab8cf;
    --brand-blue: #73c2f2;
    --brand-cyan: #53d2e5;
    --brand-deep: #b4deff;
    --card-border: #3f5c74;
    --card-border-strong: #58758f;
    --shadow-soft: 0 12px 26px rgba(3, 12, 20, 0.42);
    --ok: #84d9a4;
    --warn: #f3c065;
    --danger: #ff9bb6;
    --safe: #9be2b0;
}

html,
body {
    margin: 0;
    font-family: "Segoe UI Variable Text", "Segoe UI", "Trebuchet MS", Tahoma, Geneva, sans-serif;
    background: linear-gradient(180deg, var(--page-bg), var(--page-bg-strong));
    color: var(--text-primary);
    min-height: 100%;
}

* {
    box-sizing: border-box;
}

h1:focus {
    outline: none;
}

a,
.btn-link {
    color: var(--brand-blue);
    text-decoration-color: rgba(15, 111, 174, 0.4);
}

a:hover,
.btn-link:hover {
    color: var(--brand-deep);
}

h1 {
    margin-top: 0.75rem;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    color: var(--text-primary);
}

h2 {
    color: var(--text-primary);
    font-size: 1.35rem;
}

h3 {
    color: var(--text-primary);
    font-size: 1.08rem;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: 2.5rem;
}

.lead-text {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 78ch;
}

.muted {
    color: var(--text-muted);
}

.danger-note {
    color: var(--danger);
    font-weight: 600;
}

.touch-btn,
.btn,
button,
.btn-link {
    min-height: 48px;
}

.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
    background-color: var(--surface-raised);
    color: var(--text-primary);
    border-color: var(--card-border);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.92;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 0.2rem rgba(42, 167, 201, 0.2);
}

.status-banner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin: 1rem 0 1.2rem;
    border: 1px solid var(--card-border);
    background: var(--surface-raised);
    box-shadow: var(--shadow-soft);
}

.status-banner.online {
    border-left: 5px solid var(--ok);
}

.status-banner.offline {
    border-left: 5px solid var(--warn);
}

.status-banner.error {
    border-left: 5px solid var(--danger);
}

.source-pill {
    font-weight: 700;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.3rem;
}

.info-card,
.section-block,
.guide-item,
.diagnostic-card,
.contact-card,
.check-item {
    background: var(--surface-raised);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.info-card {
    padding: 1rem;
}

.info-card p {
    color: var(--text-secondary);
}

.section-block {
    padding: 1rem 1.1rem;
    margin-top: 1rem;
    background: linear-gradient(180deg, var(--surface-raised), var(--surface-alt));
}

.contact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.85rem;
}

.contact-card {
    border-style: dashed;
    padding: 0.75rem;
    background: var(--surface-alt);
}

.phone-link {
    font-weight: 700;
    text-decoration: none;
}

.phone-link:hover {
    text-decoration: underline;
}

.filters-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0.8rem 0 1rem;
}

.diagnostic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.95rem;
    margin-top: 1rem;
}

.diagnostic-card {
    padding: 1rem;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

.risk-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.risk-critical {
    border-left: 5px solid var(--danger);
    background: rgba(159, 18, 57, 0.09);
}

.risk-warning {
    border-left: 5px solid var(--warn);
    background: rgba(178, 107, 0, 0.12);
}

.risk-safe {
    border-left: 5px solid var(--safe);
    background: rgba(31, 122, 61, 0.12);
}

.drive-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.82rem;
    background: var(--surface-alt);
}

.guide-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.guide-item {
    padding: 0.85rem 0.95rem;
}

.guide-item.guide-targeted {
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 0.2rem rgba(42, 167, 201, 0.18), var(--shadow-soft);
}

.guide-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    font-weight: 700;
}

.guide-item summary::-webkit-details-marker {
    display: none;
}

.guide-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.6rem 0;
}

.tool-tag {
    font-size: 0.82rem;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--text-primary);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--card-border);
}

.warning-text {
    color: var(--danger);
    font-weight: 600;
}

.guide-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
    margin: 0.8rem 0;
}

.model-match-pill {
    display: inline-flex;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(45, 125, 70, 0.2);
    color: var(--text-primary);
    padding: 0.2rem 0.6rem;
}

.vin-row,
.stations-controls,
.assist-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}

.form-grid {
    display: grid;
    gap: 0.8rem;
}

.coords-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: end;
}

.photo-preview {
    margin-top: 0.8rem;
    max-width: min(100%, 420px);
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.checklist-wrap {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.check-item {
    padding: 0.75rem;
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.check-item.critical {
    border-left: 5px solid var(--danger);
}

.check-item.done {
    background: rgba(45, 125, 70, 0.11);
}

.check-item input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.1rem;
}

.uh-page {
    display: grid;
    gap: 1rem;
}

.uh-hero {
    position: relative;
    display: grid;
    gap: 1rem;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid #b9d1e6;
    background:
        radial-gradient(circle at 92% 7%, rgba(50, 169, 203, 0.18), rgba(50, 169, 203, 0)),
        radial-gradient(circle at 7% 16%, rgba(110, 188, 235, 0.22), rgba(110, 188, 235, 0)),
        linear-gradient(180deg, rgba(240, 248, 255, 0.95), rgba(232, 243, 253, 0.95));
}

.uh-kicker {
    margin: 0;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f5785;
    font-weight: 800;
}

.uh-hero h1 {
    margin: 0.25rem 0 0.7rem;
    line-height: 1.06;
    font-size: clamp(2rem, 4.4vw, 4.1rem);
}

.uh-hero .lead-text {
    max-width: 62ch;
    margin-bottom: 0;
}

.uh-hero-points {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.56rem;
}

.uh-hero-points span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #b2d2e7;
    background: rgba(255, 255, 255, 0.76);
    color: #1b4a68;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.26rem 0.72rem;
}

.uh-hero-points span::before {
    content: "\2022";
    margin-right: 0.42rem;
    color: #1a7fb9;
    font-weight: 900;
}

.uh-hero-image {
    position: relative;
    border-radius: 20px;
    border: 1px solid #9fc0d9;
    background: linear-gradient(180deg, #dcebf7 0%, #c9def1 100%);
    padding: 0.65rem;
    box-shadow: 0 12px 26px rgba(17, 63, 95, 0.14);
}

.uh-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 15px;
}

.uh-hero-badge {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.36rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #84b5d4;
    background: rgba(10, 67, 104, 0.88);
    color: #e8f5ff;
    font-size: 0.8rem;
    font-weight: 700;
}

.uh-safety {
    border-radius: 16px;
    border: 1px solid #ecc38a;
    border-left: 5px solid #cb7803;
    background: linear-gradient(180deg, #fff4dd, #ffefd1);
    color: #784500;
    font-size: 1.06rem;
    padding: 0.95rem 1rem;
    box-shadow: 0 10px 20px rgba(126, 78, 8, 0.08);
}

.uh-workspace {
    display: grid;
    gap: 1rem;
}

.uh-map-card,
.uh-panel,
.uh-gallery,
.uh-page .section-block {
    border-radius: 20px;
}

.uh-card-head {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.uh-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.uh-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    border: 1px solid #c6dceb;
    background: #f2f8fd;
    color: #2a5068;
    font-size: 0.8rem;
    padding: 0.18rem 0.56rem;
    font-weight: 600;
}

.uh-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.uh-dot.risk-safe {
    background: #1f7a3d;
}

.uh-dot.risk-warning {
    background: #b26b00;
}

.uh-dot.risk-critical {
    background: #9f1239;
}

.uh-map {
    width: 100%;
    border-radius: 16px;
    border: 1px solid #9fc0d9;
    background: linear-gradient(180deg, #bdd5e8 0%, #a4c2da 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.44);
}

.uh-map-base {
    fill: rgba(20, 70, 106, 0.24);
}

.uh-zone-group .uh-zone-shape {
    fill: #5aa4cd;
    stroke: rgba(20, 74, 108, 0.62);
    stroke-width: 2;
    cursor: pointer;
    transition: transform 0.2s ease, fill 0.2s ease;
}

.uh-zone-group .uh-zone-label {
    fill: #f6fbff;
    font-size: 21px;
    font-weight: 700;
    pointer-events: none;
}

.uh-zone-group .uh-zone-label.uh-zone-label-sm {
    font-size: 18px;
}

.uh-zone-group:hover .uh-zone-shape {
    fill: #4593be;
    transform: translateY(-2px);
}

.uh-zone-group.selected .uh-zone-shape {
    fill: #efb74c;
    stroke: rgba(141, 92, 10, 0.86);
}

.uh-map-caption {
    margin: 0.65rem 0 0;
    color: #3b6078;
    font-size: 0.9rem;
}

.uh-panel {
    display: grid;
    gap: 0.7rem;
    align-content: start;
}

.uh-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.uh-panel-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #235675;
    font-weight: 700;
}

.uh-panel-photo {
    width: 100%;
    border-radius: 16px;
    border: 1px solid #b6cfe2;
    background: #d3e4f2;
    display: block;
}

.uh-risk {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.24rem 0.62rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.uh-risk.risk-safe {
    color: #155b2d;
    border-color: #8ac79e;
    background: #e4f7eb;
}

.uh-risk.risk-warning {
    color: #754100;
    border-color: #e8c188;
    background: #fff1dc;
}

.uh-risk.risk-critical {
    color: #7e1432;
    border-color: #e9a6b7;
    background: #ffe8ee;
}

.uh-service-call {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid #b7d3e6;
    background: #eaf4fb;
    border-radius: 14px;
    padding: 0.6rem 0.75rem;
}

.uh-service-call span {
    color: #486783;
    font-size: 0.87rem;
}

.uh-service-call strong {
    color: #1a4968;
}

.uh-checks {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.42rem;
    color: #2b4e67;
}

.uh-checks li::marker {
    color: #1680b8;
}

.uh-actions {
    display: grid;
    gap: 0.55rem;
}

.uh-tip-banner {
    border: 1px solid #c8dced;
    border-left: 4px solid #147eb6;
    background: #eef7ff;
    border-radius: 12px;
    padding: 0.62rem 0.72rem;
    color: #264e69;
}

.uh-gallery-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.uh-gallery-card {
    text-align: left;
    border: 1px solid #bfd6e8;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6fd 100%);
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    color: inherit;
    box-shadow: 0 12px 24px rgba(21, 63, 92, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.uh-gallery-card:hover,
.uh-gallery-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 55, 84, 0.14);
    border-color: #78afd0;
}

.uh-gallery-card.active {
    border-color: #2783b5;
    box-shadow: 0 0 0 2px rgba(39, 131, 181, 0.16), 0 18px 30px rgba(14, 54, 83, 0.16);
}

.uh-gallery-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #c7dcf1;
}

.uh-gallery-body {
    padding: 0.72rem;
}

.uh-gallery-body h3 {
    margin: 0 0 0.34rem;
}

.uh-gallery-body p {
    margin: 0;
    color: #466580;
}

.underhood-static {
    width: 100%;
    max-width: 860px;
    border-radius: 16px;
    border: 1px solid #bfd6e8;
    box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] .uh-hero {
    border-color: #42627b;
    background:
        radial-gradient(circle at 90% 10%, rgba(98, 184, 226, 0.22), rgba(98, 184, 226, 0)),
        linear-gradient(180deg, rgba(41, 64, 87, 0.96), rgba(30, 48, 66, 0.96));
}

:root[data-theme="dark"] .uh-kicker,
:root[data-theme="dark"] .uh-panel-kicker,
:root[data-theme="dark"] .uh-map-caption {
    color: #9bc9e8;
}

:root[data-theme="dark"] .uh-hero-points span,
:root[data-theme="dark"] .uh-legend span {
    background: rgba(20, 39, 58, 0.7);
    border-color: #4f7491;
    color: #c7e1f2;
}

:root[data-theme="dark"] .uh-safety {
    background: linear-gradient(180deg, #47381f, #3b2f1b);
    border-color: #825f2a;
    color: #f7d9a0;
}

:root[data-theme="dark"] .uh-hero-image {
    background: linear-gradient(180deg, #2a4963, #213d55);
    border-color: #4c6e89;
}

:root[data-theme="dark"] .uh-map {
    background: linear-gradient(180deg, #27435a 0%, #20364b 100%);
    border-color: #4a6c86;
}

:root[data-theme="dark"] .uh-map-base {
    fill: rgba(10, 23, 33, 0.45);
}

:root[data-theme="dark"] .uh-zone-group .uh-zone-shape {
    fill: #4d94bd;
    stroke: rgba(188, 222, 245, 0.34);
}

:root[data-theme="dark"] .uh-zone-group.selected .uh-zone-shape {
    fill: #d9a447;
    stroke: #f0c778;
}

:root[data-theme="dark"] .uh-service-call,
:root[data-theme="dark"] .uh-tip-banner {
    background: #22384d;
    border-color: #466680;
    color: #cbe2f3;
}

:root[data-theme="dark"] .uh-service-call span,
:root[data-theme="dark"] .uh-gallery-body p {
    color: #a8c6dd;
}

:root[data-theme="dark"] .uh-gallery-card {
    background: linear-gradient(180deg, #2b4359 0%, #24394d 100%);
    border-color: #4b6f8a;
}

:root[data-theme="dark"] .uh-gallery-card.active {
    border-color: #7ab8dc;
}

.auth-form {
    max-width: 680px;
}

.auth-shell {
    display: grid;
    gap: 1rem;
    margin-top: 0.8rem;
}

.auth-shell-modern {
    position: relative;
}

.auth-hero-panel {
    background:
        radial-gradient(circle at 14% 14%, rgba(115, 214, 255, 0.24), transparent 46%),
        linear-gradient(160deg, #0f3550 0%, #176285 60%, #2a8fb8 100%);
    color: #f6fbff;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 1.25rem;
    box-shadow: 0 20px 36px rgba(8, 29, 43, 0.26);
    position: relative;
    overflow: hidden;
}

.auth-hero-panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    right: -64px;
    bottom: -74px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.auth-hero-panel h2 {
    color: inherit;
    margin-top: 0.5rem;
    margin-bottom: 0.55rem;
    font-size: clamp(1.38rem, 2vw, 1.8rem);
}

.auth-hero-panel p {
    color: rgba(246, 251, 255, 0.94);
    margin-bottom: 0;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

.auth-feature-list {
    margin: 0.95rem 0 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.auth-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: rgba(246, 251, 255, 0.95);
}

.auth-feature-list li::before {
    content: "\2713";
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.17);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 0.12rem;
}

.auth-hero-stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.auth-stat-item {
    border-radius: 12px;
    padding: 0.55rem 0.58rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    gap: 0.15rem;
}

.auth-stat-item strong {
    font-size: 0.96rem;
    line-height: 1.1;
}

.auth-stat-item span {
    font-size: 0.74rem;
    color: rgba(246, 251, 255, 0.88);
}

.auth-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 254, 255, 0.93) 100%);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 14px 30px rgba(10, 35, 51, 0.14);
}

:root[data-theme="dark"] .auth-card {
    background: linear-gradient(180deg, rgba(24, 34, 43, 0.94) 0%, rgba(19, 29, 37, 0.94) 100%);
    border-color: rgba(129, 158, 178, 0.22);
}

.auth-card-modern {
    backdrop-filter: blur(4px);
}

.auth-title {
    margin: 0;
    font-family: "Montserrat", "Segoe UI", Tahoma, sans-serif;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
}

.auth-subtitle {
    margin: 0.55rem 0 1rem;
    color: var(--text-secondary);
    max-width: 56ch;
}

.auth-form-wrap {
    display: grid;
    gap: 0.7rem;
}

.auth-form-wrap .validation-summary-errors {
    background: rgba(211, 17, 69, 0.08);
    color: #8f0f34;
    border: 1px solid rgba(211, 17, 69, 0.25);
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
}

.auth-form-wrap .validation-summary-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-form-grid {
    max-width: 100%;
}

.auth-field-wrap {
    display: grid;
    gap: 0.42rem;
}

.auth-field-wrap .form-control {
    min-height: 52px;
    border-radius: 12px;
    border-width: 1px;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field-wrap .form-control:focus {
    border-color: rgba(44, 125, 160, 0.75);
    box-shadow: 0 0 0 0.24rem rgba(44, 125, 160, 0.18);
}

.auth-phone-wrap {
    grid-column: 1 / -1;
}

.auth-phone-input {
    letter-spacing: 0.01em;
}

.auth-field-hint {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.auth-actions {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.28rem;
}

.auth-actions .btn {
    border-radius: 12px;
    font-weight: 600;
}

.auth-submit {
    font-weight: 700;
    border: 0;
    background: linear-gradient(135deg, #1778a7 0%, #1f9ec7 100%);
}

.auth-submit:hover,
.auth-submit:focus {
    background: linear-gradient(135deg, #156e99 0%, #1a8db4 100%);
}

.auth-outline {
    border-width: 1px;
}

.tow-status-grid {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.tow-status-card {
    background: var(--surface-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
}

.tow-status-card p {
    margin-bottom: 0.45rem;
}

.tow-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.45rem;
}

.tow-status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
}

.tow-status-pending {
    color: #654200;
    background: rgba(178, 107, 0, 0.18);
    border: 1px solid rgba(178, 107, 0, 0.3);
}

.tow-status-accepted {
    color: #0b4460;
    background: rgba(44, 125, 160, 0.18);
    border: 1px solid rgba(44, 125, 160, 0.32);
}

.tow-status-completed {
    color: #0c4e24;
    background: rgba(31, 122, 61, 0.18);
    border: 1px solid rgba(31, 122, 61, 0.32);
}

.admin-page-modern {
    background:
        radial-gradient(circle at 4% 6%, rgba(151, 212, 241, 0.42), rgba(151, 212, 241, 0)),
        linear-gradient(180deg, #f8fcff 0%, #eef6fc 100%);
    border: 1px solid #cfe1ef;
    border-radius: 20px;
    padding: 1.15rem;
    box-shadow: 0 14px 28px rgba(31, 70, 98, 0.12);
}

:root[data-theme="dark"] .admin-page-modern {
    background:
        radial-gradient(circle at 4% 6%, rgba(151, 212, 241, 0.27), rgba(151, 212, 241, 0)),
        linear-gradient(180deg, #e9f2f9 0%, #e0ecf5 100%);
    border-color: #b7cad9;
}

.admin-page-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.8rem 0 0.3rem;
}

.catalog-hero {
    background:
        radial-gradient(circle at 92% 8%, rgba(113, 198, 232, 0.3), rgba(113, 198, 232, 0)),
        linear-gradient(180deg, #f6fbff 0%, #edf6ff 100%);
}

.catalog-hero-head {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}

.catalog-subtitle {
    margin: 0.4rem 0 0;
    color: #365d76;
    max-width: 78ch;
}

.catalog-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.55rem;
}

.catalog-kpi-card {
    border: 1px solid #c4daeb;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    padding: 0.55rem 0.7rem;
    display: grid;
    gap: 0.2rem;
}

.catalog-kpi-card span {
    color: #4d7188;
    font-size: 0.82rem;
}

.catalog-kpi-card strong {
    color: #12334d;
    font-size: 1.22rem;
    line-height: 1.1;
}

.catalog-tabs .btn {
    min-width: 170px;
}

.catalog-form-card {
    border: 1px solid #b7d2e7;
    border-radius: 18px;
    background:
        radial-gradient(circle at 5% 2%, rgba(117, 200, 230, 0.16), rgba(117, 200, 230, 0)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 251, 255, 0.95));
    box-shadow: 0 10px 22px rgba(23, 73, 104, 0.08);
}

.catalog-form-grid .form-control,
.catalog-form-grid .form-select {
    border-radius: 12px;
    min-height: 50px;
}

.catalog-form-grid textarea.form-control {
    min-height: 110px;
}

.catalog-form-hint {
    margin: 0.68rem 0 0;
    color: #4a6d86;
    font-size: 0.9rem;
}

.admin-row-click {
    cursor: pointer;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.admin-page-header h1 {
    margin: 0;
    font-family: "Montserrat", "Segoe UI", Tahoma, sans-serif;
}

.admin-page-header .lead-text {
    margin: 0.4rem 0 0;
    max-width: 72ch;
    color: #33586f;
}

.admin-refresh-btn {
    border: 0;
    background: linear-gradient(135deg, #1b7eb8 0%, #2e9fca 100%);
}

.admin-refresh-btn:hover,
.admin-refresh-btn:focus {
    background: linear-gradient(135deg, #166c9e 0%, #288eb4 100%);
}

.admin-empty-state {
    background: rgba(255, 255, 255, 0.84);
}

.admin-request-grid {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.35rem;
}

.admin-request-card {
    border: 1px solid #c9dceb;
    border-radius: 16px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 22px rgba(26, 70, 97, 0.08);
}

.admin-request-card.active {
    border-color: #4f9ec7;
    box-shadow: 0 0 0 0.2rem rgba(79, 158, 199, 0.2), 0 10px 24px rgba(26, 70, 97, 0.12);
}

.admin-request-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.admin-request-user {
    display: grid;
    gap: 0.14rem;
}

.admin-request-user strong {
    font-size: 1.02rem;
}

.admin-request-user span {
    color: #3f5d71;
    font-size: 0.92rem;
}

.admin-request-description {
    margin: 0.65rem 0;
    color: #2c4658;
    font-size: 0.97rem;
    line-height: 1.45;
}

.admin-request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-request-meta span {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid #c7d9e8;
    background: #edf5fb;
    color: #355a70;
    font-size: 0.82rem;
    padding: 0.2rem 0.55rem;
}

.admin-request-actions {
    display: grid;
    gap: 0.62rem;
}

.admin-request-actions .btn {
    border-radius: 11px;
}

.admin-manage-grid {
    display: grid;
    gap: 0.45rem;
    min-width: 240px;
}

.admin-open-request-btn {
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #1f81ba 0%, #2ea8cf 100%);
    box-shadow: 0 6px 14px rgba(23, 111, 158, 0.24);
}

.admin-open-request-btn:hover,
.admin-open-request-btn:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #1b74a8 0%, #2898bb 100%);
    box-shadow: 0 8px 18px rgba(19, 95, 136, 0.26);
}

.admin-cell-description {
    max-width: 360px;
    color: #29495d;
    line-height: 1.35;
    word-break: break-word;
}

.admin-status-edit {
    display: grid;
    gap: 0.35rem;
}

.admin-status-edit .form-select {
    border-radius: 11px;
    min-height: 44px;
}

.admin-status-edit .btn {
    min-height: 44px;
    border-radius: 11px;
}

.admin-viewer-card {
    margin-top: 1rem;
    border: 1px solid #c3d8e8;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.95rem;
    box-shadow: 0 10px 26px rgba(26, 70, 97, 0.1);
}

.admin-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
}

.admin-viewer-header h2 {
    margin: 0;
}

.admin-viewer-grid {
    display: grid;
    gap: 0.75rem;
}

.admin-media-card {
    border: 1px solid #c8dcec;
    border-radius: 14px;
    background: #f8fcff;
    padding: 0.75rem;
}

.admin-media-card h3 {
    margin: 0 0 0.55rem;
    font-size: 1rem;
}

.admin-map-frame {
    width: 100%;
    min-height: 340px;
    border: 1px solid #c5dae9;
    border-radius: 12px;
    background: #ffffff;
}

.admin-photo-frame {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #c5dae9;
    background: #ffffff;
}

.admin-media-placeholder {
    min-height: 180px;
    border: 1px dashed #b5cadb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.8rem;
    color: #527286;
    background: #f1f8fd;
}

.admin-staff-create-card {
    border: 1px solid #c7dbee;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 250, 255, 0.92));
    padding: 0.9rem;
    margin-bottom: 0.85rem;
}

.admin-staff-grid {
    gap: 0.62rem;
}

.dispatch-home {
    border: 1px solid #c9ddeb;
    border-radius: 20px;
    padding: 1.1rem;
    box-shadow: 0 14px 30px rgba(17, 56, 83, 0.11);
}

.dispatch-home-tow {
    background:
        radial-gradient(circle at 7% 8%, rgba(130, 205, 239, 0.42), rgba(130, 205, 239, 0)),
        linear-gradient(180deg, #f8fcff 0%, #edf7ff 100%);
}

.dispatch-home-mechanic {
    background:
        radial-gradient(circle at 92% 10%, rgba(129, 226, 207, 0.3), rgba(129, 226, 207, 0)),
        linear-gradient(180deg, #f8fffd 0%, #edfbf6 100%);
}

.dispatch-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.dispatch-hero h1 {
    margin: 0.3rem 0 0.45rem;
}

.dispatch-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #b8d4e8;
    background: rgba(255, 255, 255, 0.86);
    color: #1f5f83;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.24rem 0.68rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dispatch-refresh-btn {
    border: 0;
    background: linear-gradient(135deg, #157db8 0%, #25a6cd 100%);
}

.dispatch-refresh-btn:hover,
.dispatch-refresh-btn:focus {
    background: linear-gradient(135deg, #136f9f 0%, #2096b9 100%);
}

.dispatch-grid {
    display: grid;
    gap: 0.85rem;
}

.dispatch-list {
    display: grid;
    gap: 0.7rem;
}

.dispatch-card {
    border: 1px solid #c7daea;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.78rem 0.82rem;
    box-shadow: 0 8px 18px rgba(22, 63, 91, 0.09);
}

.dispatch-card.active {
    border-color: #4a9bc6;
    box-shadow: 0 0 0 0.18rem rgba(74, 155, 198, 0.21), 0 10px 22px rgba(19, 54, 79, 0.14);
}

.dispatch-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.45rem;
}

.dispatch-card-head h3 {
    margin: 0;
}

.dispatch-card-head .muted {
    margin: 0.2rem 0 0;
}

.dispatch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.46rem;
    margin-bottom: 0.5rem;
}

.dispatch-meta span {
    border-radius: 999px;
    border: 1px solid #c7d9e8;
    background: #edf5fb;
    color: #274a60;
    font-size: 0.82rem;
    padding: 0.18rem 0.54rem;
}

.dispatch-description {
    margin: 0 0 0.62rem;
    color: #2a495d;
}

.dispatch-actions {
    display: grid;
    gap: 0.5rem;
}

.dispatch-actions .btn {
    min-height: 42px;
    border-radius: 10px;
}

.dispatch-detail {
    display: grid;
    gap: 0.7rem;
}

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

.table {
    color: var(--text-primary);
    border-color: var(--card-border);
}

.table thead th {
    border-bottom-width: 1px;
    border-color: var(--card-border-strong);
    color: var(--text-primary);
    font-weight: 700;
}

.table td,
.table th {
    border-color: var(--card-border);
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(143, 191, 220, 0.12);
    color: var(--text-primary);
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(42, 167, 201, 0.14);
    color: var(--text-primary);
}

.table-hover > tbody > tr.table-active > * {
    --bs-table-accent-bg: rgba(42, 142, 190, 0.24);
    color: var(--text-primary);
}

:root[data-theme="dark"] .admin-open-request-btn {
    background: linear-gradient(135deg, #1c6f9e 0%, #2589aa 100%);
}

:root[data-theme="dark"] .admin-open-request-btn:hover,
:root[data-theme="dark"] .admin-open-request-btn:focus {
    background: linear-gradient(135deg, #19658f 0%, #217d9a 100%);
}

:root[data-theme="dark"] .catalog-hero {
    background:
        radial-gradient(circle at 92% 8%, rgba(113, 198, 232, 0.22), rgba(113, 198, 232, 0)),
        linear-gradient(180deg, #eaf3fa 0%, #e1edf7 100%);
}

:root[data-theme="dark"] .catalog-kpi-card {
    background: rgba(255, 255, 255, 0.8);
}

:root[data-theme="dark"] .catalog-form-card {
    background:
        radial-gradient(circle at 5% 2%, rgba(117, 200, 230, 0.16), rgba(117, 200, 230, 0)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 250, 255, 0.94));
}

:root[data-theme="dark"] .underhood-map {
    background: linear-gradient(180deg, #1f3b52 0%, #1a3348 100%);
}

:root[data-theme="dark"] .underhood-base {
    fill: rgba(9, 25, 37, 0.4);
}

:root[data-theme="dark"] .map-zone {
    fill: #5aa8d1;
    stroke: rgba(193, 225, 244, 0.4);
}

:root[data-theme="dark"] .map-zone:hover {
    fill: #79c1e5;
}

:root[data-theme="dark"] .map-zone.selected {
    fill: #f3c065;
}

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

.invalid {
    outline: 1px solid #d31145;
}

.validation-message {
    color: #d31145;
}

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

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

@media (min-width: 640px) {
    .filters-row {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .vin-row {
        grid-template-columns: 2fr auto auto;
    }

    .stations-controls,
    .assist-actions {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .coords-row {
        grid-template-columns: 1fr 1fr auto;
    }

    .uh-hero {
        grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
        align-items: center;
        gap: 1.1rem;
    }

    .uh-workspace {
        grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
        align-items: start;
    }

    .uh-card-head {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .uh-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .admin-page-header {
        grid-template-columns: 1fr auto;
        align-items: end;
    }

    .admin-request-actions {
        grid-template-columns: minmax(180px, auto) 1fr;
        align-items: end;
    }

    .admin-status-edit {
        grid-template-columns: minmax(190px, 240px) auto;
    }

    .admin-manage-grid {
        min-width: 280px;
    }

    .catalog-hero-head {
        grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr);
        align-items: end;
    }

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

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

    .catalog-form-grid textarea.form-control {
        grid-column: 1 / -1;
    }
}

@media (min-width: 900px) {
    .auth-shell {
        grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.05fr);
        align-items: start;
    }

    .auth-form-register-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tow-status-grid {
        grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    }

    .admin-request-grid {
        grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    }

    .admin-viewer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .dispatch-hero {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .dispatch-grid {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        align-items: start;
    }

    .dispatch-actions {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }

    .uh-hero-image {
        padding: 0.75rem;
    }
}

@media (max-width: 639px) {
    .content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

