:root {
    color-scheme: dark;
    --page-bg: #0c1118;
    --panel-bg: #121a24;
    --panel-bg-strong: #162232;
    --border: #263546;
    --border-strong: #3b5068;
    --text: #f3f6f9;
    --muted: #9baaba;
    --brand: #d6ad4f;
    --brand-strong: #f0c766;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

/* CADMAP */
.cadmap-page .cadmap-actions,
.cadmap-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.cadmap-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 18px;
    margin-top: 28px;
}

.cadmap-card {
    border: 1px solid rgba(143, 179, 217, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(83, 145, 204, 0.15), rgba(4, 14, 24, 0.72)),
        rgba(10, 27, 43, 0.86);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.cadmap-live-map {
    height: min(72vh, 760px);
    min-height: 520px;
    overflow: hidden;
    background: #06121d;
}

.cadmap-leaflet,
.cadmap-fallback {
    width: 100%;
    height: 100%;
    background: #06121d;
}

.cadmap-fallback {
    overflow: auto;
}

.cadmap-fallback img {
    display: block;
    width: 100%;
    height: auto;
}

.cadmap-leaflet .leaflet-control-zoom a {
    color: #07111b;
    font-weight: 900;
}

.cadmap-unit-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    height: 47px;
    gap: 3px;
    overflow: visible;
    color: #fff;
    font: 900 9px/1 Arial, Helvetica, sans-serif;
    text-align: center;
    transition: transform 0.45s linear;
}

.cadmap-unit-marker__arrow {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.9));
    transform-origin: 50% 52%;
    transition: transform 0.35s linear;
}

.cadmap-unit-marker__arrow::before,
.cadmap-unit-marker__arrow::after {
    position: absolute;
    content: "";
    clip-path: polygon(50% 0, 100% 100%, 50% 79%, 0 100%);
}

.cadmap-unit-marker__arrow::before {
    inset: 0;
    background: #f7fbff;
}

.cadmap-unit-marker__arrow::after {
    inset: 2px 3px 3px;
    background: linear-gradient(180deg, #243647 0%, #101a24 65%, #071019 100%);
}

.cadmap-unit-marker strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 19px;
    border: 1px solid rgba(247, 251, 255, 0.96);
    border-radius: 3px;
    padding: 3px 6px;
    color: #fff;
    background: rgba(8, 18, 29, 0.96);
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.78),
        inset 0 0 0 1px rgba(85, 139, 184, 0.28);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
    font-size: 10px;
    white-space: nowrap;
}

.cadmap-unit-marker--overfall .cadmap-unit-marker__arrow::after {
    background: #b60016;
    animation: cadmap-overfall-arrow 0.72s steps(2, end) infinite;
}

.cadmap-unit-marker--overfall strong {
    border-color: #fff;
    background: #b60016;
    animation: cadmap-overfall-label 0.72s steps(2, end) infinite;
}

@keyframes cadmap-overfall-arrow {
    0%,
    100% {
        background: #970011;
        box-shadow: 0 0 0 rgba(255, 0, 32, 0);
    }

    50% {
        background: #ff1731;
        box-shadow: 0 0 18px rgba(255, 23, 49, 0.96);
    }
}

@keyframes cadmap-overfall-label {
    0%,
    100% {
        background: #970011;
        box-shadow:
            0 2px 5px rgba(0, 0, 0, 0.78),
            0 0 0 rgba(255, 0, 32, 0);
    }

    50% {
        background: #ff1731;
        box-shadow:
            0 2px 5px rgba(0, 0, 0, 0.78),
            0 0 20px rgba(255, 23, 49, 0.96);
    }
}

.cadmap-status-card {
    padding: 18px;
}

/* Fristående SOS-karta för en separat operatörsskärm. */
body.sos-map-monitor {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: #f4f8fc;
    background: #06121d;
}

.sos-map-monitor__header {
    position: relative;
    z-index: 1000;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid rgba(125, 166, 205, 0.28);
    padding: 12px 20px;
    background: rgba(6, 18, 29, 0.98);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.sos-map-monitor__identity,
.sos-map-monitor__tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sos-map-monitor__identity img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sos-map-monitor__identity span {
    display: block;
    margin-bottom: 2px;
    color: #8ebee9;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.sos-map-monitor__identity h1 {
    margin: 0;
    font-size: 1.4rem;
}

.sos-map-monitor__status {
    margin: 0;
    border: 1px solid rgba(89, 209, 166, 0.34);
    border-radius: 999px;
    padding: 7px 12px;
    color: #a8f4d8;
    background: rgba(17, 90, 70, 0.3);
    font-weight: 800;
}

.sos-map-monitor__status[data-status="error"] {
    border-color: rgba(255, 79, 98, 0.46);
    color: #ffc2ca;
    background: rgba(126, 17, 32, 0.42);
}

.sos-map-monitor__status[data-status="warning"] {
    border-color: rgba(245, 185, 74, 0.46);
    color: #ffe1a5;
    background: rgba(107, 73, 10, 0.42);
}

.sos-map-monitor__close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(143, 179, 217, 0.32);
    border-radius: 6px;
    color: #fff;
    background: #172536;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
}

.sos-map-monitor__close:hover {
    border-color: rgba(255, 255, 255, 0.64);
    background: #233a52;
}

.sos-map-monitor__main {
    width: 100%;
    height: calc(100vh - 74px);
    padding: 12px;
}

.sos-map-monitor__map {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(143, 179, 217, 0.34);
    border-radius: 6px;
    background: #06121d;
}

@media (max-width: 760px) {
    .sos-map-monitor__header {
        min-height: 64px;
        padding: 8px 10px;
    }

    .sos-map-monitor__identity h1 {
        font-size: 1.05rem;
    }

    .sos-map-monitor__status {
        display: none;
    }

    .sos-map-monitor__main {
        height: calc(100vh - 64px);
        padding: 6px;
    }
}

.cadmap-status-card h2,
.cadmap-status-card h3 {
    margin: 0 0 10px;
}

.cadmap-status-card p {
    color: var(--muted);
}

.cadmap-status-line {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid rgba(143, 179, 217, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
    color: #c7d8ec;
    background: rgba(7, 17, 27, 0.72);
    font-weight: 800;
}

.cadmap-status-line[data-status="ok"] {
    border-color: rgba(79, 191, 143, 0.5);
    color: #9af0c6;
}

.cadmap-status-line[data-status="warning"] {
    border-color: rgba(244, 204, 85, 0.52);
    color: #ffe39a;
}

.cadmap-status-line[data-status="error"] {
    border-color: rgba(228, 95, 95, 0.58);
    color: #ffb1b1;
}

.cadmap-table {
    width: 100%;
    border-collapse: collapse;
}

.cadmap-table th,
.cadmap-table td {
    border-bottom: 1px solid rgba(143, 179, 217, 0.18);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.cadmap-table th {
    color: #a9c7ec;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.cadmap-admin-grid,
.cadmap-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cadmap-admin-grid {
    align-items: start;
}

.cadmap-form-grid label {
    display: grid;
    gap: 8px;
    color: #a9c7ec;
    font-weight: 800;
}

.cadmap-form-grid input,
.cadmap-form-grid select {
    min-height: 44px;
}

.cadmap-admin-map {
    height: 620px;
    min-height: 420px;
    overflow: hidden;
}

.cadmap-alert {
    border: 1px solid rgba(228, 95, 95, 0.6);
    border-radius: 8px;
    padding: 14px 16px;
    background: rgba(102, 12, 22, 0.38);
    color: #ffd3d3;
}

.module-card--cadmap {
    --card-accent: #3f8cff;
}

@media (max-width: 960px) {
    .cadmap-shell,
    .cadmap-admin-grid,
    .cadmap-form-grid {
        grid-template-columns: 1fr;
    }

    .cadmap-live-map {
        min-height: 420px;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-bg);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(25, 36, 50, 0.98), rgba(12, 17, 24, 1) 38%),
        var(--page-bg);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(10, 15, 22, 0.92);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.site-brand img {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 50%;
}

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav__links a,
.logout-link,
.module-card__action {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
}

.site-nav__links a:hover,
.logout-link:hover {
    border-color: var(--border-strong);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 64px;
}

body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 78% 35%, rgba(63, 104, 157, 0.2), transparent 36%),
        radial-gradient(circle at 20% 12%, rgba(32, 82, 125, 0.28), transparent 34%),
        linear-gradient(135deg, rgba(4, 11, 18, 0.96), rgba(11, 27, 45, 0.94) 54%, rgba(4, 10, 16, 0.98)),
        #050b11;
}

body.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at 70% 50%, black, transparent 72%);
}

body.login-page main.login-main {
    width: min(1440px, calc(100% - 40px));
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px 0;
}

.login-shell {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 40px);
    overflow: hidden;
    border: 1px solid rgba(61, 87, 113, 0.34);
    background:
        linear-gradient(90deg, rgba(5, 12, 19, 0.96) 0%, rgba(8, 22, 37, 0.86) 48%, rgba(13, 30, 50, 0.72) 100%),
        radial-gradient(circle at 72% 62%, rgba(88, 139, 195, 0.18), transparent 34%);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.5);
}

.login-shell::before {
    content: "";
    position: absolute;
    right: -8%;
    bottom: -18%;
    width: 58%;
    aspect-ratio: 1;
    border: 1px solid rgba(123, 169, 223, 0.16);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 1px rgba(123, 169, 223, 0.08),
        inset 0 0 0 70px rgba(123, 169, 223, 0.025);
}

.login-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin: 44px 0 0 44px;
    font-size: 1.2rem;
    font-weight: 800;
}

.login-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(83, 154, 255, 0.32));
}

.login-layout {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100% - 96px));
    min-height: calc(100vh - 190px);
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.05fr);
    gap: 38px;
    align-items: center;
    margin: 0 auto;
    padding: 40px 0 56px;
}

.login-hero {
    position: relative;
    display: grid;
    align-content: center;
    gap: 20px;
    min-height: 330px;
    border-left: 2px solid rgba(240, 199, 102, 0.72);
    padding-left: 34px;
}

.login-hero h1 {
    margin: 0;
    font-size: clamp(3.3rem, 7vw, 4.7rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.login-hero p:not(.eyebrow) {
    max-width: 390px;
    margin: 0;
    color: #aebccc;
    font-size: 1.23rem;
    line-height: 1.45;
}

.login-security-note {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #9eacbc;
    font-size: 0.95rem;
    line-height: 1.45;
}

.login-security-note span {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 2px solid #6ea8ff;
    border-radius: 9px;
    box-shadow: inset 0 0 0 4px rgba(110, 168, 255, 0.12), 0 0 16px rgba(110, 168, 255, 0.28);
}

.login-security-note p {
    margin: 0;
}

.login-card {
    position: relative;
    width: min(100%, 680px);
    overflow: visible;
    border: 1px solid rgba(103, 132, 160, 0.42);
    border-radius: 12px;
    padding: 74px 48px 38px;
    background:
        linear-gradient(180deg, rgba(22, 34, 50, 0.68), rgba(9, 15, 23, 0.86)),
        rgba(12, 21, 31, 0.82);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(14px);
}

.login-card-logo {
    position: absolute;
    top: -54px;
    left: 50%;
    width: 108px;
    height: 108px;
    display: grid;
    place-items: center;
    transform: translateX(-50%);
    border: 1px solid rgba(111, 142, 174, 0.44);
    border-radius: 50%;
    padding: 0;
    background: rgba(16, 28, 43, 0.88);
    box-shadow: 0 0 0 12px rgba(23, 41, 62, 0.26), 0 16px 40px rgba(0, 0, 0, 0.35);
}

.login-card-logo img {
    width: 115%;
    height: 115%;
    max-width: none;
    object-fit: contain;
    border-radius: 50%;
    transform: translateY(-8px);
}

.login-card form {
    display: grid;
    gap: 18px;
}

.login-card .field label {
    color: #aebccc;
    font-size: 0.95rem;
}

.login-card .field input {
    min-height: 60px;
    border-color: rgba(82, 112, 145, 0.6);
    border-radius: 8px;
    padding: 0 17px;
    background: rgba(13, 25, 38, 0.82);
    font-size: 1rem;
}

.login-card .field input:focus {
    outline: none;
    border-color: #5da0ff;
    box-shadow: 0 0 0 3px rgba(93, 160, 255, 0.18), 0 0 24px rgba(93, 160, 255, 0.22);
}

.login-card .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.login-submit,
.login-register {
    width: 100%;
    min-height: 54px;
    font-size: 1.05rem;
}

.login-register {
    color: #d4deea;
}

.login-error {
    margin: 0 0 18px;
}

.login-help {
    grid-column: 2;
    margin: 2px 0 0;
    color: #8f9eb0;
    text-align: center;
}

.login-help span {
    color: #5da0ff;
}

.auth-action-stack {
    display: grid;
    gap: 14px;
}

.auth-discord-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-discord-button.is-disabled {
    pointer-events: none;
    opacity: 0.58;
}

.auth-muted,
.field-help {
    margin: 0;
    color: #8f9eb0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.auth-discord-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-discord-profile img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(103, 132, 160, 0.5);
    background: rgba(10, 18, 28, 0.86);
}

.auth-discord-profile strong {
    display: block;
    font-size: 1.25rem;
}

.auth-discord-profile p {
    margin: 4px 0 0;
    color: #91a5bb;
}

.auth-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.auth-choice-card {
    min-height: 220px;
    display: grid;
    align-content: center;
    gap: 14px;
    padding: 28px;
    border: 1px solid rgba(103, 132, 160, 0.42);
    border-radius: 10px;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(19, 37, 57, 0.86), rgba(6, 13, 22, 0.9)),
        rgba(12, 21, 31, 0.82);
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-choice-card:hover,
.auth-choice-card:focus-visible {
    border-color: rgba(93, 160, 255, 0.76);
    box-shadow: 0 0 0 3px rgba(93, 160, 255, 0.16);
}

.auth-choice-card strong {
    font-size: 1.6rem;
}

.auth-choice-card p {
    margin: 0;
    color: #aebccc;
    line-height: 1.55;
}

main.sos-main {
    width: min(1560px, calc(100% - 32px));
}

footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding: 22px 0;
    color: var(--muted);
    font-size: 0.86rem;
}

footer p {
    margin: 0;
}

body.app-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 86% 8%, rgba(43, 105, 166, 0.26), transparent 29%),
        radial-gradient(circle at 8% 22%, rgba(24, 81, 132, 0.2), transparent 35%),
        linear-gradient(120deg, rgba(4, 13, 23, 0.98), rgba(8, 28, 48, 0.98) 48%, rgba(3, 12, 21, 0.99)),
        #050c14;
}

body.app-page::before,
body.app-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.app-page::before {
    background:
        linear-gradient(90deg, rgba(146, 184, 221, 0.052) 1px, transparent 1px),
        linear-gradient(0deg, rgba(146, 184, 221, 0.04) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: linear-gradient(180deg, black, transparent 92%);
}

body.app-page::after {
    right: -12%;
    left: auto;
    width: 44%;
    border: 1px solid rgba(125, 170, 220, 0.11);
    border-radius: 0 0 0 100%;
    box-shadow:
        inset 0 0 0 48px rgba(125, 170, 220, 0.025),
        inset 0 0 0 104px rgba(125, 170, 220, 0.016);
}

.app-page .site-header {
    position: relative;
    z-index: 2;
    border-bottom: 0;
    background: transparent;
}

.app-page .site-nav {
    width: min(1360px, calc(100% - 64px));
    min-height: 104px;
}

.app-page .site-brand {
    gap: 14px;
    font-size: 1.12rem;
    font-weight: 800;
}

.app-page .site-brand img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 18px rgba(85, 161, 255, 0.28));
}

.app-page .site-nav__links a {
    min-width: 108px;
    min-height: 46px;
    border-color: rgba(103, 132, 160, 0.38);
    border-radius: 8px;
    color: #d7e2ef;
    background: rgba(7, 21, 34, 0.48);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.app-page .site-nav__links a:hover {
    border-color: rgba(111, 167, 226, 0.64);
    background: rgba(17, 43, 67, 0.74);
}

.app-page main {
    position: relative;
    z-index: 1;
    width: min(1360px, calc(100% - 64px));
    padding: 32px 0 72px;
}

.app-page footer {
    position: relative;
    z-index: 1;
    width: min(1360px, calc(100% - 64px));
    border-top-color: rgba(98, 128, 160, 0.28);
}

.app-page .dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    max-width: none;
    gap: 28px;
    margin: 26px 0 32px;
    border-left: 3px solid rgba(240, 199, 102, 0.82);
    border-bottom: 1px solid rgba(98, 128, 160, 0.28);
    padding: 2px 0 28px 26px;
}

.app-page .dashboard-hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 5vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.app-page .dashboard-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #a8b6c8;
    font-size: 1.08rem;
}

.app-page .eyebrow {
    color: var(--brand-strong);
    font-weight: 850;
    letter-spacing: 0.04em;
}

.app-page .logout-link,
.app-page .button,
.app-page .module-card__action {
    border-radius: 8px;
    text-decoration: none;
}

.app-page .logout-link,
.app-page .button--secondary {
    border-color: rgba(103, 132, 160, 0.42);
    color: #d7e2ef;
    background: rgba(7, 21, 34, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.app-page .logout-link:hover,
.app-page .button--secondary:hover {
    border-color: rgba(111, 167, 226, 0.64);
    color: #fff;
    background: rgba(17, 43, 67, 0.78);
}

.app-page .button:not(.button--secondary):not(.button--danger) {
    border-color: rgba(240, 199, 102, 0.74);
    color: #11151b;
    background: linear-gradient(180deg, #ffd979, #f0c766);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.app-page .button:not(.button--secondary):not(.button--danger):hover {
    background: linear-gradient(180deg, #ffe39a, #ffd16b);
}

.app-page .button--danger {
    border-color: rgba(239, 100, 100, 0.68);
    background: linear-gradient(180deg, rgba(191, 56, 56, 0.96), rgba(143, 32, 32, 0.96));
}

.app-page .admin-panel,
.app-page .form-card,
.app-page .stat-card,
.app-page .detail-card,
.app-page .empty-state,
.app-page .danger-zone {
    border: 1px solid rgba(82, 112, 145, 0.42);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(19, 43, 66, 0.76), rgba(7, 17, 28, 0.92)),
        rgba(10, 24, 38, 0.84);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.app-page .admin-panel,
.app-page .form-card,
.app-page .detail-card {
    backdrop-filter: blur(10px);
}

.app-page .admin-panel--table {
    overflow: hidden;
    padding: 0;
}

.app-page .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
}

.app-page .stat-card {
    position: relative;
    overflow: hidden;
}

.app-page .stat-card::before,
.app-page .admin-panel::before,
.app-page .form-card::before,
.app-page .detail-card::before,
.app-page .empty-state::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 2px solid rgba(95, 157, 218, 0.42);
    pointer-events: none;
}

.app-page .form-card,
.app-page .detail-card,
.app-page .empty-state,
.app-page .stat-card {
    position: relative;
}

.app-page .admin-panel {
    position: relative;
    overflow: hidden;
}

.app-page .admin-panel h2,
.app-page .detail-card h2,
.app-page .empty-state h2 {
    color: #f7fbff;
}

.app-page .admin-panel p,
.app-page .empty-state p,
.app-page .table-meta,
.app-page .field-hint {
    color: #a8b6c8;
}

.app-page .page-actions {
    gap: 12px;
}

.app-page .page-actions--top {
    margin-bottom: 20px;
}

.app-page .field label,
.app-page .field-label,
.app-page .detail-label,
.app-page .stat-card__label {
    color: #a9c9ef;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.app-page .field input,
.app-page .field select,
.app-page .field textarea,
.app-page .custom-multi-select summary {
    border-color: rgba(84, 116, 150, 0.58);
    border-radius: 8px;
    color: #f6f9fc;
    background: rgba(3, 11, 18, 0.78);
}

.app-page .field input:focus,
.app-page .field select:focus,
.app-page .field textarea:focus,
.app-page .custom-multi-select[open] summary {
    border-color: #6ea8ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 160, 255, 0.16), 0 0 24px rgba(93, 160, 255, 0.16);
}

.app-page .field input:disabled,
.app-page .field select:disabled,
.app-page .field textarea:disabled {
    color: #9fb1c5;
    background: rgba(25, 39, 58, 0.58);
}

.app-page .custom-multi-select__panel {
    border-color: rgba(103, 132, 160, 0.62);
    background: rgba(5, 15, 24, 0.98);
}

.app-page .checkbox-group {
    border-color: rgba(84, 116, 150, 0.52);
    background: rgba(3, 11, 18, 0.54);
}

.app-page .data-table {
    background: transparent;
}

.app-page .data-table th {
    color: #a9c9ef;
    background: rgba(255, 255, 255, 0.055);
    font-weight: 850;
}

.app-page .data-table td {
    border-bottom-color: rgba(98, 128, 160, 0.24);
}

.app-page .data-table tbody tr:hover td {
    background: rgba(93, 160, 255, 0.045);
}

.app-page .admin-user-row {
    cursor: pointer;
}

.app-page .admin-user-detail-row {
    display: none;
}

.app-page .admin-user-detail-row.is-open {
    display: table-row;
}

.app-page .admin-user-detail {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(103, 132, 160, 0.32);
    border-radius: 8px;
    background: rgba(3, 11, 18, 0.34);
}

.app-page .admin-user-detail .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.app-page .admin-user-detail strong {
    display: block;
    margin-top: 5px;
    color: #f6f9fc;
}

.app-page .admin-user-edit-form {
    display: grid;
    grid-template-columns: minmax(220px, 420px) max-content;
    gap: 12px;
    align-items: end;
}

.app-page .admin-user-civilians ul {
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.app-page .admin-user-civilians li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(103, 132, 160, 0.26);
    border-radius: 8px;
    background: rgba(6, 18, 30, 0.64);
}

.app-page .notice {
    border-color: rgba(79, 191, 143, 0.5);
    background: rgba(14, 82, 61, 0.3);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.app-page .notice--error {
    border-color: rgba(228, 95, 95, 0.62);
    background: rgba(114, 28, 36, 0.34);
}

.app-page .status-badge,
.app-page .priority-badge,
.app-page .marker-chip {
    border-radius: 999px;
    font-weight: 850;
}

.app-page .search-card {
    margin-bottom: 20px;
}

.app-page .danger-zone {
    border-color: rgba(228, 95, 95, 0.52);
    background:
        linear-gradient(145deg, rgba(80, 22, 35, 0.62), rgba(7, 17, 28, 0.94)),
        rgba(10, 24, 38, 0.84);
}

.dashboard-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 92% 0%, rgba(35, 91, 147, 0.34), transparent 29%),
        radial-gradient(circle at 8% 18%, rgba(27, 83, 133, 0.2), transparent 34%),
        linear-gradient(120deg, rgba(4, 13, 23, 0.98), rgba(8, 28, 48, 0.98) 48%, rgba(3, 12, 21, 0.99)),
        #050c14;
}

.dashboard-page::before,
.dashboard-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.dashboard-page::before {
    background:
        linear-gradient(90deg, rgba(146, 184, 221, 0.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(146, 184, 221, 0.045) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: linear-gradient(180deg, black, transparent 90%);
}

.dashboard-page::after {
    right: -9%;
    left: auto;
    width: 42%;
    border: 1px solid rgba(125, 170, 220, 0.12);
    border-radius: 0 0 0 100%;
    box-shadow:
        inset 0 0 0 48px rgba(125, 170, 220, 0.025),
        inset 0 0 0 100px rgba(125, 170, 220, 0.018);
}

.dashboard-page .site-header {
    position: relative;
    z-index: 2;
    border-bottom: 0;
    background: transparent;
}

.dashboard-page .site-nav {
    width: min(1360px, calc(100% - 64px));
    min-height: 104px;
}

.dashboard-page .site-brand {
    gap: 14px;
    font-size: 1.12rem;
    font-weight: 800;
}

.dashboard-page .site-brand img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 18px rgba(85, 161, 255, 0.28));
}

.dashboard-page .site-nav__links a {
    min-width: 108px;
    min-height: 46px;
    border-color: rgba(103, 132, 160, 0.38);
    border-radius: 8px;
    color: #d7e2ef;
    background: rgba(7, 21, 34, 0.48);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.dashboard-page .site-nav__links a:hover {
    border-color: rgba(111, 167, 226, 0.64);
    background: rgba(17, 43, 67, 0.74);
}

.dashboard-main {
    position: relative;
    z-index: 1;
    width: min(1360px, calc(100% - 64px));
    padding: 32px 0 70px;
}

.dashboard-hero {
    display: block;
    max-width: 720px;
    margin: 26px 0 50px;
    border-left: 3px solid rgba(240, 199, 102, 0.82);
    padding: 2px 0 4px 26px;
}

.dashboard-hero h1 {
    margin: 0;
    font-size: clamp(3rem, 6vw, 4.9rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.dashboard-hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #a8b6c8;
    font-size: 1.12rem;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--brand-strong);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.logout-link {
    flex: 0 0 auto;
}

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

.module-card {
    position: relative;
    min-height: 218px;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    overflow: hidden;
    border: 1px solid rgba(82, 112, 145, 0.42);
    border-radius: 8px;
    padding: 30px 24px;
    color: var(--text);
    background:
        linear-gradient(145deg, rgba(19, 43, 66, 0.78), rgba(7, 17, 28, 0.92)),
        rgba(10, 24, 38, 0.86);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
    text-decoration: none;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.system-card-form {
    display: flex;
}

.system-card-form .module-card {
    width: 100%;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.module-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 3px solid var(--card-accent, var(--brand));
    background:
        radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--card-accent) 24%, transparent), transparent 36%),
        linear-gradient(90deg, color-mix(in srgb, var(--card-accent) 10%, transparent), transparent 42%);
    opacity: 0.8;
    pointer-events: none;
}

.module-card:hover {
    border-color: color-mix(in srgb, var(--card-accent) 60%, var(--border-strong));
    transform: translateY(-3px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.module-card:focus-visible {
    outline: 3px solid var(--brand-strong);
    outline-offset: 3px;
}

.module-card__media {
    position: relative;
    z-index: 1;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(95, 132, 166, 0.38);
    border-radius: 50%;
    background: rgba(6, 17, 29, 0.72);
}

.module-card__media img {
    max-width: 76%;
    max-height: 76%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.12));
}

.module-card__media span {
    color: var(--card-accent, var(--brand-strong));
    font-size: 1.4rem;
    font-weight: 900;
}

.module-card__content {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    gap: 12px;
}

.module-card__title {
    display: block;
    margin-top: 2px;
    font-size: 1.52rem;
    font-weight: 800;
    line-height: 1.15;
}

.module-card__description {
    display: block;
    color: #a9b8ca;
    line-height: 1.5;
}

.module-card__action {
    width: fit-content;
    min-width: 150px;
    margin-top: 12px;
    border-color: rgba(106, 137, 166, 0.42);
    color: var(--text);
    background: rgba(5, 17, 29, 0.48);
    font-weight: 750;
}

.module-card__action span {
    margin-left: 12px;
    font-size: 1.3rem;
    line-height: 1;
}

.module-card--blue {
    --card-accent: #5aa7ff;
}

.module-card--navy {
    --card-accent: #1f4f8f;
}

.module-card--gold {
    --card-accent: #d6ad4f;
}

.module-card--transport {
    --card-accent: #0069b4;
}

.module-card--traffic {
    --card-accent: #b76a2f;
}

.module-card--green {
    --card-accent: #4fbf8f;
}

.module-card--red {
    --card-accent: #e45f5f;
}

.module-card--teal {
    --card-accent: #53c6c0;
}

.module-card--gray {
    --card-accent: #8f98a3;
}

.module-card--violet {
    --card-accent: #a990ff;
}

.module-card--steel {
    --card-accent: #8fb3d9;
}

.empty-state {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    background: var(--panel-bg);
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.admin-panel,
.form-card,
.stat-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 34, 50, 0.94), rgba(18, 26, 36, 0.98));
    box-shadow: var(--shadow);
}

.admin-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
}

.admin-panel--table {
    display: block;
    padding: 0;
    overflow: hidden;
}

.admin-panel h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.admin-panel p {
    max-width: 660px;
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    padding: 20px;
}

.stat-card__label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.page-actions--top {
    margin-bottom: 18px;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 173, 79, 0.52);
    border-radius: 8px;
    padding: 0 15px;
    color: #11151b;
    background: var(--brand-strong);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: #ffd878;
}

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

.button:disabled:hover {
    background: var(--brand-strong);
}

.button--secondary {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.05);
}

.button--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.button--active {
    color: #11151b;
    border-color: var(--brand-strong);
    background: var(--brand-strong);
}

.button--active:hover {
    background: #ffd878;
}

.button--danger {
    color: #fff;
    border-color: rgba(228, 95, 95, 0.65);
    background: rgba(160, 44, 44, 0.92);
}

.button--danger:hover {
    background: rgba(190, 55, 55, 0.96);
}

.button--small {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.86rem;
}

.notice {
    margin-bottom: 18px;
    border: 1px solid rgba(79, 191, 143, 0.42);
    border-radius: 8px;
    padding: 14px 16px;
    color: #d9fff0;
    background: rgba(29, 93, 68, 0.26);
}

.notice--error {
    border-color: rgba(228, 95, 95, 0.56);
    color: #ffe3e3;
    background: rgba(125, 38, 38, 0.28);
}

.notice p {
    margin: 0;
}

.notice p + p {
    margin-top: 6px;
}

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

.data-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.data-table--compact {
    min-width: 760px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.78rem;
    text-transform: uppercase;
}

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

.table-meta {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 0 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
    font-weight: 700;
}

.status-badge--active {
    color: #d9fff0;
    border-color: rgba(79, 191, 143, 0.5);
    background: rgba(79, 191, 143, 0.16);
}

.status-badge--danger {
    color: #ffe4e4;
    border-color: rgba(228, 95, 95, 0.55);
    background: rgba(160, 44, 44, 0.2);
}

.marker-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.marker-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid rgba(79, 191, 143, 0.46);
    border-radius: 999px;
    padding: 0 9px;
    color: #d9fff0;
    background: rgba(79, 191, 143, 0.14);
    font-size: 0.74rem;
    font-weight: 800;
}

.marker-chip--danger {
    color: #ffe4e4;
    border-color: rgba(228, 95, 95, 0.68);
    background: rgba(160, 44, 44, 0.28);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.checkbox-group--dense {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

.vehicle-marker-group {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.vehicle-marker-group label {
    min-width: 0;
    line-height: 1.25;
    white-space: normal;
}

.vehicle-marker-group input[type="checkbox"] {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
}

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

.inline-form {
    display: inline-flex;
    margin: 0;
}

.form-card {
    padding: 24px;
}

.user-type-card {
    margin-top: 18px;
}

.user-search-card {
    margin-bottom: 18px;
}

.user-type-card + .admin-panel--table {
    margin-top: 18px;
}

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    border: 1px solid rgba(228, 95, 95, 0.46);
    border-radius: 8px;
    padding: 20px 24px;
    background: rgba(125, 38, 38, 0.16);
}

.danger-zone h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.danger-zone p {
    margin: 0;
    color: var(--muted);
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label,
.field-label {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--text);
    background: rgba(6, 10, 15, 0.76);
    font: inherit;
}

.field textarea {
    min-height: 140px;
    padding: 12px;
    resize: vertical;
    line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--brand-strong);
    outline: 2px solid rgba(240, 199, 102, 0.25);
    outline-offset: 2px;
}

.field--full {
    grid-column: 1 / -1;
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.field-with-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.field-inline-badge {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--brand-strong);
    background: rgba(6, 10, 15, 0.5);
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.repeatable-list {
    display: grid;
    gap: 10px;
}

.repeatable-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.custom-multi-select {
    position: relative;
}

.custom-multi-select summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--text);
    background: rgba(6, 10, 15, 0.76);
    cursor: pointer;
    list-style: none;
}

.custom-multi-select summary::-webkit-details-marker {
    display: none;
}

.custom-multi-select summary::after {
    content: "▾";
    color: var(--muted);
    font-size: 0.8rem;
}

.custom-multi-select[open] summary {
    border-color: var(--brand-strong);
}

.custom-multi-select__panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px;
    background: #091018;
    box-shadow: var(--shadow);
}

.custom-multi-select__panel p {
    margin: 8px;
    color: var(--muted);
}

.custom-multi-select__option {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    padding: 8px;
    color: var(--text);
    cursor: pointer;
}

.custom-multi-select__option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.custom-multi-select__option input {
    width: 18px;
    min-height: 18px;
}

.field--checkbox {
    justify-content: flex-end;
}

.field--checkbox label {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.field--checkbox input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--brand-strong);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.search-card {
    margin-bottom: 18px;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.police-summary {
    margin-bottom: 18px;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid rgba(240, 199, 102, 0.5);
    border-radius: 8px;
    padding: 0 10px;
    color: #ffe8a5;
    background: rgba(214, 173, 79, 0.16);
    font-size: 0.82rem;
    font-weight: 700;
}

.priority-badge--1 {
    color: #ffe3e3;
    border-color: rgba(228, 95, 95, 0.65);
    background: rgba(160, 44, 44, 0.28);
}

.priority-badge--2 {
    color: #fff0c4;
    border-color: rgba(240, 199, 102, 0.62);
    background: rgba(214, 173, 79, 0.22);
}

.priority-badge--3 {
    color: #dcecff;
    border-color: rgba(90, 167, 255, 0.54);
    background: rgba(90, 167, 255, 0.16);
}

.priority-badge--4 {
    color: #d9fff0;
    border-color: rgba(79, 191, 143, 0.5);
    background: rgba(79, 191, 143, 0.14);
}

.detail-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(22, 34, 50, 0.94), rgba(18, 26, 36, 0.98));
    box-shadow: var(--shadow);
}

.detail-card--spaced {
    margin-top: 18px;
}

.call-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.detail-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.call-detail-grid strong {
    display: block;
    line-height: 1.35;
}

.call-description {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.detail-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.detail-section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.call-description p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.civilian-marker-panel {
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: rgba(6, 10, 15, 0.32);
}

.civilian-marker-panel--alert {
    border-color: rgba(228, 95, 95, 0.58);
    background: rgba(125, 38, 38, 0.22);
}

.civilian-marker-panel p {
    margin: 10px 0 0;
    line-height: 1.5;
}

.call-report-list {
    display: grid;
    gap: 12px;
}

.call-report-entry {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    background: rgba(6, 10, 15, 0.36);
}

.call-report-entry header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.86rem;
}

.call-report-entry header strong {
    color: var(--text);
}

.call-report-entry__separator {
    color: var(--muted);
    opacity: 0.72;
}

.call-report-entry time {
    color: var(--muted);
    white-space: nowrap;
}

.call-report-entry p,
.call-report-empty {
    margin: 0;
    line-height: 1.55;
}

.call-report-empty {
    color: var(--muted);
}

.crime-entry-list {
    display: grid;
    gap: 12px;
}

.crime-entry {
    display: grid;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: rgba(6, 10, 15, 0.34);
}

.crime-entry header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.crime-entry__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.crime-entry h3 {
    margin: 0;
    font-size: 1.18rem;
}

.crime-entry p {
    margin: 0;
    line-height: 1.55;
}

.crime-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.crime-entry-grid dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.crime-entry-grid dd {
    margin: 4px 0 0;
    line-height: 1.4;
}

.crime-entry__history {
    color: var(--muted);
    font-size: 0.9rem;
}

.crime-entry__notes {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.registry-add-panel {
    width: min(100%, 720px);
}

.registry-add-panel summary {
    list-style: none;
    cursor: pointer;
}

.registry-add-panel summary::-webkit-details-marker {
    display: none;
}

.registry-add-panel[open] {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    background: rgba(6, 10, 15, 0.28);
}

.registry-add-panel[open] summary {
    margin-bottom: 14px;
}

.registry-add-form {
    gap: 14px;
}

.description-edit-form {
    margin-top: 8px;
}

.sos-priority-form {
    display: grid;
    grid-template-columns: minmax(180px, 260px) auto;
    gap: 12px;
    align-items: end;
    margin-top: 14px;
}

.unit-add-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
}

.sos-operations-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.sos-units-panel,
.sos-calls-panel {
    min-width: 0;
}

.sos-units-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(22, 34, 50, 0.94), rgba(18, 26, 36, 0.98));
    box-shadow: var(--shadow);
}

.sos-units-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.sos-units-panel__header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.sos-units-panel__hint {
    border: 1px solid rgba(79, 191, 143, 0.5);
    border-radius: 999px;
    padding: 4px 8px;
    color: #d9fff0;
    background: rgba(79, 191, 143, 0.14);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sos-unit-list {
    display: grid;
    gap: 10px;
}

.sos-unit-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.sos-unit-card--available {
    border-color: rgba(79, 191, 143, 0.58);
    background: rgba(23, 94, 64, 0.36);
}

.sos-unit-card--busy {
    border-color: rgba(240, 199, 102, 0.62);
    background: rgba(126, 96, 30, 0.36);
}

.sos-unit-card--standby {
    border-color: rgba(174, 183, 194, 0.58);
    background: rgba(76, 83, 92, 0.42);
}

.sos-unit-card--request {
    box-shadow: inset 0 0 0 2px rgba(240, 199, 102, 0.48);
}

.sos-unit-card--emergency {
    border-color: rgba(255, 90, 90, 0.92);
    background: rgba(155, 0, 0, 0.82);
    animation: sosEmergencyBlink 0.75s infinite;
}

.sos-unit-card--akut {
    color: #fff;
    border-color: rgba(255, 197, 72, 0.94);
    background: rgba(174, 95, 0, 0.88);
    animation: sosAkutBlink 0.75s infinite;
}

.sos-unit-card--akut .sos-unit-card__meta,
.sos-unit-card--akut .sos-unit-card__top span {
    color: #fff;
}

.sos-unit-card--akut .sos-unit-card__top span {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(80, 42, 0, 0.3);
}

.sos-unit-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sos-unit-card__top strong {
    font-size: 1.15rem;
}

.sos-unit-card__top span {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
}

.sos-unit-card__meta {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    color: #d6e0eb;
    font-size: 0.86rem;
}

.sos-call-request-badge {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 3px;
    margin-top: 12px;
    border: 1px solid rgba(240, 199, 102, 0.78);
    border-radius: 8px;
    padding: 8px 10px;
    color: #11151b;
    background: var(--brand-strong);
    font: inherit;
    font-weight: 800;
    line-height: 1.12;
    text-align: left;
    cursor: pointer;
    animation: sosRequestBlink 1s infinite;
}

.sos-call-request-badge span,
.sos-call-request-badge small {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.sos-call-request-badge small {
    font-size: 0.78rem;
    text-transform: uppercase;
}

.sos-call-request-badge:disabled {
    cursor: wait;
    opacity: 0.66;
}

.sos-call-request-badge--emergency {
    color: #fff;
    border-color: rgba(255, 230, 230, 0.82);
    background: #d00000;
}

.sos-call-request-badge--akut {
    color: #fff;
    border-color: rgba(255, 244, 205, 0.9);
    background: #d77b00;
}

.sos-call-list-panel {
    display: grid;
    gap: 10px;
}

.sos-call-list-header,
.sos-call-summary {
    display: grid;
    grid-template-columns: minmax(110px, 1.1fr) minmax(92px, 0.8fr) minmax(130px, 1.3fr) minmax(110px, 1fr) minmax(120px, 1fr) minmax(110px, 1fr) minmax(92px, 0.8fr) minmax(138px, 1.1fr) minmax(110px, 0.9fr);
    gap: 14px;
    align-items: center;
}

.sos-call-list-header {
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    padding: 14px 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sos-call-list {
    display: grid;
    gap: 10px;
}

.sos-call-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 34, 50, 0.94), rgba(18, 26, 36, 0.98));
    box-shadow: var(--shadow);
}

.sos-call-card[open] {
    border-color: var(--border-strong);
}

.sos-call-summary {
    min-height: 74px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.sos-call-summary--history {
    grid-template-columns: minmax(130px, 1.3fr) minmax(92px, 0.8fr) minmax(150px, 1.4fr) minmax(130px, 1fr) minmax(150px, 1fr) minmax(110px, 0.8fr);
}

.sos-call-summary::-webkit-details-marker {
    display: none;
}

.sos-call-summary:hover {
    background: rgba(255, 255, 255, 0.035);
}

.sos-call-summary__cell {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.sos-call-summary__cell small {
    display: none;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sos-call-summary__cell strong,
.sos-call-summary__cell span,
.sos-call-summary__cell time {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sos-call-summary__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.sos-unit-lines {
    display: grid;
    gap: 4px;
}

.sos-unit-lines span {
    display: block;
}

.sos-report-notice {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(240, 199, 102, 0.68);
    border-radius: 8px;
    padding: 0 9px;
    color: #fff0c4;
    background: rgba(126, 96, 30, 0.36);
    font-size: 0.78rem;
    font-weight: 800;
    animation: sosRequestBlink 1s infinite;
}

.sos-report-notice--hidden {
    display: none;
}

.sos-call-expanded {
    border-top: 1px solid var(--border);
    padding: 18px 20px 20px;
}

.sos-call-expanded-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.sos-call-expanded-section {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.sos-call-expanded-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

@keyframes sosRequestBlink {
    0%,
    100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.32);
    }
}

@keyframes sosEmergencyBlink {
    0%,
    100% {
        background: rgba(155, 0, 0, 0.82);
        box-shadow: 0 0 0 rgba(255, 90, 90, 0);
    }
    50% {
        background: rgba(220, 0, 0, 0.98);
        box-shadow: 0 0 24px rgba(255, 70, 70, 0.45);
    }
}

@keyframes sosAkutBlink {
    0%,
    100% {
        background: rgba(174, 95, 0, 0.88);
        box-shadow: 0 0 0 rgba(255, 179, 38, 0);
    }
    50% {
        background: rgba(238, 145, 0, 0.98);
        box-shadow: 0 0 24px rgba(255, 179, 38, 0.48);
    }
}

body.sos-page {
    color-scheme: light;
    --page-bg: #f3f1ff;
    --panel-bg: rgba(255, 255, 255, 0.66);
    --panel-bg-strong: rgba(255, 255, 255, 0.82);
    --border: rgba(116, 105, 194, 0.18);
    --border-strong: rgba(98, 82, 210, 0.36);
    --text: #171936;
    --muted: #6d7192;
    --brand: #6b5ce7;
    --brand-strong: #5f48d8;
    --shadow: 0 24px 70px rgba(89, 76, 174, 0.16);
    min-height: 100vh;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 243, 255, 0.82) 32%, rgba(221, 215, 255, 0.74) 100%),
        #f3f1ff;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

body.sos-page::before,
body.sos-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body.sos-page::before {
    background:
        linear-gradient(132deg, transparent 0 18%, rgba(143, 131, 229, 0.14) 18% 28%, transparent 28% 100%),
        linear-gradient(42deg, transparent 0 48%, rgba(111, 94, 214, 0.12) 48% 58%, transparent 58% 100%),
        linear-gradient(90deg, rgba(105, 88, 214, 0.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(105, 88, 214, 0.04) 1px, transparent 1px);
    background-size: auto, auto, 94px 94px, 94px 94px;
}

body.sos-page::after {
    inset: 76px 0 0;
    background:
        conic-gradient(from 218deg at 18% 48%, transparent 0deg, rgba(136, 123, 226, 0.18) 66deg, transparent 122deg),
        conic-gradient(from 18deg at 72% 60%, transparent 0deg, rgba(255, 255, 255, 0.66) 58deg, rgba(127, 112, 219, 0.16) 128deg, transparent 184deg),
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(221, 214, 255, 0.18));
    filter: blur(0.2px);
    opacity: 0.92;
}

.sos-page .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(109, 96, 199, 0.16);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 38px rgba(69, 58, 160, 0.13);
    backdrop-filter: blur(18px);
}

.sos-page .site-nav {
    width: min(1536px, calc(100% - 48px));
    min-height: 82px;
}

.sos-page .site-brand {
    gap: 12px;
    color: #161735;
    font-size: 1.26rem;
    font-weight: 900;
}

.sos-page .site-brand img {
    width: 35px;
    height: 35px;
    border-radius: 0;
    object-fit: contain;
    filter: drop-shadow(0 7px 14px rgba(93, 72, 216, 0.18));
}

.sos-page .site-nav__links a {
    min-width: 118px;
    min-height: 44px;
    border-color: rgba(95, 72, 216, 0.22);
    border-radius: 9px;
    color: #302d6a;
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 8px 22px rgba(95, 72, 216, 0.08);
    font-weight: 800;
}

.sos-page .site-nav__links a:hover {
    border-color: rgba(95, 72, 216, 0.44);
    color: #fff;
    background: linear-gradient(135deg, #7460ea, #5841ce);
}

.sos-page main,
.sos-page footer {
    position: relative;
    z-index: 1;
    width: min(1540px, calc(100% - 80px));
}

.sos-page main {
    padding: 74px 0 78px;
}

.sos-page footer {
    border-top-color: rgba(105, 93, 184, 0.18);
    color: rgba(43, 44, 79, 0.68);
}

.sos-page .dashboard-hero {
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin: 0 0 54px;
    border: 0;
    padding: 0 0 0 30px;
}

.sos-page .dashboard-hero::before {
    content: "";
    width: 3px;
    align-self: stretch;
    min-height: 124px;
    margin-left: -30px;
    background: linear-gradient(180deg, #6d5ce7, #b7a9ff);
    border-radius: 999px;
}

.sos-page .dashboard-hero > div {
    flex: 1 1 auto;
}

.sos-page .dashboard-hero h1 {
    margin: 12px 0 0;
    color: #151735;
    font-size: clamp(3rem, 5.7vw, 5rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.sos-page .dashboard-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #30324e;
    font-size: 1.08rem;
    line-height: 1.55;
}

.sos-page .eyebrow,
.sos-page .detail-label,
.sos-page .field label,
.sos-page .field-label {
    color: #6252dc;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.sos-page .logout-link,
.sos-page .button {
    min-height: 44px;
    border-color: rgba(95, 72, 216, 0.22);
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #7562ee, #5a42d1);
    box-shadow: 0 12px 28px rgba(95, 72, 216, 0.22);
    font-weight: 850;
}

.sos-page .logout-link:hover,
.sos-page .button:hover {
    border-color: rgba(95, 72, 216, 0.44);
    color: #fff;
    background: linear-gradient(135deg, #816fff, #5138c9);
}

.sos-page .button--secondary,
.sos-page .logout-link {
    color: #302d6a;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 10px 24px rgba(83, 72, 164, 0.1);
}

.sos-page .button--secondary:hover,
.sos-page .logout-link:hover {
    color: #fff;
    background: linear-gradient(135deg, #7562ee, #5a42d1);
}

.sos-page .button--danger {
    border-color: rgba(255, 78, 93, 0.24);
    color: #ef3f52;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 24px rgba(255, 78, 93, 0.12);
}

.sos-page .button--danger:hover {
    color: #fff;
    background: linear-gradient(135deg, #ff6370, #ee344a);
}

.sos-page .button--small {
    min-height: 36px;
}

.sos-page .page-actions--top {
    margin: -18px 0 28px;
}

.sos-page .sos-page-actions {
    justify-content: space-between;
}

.sos-page-actions__right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.sos-page .notice {
    border-color: rgba(77, 193, 154, 0.28);
    color: #146b56;
    background: rgba(240, 255, 250, 0.74);
    box-shadow: 0 14px 32px rgba(58, 169, 132, 0.09);
}

.sos-page .notice--error {
    border-color: rgba(255, 78, 93, 0.28);
    color: #a52738;
    background: rgba(255, 241, 244, 0.84);
}

.sos-page .sos-operations-layout {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.sos-page .sos-units-panel,
.sos-page .sos-calls-panel,
.sos-page .form-card,
.sos-page .detail-card,
.sos-page .empty-state {
    border: 1px solid rgba(112, 100, 195, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.sos-page .form-card,
.sos-page .detail-card {
    padding: 28px;
}

.sos-page .sos-units-panel {
    padding: 24px;
}

.sos-page .sos-units-panel__header h2,
.sos-page .detail-section-header h2,
.sos-page .empty-state h2,
.sos-page .danger-zone h2 {
    color: #171936;
}

.sos-page .sos-units-panel__hint {
    border-color: rgba(48, 197, 151, 0.22);
    color: #249274;
    background: rgba(234, 255, 249, 0.9);
}

.sos-page .sos-unit-list {
    gap: 12px;
}

.sos-page .sos-unit-card {
    border-color: rgba(115, 105, 190, 0.14);
    border-radius: 10px;
    padding: 16px;
    color: #242548;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.sos-page .sos-unit-card--available {
    border-color: rgba(62, 194, 150, 0.28);
    background: linear-gradient(180deg, rgba(244, 255, 251, 0.92), rgba(255, 255, 255, 0.64));
}

.sos-page .sos-unit-card--busy {
    border-color: rgba(242, 178, 70, 0.36);
    background: linear-gradient(180deg, rgba(255, 248, 231, 0.94), rgba(255, 255, 255, 0.66));
}

.sos-page .sos-unit-card--standby {
    border-color: rgba(128, 136, 149, 0.3);
    background: linear-gradient(180deg, rgba(231, 234, 239, 0.94), rgba(247, 248, 250, 0.72));
}

.sos-page .sos-unit-card--request {
    box-shadow: inset 0 0 0 2px rgba(103, 83, 222, 0.18), 0 16px 32px rgba(103, 83, 222, 0.12);
}

.sos-page .sos-unit-card--emergency {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.62);
    background: #e3263a;
}

.sos-page .sos-unit-card--akut {
    color: #fff;
    border-color: rgba(255, 225, 145, 0.72);
}

.sos-page .sos-unit-card__top strong {
    color: inherit;
    font-size: 1.18rem;
}

.sos-page .sos-unit-card__top span {
    border-color: rgba(95, 72, 216, 0.16);
    color: #6753e4;
    background: rgba(246, 243, 255, 0.95);
}

.sos-page .sos-unit-card__meta {
    color: #626681;
}

.sos-page .sos-unit-card--emergency .sos-unit-card__meta,
.sos-page .sos-unit-card--emergency .sos-unit-card__top span {
    color: #fff;
}

.sos-page .sos-unit-card--akut .sos-unit-card__meta,
.sos-page .sos-unit-card--akut .sos-unit-card__top span {
    color: #fff;
}

.sos-page .sos-unit-card--emergency .sos-unit-card__top span {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.sos-page .sos-unit-card--akut .sos-unit-card__top span {
    background: rgba(90, 48, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.34);
}

.sos-page .sos-call-request-badge {
    border-color: rgba(103, 83, 222, 0.24);
    color: #fff;
    background: linear-gradient(135deg, #7562ee, #5a42d1);
    box-shadow: 0 10px 24px rgba(95, 72, 216, 0.2);
}

.sos-page .sos-call-request-badge--emergency {
    border-color: rgba(255, 255, 255, 0.66);
    background: linear-gradient(135deg, #ff384b, #d70018);
}

.sos-page .sos-call-request-badge--akut {
    border-color: rgba(255, 245, 211, 0.82);
    background: linear-gradient(135deg, #f6a817, #c96b00);
    box-shadow: 0 10px 24px rgba(224, 126, 0, 0.28);
}

.sos-page .sos-call-list-header {
    border: 0;
    border-bottom: 1px solid rgba(116, 105, 194, 0.16);
    border-radius: 12px 12px 0 0;
    padding: 20px 26px;
    color: #72759a;
    background: rgba(255, 255, 255, 0.48);
    letter-spacing: 0.04em;
}

.sos-page .sos-call-list-header,
.sos-page .sos-call-summary {
    grid-template-columns:
        minmax(90px, 1.05fr)
        minmax(76px, 0.72fr)
        minmax(112px, 1.28fr)
        minmax(96px, 0.92fr)
        minmax(102px, 0.95fr)
        minmax(84px, 0.86fr)
        minmax(76px, 0.72fr)
        minmax(104px, 0.92fr)
        minmax(96px, 0.76fr);
    gap: 12px;
}

.sos-page .sos-call-list {
    gap: 0;
}

.sos-page .sos-call-card {
    overflow: hidden;
    border: 0;
    border-top: 1px solid rgba(116, 105, 194, 0.12);
    border-radius: 0;
    color: #171936;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.sos-page .sos-call-list .sos-call-card:first-child {
    border-top: 0;
}

.sos-page .sos-call-card[open] {
    background: rgba(255, 255, 255, 0.34);
}

.sos-page .sos-call-summary {
    min-height: 92px;
    padding: 22px 26px;
}

.sos-page .sos-call-summary:hover {
    background: rgba(246, 243, 255, 0.52);
}

.sos-page .sos-call-summary__cell small {
    color: #7a7d9e;
}

.sos-page .sos-call-summary__cell strong {
    color: #171936;
}

.sos-page .sos-call-summary__cell span,
.sos-page .sos-call-summary__cell time {
    color: #2d2f50;
}

.sos-page .priority-badge {
    border-color: rgba(255, 78, 93, 0.22);
    color: #f14455;
    background: rgba(255, 236, 239, 0.78);
}

.sos-page .priority-badge--2 {
    border-color: rgba(242, 178, 70, 0.28);
    color: #a96f13;
    background: rgba(255, 248, 231, 0.86);
}

.sos-page .priority-badge--3 {
    border-color: rgba(95, 72, 216, 0.22);
    color: #5f48d8;
    background: rgba(244, 241, 255, 0.92);
}

.sos-page .status-badge {
    border-color: rgba(102, 108, 145, 0.16);
    color: #626681;
    background: rgba(255, 255, 255, 0.58);
}

.sos-page .status-badge--active {
    border-color: rgba(48, 197, 151, 0.24);
    color: #18866b;
    background: rgba(229, 255, 247, 0.88);
}

.sos-page .sos-report-notice {
    border-color: rgba(242, 178, 70, 0.32);
    color: #9a6712;
    background: rgba(255, 245, 221, 0.9);
}

.sos-page .sos-call-expanded {
    border-top-color: rgba(116, 105, 194, 0.14);
    padding: 24px 26px 26px;
    background: rgba(255, 255, 255, 0.46);
}

.sos-page .sos-call-expanded-section,
.sos-page .call-description {
    border-top-color: rgba(116, 105, 194, 0.14);
}

.sos-page .field input,
.sos-page .field select,
.sos-page .field textarea,
.sos-page .custom-multi-select summary {
    border-color: rgba(116, 105, 194, 0.24);
    color: #171936;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.sos-page .field input::placeholder,
.sos-page .field textarea::placeholder {
    color: rgba(78, 81, 118, 0.55);
}

.sos-page .field input:focus,
.sos-page .field select:focus,
.sos-page .field textarea:focus,
.sos-page .custom-multi-select[open] summary {
    border-color: rgba(95, 72, 216, 0.66);
    outline: 3px solid rgba(95, 72, 216, 0.14);
}

.sos-page .field-hint,
.sos-page .call-report-empty,
.sos-page .empty-state p {
    color: #696d90;
}

.sos-page .custom-multi-select__panel {
    border-color: rgba(95, 72, 216, 0.28);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 46px rgba(89, 76, 174, 0.18);
}

.sos-page .custom-multi-select__option {
    color: #171936;
}

.sos-page .custom-multi-select__option:hover {
    background: rgba(244, 241, 255, 0.9);
}

.sos-page .data-table th,
.sos-page .data-table td {
    border-bottom-color: rgba(116, 105, 194, 0.14);
}

.sos-page .data-table th {
    color: #77799e;
    background: rgba(248, 246, 255, 0.68);
}

.sos-page .table-meta {
    color: #707492;
}

.sos-page .call-report-entry {
    border-color: rgba(116, 105, 194, 0.16);
    background: rgba(255, 255, 255, 0.6);
}

.sos-page .call-report-entry header,
.sos-page .call-report-entry time,
.sos-page .call-report-entry__separator {
    color: #6d7192;
}

.sos-page .call-report-entry header strong,
.sos-page .call-description p,
.sos-page .call-report-entry p {
    color: #171936;
}

.sos-page .danger-zone {
    border-color: rgba(255, 78, 93, 0.22);
    border-radius: 12px;
    background: rgba(255, 244, 246, 0.74);
    box-shadow: 0 18px 45px rgba(255, 78, 93, 0.1);
}

.sos-page .danger-zone p {
    color: #7f5761;
}

.sos-page .form-grid {
    gap: 22px;
}

.sos-page .unit-add-form {
    align-items: end;
}

.sos-page .empty-state {
    padding: 32px;
}

.sos-page .sos-theme-toggle {
    min-width: 126px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(95, 72, 216, 0.22);
    border-radius: 9px;
    color: #302d6a;
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 8px 22px rgba(95, 72, 216, 0.08);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.sos-page .sos-theme-toggle:hover {
    border-color: rgba(95, 72, 216, 0.44);
    color: #fff;
    background: linear-gradient(135deg, #7460ea, #5841ce);
}

.sos-theme-toggle__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #6b5ce7;
    box-shadow: 0 0 0 4px rgba(107, 92, 231, 0.12);
}

.sos-theme-dark body.sos-page {
    color-scheme: dark;
    --page-bg: #061421;
    --panel-bg: rgba(13, 31, 49, 0.82);
    --panel-bg-strong: rgba(17, 42, 67, 0.94);
    --border: rgba(116, 158, 202, 0.22);
    --border-strong: rgba(107, 170, 235, 0.42);
    --text: #f5f8ff;
    --muted: #9fb2c8;
    --brand: #6aa7ff;
    --brand-strong: #4f8fe6;
    --shadow: 0 26px 72px rgba(0, 0, 0, 0.34);
    color: var(--text);
    background:
        radial-gradient(circle at 80% 0%, rgba(53, 110, 165, 0.28), transparent 32%),
        linear-gradient(135deg, rgba(3, 12, 21, 0.98), rgba(8, 29, 48, 0.96) 58%, rgba(3, 10, 17, 0.99)),
        #061421;
}

.sos-theme-dark body.sos-page::before {
    background:
        linear-gradient(132deg, transparent 0 18%, rgba(88, 137, 188, 0.09) 18% 28%, transparent 28% 100%),
        linear-gradient(42deg, transparent 0 48%, rgba(91, 143, 196, 0.08) 48% 58%, transparent 58% 100%),
        linear-gradient(90deg, rgba(134, 181, 229, 0.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(134, 181, 229, 0.042) 1px, transparent 1px);
    background-size: auto, auto, 94px 94px, 94px 94px;
}

.sos-theme-dark body.sos-page::after {
    background:
        radial-gradient(circle at 74% 32%, rgba(67, 132, 194, 0.16), transparent 32%),
        conic-gradient(from 218deg at 18% 48%, transparent 0deg, rgba(62, 114, 168, 0.12) 66deg, transparent 122deg),
        linear-gradient(180deg, rgba(16, 43, 70, 0.32), rgba(3, 12, 21, 0.18));
    opacity: 0.98;
}

.sos-theme-dark .sos-page .site-header {
    border-bottom-color: rgba(121, 167, 215, 0.16);
    background: rgba(4, 14, 24, 0.84);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.sos-theme-dark .sos-page .site-brand,
.sos-theme-dark .sos-page .dashboard-hero h1,
.sos-theme-dark .sos-page .sos-units-panel__header h2,
.sos-theme-dark .sos-page .detail-section-header h2,
.sos-theme-dark .sos-page .empty-state h2,
.sos-theme-dark .sos-page .danger-zone h2,
.sos-theme-dark .sos-page .sos-call-summary__cell strong,
.sos-theme-dark .sos-page .call-report-entry header strong,
.sos-theme-dark .sos-page .call-description p,
.sos-theme-dark .sos-page .call-report-entry p {
    color: #f5f8ff;
}

.sos-theme-dark .sos-page .dashboard-hero p,
.sos-theme-dark .sos-page .sos-call-summary__cell span,
.sos-theme-dark .sos-page .sos-call-summary__cell time {
    color: #c8d5e6;
}

.sos-theme-dark .sos-page footer,
.sos-theme-dark .sos-page .field-hint,
.sos-theme-dark .sos-page .call-report-empty,
.sos-theme-dark .sos-page .empty-state p,
.sos-theme-dark .sos-page .table-meta,
.sos-theme-dark .sos-page .call-report-entry header,
.sos-theme-dark .sos-page .call-report-entry time,
.sos-theme-dark .sos-page .call-report-entry__separator {
    color: #93a9c2;
}

.sos-theme-dark .sos-page .eyebrow,
.sos-theme-dark .sos-page .detail-label,
.sos-theme-dark .sos-page .field label,
.sos-theme-dark .sos-page .field-label {
    color: #86bfff;
}

.sos-theme-dark .sos-page .site-nav__links a,
.sos-theme-dark .sos-page .sos-theme-toggle,
.sos-theme-dark .sos-page .button--secondary,
.sos-theme-dark .sos-page .logout-link {
    border-color: rgba(126, 171, 218, 0.24);
    color: #dcecff;
    background: rgba(12, 31, 51, 0.72);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.sos-theme-dark .sos-page .site-nav__links a:hover,
.sos-theme-dark .sos-page .sos-theme-toggle:hover,
.sos-theme-dark .sos-page .button--secondary:hover,
.sos-theme-dark .sos-page .logout-link:hover {
    border-color: rgba(123, 184, 246, 0.5);
    color: #fff;
    background: linear-gradient(135deg, #1f6fb2, #10395d);
}

.sos-theme-dark .sos-theme-toggle__dot {
    background: #76b7ff;
    box-shadow: 0 0 0 4px rgba(118, 183, 255, 0.16);
}

.sos-theme-dark .sos-page .button {
    background: linear-gradient(135deg, #2d89d8, #17517f);
    box-shadow: 0 14px 34px rgba(27, 100, 164, 0.22);
}

.sos-theme-dark .sos-page .dashboard-hero::before {
    background: linear-gradient(180deg, #6aa7ff, #d6ad4f);
}

.sos-theme-dark .sos-page .sos-units-panel,
.sos-theme-dark .sos-page .sos-calls-panel,
.sos-theme-dark .sos-page .form-card,
.sos-theme-dark .sos-page .detail-card,
.sos-theme-dark .sos-page .empty-state {
    border-color: rgba(126, 171, 218, 0.18);
    background: rgba(11, 27, 44, 0.78);
    box-shadow: var(--shadow);
}

.sos-theme-dark .sos-page .sos-unit-card {
    border-color: rgba(126, 171, 218, 0.16);
    color: #eaf3ff;
    background: rgba(10, 26, 43, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.sos-theme-dark .sos-page .sos-unit-card--available {
    border-color: rgba(63, 205, 158, 0.36);
    background: linear-gradient(180deg, rgba(13, 73, 55, 0.78), rgba(11, 38, 43, 0.76));
}

.sos-theme-dark .sos-page .sos-unit-card--busy {
    border-color: rgba(232, 172, 67, 0.42);
    background: linear-gradient(180deg, rgba(92, 65, 14, 0.78), rgba(45, 35, 21, 0.76));
}

.sos-theme-dark .sos-page .sos-unit-card--standby {
    border-color: rgba(159, 171, 184, 0.34);
    background: linear-gradient(180deg, rgba(60, 68, 78, 0.82), rgba(35, 42, 50, 0.78));
}

.sos-theme-dark .sos-page .sos-unit-card--akut {
    color: #fff;
    border-color: rgba(255, 205, 91, 0.76);
    animation: sosAkutBlink 0.75s infinite;
}

.sos-theme-dark .sos-page .sos-unit-card__top span {
    border-color: rgba(142, 192, 244, 0.2);
    color: #d9ecff;
    background: rgba(11, 32, 52, 0.82);
}

.sos-theme-dark .sos-page .sos-unit-card__meta {
    color: #bed0e4;
}

.sos-theme-dark .sos-page .sos-unit-card--akut .sos-unit-card__meta,
.sos-theme-dark .sos-page .sos-unit-card--akut .sos-unit-card__top span {
    color: #fff;
}

.sos-theme-dark .sos-page .sos-unit-card--akut .sos-unit-card__top span {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(80, 42, 0, 0.34);
}

.sos-theme-dark .sos-page .sos-call-list-header {
    border-bottom-color: rgba(126, 171, 218, 0.16);
    color: #91a8c2;
    background: rgba(18, 39, 62, 0.72);
}

.sos-theme-dark .sos-page .sos-call-card {
    border-top-color: rgba(126, 171, 218, 0.12);
    color: #f5f8ff;
}

.sos-theme-dark .sos-page .sos-call-card[open],
.sos-theme-dark .sos-page .sos-call-summary:hover,
.sos-theme-dark .sos-page .sos-call-expanded {
    background: rgba(13, 31, 49, 0.74);
}

.sos-theme-dark .sos-page .sos-call-expanded,
.sos-theme-dark .sos-page .sos-call-expanded-section,
.sos-theme-dark .sos-page .call-description,
.sos-theme-dark .sos-page .data-table th,
.sos-theme-dark .sos-page .data-table td {
    border-color: rgba(126, 171, 218, 0.14);
}

.sos-theme-dark .sos-page .field input,
.sos-theme-dark .sos-page .field select,
.sos-theme-dark .sos-page .field textarea,
.sos-theme-dark .sos-page .custom-multi-select summary {
    border-color: rgba(126, 171, 218, 0.22);
    color: #f5f8ff;
    background: rgba(4, 14, 24, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.sos-theme-dark .sos-page .field input::placeholder,
.sos-theme-dark .sos-page .field textarea::placeholder {
    color: rgba(190, 208, 228, 0.56);
}

.sos-theme-dark .sos-page .custom-multi-select__panel,
.sos-theme-dark .sos-page .call-report-entry {
    border-color: rgba(126, 171, 218, 0.18);
    background: rgba(8, 22, 36, 0.94);
}

.sos-theme-dark .sos-page .custom-multi-select__option {
    color: #f5f8ff;
}

.sos-theme-dark .sos-page .custom-multi-select__option:hover,
.sos-theme-dark .sos-page .data-table th {
    background: rgba(18, 39, 62, 0.86);
}

.sos-theme-dark .sos-page .priority-badge {
    border-color: rgba(255, 100, 113, 0.36);
    color: #ffcdd3;
    background: rgba(104, 18, 30, 0.72);
}

.sos-theme-dark .sos-page .priority-badge--2 {
    border-color: rgba(232, 172, 67, 0.4);
    color: #ffe1a8;
    background: rgba(86, 60, 13, 0.74);
}

.sos-theme-dark .sos-page .priority-badge--3 {
    border-color: rgba(118, 183, 255, 0.34);
    color: #cfe8ff;
    background: rgba(18, 61, 96, 0.74);
}

.sos-theme-dark .sos-page .status-badge {
    border-color: rgba(126, 171, 218, 0.2);
    color: #c9d9eb;
    background: rgba(11, 32, 52, 0.78);
}

.sos-theme-dark .sos-page .status-badge--active,
.sos-theme-dark .sos-page .sos-units-panel__hint {
    border-color: rgba(63, 205, 158, 0.3);
    color: #bdf7e3;
    background: rgba(15, 78, 61, 0.72);
}

.sos-theme-dark .sos-page .notice {
    border-color: rgba(63, 205, 158, 0.28);
    color: #bdf7e3;
    background: rgba(12, 70, 55, 0.76);
}

.sos-theme-dark .sos-page .notice--error,
.sos-theme-dark .sos-page .danger-zone {
    border-color: rgba(255, 100, 113, 0.32);
    color: #ffd6db;
    background: rgba(80, 17, 28, 0.76);
}

.sos-theme-dark .sos-page .danger-zone p {
    color: #ffc0ca;
}

.titan-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 16px;
    color: #fff;
    background: #070a0d;
    font-family: Arial, Helvetica, sans-serif;
}

.titan-shell {
    position: relative;
    width: min(1380px, 100%);
    height: min(820px, calc(100vh - 32px));
    min-height: 620px;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(500px, 560px);
    grid-template-rows: 86px minmax(0, 1fr) 116px;
    column-gap: 12px;
    overflow: hidden;
    border: 1px solid #242a30;
    border-radius: 10px;
    background: #0a0d0f;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.titan-shell--status {
    grid-template-rows: 78px minmax(0, 1fr);
    padding: 0;
}

.titan-topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: max-content max-content max-content minmax(24px, 1fr) minmax(260px, 380px);
    column-gap: clamp(28px, 2.4vw, 44px);
    row-gap: 14px;
    align-items: stretch;
    padding: 8px 12px 0;
}

.titan-unit,
.titan-registration,
.titan-clock,
.titan-area,
.titan-back {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.titan-unit strong,
.titan-registration strong,
.titan-clock strong {
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    line-height: 1;
    font-weight: 500;
}

.titan-registration strong {
    white-space: nowrap;
}

.titan-unit span,
.titan-registration span,
.titan-clock span {
    margin-top: 8px;
    color: #f5f5f5;
    font-size: 0.95rem;
}

.titan-area {
    grid-column: 5;
    justify-self: end;
    width: min(100%, 380px);
    border: 1px solid #827a7a;
    border-bottom-color: #c00000;
    border-radius: 18px 18px 0 0;
    padding: 8px 14px;
    background: #111;
    text-align: right;
}

.titan-area label {
    color: #a9c7ec;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.titan-area select {
    width: 100%;
    border: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: 1.45rem;
    text-align: right;
}

.titan-area option {
    color: #111;
}

.titan-area span {
    margin-top: 4px;
    font-size: 0.85rem;
}

.titan-back {
    align-self: center;
    justify-self: end;
    min-height: 44px;
    border: 1px solid #3c4550;
    border-radius: 8px;
    padding: 0 16px;
    color: #fff;
    text-decoration: none;
}

.titan-grid {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(520px, 560px);
    gap: 12px;
    min-height: 0;
    padding: 0 12px 6px;
}

.titan-status-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 430px;
    gap: 12px;
    min-height: 0;
    padding: 12px;
}

.titan-map-panel {
    min-width: 0;
    min-height: 0;
    border: 2px solid #0c1118;
    background: #d7e1e8;
}

.titan-panel--map-area {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0 0 6px 12px;
    overflow: hidden;
    padding: 16px;
}

.titan-map {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    min-height: 420px;
}

.titan-shell > .titan-map {
    margin: 0 0 6px 12px;
    width: calc(100% - 12px);
    height: calc(100% - 6px);
}

.titan-map--status {
    min-height: 560px;
}

.titan-map-panel--status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: #101312;
}

.titan-map-panel--report {
    overflow: hidden;
    padding: 16px;
    background: #101312;
}

.titan-report-workspace {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.titan-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #3a4148;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.titan-report-header span {
    display: block;
    color: #a9c7ec;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-report-header strong {
    display: block;
    margin-top: 3px;
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    line-height: 1.05;
}

.titan-report-header h1 {
    margin: 0;
    font-size: clamp(1.75rem, 2.4vw, 2.3rem);
    line-height: 1.05;
}

.titan-report-back {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #6d6565;
    border-radius: 8px;
    padding: 0 14px;
    color: #fff;
    background: #343337;
    text-decoration: none;
}

.titan-report-back--danger {
    border-color: rgba(255, 230, 230, 0.62);
    background: #b50000;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.titan-report-back--danger:hover {
    background: #d00000;
}

.titan-report-list {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 12px;
    padding-right: 6px;
}

.titan-report-card,
.titan-report-empty {
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 16px;
    background: #171b1f;
}

.titan-report-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #d8d8d8;
    font-size: 0.85rem;
}

.titan-report-card h2 {
    margin: 14px 0;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.1;
}

.titan-report-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.titan-report-card dt {
    color: #a9c7ec;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-report-card dd {
    margin: 4px 0 0;
    color: #fff;
    line-height: 1.3;
}

.titan-report-card p {
    margin: 0;
    border-top: 1px solid #30363d;
    padding-top: 12px;
    color: #f3f6f9;
    line-height: 1.5;
}

.titan-report-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    color: #d8d8d8;
    text-align: center;
}

.titan-report-empty strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.titan-menu-workspace,
.titan-search-workspace {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.titan-menu-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: center;
}

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

.titan-menu-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #6d6565;
    border-radius: 10px;
    padding: 18px;
    color: #fff;
    background: #6e6868;
    text-align: center;
    text-decoration: none;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.25);
}

.titan-menu-card:hover {
    background: #817a7a;
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px #cbc4c4;
}

.titan-menu-card span {
    color: #e5e5e5;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-menu-card strong {
    margin-top: 8px;
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.titan-menu-session-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    border: 1px solid #3b3c42;
    border-radius: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.titan-menu-session-card div {
    display: grid;
    gap: 5px;
}

.titan-menu-session-card span {
    color: #aad1ff;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.titan-menu-session-card strong {
    color: #fff;
    font-size: clamp(1rem, 1.35vw, 1.35rem);
}

.titan-menu-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 0;
}

.titan-menu-actions form {
    display: contents;
}

.titan-menu-card--danger {
    width: 100%;
    border-color: rgba(255, 120, 120, 0.55);
    background: linear-gradient(180deg, rgba(125, 10, 10, 0.82), rgba(62, 8, 8, 0.92));
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.titan-menu-card--danger:hover {
    border-color: rgba(255, 190, 190, 0.9);
    background: linear-gradient(180deg, rgba(178, 0, 0, 0.9), rgba(90, 10, 10, 0.95));
}

.titan-window-open {
    overflow: hidden;
}

.titan-window-overlay {
    position: absolute;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.78);
}

.titan-window-overlay[hidden] {
    display: none;
}

.titan-window {
    width: min(1120px, calc(100vw - 56px));
    height: min(720px, calc(100vh - 56px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid #817a7a;
    border-radius: 12px;
    background: #111416;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
}

.titan-window__header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px 10px 20px;
    border-bottom: 1px solid #3d3838;
    background: #151313;
    color: #fff;
}

.titan-window__header strong {
    min-width: 0;
    overflow: hidden;
    font-size: 1.2rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.titan-window__close {
    width: 42px;
    height: 42px;
    border: 1px solid #817a7a;
    border-radius: 8px;
    background: #706a6a;
    color: #fff;
    cursor: pointer;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.titan-window__close:hover,
.titan-window__close:focus {
    border-color: #ffd25d;
    outline: none;
}

.titan-window__frame {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

.titan-search-form {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.titan-search-form label {
    color: #a9c7ec;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-search-form div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.titan-search-form input {
    min-height: 44px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 0 12px;
    color: #fff;
    background: #0b0e10;
    font: inherit;
}

.titan-search-form button {
    min-height: 44px;
    border: 1px solid #6d6565;
    border-radius: 8px;
    padding: 0 18px;
    color: #fff;
    background: #343337;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.titan-search-results {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 12px;
    padding-right: 6px;
}

.titan-search-card {
    display: grid;
    gap: 14px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 16px;
    background: #171b1f;
}

.titan-search-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.titan-search-card header span,
.titan-search-grid dt {
    color: #a9c7ec;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-search-card h2 {
    margin: 4px 0 0;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.1;
}

.titan-search-card header > strong {
    text-align: right;
    font-size: 1rem;
}

.titan-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.titan-search-grid dd {
    margin: 4px 0 0;
    line-height: 1.35;
}

.titan-marker-box {
    display: grid;
    gap: 8px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 12px;
    background: rgba(6, 10, 15, 0.36);
}

.titan-marker-box--alert {
    border-color: rgba(228, 95, 95, 0.7);
    background: rgba(125, 38, 38, 0.34);
}

.titan-marker-box > strong {
    color: #fff;
    font-size: 0.9rem;
}

.titan-marker-box span,
.titan-marker-box p {
    margin: 0;
    line-height: 1.45;
}

.titan-crime-form {
    display: grid;
    gap: 9px;
}

.titan-crime-form label {
    color: #a9c7ec;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-crime-form select,
.titan-crime-form input,
.titan-crime-form textarea {
    width: 100%;
    border: 1px solid #3a4148;
    border-radius: 8px;
    color: #fff;
    background: #0b0e10;
    font: inherit;
}

.titan-crime-form select,
.titan-crime-form input {
    min-height: 40px;
    padding: 0 10px;
}

.titan-crime-form textarea {
    min-height: 84px;
    padding: 10px;
    resize: vertical;
    line-height: 1.45;
}

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

.titan-search-status--ok {
    color: #d9fff0;
}

.titan-search-status--danger {
    color: #ffe4e4;
}

.titan-owned-vehicles {
    display: grid;
    gap: 10px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 12px;
    background: rgba(6, 10, 15, 0.3);
}

.titan-owned-vehicles__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.titan-owned-vehicles__header strong {
    font-size: 0.9rem;
}

.titan-owned-vehicles__header span {
    min-width: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111;
    background: #f0c766;
    font-size: 0.82rem;
    font-weight: 800;
}

.titan-owned-vehicles p,
.titan-owned-vehicle p,
.titan-card-note {
    margin: 0;
    color: #d8d8d8;
    line-height: 1.45;
}

.titan-owned-vehicles__list {
    display: grid;
    gap: 8px;
}

.titan-owned-vehicle {
    display: grid;
    gap: 8px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.titan-owned-vehicle--alert {
    border-color: rgba(228, 95, 95, 0.7);
    background: rgba(125, 38, 38, 0.28);
}

.traffic-history-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.traffic-history-entry {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.traffic-history-entry header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.traffic-history-entry span,
.traffic-history-entry small {
    color: rgba(255, 255, 255, 0.72);
}

.titan-owned-vehicle header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.titan-owned-vehicle header strong {
    font-size: 1.05rem;
}

.titan-owned-vehicle header span {
    font-size: 0.78rem;
    font-weight: 800;
}

.titan-search-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.titan-license-form {
    width: min(100%, 360px);
    display: grid;
    gap: 9px;
}

.titan-license-form textarea {
    width: 100%;
    min-height: 78px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    background: #0b0e10;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
}

.titan-hr-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 12px;
    padding-right: 6px;
}

.titan-hr-select,
.titan-hr-form,
.titan-hr-log {
    display: grid;
    gap: 10px;
}

.titan-hr-select label,
.titan-hr-form label {
    color: #a9c7ec;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-hr-select select,
.titan-hr-form textarea {
    width: 100%;
    border: 1px solid #3a4148;
    border-radius: 8px;
    color: #fff;
    background: #0b0e10;
    font: inherit;
}

.titan-hr-select select {
    min-height: 44px;
    padding: 0 12px;
}

.titan-hr-form textarea {
    min-height: 118px;
    padding: 12px;
    resize: vertical;
    line-height: 1.45;
}

.titan-hr-form .button {
    justify-self: start;
}

.titan-hr-summary,
.titan-hr-entry {
    border: 1px solid #3a4148;
    border-radius: 8px;
    background: #171b1f;
}

.titan-hr-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px;
}

.titan-hr-summary strong {
    font-size: 1.2rem;
}

.titan-hr-summary span:last-child {
    color: #d8d8d8;
}

.titan-hr-log {
    margin-top: 4px;
}

.titan-hr-log h2 {
    margin: 0;
    color: #a9c7ec;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.titan-hr-log > p {
    margin: 0;
    color: #d8d8d8;
}

.titan-hr-entry {
    padding: 12px 14px;
}

.titan-hr-entry header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #d8d8d8;
    font-size: 0.85rem;
}

.titan-hr-entry p {
    margin: 0;
    color: #fff;
    line-height: 1.5;
}

.titan-status-workspace {
    width: min(100%, 760px);
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.titan-status-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #6d6565;
    border-radius: 10px;
    padding: 14px 18px;
    background: #111;
}

.titan-status-heading span {
    color: #d8d8d8;
    font-size: 1rem;
}

.titan-status-heading strong {
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 600;
    text-align: right;
}

.titan-status-message {
    border: 1px solid #2b4f75;
    border-radius: 8px;
    padding: 12px 14px;
    color: #d9ecff;
    background: #0b2236;
}

.titan-status-message--error {
    border-color: #7f1d1d;
    color: #ffe1e1;
    background: #320b0b;
}

.titan-status-panel.titan-panel--map-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 44px 36px;
}

.titan-status-panel.titan-panel--map-area .titan-report-header {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.titan-status-panel.titan-panel--map-area .titan-status-grid {
    flex: 0 0 auto;
}

.titan-status-heading h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 700;
    text-align: right;
}

.titan-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 14px;
    background: rgba(9, 13, 17, 0.88);
}

.titan-form label {
    color: #a9c7ec;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.titan-form select,
.titan-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #3c4550;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    background: #090d11;
    font: inherit;
}

.titan-form textarea {
    min-height: 118px;
    resize: vertical;
    line-height: 1.45;
}

.titan-form .button {
    justify-self: start;
}

.titan-form + .titan-report-list {
    flex: 1;
}

.titan-actions {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(70px, 1fr);
    gap: 14px 12px;
    align-content: stretch;
    padding: 8px 0 0;
}

.titan-shell > .titan-actions {
    grid-column: 2;
    grid-row: 2;
    margin: 0 12px 6px 0;
}

/* Anropsbegäran använder titan-grid men ska behålla exakt samma knappbredd. */
.titan-grid > .titan-actions {
    margin-left: 12px;
}

.titan-action-form {
    display: contents;
}

.titan-action,
.titan-status-button {
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #343337;
    font: inherit;
    cursor: pointer;
}

.titan-action {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    font-size: clamp(1.1rem, 1.55vw, 1.55rem);
}

.titan-action--primary {
    background: #6e6868;
}

.titan-action--alert {
    background: #7c5f2a;
    box-shadow: inset 0 0 0 3px #f0c766;
}

.titan-action--active {
    box-shadow: inset 0 0 0 3px #9a9292;
}

.titan-action--alert.titan-action--active {
    box-shadow: inset 0 0 0 3px #f0c766;
}

.titan-action--mission.titan-action--active {
    background: #b7791f;
    box-shadow:
        inset 0 0 0 3px #ffd37a,
        0 0 18px rgba(255, 190, 76, 0.3);
}

.titan-action__icon {
    min-width: 44px;
    text-align: center;
    font-size: 2.1rem;
    line-height: 1;
}

.titan-action__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.05;
}

.titan-action__text small {
    color: #fff4c9;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-action__badge {
    position: absolute;
    top: 8px;
    right: 10px;
    min-width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #111;
    border-radius: 999px;
    color: #111;
    background: #f0c766;
    font-size: 0.9rem;
    font-weight: 800;
}

.titan-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: 0;
}

.titan-action--compact {
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 7px 8px;
    text-align: center;
    font-size: clamp(0.78rem, 1vw, 1rem);
    line-height: 1.15;
}

.titan-action--compact .titan-action__icon {
    min-width: 0;
    font-size: 1.65rem;
}

.titan-action--call,
.titan-action--mission {
    justify-content: center;
}

.titan-action--danger {
    background: #b50000;
}

.titan-action--success {
    background: #078a51;
}

.titan-action--disabled,
.titan-status-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.titan-bottom {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: 310px minmax(56px, 1fr) 158px 158px minmax(520px, 640px);
    gap: 6px;
    align-items: stretch;
    border-top: 2px solid #6d6565;
    padding: 6px 8px 8px;
    background: #111;
}

.titan-bottom-group {
    display: grid;
    gap: 6px;
    min-width: 0;
    border: 2px solid #6d6565;
    border-radius: 16px;
    padding: 5px;
    background: #111;
}

.titan-bottom-group--left {
    grid-template-columns: 92px minmax(0, 1fr);
}

.titan-bottom-group--right {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 92px;
}

.titan-bottom-spacer {
    min-width: 0;
}

.titan-bottom-button {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: #706a6a;
    text-align: center;
    text-decoration: none;
    font-size: 1.45rem;
    font-family: inherit;
    cursor: pointer;
}

.titan-bottom-button__icon {
    font-size: 2.7rem;
    line-height: 1;
}

.titan-bottom-button__icon--expand {
    font-size: 3.2rem;
}

.titan-bottom-button--active {
    background: #063250;
}

.titan-bottom-button--radio {
    background: #070733;
    box-shadow: inset 0 0 0 4px #6d6565;
}

.titan-bottom-button--utility {
    background: #706a6a;
}

.titan-status-panel,
.titan-status-grid {
    align-self: start;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 0;
}

.titan-status-grid {
    align-self: stretch;
    align-content: center;
}

.titan-status-grid--call-request {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.titan-status-panel form,
.titan-status-grid form {
    margin: 0;
}

.titan-status-button {
    width: 100%;
    min-height: 78px;
    padding: 10px 14px;
    background: #6e6868;
    font-size: clamp(1rem, 1.35vw, 1.35rem);
    font-weight: 700;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.25);
}

.titan-status-button:hover,
.titan-status-button--active {
    background: #817a7a;
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px #cbc4c4;
}

.titan-status-button--danger {
    background: #b50000;
}

.titan-status-button--warning {
    background: #cf7a12;
}

.titan-status-button--warning:hover,
.titan-status-button--warning.titan-status-button--active {
    background: #e58a16;
}

.titan-status-button--danger:hover,
.titan-status-button--danger.titan-status-button--active {
    background: #d00000;
}

.titan-status-button--available.titan-status-button--active {
    background: #078a51;
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px #b7ffe0;
}

.titan-status-button--busy.titan-status-button--active {
    background: #b7791f;
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px #ffd37a;
}

.titan-status-grid--extended .titan-status-button {
    min-height: 58px;
}

.titan-status-button--danger.titan-status-button--active {
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px #ffd1d1;
}

.titan-call-request-current {
    display: grid;
    gap: 4px;
    border: 1px solid #7c5f2a;
    border-radius: 10px;
    padding: 14px 18px;
    background: #171b1f;
}

.titan-call-request-current span {
    color: #a9c7ec;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-call-request-current strong {
    font-size: 1.55rem;
}

.titan-call-request-current small {
    color: #d8d8d8;
}

.titan-rakel-workspace {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.titan-rakel-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #6d6565;
    border-radius: 10px;
    padding: 16px 18px;
    background: #111;
}

.titan-rakel-hero span,
.titan-rakel-card span {
    color: #a9c7ec;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.titan-rakel-hero strong {
    display: block;
    margin-top: 4px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
}

.titan-rakel-status {
    border: 1px solid #6d6565;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fff;
    background: #6e6868;
    font-weight: 800;
}

.titan-rakel-status--available {
    border-color: #5ce0a7;
    background: #078a51;
}

.titan-rakel-status--busy {
    border-color: #ffd37a;
    background: #b7791f;
}

.titan-rakel-status--off {
    border-color: #ff9f9f;
    background: #b50000;
}

.titan-rakel-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
    padding-right: 6px;
}

.titan-rakel-card {
    display: grid;
    gap: 6px;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 15px;
    background: #171b1f;
}

.titan-rakel-card--wide {
    grid-column: 1 / -1;
}

.titan-rakel-card strong {
    font-size: clamp(1.15rem, 2vw, 1.65rem);
    line-height: 1.15;
}

.titan-rakel-card small {
    color: #d8d8d8;
}

.titan-rakel-crew {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.titan-rakel-crew li {
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

.rescue-pad-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 16px;
    background: #080a0c;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.rescue-pad-shell {
    position: relative;
    width: min(1380px, 100%);
    height: min(820px, calc(100vh - 32px));
    min-height: 620px;
    overflow: hidden;
    border: 5px solid #242424;
    border-radius: 8px;
    background: #111;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.rescue-pad-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: #dde4e8;
}

.rescue-pad-map.cadmap-leaflet,
.rescue-pad-map.cadmap-fallback {
    height: auto;
    background: #0b1114;
}

.rescue-pad-map--dimmed {
    filter: saturate(0.9) brightness(0.88);
}

.rescue-pad-topbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr minmax(180px, 240px) minmax(180px, 240px) minmax(180px, 240px) auto;
    gap: 10px;
    align-items: center;
    padding: 22px 28px 10px;
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.72), rgba(13, 13, 13, 0.24));
}

.rescue-pad-info-card,
.rescue-pad-nav__button {
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: #050505;
    color: #fff;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.18);
}

.rescue-pad-info-card {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 14px;
}

.rescue-pad-info-card span {
    font-weight: 800;
}

.rescue-pad-info-card strong {
    margin-top: 6px;
    font-size: 1.05rem;
}

.rescue-pad-info-card--link {
    cursor: pointer;
    text-decoration: none;
}

.rescue-pad-info-card--link:hover,
.rescue-pad-info-card--link:focus {
    border-color: rgba(255, 255, 255, 0.72);
    outline: none;
}

.rescue-pad-info-card--alert {
    border-color: #f2bd25;
}

.rescue-pad-notice {
    position: absolute;
    top: 112px;
    left: 50%;
    z-index: 18;
    width: min(560px, calc(100% - 80px));
    transform: translateX(-50%);
    border: 1px solid rgba(90, 167, 255, 0.52);
    border-radius: 8px;
    padding: 12px 16px;
    background: rgba(8, 34, 58, 0.92);
    color: #dcecff;
    font-weight: 800;
    text-align: center;
}

.rescue-pad-nav {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.rescue-pad-nav form {
    margin: 0;
}

.rescue-pad-nav__button {
    min-width: 104px;
    min-height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    padding: 0 18px;
    cursor: pointer;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.rescue-pad-nav__button--icon {
    min-width: 68px;
    font-size: 2rem;
}

.rescue-pad-bottom {
    position: absolute;
    right: 28px;
    bottom: 18px;
    left: 28px;
    z-index: 10;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    pointer-events: none;
}

.rescue-pad-left-actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.rescue-pad-menu-button,
.rescue-pad-cbr__button {
    pointer-events: auto;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.25);
}

.rescue-pad-menu-button {
    min-width: 110px;
    min-height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #080808;
    font-size: 1.1rem;
}

.rescue-pad-hr-button {
    background: #123f5c;
}

.rescue-pad-cbr {
    display: grid;
    grid-template-columns: repeat(3, minmax(95px, 140px));
    gap: 8px;
}

.rescue-pad-cbr form {
    margin: 0;
    pointer-events: auto;
}

.rescue-pad-clock-panel {
    grid-column: 1 / -1;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(92, 89, 86, 0.72);
    font-size: 1.25rem;
    font-weight: 800;
}

.rescue-pad-cbr__button {
    width: 100%;
    min-height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-size: 1.05rem;
}

.rescue-pad-cbr__button--yellow {
    background: #f2bd25;
    color: #3b2600;
}

.rescue-pad-cbr__button--red {
    background: #e7333b;
}

.rescue-pad-button--active {
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px rgba(255, 255, 255, 0.62);
}

.rescue-status-modal,
.rescue-pad-panel {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: 50%;
    width: min(740px, calc(100% - 120px));
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(126, 121, 121, 0.74);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.rescue-status-modal {
    padding: 32px;
}

.rescue-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.rescue-status-grid form {
    margin: 0;
}

.rescue-status-button {
    width: 100%;
    min-height: 78px;
    border: 0;
    border-radius: 2px;
    background: #2e2e34;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.28);
}

.rescue-status-button:hover,
.rescue-status-button--active {
    background: #4a4a50;
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.28),
        inset 0 0 0 3px rgba(255, 255, 255, 0.58);
}

.rescue-status-error {
    margin-bottom: 16px;
    border: 1px solid rgba(228, 95, 95, 0.7);
    border-radius: 6px;
    padding: 10px 12px;
    background: rgba(80, 0, 0, 0.8);
    font-weight: 700;
}

.rescue-pad-panel {
    width: min(700px, calc(100% - 120px));
    border-radius: 8px;
    padding: 22px;
    background: rgba(18, 21, 24, 0.94);
}

.rescue-pad-panel--wide {
    width: min(920px, calc(100% - 120px));
}

.rescue-pad-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #39424a;
    padding-bottom: 14px;
}

.rescue-pad-panel__header span,
.rescue-pad-details dt {
    color: #9cc7ff;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rescue-pad-panel__header h1 {
    margin: 4px 0 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.rescue-pad-panel__close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #6d7680;
    border-radius: 8px;
    background: #2d3035;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.rescue-pad-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}

.rescue-pad-details dd {
    margin: 6px 0 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.rescue-pad-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rescue-pad-action {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 18px;
    background: #f2bd25;
    color: #211700;
    font-weight: 900;
    text-decoration: none;
}

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

.rescue-unit-card {
    border: 1px solid rgba(79, 191, 143, 0.58);
    border-radius: 8px;
    padding: 14px;
    background: rgba(23, 94, 64, 0.38);
}

.rescue-unit-card strong {
    display: block;
    font-size: 1.25rem;
}

.rescue-unit-card span {
    display: inline-flex;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 3px 9px;
    font-weight: 800;
}

.rescue-unit-card p {
    margin: 10px 0 4px;
}

.rescue-unit-card small {
    color: #bdd7f5;
}

.rescue-pad-empty {
    grid-column: 1 / -1;
    margin: 0;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 18px;
    color: #c8d8ea;
    background: #0f171f;
}

.rescue-hr-panel {
    top: 92px;
    bottom: 120px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow: hidden;
}

.rescue-hr-panel .rescue-pad-panel__header {
    flex: 0 0 auto;
    align-items: center;
}

.rescue-hr-workspace {
    flex: 1;
    min-height: 0;
    max-height: none;
    margin-top: 18px;
    padding-bottom: 12px;
    padding-right: 6px;
}

.rescue-hr-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
}

.rescue-hr-field {
    display: grid;
    gap: 8px;
}

.rescue-hr-field label {
    color: #9cc7ff;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rescue-hr-field select,
.rescue-hr-field textarea {
    width: 100%;
    border: 1px solid #4b5560;
    border-radius: 8px;
    padding: 11px 12px;
    color: #fff;
    background: rgba(6, 9, 12, 0.9);
    font: inherit;
}

.rescue-hr-field select {
    min-height: 44px;
}

.rescue-hr-field textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.45;
}

.rescue-hr-submit {
    width: 100%;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.rescue-alarm-list {
    max-height: min(470px, calc(100vh - 290px));
    overflow-y: auto;
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-right: 6px;
}

.rescue-alarm-card {
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 16px;
    background: rgba(9, 13, 17, 0.88);
}

.rescue-alarm-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rescue-alarm-card h2 {
    margin: 14px 0;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.rescue-alarm-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}

.rescue-alarm-card dt {
    color: #9cc7ff;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rescue-alarm-card dd {
    margin: 5px 0 0;
    font-weight: 800;
}

.rescue-alarm-card p {
    margin: 0;
    border-top: 1px solid #30363d;
    padding-top: 12px;
}

.healthcare-pad-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 16px;
    background: #080b10;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.healthcare-pad-shell {
    position: relative;
    width: min(1420px, 100%);
    height: min(820px, calc(100vh - 32px));
    min-height: 620px;
    overflow: hidden;
    border: 4px solid #20242a;
    border-radius: 8px;
    background: #111820;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.healthcare-pad-map {
    position: absolute;
    inset: 76px 0 82px;
    z-index: 1;
    width: 100%;
    background: #dfe6ea;
}

.healthcare-pad-map.cadmap-leaflet,
.healthcare-pad-map.cadmap-fallback {
    height: auto;
    background: #0b1114;
}

.healthcare-pad-map--dimmed {
    filter: saturate(0.9) brightness(0.76);
}

.healthcare-pad-topbar,
.healthcare-pad-bottom {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 10;
    background: #596b9c;
    color: #fff;
}

.healthcare-pad-topbar {
    top: 0;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 18px;
}

.healthcare-pad-cbr-top {
    display: flex;
    gap: 10px;
}

.healthcare-pad-cbr-top form {
    margin: 0;
}

.healthcare-pad-cbr-button {
    min-width: 98px;
    min-height: 50px;
    border: 0;
    border-radius: 6px;
    padding: 0 18px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22);
}

.healthcare-pad-cbr-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.8);
    opacity: 0.58;
}

.healthcare-pad-cbr-button--yellow {
    background: #f5bd21;
    color: #3c2800;
}

.healthcare-pad-cbr-button--red {
    background: #ec3c46;
}

.healthcare-pad-cbr-button--active {
    filter: brightness(1.08);
    box-shadow:
        inset 0 -5px 0 rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.healthcare-pad-unit-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.18rem;
    font-weight: 900;
    white-space: nowrap;
}

.healthcare-pad-pill {
    border-radius: 999px;
    padding: 5px 10px;
    background: #716621;
    color: #f7d543;
    font-size: 0.75rem;
}

.healthcare-pad-battery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 34px;
    border: 2px solid #4fdf72;
    border-radius: 4px;
    color: #4fdf72;
    font-size: 0.9rem;
}

.healthcare-pad-case-chip {
    position: absolute;
    top: 112px;
    right: 20px;
    z-index: 12;
    min-width: 140px;
    max-width: 260px;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 4px;
    padding: 12px 16px;
    background: rgba(96, 98, 120, 0.88);
    color: #fff;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.24);
}

.healthcare-pad-case-chip--alert {
    border-color: #f4ca54;
    background: rgba(122, 94, 25, 0.94);
}

.healthcare-pad-case-chip span,
.healthcare-pad-case-chip small {
    color: #e5edf8;
    font-size: 0.78rem;
    font-weight: 800;
}

.healthcare-pad-case-chip strong {
    margin-top: 4px;
    font-size: 1rem;
}

.healthcare-pad-notice {
    position: absolute;
    top: 92px;
    left: 50%;
    z-index: 18;
    width: min(560px, calc(100% - 80px));
    transform: translateX(-50%);
    border: 1px solid rgba(90, 167, 255, 0.52);
    border-radius: 8px;
    padding: 12px 16px;
    background: rgba(8, 34, 58, 0.92);
    color: #dcecff;
    font-weight: 800;
    text-align: center;
}

.healthcare-pad-bottom {
    bottom: 0;
    min-height: 82px;
    display: grid;
    grid-template-columns: 70px repeat(7, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
}

.healthcare-pad-bottom form {
    display: flex;
    margin: 0;
}

.healthcare-pad-bottom form .healthcare-pad-nav__item {
    width: 100%;
}

.healthcare-pad-nav__item {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 12px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}

.healthcare-pad-nav__item:hover,
.healthcare-pad-nav__item:focus,
.healthcare-pad-nav__item--active {
    background: rgba(0, 0, 0, 0.17);
    outline: none;
}

.healthcare-pad-nav__item--icon {
    font-size: 2rem;
}

.healthcare-pad-nav__item--alert::after,
.healthcare-pad-nav__item span {
    position: absolute;
    top: 12px;
    right: 18px;
    min-width: 22px;
    border-radius: 999px;
    padding: 2px 6px;
    background: #f4ca54;
    color: #2b2107;
    font-size: 0.78rem;
    font-weight: 900;
}

.healthcare-pad-nav__item--disabled {
    cursor: default;
    opacity: 0.62;
}

.healthcare-pad-nav__item--disabled:hover {
    background: transparent;
}

.healthcare-pad-panel {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: 50%;
    width: min(720px, calc(100% - 120px));
    max-height: calc(100% - 190px);
    overflow: hidden;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 22px;
    background: rgba(15, 21, 28, 0.96);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.healthcare-pad-panel--wide {
    width: min(980px, calc(100% - 120px));
}

.healthcare-pad-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #39424a;
    padding-bottom: 14px;
}

.healthcare-pad-panel__header span,
.healthcare-pad-details dt,
.healthcare-alarm-card dt {
    color: #b8d5ff;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.healthcare-pad-panel__header h1 {
    margin: 4px 0 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.healthcare-pad-panel__close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #6d7680;
    border-radius: 8px;
    background: #2d3035;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.healthcare-pad-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0 0;
}

.healthcare-pad-details dd {
    margin: 6px 0 0;
    font-size: 1.1rem;
    font-weight: 850;
}

.healthcare-pad-details__wide {
    grid-column: 1 / -1;
}

.healthcare-pad-empty {
    grid-column: 1 / -1;
    margin: 0;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 18px;
    color: #c8d8ea;
    background: #0f171f;
}

.healthcare-alarm-list,
.healthcare-journal-workspace {
    max-height: min(540px, calc(100vh - 290px));
    overflow-y: auto;
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-right: 6px;
}

.healthcare-alarm-card,
.healthcare-journal-entry {
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 16px;
    background: rgba(9, 13, 17, 0.88);
}

.healthcare-alarm-card--selected {
    border-color: #f4ca54;
}

.healthcare-alarm-card header,
.healthcare-journal-entry header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.healthcare-alarm-card h2 {
    margin: 14px 0;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.healthcare-alarm-card dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}

.healthcare-alarm-card dd {
    margin: 5px 0 0;
    font-weight: 850;
}

.healthcare-alarm-card p,
.healthcare-journal-entry p {
    margin: 0;
    border-top: 1px solid #30363d;
    padding-top: 12px;
}

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

.healthcare-unit-card {
    border: 1px solid rgba(79, 191, 143, 0.58);
    border-radius: 8px;
    padding: 14px;
    background: rgba(28, 74, 88, 0.72);
}

.healthcare-unit-card strong {
    display: block;
    font-size: 1.25rem;
}

.healthcare-unit-card span {
    display: inline-flex;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 3px 9px;
    font-weight: 850;
}

.healthcare-unit-card p {
    margin: 10px 0 4px;
}

.healthcare-unit-card small {
    display: block;
    color: #bdd7f5;
}

.healthcare-journal-panel {
    top: 90px;
    bottom: 96px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    max-height: none;
}

.healthcare-journal-workspace {
    flex: 1;
    min-height: 0;
    max-height: none;
}

.healthcare-journal-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.healthcare-journal-form__text {
    grid-column: 1 / -1;
}

.healthcare-journal-form .button {
    justify-self: start;
}

.healthcare-journal-log {
    display: grid;
    gap: 12px;
}

.healthcare-journal-log h2 {
    margin: 6px 0 0;
}

.healthcare-journal-entry small {
    display: block;
    margin: 10px 0 12px;
    color: #c8d8ea;
}

.healthcare-journal-panel--flow {
    width: min(1120px, calc(100% - 90px));
}

.healthcare-journal-context {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.healthcare-journal-context div {
    border: 1px solid #38434d;
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(3, 8, 12, 0.68);
}

.healthcare-journal-context span,
.healthcare-journal-readonly dt,
.healthcare-journal-mini-list h2,
.healthcare-journal-summary h2,
.healthcare-journal-addendum h2 {
    color: #b8d5ff;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.healthcare-journal-context strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 1rem;
}

.healthcare-journal-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.healthcare-journal-step {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4d5965;
    border-radius: 8px;
    padding: 0 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}

.healthcare-journal-step--active {
    border-color: #f4ca54;
    color: #11151b;
    background: #f4ca54;
}

.healthcare-journal-step--disabled {
    opacity: 0.45;
}

.healthcare-journal-workspace--flow {
    gap: 14px;
}

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

.healthcare-journal-form--flow textarea,
.healthcare-journal-summary textarea,
.healthcare-journal-addendum textarea {
    width: 100%;
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    background: #090d11;
    font: inherit;
    resize: vertical;
}

.healthcare-vitals-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.healthcare-vitals-form .button {
    grid-column: 1 / -1;
    justify-self: start;
}

.healthcare-action-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.healthcare-action-buttons form {
    min-width: 0;
}

.healthcare-action-buttons button {
    width: 100%;
    min-height: 58px;
    border: 1px solid #68615f;
    border-radius: 8px;
    color: #fff;
    background: #726d6b;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.healthcare-action-buttons button:hover {
    background: #817b79;
}

.healthcare-other-action-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.healthcare-journal-mini-list {
    display: grid;
    gap: 10px;
}

.healthcare-journal-mini-list h2 {
    margin: 4px 0;
}

.healthcare-journal-mini-list a,
.healthcare-journal-mini-list article,
.healthcare-journal-readonly,
.healthcare-journal-summary,
.healthcare-journal-addendum {
    border: 1px solid #3a4148;
    border-radius: 8px;
    padding: 14px;
    color: #fff;
    background: rgba(9, 13, 17, 0.88);
    text-decoration: none;
}

.healthcare-journal-mini-list a,
.healthcare-journal-mini-list article {
    display: grid;
    gap: 6px;
}

.healthcare-journal-mini-list span,
.healthcare-journal-mini-list p,
.healthcare-journal-readonly dd,
.healthcare-journal-summary p {
    margin: 0;
    color: #d7e5f7;
    line-height: 1.45;
}

.healthcare-journal-readonly dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 0;
}

.healthcare-journal-readonly dd {
    margin-top: 5px;
    font-weight: 750;
}

.healthcare-journal-summary form,
.healthcare-journal-addendum form {
    display: grid;
    gap: 12px;
}

.healthcare-journal-summary pre {
    overflow-x: auto;
    white-space: pre-wrap;
    border: 1px solid #3a4148;
    border-radius: 8px;
    margin: 12px 0;
    padding: 12px;
    background: #080c10;
    line-height: 1.5;
}

.healthcare-journal-action-row,
.healthcare-journal-global-actions,
.healthcare-journal-global-actions form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.healthcare-journal-global-actions {
    justify-content: space-between;
    border-top: 1px solid #39424a;
    margin-top: 12px;
    padding-top: 12px;
}

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

@media (max-width: 900px) {
    body.login-page main.login-main {
        width: 100%;
        padding: 0;
    }

    .login-shell {
        min-height: 100vh;
        border: 0;
    }

    .login-brand {
        margin: 24px 0 0 24px;
    }

    .login-layout {
        width: min(100% - 32px, 620px);
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 44px 0 56px;
    }

    .login-hero {
        min-height: 0;
        padding-left: 22px;
    }

    .login-card {
        padding: 70px 24px 28px;
    }

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

    .login-help {
        grid-column: auto;
    }

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

    .stat-grid,
    .form-grid,
    .search-row,
    .call-detail-grid,
    .unit-add-form,
    .sos-priority-form,
    .sos-operations-layout,
    .sos-call-summary,
    .sos-call-expanded-grid {
        grid-template-columns: 1fr;
    }

    .sos-call-list-header {
        display: none;
    }

    .sos-call-summary__cell small {
        display: block;
    }

    .sos-call-summary__actions {
        justify-content: flex-start;
    }

    .admin-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .danger-zone {
        align-items: flex-start;
        flex-direction: column;
    }

    .titan-body {
        display: block;
        overflow: auto;
        padding: 0;
    }

    .titan-shell,
    .titan-shell--status {
        display: block;
        width: min(100% - 24px, 720px);
        height: auto;
        min-height: 0;
        margin: 12px auto;
    }

    .titan-topbar,
    .titan-grid,
    .titan-status-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .titan-grid,
    .titan-status-layout {
        padding: 12px;
    }

    .titan-area,
    .titan-back {
        grid-column: auto;
        justify-self: stretch;
        width: 100%;
    }

    .titan-actions,
    .titan-status-panel,
    .titan-status-grid,
    .titan-menu-grid,
    .titan-search-grid {
        grid-template-columns: 1fr;
    }

    .titan-grid > .titan-actions {
        margin-left: 0;
    }

    .crime-entry-grid,
    .titan-crime-form__row {
        grid-template-columns: 1fr;
    }

    .titan-search-form div {
        grid-template-columns: 1fr;
    }

    .titan-map-panel--status {
        min-height: 420px;
    }

    .titan-map-panel--report {
        min-height: 420px;
    }

    .titan-report-card dl {
        grid-template-columns: 1fr;
    }

    .titan-map,
    .titan-map--status {
        min-height: 420px;
    }

    .titan-bottom {
        grid-template-columns: 1fr;
        margin: 0 12px 12px;
    }

    .titan-bottom-spacer {
        display: none;
    }

    .titan-bottom-group--left,
    .titan-bottom-group--right {
        grid-template-columns: 1fr 1fr;
    }

    .rescue-pad-body {
        display: block;
        padding: 0;
    }

    .rescue-pad-shell {
        width: min(100% - 24px, 720px);
        height: 760px;
        margin: 12px auto;
    }

    .rescue-pad-topbar {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .rescue-pad-topbar__spacer {
        display: none;
    }

    .rescue-pad-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rescue-pad-nav__button {
        min-width: 0;
        min-height: 56px;
        padding: 0 10px;
        font-size: 0.92rem;
    }

    .rescue-pad-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .rescue-pad-left-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .rescue-pad-cbr,
    .rescue-status-grid,
    .rescue-pad-details,
    .rescue-unit-grid,
    .rescue-alarm-card dl {
        grid-template-columns: 1fr;
    }

    .rescue-status-modal,
    .rescue-pad-panel,
    .rescue-pad-panel--wide {
        width: calc(100% - 44px);
    }

    .rescue-status-modal {
        padding: 18px;
    }

    .rescue-hr-panel {
        top: 180px;
        bottom: 250px;
    }

    .healthcare-pad-body {
        display: block;
        padding: 0;
    }

    .healthcare-pad-shell {
        width: min(100% - 24px, 720px);
        height: 760px;
        margin: 12px auto;
    }

    .healthcare-pad-topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        min-height: 150px;
    }

    .healthcare-pad-map {
        inset: 150px 0 210px;
    }

    .healthcare-pad-cbr-top {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .healthcare-pad-cbr-button {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
        font-size: 0.85rem;
    }

    .healthcare-pad-unit-strip {
        justify-content: flex-end;
        font-size: 1rem;
    }

    .healthcare-pad-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 210px;
    }

    .healthcare-pad-case-chip {
        top: 170px;
        right: 12px;
    }

    .healthcare-pad-panel,
    .healthcare-pad-panel--wide {
        width: calc(100% - 44px);
        max-height: calc(100% - 260px);
    }

    .healthcare-journal-panel--flow {
        width: calc(100% - 44px);
    }

    .healthcare-journal-panel {
        top: 170px;
        bottom: 222px;
    }

    .healthcare-pad-details,
    .healthcare-alarm-card dl,
    .healthcare-unit-grid,
    .healthcare-journal-form,
    .healthcare-journal-context,
    .healthcare-journal-steps,
    .healthcare-vitals-form,
    .healthcare-action-buttons,
    .healthcare-other-action-form,
    .healthcare-journal-readonly dl {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 1450px) {
    .sos-page main,
    .sos-page footer,
    .sos-page .site-nav {
        width: min(100% - 32px, 960px);
    }

    .sos-page .sos-operations-layout {
        grid-template-columns: 1fr;
    }

    .sos-page .sos-call-list-header {
        display: none;
    }

    .sos-page .sos-call-list {
        gap: 12px;
    }

    .sos-page .sos-call-card {
        border: 1px solid rgba(112, 100, 195, 0.16);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.58);
        box-shadow: 0 14px 34px rgba(89, 76, 174, 0.1);
    }

    .sos-page .sos-call-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .sos-page .sos-call-summary__cell small {
        display: block;
    }

    .sos-page .sos-call-summary__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .sos-page .sos-call-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-nav,
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        padding: 16px 0;
    }

    .site-nav__links {
        justify-content: flex-start;
    }

    main {
        padding-top: 30px;
    }

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

    .module-card {
        min-height: 190px;
    }

    .logout-link {
        width: 100%;
    }

    .page-actions,
    .form-actions,
    .button {
        width: 100%;
    }

    .login-card .form-actions {
        grid-template-columns: 1fr;
    }

    .row-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-form,
    .inline-form .button {
        width: 100%;
    }
}
