:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --ink: #17212b;
    --muted: #637083;
    --line: #dbe2ea;
    --brand: #0d6efd;
    --brand-dark: #084eb4;
    --ok: #177245;
    --warn: #b76b00;
    --danger: #c93535;
    --soft-blue: #e8f1ff;
    --soft-red: #ffe9e9;
    --shadow: 0 12px 30px rgba(19, 34, 54, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.auth-pending .app-shell {
    display: none;
}

.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 16px;
    padding: 18px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(145deg, #07111c, #111d2b 56%, #070b11);
    background-size: 34px 34px, 34px 34px, auto;
}

.auth-gate[hidden] {
    display: none;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 8, 14, 0.42);
    backdrop-filter: blur(14px);
}

.auth-card {
    position: relative;
    width: min(360px, 100%);
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.97));
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: authModalEnter 0.28s ease both;
}

.auth-header {
    display: grid;
    gap: 4px;
    text-align: center;
    padding: 2px 4px 0;
}

.auth-floating-logo {
    position: relative;
    z-index: 1;
    width: min(210px, 62vw);
    max-height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.34));
}

.auth-card h1 {
    margin: 0;
    font-size: 1.34rem;
    line-height: 1.1;
}

.auth-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}

.auth-fields {
    display: grid;
    gap: 9px;
}

.auth-field {
    gap: 7px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: #405063;
}

.auth-field span {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-field input {
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.02rem;
    color: var(--ink);
}

.auth-field input:focus {
    box-shadow: none;
}

.auth-field:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.auth-submit {
    min-height: 48px;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(13, 110, 253, 0.26);
}

.auth-error {
    padding: 10px 12px;
    border: 1px solid #f3b5b5;
    border-radius: 12px;
    background: var(--soft-red);
    color: #8d1f1f;
    font-weight: 700;
    font-size: 0.9rem;
}

.auth-error[hidden] {
    display: none;
}

.auth-foot {
    padding-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.rgpd-notice {
    padding: 10px 12px;
    border: 1px solid #cbd7e6;
    border-radius: 12px;
    background: #f7fafc;
    color: #31445a;
}

@keyframes authModalEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: calc(14px + env(safe-area-inset-top)) 14px 12px;
    background:
        linear-gradient(135deg, rgba(23, 33, 43, 0.98), rgba(7, 15, 25, 0.98)),
        #101925;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 36px rgba(4, 12, 22, 0.24);
    backdrop-filter: blur(16px);
}

.brand-row {
    display: grid;
    justify-items: center;
    align-items: center;
    gap: 10px;
    max-width: 1160px;
    margin: 0 auto;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 0;
    text-align: center;
}

.brand-mark {
    width: min(178px, 52vw);
    height: 48px;
    display: grid;
    place-items: center;
}

.brand-mark img {
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.protected-asset {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
    pointer-events: none;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand strong {
    font-size: 1.05rem;
    color: #fff;
}

.brand span {
    color: rgba(229, 237, 247, 0.74);
    font-size: 0.82rem;
}

.role-pill {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(235, 242, 250, 0.82);
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.session-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

main {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 14px 14px 92px;
}

.tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(28, 40, 58, 0.08);
}

.tab {
    min-height: 54px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 0.72rem;
}

.tab svg {
    width: 21px;
    height: 21px;
    stroke-width: 2;
}

.tab.active {
    background: var(--soft-blue);
    color: var(--brand-dark);
    font-weight: 700;
}

.tab:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    color: #8a94a2;
    filter: grayscale(0.4);
}

.tab:disabled.active {
    background: transparent;
    color: #8a94a2;
    font-weight: 400;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.grid {
    display: grid;
    gap: 12px;
}

.two-cols {
    display: grid;
    gap: 12px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-body {
    padding: 14px;
}

.panel-title {
    margin: 0 0 10px;
    font-size: 1rem;
}

.qr-vehicle-notice {
    display: grid;
    gap: 2px;
    margin: 0 0 12px;
    padding: 11px 12px;
    border: 1px solid #b9d7ff;
    border-radius: var(--radius);
    background: var(--soft-blue);
    color: var(--brand-dark);
}

.qr-vehicle-notice[hidden] {
    display: none;
}

.qr-vehicle-notice strong {
    font-size: 0.95rem;
}

.qr-vehicle-notice span {
    font-size: 0.8rem;
    color: #315f96;
}

.section-title {
    margin: 18px 0 10px;
    font-size: 1.05rem;
}

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

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    padding: 10px 11px;
    outline: none;
}

textarea {
    min-height: 106px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.14);
}

.row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.button {
    min-height: 46px;
    border: 0;
    border-radius: var(--radius);
    padding: 0 14px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.button.secondary {
    background: #eef2f6;
    color: var(--ink);
    border: 1px solid var(--line);
}

.button.danger {
    background: var(--danger);
}

.button.ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.diagram-wrap {
    display: grid;
    gap: 10px;
}

.view-switcher {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.view-button {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0 6px;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.view-button.active {
    background: var(--soft-blue);
    border-color: #9fc7ff;
    color: var(--brand-dark);
    transform: translateY(-1px);
}

.vehicle-diagram {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.bus-image-map {
    position: relative;
    width: 100%;
    aspect-ratio: var(--map-ratio, 16 / 9);
    background: #fff;
    overflow: hidden;
    animation: diagramEnter 0.24s ease both;
}

.bus-map-canvas {
    position: absolute;
    left: var(--map-left, 0);
    top: var(--map-top, 0);
    width: var(--map-width, 100%);
    transition: left 0.26s ease, top 0.26s ease, width 0.26s ease;
}

.bus-image-map img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

@keyframes diagramEnter {
    from {
        opacity: 0;
        transform: scale(0.985);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zone {
    fill: rgba(13, 110, 253, 0.08);
    stroke: rgba(55, 73, 96, 0.45);
    stroke-width: 1.5;
    cursor: pointer;
    transition: fill 0.16s ease, stroke 0.16s ease, transform 0.16s ease;
}

.zone:hover,
.zone.selected {
    fill: rgba(13, 110, 253, 0.28);
    stroke: var(--brand);
}

.zone.has-damage {
    fill: rgba(201, 53, 53, 0.24);
    stroke: var(--danger);
}

.zone.has-damage.selected {
    fill: rgba(201, 53, 53, 0.36);
    stroke: #9d1f1f;
}

.zone-point {
    position: absolute;
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.28), 0 6px 14px rgba(13, 28, 48, 0.24);
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.zone-point:hover,
.zone-point.selected {
    background: #063f91;
    box-shadow: 0 0 0 5px rgba(13, 110, 253, 0.22), 0 8px 18px rgba(13, 28, 48, 0.28);
}

.zone-point.has-damage {
    background: var(--danger);
    box-shadow: 0 0 0 5px rgba(201, 53, 53, 0.22), 0 8px 18px rgba(13, 28, 48, 0.26);
}

.zone-point.has-damage.selected {
    background: #9d1f1f;
}

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

.zone-label {
    pointer-events: none;
    fill: var(--ink);
    font-size: 11px;
    font-weight: 800;
}

.zone-damage-panel {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.zone-damage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(248, 251, 252, 0.9);
}

.zone-damage-head strong {
    color: var(--ink);
}

.zone-damage-head span {
    color: var(--muted);
    font-size: 0.84rem;
    white-space: nowrap;
}

.zone-damage-list {
    display: grid;
    gap: 10px;
    max-height: min(460px, 52vh);
    overflow: auto;
    padding-right: 2px;
}

.zone-damage-list .damage-card {
    border-radius: 14px;
}

.compact-empty {
    padding: 12px;
    border-radius: 14px;
}

.bus-line {
    fill: none;
    stroke: #233142;
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.bus-body {
    fill: #f7fbff;
    stroke: #263241;
    stroke-width: 2.5;
}

.bus-shadow {
    fill: rgba(26, 39, 55, 0.12);
}

.bus-glass {
    fill: #a9cee8;
    stroke: #31445a;
    stroke-width: 1.4;
}

.bus-detail {
    fill: #d9e4ee;
    stroke: #52667c;
    stroke-width: 1.2;
}

.hint {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--muted);
    background: #eef2f6;
}

.status.open {
    color: #962727;
    background: var(--soft-red);
}

.status.repaired {
    color: var(--ok);
    background: #e3f5ea;
}

.status.warning {
    color: var(--warn);
    background: #fff2d8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfe;
}

.stat strong {
    display: block;
    font-size: 1.35rem;
}

.stat span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.cards {
    display: grid;
    gap: 10px;
}

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

.admin-title {
    margin: 0;
}

.admin-filters {
    margin-top: 12px;
}

.admin-module-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 6px;
}

.admin-module-button {
    min-height: 82px;
    display: grid;
    align-content: space-between;
    gap: 8px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.94)),
        #fff;
    color: var(--ink);
    text-align: left;
    box-shadow: 0 16px 38px rgba(19, 34, 54, 0.09);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-module-button.active {
    border-color: rgba(13, 110, 253, 0.34);
    background:
        linear-gradient(180deg, rgba(232, 241, 255, 0.98), rgba(255, 255, 255, 0.95)),
        var(--soft-blue);
    color: var(--brand-dark);
    box-shadow: 0 18px 44px rgba(13, 110, 253, 0.16);
}

.admin-module-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    border-color: rgba(99, 112, 131, 0.22);
    background:
        linear-gradient(180deg, rgba(235, 239, 244, 0.86), rgba(225, 230, 236, 0.82)),
        #edf1f5;
    color: #7c8795;
    box-shadow: none;
    filter: grayscale(0.35);
}

.admin-module-button:disabled span {
    color: #8a94a2;
}

.admin-module-button:active {
    transform: scale(0.985);
}

.admin-module-button:disabled:active {
    transform: none;
}

.admin-module-button strong {
    display: block;
    font-size: 0.96rem;
}

.admin-module-button span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.25;
}

.admin-module-button.active span {
    color: #315f9f;
}

.admin-module-panel[hidden] {
    display: none;
}

.form-row {
    margin-bottom: 0;
}

.module-list {
    margin-top: 10px;
}

#diagramAdminPreview .bus-image-map {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: grab;
    touch-action: none;
}

#diagramAdminPreview .bus-image-map:active {
    cursor: grabbing;
}

#diagramAdminPreview .zone-point {
    cursor: grab;
    touch-action: none;
}

#diagramAdminPreview .zone-point:active {
    cursor: grabbing;
}

.mileage-chart-card {
    display: grid;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.mileage-chart {
    display: grid;
    gap: 10px;
}

.mileage-bar-row {
    display: grid;
    grid-template-columns: minmax(86px, 0.7fr) minmax(120px, 2fr) minmax(76px, auto);
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.mileage-bar-row strong {
    color: var(--ink);
    text-align: right;
}

.mileage-bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.mileage-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #52d6b5);
}

.recap-vehicle-block {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.recap-vehicle-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.recap-vehicle-head strong,
.recap-vehicle-head span {
    display: block;
}

.recap-vehicle-head span,
.recap-count {
    color: var(--muted);
    font-size: 0.82rem;
}

.recap-count {
    flex: 0 0 auto;
    font-weight: 800;
    text-align: right;
}

.stat-widget {
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
        #fff;
    padding: 14px;
    display: grid;
    gap: 10px;
    box-shadow: var(--shadow);
}

.stat-widget h3 {
    margin: 0;
    font-size: 0.95rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.86rem;
}

.stat-row strong {
    color: var(--ink);
}

.damage-card,
.vehicle-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 9px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.card-head strong {
    display: block;
}

.meta {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.damage-text {
    margin: 0;
    line-height: 1.4;
}

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

.workshop-actions .button:disabled {
    display: none;
}

.workshop-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.workshop-progress span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: #eef2f6;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.workshop-progress span.done {
    background: var(--soft-blue);
    color: var(--brand-dark);
}

.workshop-note {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfe;
}

.workshop-note strong {
    font-size: 0.82rem;
}

.workshop-note span {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.invoice-block {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfe;
}

.invoice-block strong {
    font-size: 0.82rem;
}

.invoice-file {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration: none;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 92px);
    gap: 8px;
    align-items: start;
    justify-content: start;
}

.media-thumb,
.media-grid video {
    width: 92px;
    height: 92px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #eef2f6;
    overflow: hidden;
}

.media-thumb {
    position: relative;
    display: block;
    padding: 0;
    cursor: zoom-in;
}

.video-thumb {
    cursor: default;
}

.media-thumb img,
.media-grid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    pointer-events: none;
}

.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 8, 15, 0.92);
}

.privacy-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 8, 15, 0.78);
}

.privacy-modal[hidden] {
    display: none;
}

.privacy-card {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.privacy-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    border: 1px solid #d6e0eb;
    border-radius: 50%;
    background: #f6f9fc;
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
}

.privacy-copy {
    display: grid;
    gap: 10px;
    color: #35485d;
    line-height: 1.55;
}

.privacy-copy h3 {
    margin: 10px 0 0;
    color: var(--ink);
    font-size: 1rem;
}

.privacy-copy p {
    margin: 0;
}

.audit-log-card pre {
    overflow: auto;
    max-height: 180px;
    margin: 10px 0 0;
    padding: 10px;
    border-radius: 10px;
    background: #f5f7fa;
    color: #26384d;
    font-size: 0.78rem;
    white-space: pre-wrap;
}

.media-lightbox[hidden] {
    display: none;
}

.media-lightbox img {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    border-radius: var(--radius);
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.media-lightbox-close {
    position: fixed;
    top: calc(14px + env(safe-area-inset-top));
    right: 14px;
    z-index: 1201;
    width: 44px;
    height: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
}

.lightbox-open {
    overflow: hidden;
}

.filter-bar {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.empty {
    padding: 18px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #fbfcfe;
}

.admin-lock {
    display: grid;
    gap: 12px;
}

.toast {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 40;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #132132;
    color: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.small-action {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.82rem;
}

.split-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.role-access-list,
.role-access-grid,
.qr-grid {
    display: grid;
    gap: 10px;
}

.role-access-card,
.qr-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

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

.role-module-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    color: var(--ink);
    font-size: 0.88rem;
}

.role-module-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

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

.qr-card {
    align-content: start;
}

.qr-preview {
    position: relative;
    justify-self: center;
    width: min(180px, 100%);
    aspect-ratio: 1;
}

.qr-image {
    width: 100%;
    height: 100%;
    justify-self: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.qr-logo-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--qr-logo-size, 24%);
    height: var(--qr-logo-size, 24%);
    display: grid;
    place-items: center;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    transform: translate(-50%, -50%);
}

.qr-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-park-number {
    justify-self: center;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--soft-blue);
    color: var(--brand-dark);
    font-size: 0.92rem;
    font-weight: 900;
}

.qr-url {
    padding: 8px 10px;
    border-radius: var(--radius);
    background: #f4f7fb;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-all;
}

.required {
    color: var(--danger);
}

@media (min-width: 760px) {
    .topbar {
        padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
    }

    .brand-row {
        display: flex;
        justify-items: stretch;
        justify-content: space-between;
        gap: 16px;
    }

    .brand {
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
    }

    .brand-mark {
        width: 152px;
        height: 44px;
    }

    .brand-mark img {
        max-height: 44px;
    }

    .session-actions {
        justify-content: flex-end;
    }

    main {
        padding-bottom: 28px;
    }

    .tabs {
        position: sticky;
        bottom: auto;
        top: 77px;
        max-width: 1160px;
        margin: 0 auto;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }

    .tab {
        min-height: 48px;
        grid-auto-flow: column;
        justify-content: center;
    }

    .two-cols {
        grid-template-columns: minmax(330px, 0.9fr) minmax(420px, 1.1fr);
        align-items: start;
    }

    .filter-bar {
        grid-template-columns: 1.2fr 1fr 1fr;
    }

    .split-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, 112px);
    }

    .media-thumb,
    .media-grid video {
        width: 112px;
        height: 112px;
    }

    .admin-module-menu {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

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

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

    .toast {
        left: auto;
        width: min(420px, calc(100vw - 28px));
    }
}

/* Modern transport UI refresh */
:root {
    --bg: #eef3f7;
    --panel: #ffffff;
    --ink: #102033;
    --muted: #66778b;
    --line: #d8e2ec;
    --brand: #006d8f;
    --brand-dark: #06364a;
    --ok: #16875d;
    --warn: #bd7100;
    --danger: #d33d45;
    --soft-blue: #e7f6fb;
    --soft-red: #fff0f1;
    --transport-teal: #18b7a5;
    --transport-yellow: #ffc247;
    --surface: #f8fbfd;
    --shadow: 0 16px 42px rgba(16, 32, 51, 0.08);
    --shadow-strong: 0 22px 60px rgba(7, 21, 33, 0.18);
    --radius: 8px;
}

body {
    background:
        linear-gradient(180deg, #eaf2f7 0, #f7f9fb 360px),
        var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.auth-gate {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 0, rgba(24, 183, 165, 0.22), transparent 36%),
        linear-gradient(145deg, #06131f, #0b2635 58%, #050a10);
    background-size: 38px 38px, 38px 38px, auto, auto;
}

.auth-card {
    width: min(380px, 100%);
    gap: 16px;
    padding: 18px;
    border-radius: 8px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(250, 252, 254, 0.98);
    box-shadow: var(--shadow-strong);
}

.auth-floating-logo {
    width: min(220px, 64vw);
}

.auth-card h1 {
    font-size: 1.45rem;
}

.auth-field {
    border-radius: 8px;
    border-color: #dbe6ef;
    background: var(--surface);
}

.auth-field select,
.auth-field input {
    min-height: 38px;
}

.auth-field:focus-within {
    border-color: var(--transport-teal);
    box-shadow: 0 0 0 4px rgba(24, 183, 165, 0.16);
}

.auth-submit {
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), #079b89);
    box-shadow: 0 16px 32px rgba(0, 109, 143, 0.24);
}

.topbar {
    padding: calc(13px + env(safe-area-inset-top)) 14px 12px;
    background:
        linear-gradient(90deg, rgba(24, 183, 165, 0.18), transparent 34%),
        linear-gradient(135deg, #071521, #0b2b3b 62%, #071521);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 44px rgba(7, 21, 33, 0.26);
}

.brand-row {
    max-width: 1240px;
}

.brand-mark {
    height: 50px;
}

.brand strong {
    font-size: 1.12rem;
    letter-spacing: 0;
}

.brand span {
    color: rgba(232, 244, 250, 0.76);
}

.role-pill {
    min-height: 36px;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #edf8fb;
    font-weight: 800;
}

main {
    max-width: 1240px;
    padding-top: 16px;
}

.tabs {
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(248, 251, 253, 0.96);
    border-top-color: rgba(16, 32, 51, 0.1);
    box-shadow: 0 -14px 36px rgba(16, 32, 51, 0.12);
    backdrop-filter: blur(16px);
}

.tab {
    min-height: 58px;
    border-radius: 8px;
    color: #647589;
    font-weight: 800;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tab svg {
    width: 22px;
    height: 22px;
}

.tab.active {
    background: #071521;
    color: #ffffff;
    box-shadow: inset 0 -3px 0 var(--transport-teal), 0 10px 24px rgba(7, 21, 33, 0.16);
}

.tab:not(:disabled):active {
    transform: translateY(1px) scale(0.99);
}

.panel {
    border-color: rgba(16, 32, 51, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.panel-body {
    padding: 16px;
}

.panel-title,
.section-title {
    color: #102033;
    font-weight: 900;
    letter-spacing: 0;
}

.panel-title {
    margin-bottom: 12px;
    font-size: 1.08rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 12px;
}

.section-title::before {
    content: "";
    width: 5px;
    height: 20px;
    border-radius: 999px;
    background: var(--transport-teal);
}

.qr-vehicle-notice {
    border-color: rgba(0, 109, 143, 0.18);
    border-left: 5px solid var(--transport-teal);
    background: #edf9f7;
    color: var(--brand-dark);
}

label {
    color: #4f6378;
    font-size: 0.82rem;
}

input,
select,
textarea {
    min-height: 48px;
    border-color: #d6e1eb;
    border-radius: 8px;
    background: #fbfdfe;
    color: #102033;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 118px;
}

input:hover,
select:hover,
textarea:hover {
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--transport-teal);
    box-shadow: 0 0 0 4px rgba(24, 183, 165, 0.16);
}

input[type="file"] {
    padding: 11px;
    background: #f3f8fb;
}

.button {
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), #079b89);
    box-shadow: 0 12px 24px rgba(0, 109, 143, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover:not(:disabled) {
    box-shadow: 0 16px 34px rgba(0, 109, 143, 0.22);
}

.button:active:not(:disabled) {
    transform: translateY(1px);
}

.button.secondary {
    background: #edf4f7;
    color: #102033;
    box-shadow: none;
}

.button.ghost {
    border-color: rgba(255, 255, 255, 0.18);
    color: #edf8fb;
}

.panel .button.ghost {
    border-color: var(--line);
    color: var(--muted);
}

.button.danger {
    background: linear-gradient(135deg, #d33d45, #b6202a);
}

.hint {
    color: #65778b;
}

.rgpd-notice {
    border-color: rgba(189, 113, 0, 0.22);
    border-left: 5px solid var(--transport-yellow);
    border-radius: 8px;
    background: #fff8e9;
    color: #5b4723;
}

.vehicle-diagram {
    border-color: #d8e4ed;
    background:
        linear-gradient(90deg, rgba(16, 32, 51, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(16, 32, 51, 0.04) 1px, transparent 1px),
        #ffffff;
    background-size: 22px 22px;
}

.bus-image-map {
    background: transparent;
}

.view-button {
    border-color: #d8e4ed;
    background: #f8fbfd;
    color: #52687d;
}

.view-button.active {
    background: #071521;
    border-color: #071521;
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--transport-teal);
}

.zone-point {
    width: 17px;
    height: 17px;
    min-height: 17px;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(0, 109, 143, 0.2), 0 8px 18px rgba(7, 21, 33, 0.24);
}

.zone-point:hover,
.zone-point.selected {
    background: var(--transport-teal);
    box-shadow: 0 0 0 6px rgba(24, 183, 165, 0.24), 0 10px 22px rgba(7, 21, 33, 0.28);
}

.zone-point.has-damage {
    background: var(--danger);
    box-shadow: 0 0 0 6px rgba(211, 61, 69, 0.22), 0 10px 22px rgba(7, 21, 33, 0.24);
}

.filter-bar {
    gap: 10px;
}

.stats {
    gap: 10px;
}

.stat {
    border-color: rgba(16, 32, 51, 0.08);
    border-radius: 8px;
    background:
        linear-gradient(180deg, #ffffff, #f5fafb);
}

.stat strong {
    color: var(--brand-dark);
    font-size: 1.45rem;
}

.cards {
    gap: 12px;
}

.damage-card,
.vehicle-card,
.recap-vehicle-block,
.stat-widget,
.role-access-card,
.qr-card {
    border-color: rgba(16, 32, 51, 0.1);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(16, 32, 51, 0.07);
}

.damage-card,
.vehicle-card {
    padding: 14px;
}

.damage-card {
    border-left: 5px solid var(--transport-teal);
}

.damage-card:has(.status.open) {
    border-left-color: var(--danger);
}

.card-head strong {
    color: #102033;
    font-size: 0.98rem;
}

.meta {
    color: #66778b;
}

.status {
    border-radius: 999px;
    background: #eef4f7;
    color: #52687d;
}

.status.open {
    background: #fff0f1;
    color: #b6202a;
}

.status.repaired {
    background: #e7f8f1;
    color: #14704d;
}

.status.warning {
    background: #fff6df;
    color: #946000;
}

.workshop-progress span {
    background: #eef4f7;
}

.workshop-progress span.done {
    background: #e7f8f1;
    color: #14704d;
}

.media-grid {
    gap: 10px;
}

.media-thumb,
.media-grid video {
    border-color: rgba(16, 32, 51, 0.1);
    border-radius: 8px;
    background: #e7eef4;
}

.media-lightbox {
    background: rgba(3, 12, 19, 0.94);
}

.media-lightbox img {
    border-radius: 8px;
}

.admin-module-menu {
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.admin-module-button {
    min-height: 88px;
    border-radius: 8px;
    border-color: rgba(16, 32, 51, 0.1);
    background:
        linear-gradient(180deg, #ffffff, #f7fbfd);
    box-shadow: 0 12px 30px rgba(16, 32, 51, 0.07);
}

.admin-module-button strong {
    font-size: 0.98rem;
}

.admin-module-button.active {
    border-color: rgba(24, 183, 165, 0.34);
    background:
        linear-gradient(180deg, #f0fbf9, #ffffff);
    color: var(--brand-dark);
    box-shadow: inset 0 4px 0 var(--transport-teal), 0 16px 38px rgba(24, 183, 165, 0.14);
}

.admin-module-button.active span {
    color: #3b6f75;
}

.admin-module-button:disabled {
    background: #eef2f5;
    color: #8996a3;
}

.module-list {
    margin-top: 12px;
}

.qr-park-number {
    background: #071521;
    color: #ffffff;
}

.qr-image {
    border-radius: 8px;
}

.toast {
    border-radius: 8px;
    background: #071521;
    box-shadow: var(--shadow-strong);
}

.empty {
    border-radius: 8px;
    background: #f8fbfd;
}

@media (max-width: 759px) {
    .brand-copy {
        display: none;
    }

    .session-actions {
        width: 100%;
    }

    .role-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .panel-body {
        padding: 14px;
    }

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

    .filter-bar label {
        min-width: 0;
    }

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

    .admin-module-button {
        min-height: 84px;
        padding: 12px;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    }

    .media-thumb,
    .media-grid video {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
}

@media (min-width: 760px) {
    body {
        background:
            linear-gradient(180deg, #e9f1f6 0, #f7f9fb 430px),
            var(--bg);
    }

    .topbar {
        padding: calc(14px + env(safe-area-inset-top)) 22px 14px;
    }

    .brand-mark {
        width: 150px;
    }

    main {
        padding: 18px 18px 34px;
    }

    .tabs {
        top: 82px;
        max-width: 1240px;
        padding: 8px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(18px);
    }

    .tab {
        min-height: 50px;
        border-radius: 8px;
    }

    .panel-body {
        padding: 18px;
    }

    .two-cols {
        gap: 16px;
        grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
    }

    .filter-bar {
        gap: 12px;
    }

    .cards {
        gap: 14px;
    }

    .damage-card,
    .vehicle-card {
        padding: 16px;
    }

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

@media (min-width: 1100px) {
    .form-grid {
        gap: 14px;
    }

    .admin-module-button:hover:not(:disabled),
    .damage-card:hover,
    .vehicle-card:hover,
    .stat-widget:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 46px rgba(16, 32, 51, 0.1);
    }
}

/* Cinematic VTrack interface */
:root {
    --bg: #070b12;
    --panel: rgba(255, 255, 255, 0.9);
    --ink: #101828;
    --muted: #607086;
    --line: rgba(142, 166, 190, 0.24);
    --brand: #00a6b7;
    --brand-dark: #06364a;
    --ok: #15a878;
    --warn: #ffb02e;
    --danger: #ff3958;
    --soft-blue: rgba(0, 166, 183, 0.12);
    --soft-red: rgba(255, 57, 88, 0.12);
    --transport-teal: #23f0d1;
    --transport-yellow: #ffd55e;
    --transport-coral: #ff5d73;
    --transport-ink: #07111c;
    --surface: rgba(248, 252, 255, 0.88);
    --shadow: 0 24px 70px rgba(6, 17, 30, 0.22);
    --shadow-strong: 0 34px 110px rgba(2, 6, 12, 0.46);
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(115deg, rgba(255, 93, 115, 0.2), transparent 28%),
        linear-gradient(255deg, rgba(35, 240, 209, 0.18), transparent 34%),
        linear-gradient(180deg, #06111f 0, #0c1b2a 38%, #eef3f7 38%, #f6f8fb 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.052) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(120deg, transparent 0 34%, rgba(255, 213, 94, 0.12) 34% 35%, transparent 35% 100%);
    background-size: 46px 46px, 46px 46px, 180px 180px;
    mask-image: linear-gradient(180deg, #000 0, #000 54%, transparent 82%);
    animation: cinematicGrid 18s linear infinite;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(3, 8, 15, 0.04), rgba(3, 8, 15, 0.18)),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
    mix-blend-mode: soft-light;
    opacity: 0.42;
    pointer-events: none;
}

@keyframes cinematicGrid {
    from {
        background-position: 0 0, 0 0, 0 0;
    }
    to {
        background-position: 46px 46px, 46px 46px, 180px 180px;
    }
}

@keyframes softRise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes sheenMove {
    from {
        transform: translateX(-130%) skewX(-18deg);
    }
    to {
        transform: translateX(130%) skewX(-18deg);
    }
}

@keyframes mapPulse {
    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(255, 57, 88, 0.2), 0 10px 22px rgba(7, 21, 33, 0.24);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 57, 88, 0.08), 0 14px 28px rgba(7, 21, 33, 0.28);
    }
}

@keyframes routeGlow {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.auth-gate {
    background:
        linear-gradient(115deg, rgba(255, 93, 115, 0.28), transparent 34%),
        linear-gradient(245deg, rgba(35, 240, 209, 0.24), transparent 40%),
        linear-gradient(135deg, #05070c, #071827 48%, #120916 100%);
    background-size: auto, auto, auto;
}

.auth-gate::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    animation: cinematicGrid 16s linear infinite;
    opacity: 0.6;
}

.auth-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 252, 0.86)),
        rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(26px) saturate(1.25);
    animation: softRise 0.48s cubic-bezier(.2, .8, .2, 1) both;
}

.auth-card::before,
.topbar::before,
.panel::before,
.admin-module-button::before,
.damage-card::before,
.vehicle-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-card::before {
    height: 3px;
    background: linear-gradient(90deg, var(--transport-coral), var(--transport-yellow), var(--transport-teal));
}

.auth-floating-logo {
    animation: softRise 0.52s 0.06s cubic-bezier(.2, .8, .2, 1) both;
}

.auth-field {
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.topbar {
    position: sticky;
    overflow: hidden;
    background:
        linear-gradient(110deg, rgba(255, 93, 115, 0.18), transparent 28%),
        linear-gradient(250deg, rgba(35, 240, 209, 0.2), transparent 34%),
        rgba(3, 9, 16, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 20px 70px rgba(3, 9, 16, 0.34);
    backdrop-filter: blur(22px) saturate(1.25);
}

.topbar::before {
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent),
        linear-gradient(90deg, var(--transport-coral), var(--transport-yellow), var(--transport-teal));
    background-size: 55% 100%, 100% 2px;
    background-repeat: no-repeat;
    background-position: -70% 0, 0 100%;
    animation: routeGlow 9s ease-in-out infinite;
}

.brand-mark {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.brand-copy strong {
    color: #fff;
    text-shadow: 0 0 28px rgba(35, 240, 209, 0.2);
}

.role-pill {
    background:
        linear-gradient(135deg, rgba(35, 240, 209, 0.18), rgba(255, 255, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

main {
    animation: softRise 0.46s 0.08s cubic-bezier(.2, .8, .2, 1) both;
}

.tabs {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 22px 70px rgba(7, 17, 28, 0.14);
    backdrop-filter: blur(24px) saturate(1.2);
}

.tab {
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.34), transparent);
    transform: translateX(-130%) skewX(-18deg);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.tab:hover::before,
.tab.active::before {
    transform: translateX(130%) skewX(-18deg);
}

.tab.active {
    background:
        linear-gradient(135deg, rgba(255, 93, 115, 0.95), rgba(0, 166, 183, 0.95));
    box-shadow: 0 14px 34px rgba(0, 166, 183, 0.2), inset 0 -3px 0 var(--transport-yellow);
}

.view.active {
    animation: softRise 0.36s cubic-bezier(.2, .8, .2, 1) both;
}

.panel,
.damage-card,
.vehicle-card,
.recap-vehicle-block,
.stat-widget,
.role-access-card,
.qr-card,
.admin-module-button {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 255, 0.86));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px) saturate(1.08);
}

.panel::before,
.damage-card::before,
.vehicle-card::before,
.admin-module-button::before {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.38), transparent 22%),
        linear-gradient(90deg, rgba(255, 93, 115, 0.16), rgba(255, 213, 94, 0.12), rgba(35, 240, 209, 0.16));
    opacity: 0;
    transition: opacity 0.24s ease;
}

.panel:hover::before,
.damage-card:hover::before,
.vehicle-card:hover::before,
.admin-module-button:hover::before {
    opacity: 1;
}

.panel-title,
.section-title {
    color: #071521;
}

.panel-title {
    position: relative;
}

.section-title::before {
    width: 7px;
    height: 24px;
    background: linear-gradient(180deg, var(--transport-coral), var(--transport-yellow), var(--transport-teal));
    box-shadow: 0 0 24px rgba(35, 240, 209, 0.28);
}

input,
select,
textarea,
.auth-field {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus,
.auth-field:focus-within {
    border-color: rgba(35, 240, 209, 0.72);
    box-shadow: 0 0 0 4px rgba(35, 240, 209, 0.15), 0 14px 34px rgba(0, 166, 183, 0.12);
}

.button {
    position: relative;
    overflow: hidden;
    border: 0;
    background: linear-gradient(135deg, #ff5d73, #ffb02e 48%, #00a6b7);
    background-size: 190% 190%;
    box-shadow: 0 16px 34px rgba(255, 93, 115, 0.22), 0 8px 20px rgba(0, 166, 183, 0.16);
}

.button::before {
    content: "";
    position: absolute;
    inset: -30% 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.44), transparent);
    transform: translateX(-130%) skewX(-18deg);
    pointer-events: none;
}

.button:hover:not(:disabled) {
    background-position: 100% 50%;
    transform: translateY(-1px);
}

.button:hover:not(:disabled)::before {
    animation: sheenMove 0.62s ease;
}

.button.secondary {
    border: 1px solid rgba(142, 166, 190, 0.28);
    background: rgba(255, 255, 255, 0.76);
    color: #102033;
    box-shadow: 0 12px 28px rgba(16, 32, 51, 0.08);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.vehicle-diagram {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.58);
    background:
        linear-gradient(90deg, rgba(7, 21, 33, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(7, 21, 33, 0.052) 1px, transparent 1px),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 250, 0.9));
    background-size: 24px 24px, 24px 24px, auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 18px 60px rgba(7, 21, 33, 0.14);
}

.vehicle-diagram::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(255, 93, 115, 0.1), transparent 33%),
        linear-gradient(245deg, rgba(35, 240, 209, 0.12), transparent 38%);
    pointer-events: none;
}

.bus-image-map {
    filter: drop-shadow(0 22px 28px rgba(7, 21, 33, 0.12));
    transform-origin: center;
    animation: softRise 0.42s cubic-bezier(.2, .8, .2, 1) both;
}

.zone-point {
    border-width: 2px;
    background: #00a6b7;
    box-shadow: 0 0 0 5px rgba(0, 166, 183, 0.18), 0 10px 22px rgba(7, 21, 33, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.zone-point:hover,
.zone-point.selected {
    background: var(--transport-yellow);
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 0 0 8px rgba(255, 213, 94, 0.18), 0 14px 30px rgba(7, 21, 33, 0.28);
}

.zone-point.has-damage {
    background: var(--danger);
    animation: mapPulse 2.4s ease-in-out infinite;
}

.zone-point.has-damage.selected {
    background: #ff123f;
    transform: translate(-50%, -50%) scale(1.2);
}

.view-button {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 20px rgba(16, 32, 51, 0.08);
}

.view-button.active {
    background: linear-gradient(135deg, #071521, #10324a);
    box-shadow: inset 0 -3px 0 var(--transport-yellow), 0 12px 28px rgba(7, 21, 33, 0.18);
}

.stat {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(235, 247, 250, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 14px 34px rgba(16, 32, 51, 0.08);
}

.stat::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--transport-coral), var(--transport-yellow), var(--transport-teal));
}

.stat strong {
    color: #071521;
    text-shadow: 0 0 30px rgba(0, 166, 183, 0.16);
}

.damage-card {
    border-left: 0;
}

.damage-card::after,
.vehicle-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--transport-teal), var(--transport-yellow));
}

.damage-card:has(.status.open)::after {
    background: linear-gradient(180deg, var(--danger), var(--transport-yellow));
}

.status {
    border: 1px solid rgba(142, 166, 190, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.status.open {
    background: rgba(255, 57, 88, 0.12);
    color: #b90c31;
}

.status.repaired {
    background: rgba(21, 168, 120, 0.12);
    color: #0d7350;
}

.media-thumb,
.media-grid video,
.qr-image {
    box-shadow: 0 12px 26px rgba(16, 32, 51, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.media-thumb:hover,
.qr-card:hover .qr-image {
    transform: translateY(-1px) scale(1.015);
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.16);
}

.admin-module-button.active {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 252, 249, 0.9));
    box-shadow: inset 0 4px 0 var(--transport-teal), 0 18px 44px rgba(0, 166, 183, 0.16);
}

.qr-logo-mark {
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(7, 21, 33, 0.2);
}

.toast {
    background:
        linear-gradient(135deg, rgba(7, 21, 33, 0.96), rgba(12, 45, 64, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(18px);
}

@media (min-width: 760px) {
    body {
        background:
            linear-gradient(115deg, rgba(255, 93, 115, 0.2), transparent 28%),
            linear-gradient(255deg, rgba(35, 240, 209, 0.18), transparent 34%),
            linear-gradient(180deg, #06111f 0, #0c1b2a 41%, #eef3f7 41%, #f6f8fb 100%);
    }

    .tabs {
        background: rgba(255, 255, 255, 0.76);
    }

    .panel-body {
        padding: 20px;
    }
}

@media (min-width: 1100px) {
    .panel:hover,
    .damage-card:hover,
    .vehicle-card:hover,
    .stat-widget:hover,
    .admin-module-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 28px 78px rgba(16, 32, 51, 0.16);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* Reunir-inspired professional transport identity */
:root {
    --bg: #f3f0ec;
    --panel: #ffffff;
    --ink: #181b20;
    --muted: #6d727a;
    --line: rgba(26, 30, 36, 0.12);
    --brand: #b52a22;
    --brand-dark: #3b1514;
    --ok: #2f7c58;
    --warn: #bf7714;
    --danger: #c51f2f;
    --soft-blue: #f1ebe4;
    --soft-red: #fff1ef;
    --transport-teal: #b52a22;
    --transport-yellow: #d8892f;
    --transport-coral: #e44f38;
    --transport-ink: #15171c;
    --surface: #fbfaf7;
    --shadow: 0 18px 44px rgba(30, 24, 20, 0.12);
    --shadow-strong: 0 34px 90px rgba(14, 11, 10, 0.34);
    --radius: 8px;
}

body {
    background:
        linear-gradient(180deg, rgba(21, 23, 28, 0.92) 0, rgba(63, 25, 22, 0.86) 280px, rgba(243, 240, 236, 0.98) 640px),
        radial-gradient(circle at 16% 0, rgba(216, 137, 47, 0.28), transparent 38%),
        radial-gradient(circle at 92% 4%, rgba(181, 42, 34, 0.28), transparent 34%),
        var(--bg);
    color: var(--ink);
}

body::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, #000 0, #000 42%, transparent 72%);
    animation: reunirDrift 24s linear infinite;
    opacity: 0.55;
}

body::after {
    background:
        linear-gradient(115deg, rgba(181, 42, 34, 0.2), transparent 34%),
        linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5) 68%);
    mix-blend-mode: normal;
    opacity: 1;
}

@keyframes reunirDrift {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 72px 36px, 36px 72px;
    }
}

@keyframes editorialIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes redPulse {
    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(197, 31, 47, 0.16), 0 10px 22px rgba(24, 27, 32, 0.2);
    }
    50% {
        box-shadow: 0 0 0 9px rgba(197, 31, 47, 0.07), 0 14px 28px rgba(24, 27, 32, 0.22);
    }
}

.auth-gate {
    background:
        linear-gradient(180deg, rgba(18, 20, 24, 0.78), rgba(48, 19, 17, 0.76)),
        radial-gradient(circle at 15% 16%, rgba(216, 137, 47, 0.32), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(181, 42, 34, 0.42), transparent 36%),
        #121418;
}

.auth-gate::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 72px 72px;
    animation: reunirDrift 22s linear infinite;
}

.auth-card {
    width: min(390px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(18px);
    animation: editorialIn 0.4s ease both;
}

.auth-card::before {
    height: 5px;
    background: linear-gradient(90deg, #b52a22, #d8892f);
}

.auth-floating-logo {
    filter: brightness(0) invert(1) drop-shadow(0 18px 34px rgba(0, 0, 0, 0.36));
    animation: editorialIn 0.42s 0.05s ease both;
}

.auth-header h1 {
    font-size: 1.65rem;
    font-weight: 950;
    letter-spacing: 0;
}

.auth-header p,
.brand-copy span {
    letter-spacing: 0.01em;
}

.auth-field {
    border-radius: 8px;
    background: #fbfaf7;
}

.auth-field span {
    color: #8a5147;
    letter-spacing: 0.08em;
}

.topbar {
    background:
        linear-gradient(90deg, rgba(181, 42, 34, 0.95), rgba(60, 20, 19, 0.88) 34%, rgba(16, 18, 22, 0.94)),
        #15171c;
    box-shadow: 0 18px 48px rgba(12, 10, 10, 0.28);
}

.topbar::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.12)),
        linear-gradient(90deg, #d8892f, #ffffff, #b52a22);
    background-size: 100% 100%, 100% 2px;
    background-position: 0 0, 0 100%;
    animation: none;
}

.brand-mark {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}

.brand-copy strong {
    font-size: 1.18rem;
    font-weight: 950;
}

.brand-copy span {
    color: rgba(255, 255, 255, 0.74);
}

.role-pill {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
}

main {
    animation: editorialIn 0.38s ease both;
}

.tabs {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px rgba(30, 24, 20, 0.12);
    backdrop-filter: blur(14px);
}

.tab {
    color: #60646d;
    font-weight: 900;
}

.tab::before {
    background: linear-gradient(90deg, transparent, rgba(181, 42, 34, 0.1), transparent);
}

.tab.active {
    background: #15171c;
    color: #fff;
    box-shadow: inset 0 -4px 0 #d8892f, 0 10px 24px rgba(21, 23, 28, 0.16);
}

.view.active {
    animation: editorialIn 0.28s ease both;
}

.panel,
.damage-card,
.vehicle-card,
.recap-vehicle-block,
.stat-widget,
.role-access-card,
.qr-card,
.admin-module-button {
    border: 1px solid rgba(30, 24, 20, 0.1);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel::before,
.damage-card::before,
.vehicle-card::before,
.admin-module-button::before {
    background: linear-gradient(110deg, rgba(181, 42, 34, 0.08), transparent 34%, rgba(216, 137, 47, 0.08));
}

.panel-title,
.section-title,
.card-head strong {
    color: #15171c;
}

.panel-title {
    font-weight: 950;
}

.section-title::before {
    width: 6px;
    height: 26px;
    background: linear-gradient(180deg, #b52a22, #d8892f);
    box-shadow: none;
}

label {
    color: #5d6068;
    font-weight: 800;
}

input,
select,
textarea {
    border-color: rgba(30, 24, 20, 0.14);
    background: #fbfaf7;
}

input:focus,
select:focus,
textarea:focus,
.auth-field:focus-within {
    border-color: rgba(181, 42, 34, 0.58);
    box-shadow: 0 0 0 4px rgba(181, 42, 34, 0.1), 0 10px 26px rgba(30, 24, 20, 0.08);
}

.button {
    background: linear-gradient(135deg, #b52a22, #d8892f);
    box-shadow: 0 14px 28px rgba(181, 42, 34, 0.22);
}

.button:hover:not(:disabled) {
    background-position: 100% 50%;
    box-shadow: 0 16px 34px rgba(181, 42, 34, 0.26);
}

.button.secondary {
    background: #f5f1ec;
    border: 1px solid rgba(30, 24, 20, 0.12);
    color: #181b20;
}

.button.ghost {
    background: rgba(255, 255, 255, 0.12);
}

.panel .button.ghost {
    color: #6d727a;
}

.button.danger {
    background: linear-gradient(135deg, #c51f2f, #8f1d1a);
}

.qr-vehicle-notice,
.rgpd-notice {
    border-left-color: #d8892f;
    background: #fff8ec;
    color: #5a3c18;
}

.vehicle-diagram {
    border-color: rgba(30, 24, 20, 0.12);
    background:
        linear-gradient(90deg, rgba(21, 23, 28, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(21, 23, 28, 0.04) 1px, transparent 1px),
        #fbfaf7;
    background-size: 28px 28px, 28px 28px, auto;
}

.vehicle-diagram::before {
    background:
        radial-gradient(circle at 8% 12%, rgba(216, 137, 47, 0.14), transparent 28%),
        radial-gradient(circle at 92% 8%, rgba(181, 42, 34, 0.1), transparent 28%);
}

.view-button {
    background: #f7f4ef;
    color: #62646c;
}

.view-button.active {
    background: #15171c;
    color: #fff;
    box-shadow: inset 0 -3px 0 #d8892f;
}

.zone-point {
    background: #15171c;
    box-shadow: 0 0 0 5px rgba(21, 23, 28, 0.14), 0 9px 22px rgba(21, 23, 28, 0.2);
}

.zone-point:hover,
.zone-point.selected {
    background: #d8892f;
    box-shadow: 0 0 0 8px rgba(216, 137, 47, 0.18), 0 12px 28px rgba(21, 23, 28, 0.22);
}

.zone-point.has-damage {
    background: #c51f2f;
    animation: redPulse 2.5s ease-in-out infinite;
}

.zone-point.has-damage.selected {
    background: #9d171f;
}

.stat {
    background: linear-gradient(180deg, #ffffff, #fbfaf7);
}

.stat::after,
.damage-card::after,
.vehicle-card::after {
    background: linear-gradient(180deg, #b52a22, #d8892f);
}

.stat strong {
    color: #b52a22;
    text-shadow: none;
}

.damage-card:has(.status.open)::after {
    background: linear-gradient(180deg, #c51f2f, #d8892f);
}

.status.open {
    background: #fff1ef;
    color: #9d171f;
}

.status.repaired {
    background: #edf8f1;
    color: #206445;
}

.admin-module-button.active {
    background: linear-gradient(180deg, #fff8ef, #ffffff);
    color: #3b1514;
    box-shadow: inset 0 4px 0 #b52a22, 0 18px 38px rgba(181, 42, 34, 0.12);
}

.admin-module-button.active span {
    color: #74524c;
}

.media-thumb,
.media-grid video,
.qr-image {
    box-shadow: 0 12px 26px rgba(30, 24, 20, 0.12);
}

.qr-park-number {
    background: #15171c;
}

.toast {
    background: rgba(21, 23, 28, 0.96);
    border-color: rgba(255, 255, 255, 0.16);
}

@media (min-width: 760px) {
    body {
        background:
            linear-gradient(180deg, rgba(21, 23, 28, 0.92) 0, rgba(63, 25, 22, 0.86) 300px, rgba(243, 240, 236, 0.98) 690px),
            radial-gradient(circle at 18% 0, rgba(216, 137, 47, 0.28), transparent 38%),
            radial-gradient(circle at 90% 3%, rgba(181, 42, 34, 0.28), transparent 34%),
            var(--bg);
    }

    .tabs {
        background: rgba(255, 255, 255, 0.9);
    }

    .panel-body {
        padding: 22px;
    }
}

/* Night collective identity - V1 colors, Reunir layout mood */
:root {
    --bg: #050a12;
    --panel: #0c1420;
    --ink: #f5f9ff;
    --muted: #9aacbd;
    --line: rgba(191, 215, 238, 0.14);
    --brand: #2f8dff;
    --brand-dark: #071521;
    --ok: #4cd7a2;
    --warn: #ffc247;
    --danger: #ff5266;
    --soft-blue: rgba(47, 141, 255, 0.14);
    --soft-red: rgba(255, 82, 102, 0.14);
    --transport-teal: #29e3d0;
    --transport-yellow: #ffc247;
    --transport-coral: #4f8dff;
    --transport-ink: #050a12;
    --surface: rgba(11, 21, 34, 0.88);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    --shadow-strong: 0 38px 120px rgba(0, 0, 0, 0.48);
    --radius: 8px;
}

body {
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.34) 0, rgba(5, 10, 18, 0.98) 440px),
        radial-gradient(circle at 20% 0, rgba(47, 141, 255, 0.28), transparent 36%),
        radial-gradient(circle at 82% 12%, rgba(41, 227, 208, 0.16), transparent 30%),
        linear-gradient(135deg, #081624, #050a12 58%, #03060b);
    color: var(--ink);
}

body::before {
    background:
        linear-gradient(90deg, rgba(180, 212, 245, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(180, 212, 245, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 50% 0, rgba(47, 141, 255, 0.18), transparent 34%);
    background-size: 82px 82px, 82px 82px, auto;
    mask-image: linear-gradient(180deg, #000 0, #000 58%, transparent 84%);
    opacity: 0.85;
    animation: nightGrid 26s linear infinite;
}

body::after {
    background:
        linear-gradient(180deg, transparent 0 62%, rgba(5, 10, 18, 0.84) 100%),
        linear-gradient(115deg, transparent 0 40%, rgba(47, 141, 255, 0.08) 40% 41%, transparent 41% 100%),
        linear-gradient(245deg, transparent 0 44%, rgba(41, 227, 208, 0.07) 44% 45%, transparent 45% 100%);
    opacity: 1;
}

@keyframes nightGrid {
    from {
        background-position: 0 0, 0 0, 0 0;
    }
    to {
        background-position: 82px 41px, 41px 82px, 0 0;
    }
}

@keyframes nightReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blueDamagePulse {
    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(255, 82, 102, 0.2), 0 10px 24px rgba(0, 0, 0, 0.36);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 82, 102, 0.08), 0 16px 30px rgba(0, 0, 0, 0.42);
    }
}

.auth-gate {
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.28), rgba(5, 10, 18, 0.98)),
        radial-gradient(circle at 22% 8%, rgba(47, 141, 255, 0.34), transparent 34%),
        radial-gradient(circle at 82% 8%, rgba(41, 227, 208, 0.18), transparent 32%),
        linear-gradient(135deg, #0a1b2d, #050a12 64%, #020409);
}

.auth-gate::before {
    background:
        linear-gradient(90deg, rgba(180, 212, 245, 0.065) 1px, transparent 1px),
        linear-gradient(180deg, rgba(180, 212, 245, 0.048) 1px, transparent 1px);
    background-size: 82px 82px;
    animation: nightGrid 26s linear infinite;
}

.auth-card {
    border: 1px solid rgba(180, 212, 245, 0.2);
    background: rgba(9, 18, 31, 0.88);
    color: #fff;
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(22px) saturate(1.18);
    animation: nightReveal 0.4s ease both;
}

.auth-card::before {
    height: 3px;
    background: linear-gradient(90deg, #2f8dff, #29e3d0);
}

.auth-floating-logo {
    filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.45));
}

.auth-card h1,
.auth-card p {
    color: #fff;
}

.auth-card p,
.auth-foot {
    color: rgba(230, 242, 255, 0.72);
}

.auth-field {
    border-color: rgba(180, 212, 245, 0.16);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(230, 242, 255, 0.78);
}

.auth-field span {
    color: #8fdcf2;
}

.auth-field input,
.auth-field select {
    color: #fff;
}

.topbar {
    background:
        linear-gradient(90deg, rgba(5, 10, 18, 0.86), rgba(7, 21, 33, 0.78)),
        rgba(5, 10, 18, 0.9);
    border-bottom: 1px solid rgba(180, 212, 245, 0.14);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px) saturate(1.2);
}

.topbar::before {
    background:
        linear-gradient(90deg, transparent, rgba(47, 141, 255, 0.18), transparent),
        linear-gradient(90deg, transparent, #2f8dff, #29e3d0, transparent);
    background-size: 100% 100%, 100% 2px;
    background-position: 0 0, 0 100%;
}

.brand-mark {
    border-color: rgba(180, 212, 245, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.brand-copy strong,
.brand-copy span,
.role-pill {
    color: #fff;
}

.brand-copy span {
    color: rgba(230, 242, 255, 0.68);
}

.role-pill {
    border-color: rgba(180, 212, 245, 0.16);
    background: rgba(255, 255, 255, 0.07);
}

main {
    animation: nightReveal 0.36s ease both;
}

.tabs {
    border: 1px solid rgba(180, 212, 245, 0.13);
    background: rgba(8, 17, 30, 0.86);
    box-shadow: 0 22px 72px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px) saturate(1.16);
}

.tab {
    color: rgba(230, 242, 255, 0.66);
}

.tab.active {
    background: linear-gradient(135deg, rgba(47, 141, 255, 0.92), rgba(10, 31, 50, 0.96));
    color: #fff;
    box-shadow: inset 0 -3px 0 #29e3d0, 0 14px 32px rgba(47, 141, 255, 0.18);
}

.panel,
.damage-card,
.vehicle-card,
.recap-vehicle-block,
.stat-widget,
.role-access-card,
.qr-card,
.admin-module-button,
.zone-damage-head,
.empty {
    border: 1px solid rgba(180, 212, 245, 0.13);
    background:
        linear-gradient(180deg, rgba(15, 29, 46, 0.94), rgba(8, 17, 30, 0.92));
    color: #f5f9ff;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px) saturate(1.12);
}

.panel::before,
.damage-card::before,
.vehicle-card::before,
.admin-module-button::before {
    background:
        linear-gradient(120deg, rgba(47, 141, 255, 0.12), transparent 36%, rgba(41, 227, 208, 0.1)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

.panel-title,
.section-title,
.card-head strong,
.stat-widget h3,
.role-access-card strong,
.qr-card strong,
.admin-module-button strong,
.zone-damage-head strong {
    color: #fff;
}

.section-title {
    color: #fff;
}

.section-title::before {
    background: linear-gradient(180deg, #2f8dff, #29e3d0);
    box-shadow: 0 0 26px rgba(47, 141, 255, 0.26);
}

.meta,
.hint,
.admin-module-button span,
.zone-damage-head span,
.stat span,
.auth-card p,
.empty {
    color: rgba(230, 242, 255, 0.68);
}

label {
    color: rgba(230, 242, 255, 0.76);
}

input,
select,
textarea {
    border-color: rgba(180, 212, 245, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

input::placeholder,
textarea::placeholder {
    color: rgba(230, 242, 255, 0.42);
}

input:focus,
select:focus,
textarea:focus,
.auth-field:focus-within {
    border-color: rgba(41, 227, 208, 0.64);
    box-shadow: 0 0 0 4px rgba(41, 227, 208, 0.12), 0 12px 30px rgba(0, 0, 0, 0.24);
}

.button {
    background: linear-gradient(135deg, #2f8dff, #29e3d0);
    color: #03101d;
    box-shadow: 0 15px 34px rgba(47, 141, 255, 0.22);
}

.button.secondary {
    border-color: rgba(180, 212, 245, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f5f9ff;
}

.button.ghost {
    border-color: rgba(180, 212, 245, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #f5f9ff;
}

.button.danger {
    background: linear-gradient(135deg, #ff5266, #b71c31);
    color: #fff;
}

.qr-vehicle-notice,
.rgpd-notice,
.workshop-note {
    border-color: rgba(255, 194, 71, 0.22);
    border-left-color: #ffc247;
    background: rgba(255, 194, 71, 0.1);
    color: #ffe8b5;
}

.vehicle-diagram {
    border-color: rgba(180, 212, 245, 0.13);
    background:
        linear-gradient(90deg, rgba(180, 212, 245, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(180, 212, 245, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 0, rgba(47, 141, 255, 0.13), transparent 38%),
        rgba(6, 13, 23, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 70px rgba(0, 0, 0, 0.24);
}

.vehicle-diagram::before {
    background:
        linear-gradient(115deg, rgba(47, 141, 255, 0.12), transparent 38%),
        linear-gradient(245deg, rgba(41, 227, 208, 0.08), transparent 40%);
}

.view-button {
    border-color: rgba(180, 212, 245, 0.13);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(230, 242, 255, 0.7);
}

.view-button.active {
    background: rgba(47, 141, 255, 0.9);
    color: #fff;
    box-shadow: inset 0 -3px 0 #29e3d0;
}

.zone-point {
    background: #2f8dff;
    box-shadow: 0 0 0 5px rgba(47, 141, 255, 0.16), 0 10px 24px rgba(0, 0, 0, 0.34);
}

.zone-point:hover,
.zone-point.selected {
    background: #29e3d0;
    box-shadow: 0 0 0 8px rgba(41, 227, 208, 0.14), 0 14px 30px rgba(0, 0, 0, 0.38);
}

.zone-point.has-damage {
    background: #ff5266;
    animation: blueDamagePulse 2.45s ease-in-out infinite;
}

.zone-point.has-damage.selected {
    background: #ff2844;
}

.stat {
    border: 1px solid rgba(180, 212, 245, 0.13);
    background: linear-gradient(180deg, rgba(15, 29, 46, 0.94), rgba(8, 17, 30, 0.92));
    color: #fff;
}

.stat::after,
.damage-card::after,
.vehicle-card::after {
    background: linear-gradient(180deg, #2f8dff, #29e3d0);
}

.damage-card:has(.status.open)::after {
    background: linear-gradient(180deg, #ff5266, #ffc247);
}

.stat strong {
    color: #fff;
    text-shadow: 0 0 30px rgba(47, 141, 255, 0.2);
}

.status {
    border-color: rgba(180, 212, 245, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(230, 242, 255, 0.86);
}

.status.open {
    background: rgba(255, 82, 102, 0.14);
    color: #ff9aa7;
}

.status.repaired {
    background: rgba(76, 215, 162, 0.14);
    color: #9ff0d0;
}

.status.warning {
    background: rgba(255, 194, 71, 0.14);
    color: #ffe1a0;
}

.workshop-progress span,
.role-module-check,
.qr-url,
.audit-log-card pre {
    border-color: rgba(180, 212, 245, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(230, 242, 255, 0.78);
}

.workshop-progress span.done {
    background: rgba(76, 215, 162, 0.13);
    color: #9ff0d0;
}

.admin-module-menu {
    align-items: stretch;
}

.admin-module-button {
    min-height: 96px;
}

.admin-module-button.active {
    border-color: rgba(41, 227, 208, 0.26);
    background:
        linear-gradient(180deg, rgba(17, 43, 64, 0.98), rgba(8, 17, 30, 0.94));
    color: #fff;
    box-shadow: inset 0 4px 0 #29e3d0, 0 22px 60px rgba(0, 0, 0, 0.24);
}

.admin-module-button.active span {
    color: rgba(230, 242, 255, 0.72);
}

.media-thumb,
.media-grid video,
.qr-image {
    border-color: rgba(180, 212, 245, 0.13);
    background: rgba(255, 255, 255, 0.08);
}

.qr-park-number {
    background: linear-gradient(135deg, #2f8dff, #123754);
    color: #fff;
}

.media-lightbox,
.privacy-modal {
    background: rgba(2, 6, 12, 0.92);
}

.privacy-card {
    background: #0b1522;
    color: #f5f9ff;
    border: 1px solid rgba(180, 212, 245, 0.14);
}

.privacy-copy,
.privacy-copy h3 {
    color: rgba(230, 242, 255, 0.82);
}

.toast {
    background: rgba(8, 17, 30, 0.96);
    color: #fff;
    border-color: rgba(180, 212, 245, 0.16);
}

@media (min-width: 760px) {
    body {
        background:
            linear-gradient(180deg, rgba(5, 10, 18, 0.18) 0, rgba(5, 10, 18, 0.98) 520px),
            radial-gradient(circle at 20% 0, rgba(47, 141, 255, 0.3), transparent 36%),
            radial-gradient(circle at 82% 12%, rgba(41, 227, 208, 0.16), transparent 30%),
            linear-gradient(135deg, #081624, #050a12 58%, #03060b);
    }

    .tabs {
        background: rgba(8, 17, 30, 0.78);
    }

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

/* UX corrections: clean logos, dark fields, clearer driver/admin flows */
.brand-mark,
.auth-floating-logo,
.protected-asset {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.brand-mark {
    padding: 0;
    width: min(150px, 42vw);
    height: 48px;
    display: flex;
    align-items: center;
}

.brand-mark img,
.auth-floating-logo {
    border-radius: 0;
}

.auth-floating-logo {
    width: min(230px, 66vw);
    max-height: 86px;
    object-fit: contain;
}

.section-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 4px 0 16px;
    padding: 18px;
    border: 1px solid rgba(180, 212, 245, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(47, 141, 255, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(13, 27, 44, 0.82), rgba(8, 17, 30, 0.74));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.section-intro h1 {
    margin: 4px 0 0;
    color: #fff;
    font-size: clamp(1.55rem, 4vw, 2.6rem);
    line-height: 0.96;
    font-weight: 950;
    letter-spacing: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8fdcf2;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2f8dff, #29e3d0);
}

.workflow-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.workflow-pills span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid rgba(180, 212, 245, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(230, 242, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 850;
}

.two-cols {
    align-items: start;
}

#reportView .two-cols > .panel:last-child {
    position: sticky;
    top: 150px;
}

.panel,
.damage-card,
.vehicle-card,
.stat-widget,
.recap-vehicle-block,
.role-access-card,
.qr-card {
    border-radius: 8px;
}

.panel-body {
    display: grid;
    gap: 14px;
}

.panel-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
}

.form-grid {
    gap: 12px;
}

.form-grid > label,
.filter-bar label,
.auth-field {
    display: grid;
    gap: 7px;
}

input,
select,
textarea {
    min-height: 50px;
    width: 100%;
    border: 1px solid rgba(180, 212, 245, 0.16);
    border-radius: 8px;
    background: rgba(3, 9, 16, 0.62) !important;
    color: #f5f9ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

textarea {
    min-height: 132px;
}

select,
select option,
select optgroup {
    background: #071521;
    color: #f5f9ff;
}

input[type="date"],
input[type="time"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="password"],
input[type="url"],
textarea {
    -webkit-appearance: none;
    appearance: none;
}

input[type="color"] {
    min-height: 50px;
    padding: 8px;
}

input[type="file"] {
    min-height: auto;
    padding: 12px;
    color: rgba(230, 242, 255, 0.76);
}

input::file-selector-button {
    margin-right: 12px;
    border: 0;
    border-radius: 8px;
    padding: 9px 12px;
    background: linear-gradient(135deg, #2f8dff, #29e3d0);
    color: #03101d;
    font-weight: 900;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f5f9ff;
    box-shadow: 0 0 0 1000px #071521 inset !important;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-card input,
.auth-card select {
    background: transparent !important;
}

.auth-field {
    border-radius: 8px;
    background: rgba(3, 9, 16, 0.54) !important;
}

.filter-bar {
    gap: 12px;
}

.split-actions,
.row {
    gap: 10px;
}

.button {
    min-height: 46px;
    justify-content: center;
    font-weight: 950;
}

.button.secondary,
.button.ghost {
    color: #f5f9ff;
}

.diagram-wrap {
    display: grid;
    gap: 12px;
}

.view-switcher {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.view-button {
    min-height: 42px;
    padding: 0 8px;
    white-space: nowrap;
}

.vehicle-diagram {
    min-height: 260px;
}

.zone-damage-panel {
    margin-top: 0;
}

.zone-damage-head {
    background:
        linear-gradient(120deg, rgba(47, 141, 255, 0.12), transparent),
        rgba(6, 13, 23, 0.84);
}

.cards,
.module-list {
    gap: 12px;
}

.damage-card,
.vehicle-card {
    padding: 14px 14px 14px 18px;
}

.admin-intro {
    margin-top: 8px;
}

.admin-heading {
    align-items: center;
}

.admin-filters {
    margin-bottom: 0;
}

.admin-module-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
    gap: 12px;
    margin: 16px 0 18px;
}

.admin-module-button {
    min-height: 106px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 14px;
    text-align: left;
    border-radius: 8px;
}

.admin-module-button::after {
    content: "";
    width: 34px;
    height: 3px;
    border-radius: 999px;
    background: rgba(180, 212, 245, 0.22);
    transition: width 0.2s ease, background 0.2s ease;
}

.admin-module-button.active::after {
    width: 58px;
    background: linear-gradient(90deg, #2f8dff, #29e3d0);
}

.admin-module-button strong {
    font-size: 1rem;
}

.admin-module-button span {
    line-height: 1.28;
}

.admin-module-panel {
    animation: nightReveal 0.26s ease both;
}

.admin-module-panel > .section-title {
    margin-top: 0;
}

.stat {
    min-height: 88px;
    align-content: center;
}

.stat strong {
    font-size: clamp(1.4rem, 4vw, 2rem);
}

.media-thumb,
.media-grid video {
    border-radius: 8px;
}

.privacy-close,
.media-lightbox-close {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 759px) {
    .section-intro {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .section-intro h1 {
        font-size: 1.55rem;
    }

    .workflow-pills {
        justify-content: flex-start;
    }

    #reportView .two-cols > .panel:last-child {
        position: static;
        order: -1;
    }

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

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

    .admin-module-button {
        min-height: 96px;
        padding: 12px;
    }

    .admin-module-button strong {
        font-size: 0.92rem;
    }

    .admin-module-button span {
        font-size: 0.78rem;
    }
}

@media (min-width: 760px) {
    .section-intro {
        padding: 22px;
    }

    .two-cols {
        grid-template-columns: minmax(360px, 0.86fr) minmax(520px, 1.14fr);
    }

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

/* Final contrast and permission visibility fixes */
[hidden],
.tab[hidden],
.admin-module-button[hidden],
.admin-module-panel[hidden] {
    display: none !important;
}

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

.brand-mark,
.brand-mark img,
.auth-floating-logo,
.protected-asset {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.panel,
.damage-card,
.vehicle-card,
.recap-vehicle-block,
.stat-widget,
.role-access-card,
.qr-card,
.admin-module-button,
.zone-damage-head,
.empty,
.privacy-card {
    background:
        linear-gradient(180deg, rgba(12, 25, 42, 0.96), rgba(5, 12, 22, 0.96)) !important;
    color: #f7fbff !important;
}

.panel *,
.damage-card *,
.vehicle-card *,
.recap-vehicle-block *,
.stat-widget *,
.role-access-card *,
.qr-card *,
.admin-module-button *,
.zone-damage-head *,
.privacy-card * {
    border-color: rgba(185, 216, 244, 0.14);
}

.panel-title,
.section-title,
.card-head strong,
.admin-module-button strong,
.stat strong,
.privacy-copy h3,
.zone-damage-head strong {
    color: #ffffff !important;
}

.meta,
.hint,
.admin-module-button span,
.stat span,
.zone-damage-head span,
.privacy-copy,
.privacy-copy p,
.damage-text {
    color: rgba(232, 244, 255, 0.72) !important;
}

label,
.auth-field span {
    color: rgba(232, 244, 255, 0.82) !important;
}

input,
select,
textarea,
.auth-field,
.role-module-check,
.qr-url,
.audit-log-card pre,
.workshop-progress span {
    border-color: rgba(185, 216, 244, 0.16) !important;
    background: rgba(3, 9, 16, 0.76) !important;
    color: #f7fbff !important;
}

select option,
select optgroup {
    background: #071521 !important;
    color: #f7fbff !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(232, 244, 255, 0.42) !important;
}

input[type="date"],
input[type="time"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="password"],
input[type="url"],
textarea,
select {
    -webkit-text-fill-color: #f7fbff;
}

input[type="color"] {
    background: rgba(3, 9, 16, 0.76) !important;
}

input[type="file"] {
    background: rgba(3, 9, 16, 0.76) !important;
}

.button.secondary,
.button.ghost {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f7fbff !important;
}

.status {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(232, 244, 255, 0.86) !important;
}

.status.open {
    background: rgba(255, 82, 102, 0.16) !important;
    color: #ffb0ba !important;
}

.status.repaired,
.workshop-progress span.done {
    background: rgba(76, 215, 162, 0.14) !important;
    color: #a8f4d5 !important;
}

.rgpd-notice,
.qr-vehicle-notice,
.workshop-note {
    background: rgba(255, 194, 71, 0.12) !important;
    color: #ffe7b0 !important;
}

.admin-module-button:not([hidden]) {
    display: grid;
}

.admin-module-button:disabled {
    display: none !important;
}

@media (min-width: 760px) {
    .tabs {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

/* Polish pass after visual review */
.topbar {
    min-height: auto;
    padding: calc(10px + env(safe-area-inset-top)) 18px 10px !important;
    background:
        linear-gradient(90deg, rgba(7, 21, 33, 0.96), rgba(10, 42, 65, 0.92) 55%, rgba(8, 64, 70, 0.82)),
        #071521 !important;
}

.brand-row {
    min-height: 54px;
}

.brand {
    min-width: 0;
}

.brand-copy {
    min-width: 0;
}

.brand-copy strong,
.brand-copy span,
.role-pill {
    text-shadow: none;
}

.brand-copy span {
    display: block;
    max-width: min(360px, 42vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-actions {
    min-width: 0;
}

.role-pill {
    max-width: min(420px, 42vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.08) !important;
}

.tabs {
    gap: 6px;
    padding: 6px !important;
    border-radius: 8px;
}

.tab {
    min-height: 58px !important;
    border-radius: 8px;
}

.tab svg {
    width: 20px;
    height: 20px;
}

.mileage-chart-card,
.invoice-block,
.workshop-note,
.recap-vehicle-block {
    border: 1px solid rgba(185, 216, 244, 0.14) !important;
    background:
        linear-gradient(180deg, rgba(8, 18, 31, 0.94), rgba(4, 10, 18, 0.94)) !important;
    color: #f7fbff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.mileage-chart-card .card-head strong,
.invoice-block strong,
.workshop-note strong,
.recap-vehicle-head strong {
    color: #fff !important;
}

.mileage-bar-row {
    color: rgba(232, 244, 255, 0.74) !important;
}

.mileage-bar-row strong {
    color: #f7fbff !important;
}

.mileage-bar-track {
    background: rgba(185, 216, 244, 0.12) !important;
}

.mileage-bar {
    background: linear-gradient(90deg, #2f8dff, #29e3d0) !important;
}

.invoice-file {
    border-color: rgba(185, 216, 244, 0.16) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f7fbff !important;
}

.media-grid {
    padding: 0;
}

.media-thumb,
.media-grid video {
    background: rgba(3, 9, 16, 0.82) !important;
}

.media-thumb img {
    background: rgba(3, 9, 16, 0.82);
}

.invoice-block .media-grid,
.workshop-note span {
    color: rgba(232, 244, 255, 0.72) !important;
}

@media (max-width: 759px) {
    .topbar {
        padding: calc(10px + env(safe-area-inset-top)) 12px 10px !important;
    }

    .brand-row {
        gap: 10px;
    }

    .brand-copy {
        display: none;
    }

    .role-pill {
        max-width: 100%;
    }

    .tabs {
        border-radius: 8px 8px 0 0;
    }

    .tab {
        min-height: 54px !important;
    }
}
