:root {
    color-scheme: dark;
    --bg: #0c121c;
    --panel: #151b24;
    --panel-soft: #1f2733;
    --panel-glass: rgba(21, 27, 36, 0.85);
    --border: rgba(255, 255, 255, 0.06);
    --accent-green: #93ff68;
    --accent-amber: #ffb649;
    --accent-red: #ff5f58;
    --accent-blue: #38bdf8;
    --text: #f5f9ff;
    --text-dim: #8c97a5;
    --text-soft: #5c6772;
    font-family: "Tahoma", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #111722 0%, #06080d 100%);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.app-shell {
    width: min(1400px, 96vw);
    height: min(860px, 96vh);
    background: linear-gradient(180deg, #1c2432 0%, #121824 42%, #0d131c 100%);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
    display: grid;
    grid-template-rows: 100px 1fr 230px;
    overflow: hidden;
}

.top-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(180deg, #202836 0%, #141b28 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.65);
}

.clock-block {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.clock {
    font-size: 32px;
    font-variant-numeric: tabular-nums;
    color: var(--accent-amber);
    text-shadow: 0 0 10px rgba(255, 182, 73, 0.45);
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.35);
    position: relative;
}

.status-dot.live {
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(147, 255, 104, 0.6);
    animation: pulse 2.8s infinite;
}

.dispatcher {
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.top-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 12px;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.control-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-btn {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.28),
        inset -1px -1px 0 rgba(0, 0, 0, 0.6);
}

.mini-btn:hover {
    transform: translateY(-1px);
}

.mini-btn.green {
    background: linear-gradient(180deg, #6af265 0%, #2ad364 100%);
}

.mini-btn.gray {
    background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
}

.mini-btn.red {
    background: linear-gradient(180deg, #ff5252 0%, #ef233c 100%);
}

.label-group {
    gap: 16px;
    opacity: 0.75;
}

.label {
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 10px;
    border: 1px solid transparent;
    cursor: pointer;
    border-radius: 3px;
}

.label:hover {
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.2);
}

.admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: none;
    background: linear-gradient(180deg, rgba(48, 62, 82, 0.8) 0%, rgba(22, 30, 44, 0.95) 100%);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.15),
        inset -1px -1px 0 rgba(0, 0, 0, 0.65);
}

.admin-link:hover {
    transform: translateY(-1px);
    color: var(--accent-blue);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow:
        inset 1px 1px 0 rgba(147, 255, 104, 0.2),
        inset -1px -1px 0 rgba(0, 0, 0, 0.5);
}

.main-grid {
    display: grid;
    grid-template-columns: 310px 1fr 260px;
    gap: 22px;
    padding: 24px 28px;
    background: linear-gradient(180deg, rgba(18, 24, 32, 0.88), rgba(13, 18, 26, 0.72));
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.7);
}

.queue-panel,
.board-panel,
.dialer-panel {
    background: linear-gradient(180deg, #18212f 0%, #121a25 100%);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.8);
}

.panel-header {
    padding: 16px 18px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: linear-gradient(180deg, rgba(30, 38, 52, 0.8) 0%, rgba(16, 23, 34, 0.4) 100%);
}

.panel-title {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-subtitle {
    font-size: 13px;
    color: var(--text-soft);
}

.panel-subtitle strong {
    color: var(--accent-blue);
}

.queue-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat {
    background: linear-gradient(180deg, rgba(37, 46, 62, 0.8) 0%, rgba(17, 24, 35, 0.85) 100%);
    border-radius: 4px;
    padding: 10px 12px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.7);
}

.stat .caption {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.stat .value {
    display: block;
    margin-top: 6px;
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-amber);
}

.mini-map-block {
    margin: 0 12px 14px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(34, 44, 60, 0.82) 0%, rgba(18, 25, 37, 0.9) 100%);
    border: 1px solid rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75);
}

.mini-map-title {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 8px;
}

.mini-map-body {
    position: relative;
    height: 120px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 3px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12), rgba(6, 10, 16, 0.9));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75);
}

.mini-map-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.55;
}

.mini-map-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-red);
    border: 2px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 12px rgba(255, 95, 88, 0.5);
    transform: translate(-50%, -50%);
    transition: top 0.4s ease, left 0.4s ease, opacity 0.3s ease;
    top: 50%;
    left: 50%;
    opacity: 0;
}

.mini-map-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(8, 12, 18, 0.9);
    border: 1px solid rgba(147, 255, 104, 0.4);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-green);
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.queue-list {
    padding: 6px 12px 18px;
    overflow: hidden auto;
    flex: 1;
    display: grid;
    gap: 8px;
}

.call-placeholder {
    align-self: center;
    justify-self: center;
    color: var(--text-soft);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 12px;
    padding-top: 40px;
}

.call-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 4px;
    border-left: 5px solid transparent;
    background: linear-gradient(180deg, rgba(30, 40, 56, 0.85) 0%, rgba(18, 26, 39, 0.9) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.call-card.flash {
    animation: slideIn 0.55s ease, popGlow 1.5s ease;
}

.call-card:hover {
    transform: translateX(4px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(56, 189, 248, 0.2);
}

.call-card.selected {
    outline: 1px solid rgba(56, 189, 248, 0.6);
}

.call-card::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 95, 88, 0.95) 0%, rgba(128, 0, 0, 0.8) 65%, rgba(128, 0, 0, 0) 100%);
    box-shadow:
        0 0 8px rgba(255, 95, 88, 0.65),
        0 0 18px rgba(255, 95, 88, 0.45);
    transform: translateY(-50%);
    animation: beaconBlink 0.7s ease-in-out infinite;
}

.call-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 18px;
}

.call-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.call-name {
    font-weight: 600;
    font-size: 15px;
}

.call-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-soft);
}

.badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.06);
}

.call-status {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

.call-card.incoming {
    border-left-color: var(--accent-amber);
    background: linear-gradient(180deg, rgba(255, 182, 73, 0.18) 0%, rgba(18, 26, 39, 0.85) 100%);
}

.call-card.active {
    border-left-color: var(--accent-green);
    background: linear-gradient(180deg, rgba(147, 255, 104, 0.15) 0%, rgba(18, 26, 39, 0.88) 100%);
    box-shadow:
        inset 0 1px 0 rgba(147, 255, 104, 0.22),
        inset 0 -1px 0 rgba(18, 26, 39, 0.9),
        0 0 0 1px rgba(147, 255, 104, 0.18);
    animation: glowActive 3s infinite;
}

.call-card.hold {
    border-left-color: #facc15;
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.14) 0%, rgba(18, 26, 39, 0.86) 100%);
}

.call-card.wrap {
    border-left-color: var(--accent-blue);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.16) 0%, rgba(18, 26, 39, 0.86) 100%);
}

.call-card.ended {
    border-left-color: var(--accent-red);
    background: linear-gradient(180deg, rgba(255, 95, 88, 0.16) 0%, rgba(18, 26, 39, 0.85) 100%);
}

.call-timer {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    color: var(--accent-blue);
}

.board-tabs {
    display: flex;
    gap: 12px;
    padding: 12px 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.75);
}

.tab {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 8px 16px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, rgba(38, 48, 64, 0.85) 0%, rgba(20, 28, 40, 0.95) 100%);
    color: var(--text-dim);
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-bottom: none;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.7);
}

.tab.active {
    color: var(--text);
    background: linear-gradient(180deg, rgba(147, 255, 104, 0.22) 0%, rgba(56, 189, 248, 0.24) 100%);
    border-color: rgba(147, 255, 104, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.board-table {
    flex: 1;
    padding: 0 20px 20px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: var(--text-dim);
}

thead {
    background: linear-gradient(180deg, rgba(34, 44, 60, 0.9) 0%, rgba(18, 24, 35, 0.95) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

th,
td {
    padding: 10px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.7);
}

tbody tr {
    transition: background 0.3s ease;
    cursor: pointer;
}

tbody tr.flash {
    animation: rowFlash 0.65s ease;
}

tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
}

tbody tr.selected {
    background: linear-gradient(90deg, rgba(147, 255, 104, 0.2), rgba(56, 189, 248, 0.08));
}

.status-pill {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #111;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.status-pill.active {
    background: linear-gradient(180deg, rgba(147, 255, 104, 0.9) 0%, rgba(83, 172, 63, 0.95) 100%);
}

.status-pill.hold {
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.9) 0%, rgba(175, 119, 13, 0.95) 100%);
}

.status-pill.wrap {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.9) 0%, rgba(30, 122, 184, 0.95) 100%);
}

.status-pill.ended {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.9) 0%, rgba(148, 33, 33, 0.95) 100%);
}

.dialer-panel {
    gap: 20px;
}

.caller-card {
    margin: 20px;
    padding: 18px;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(37, 48, 64, 0.75) 0%, rgba(18, 26, 39, 0.8) 100%);
    border: 1px solid rgba(0, 0, 0, 0.8);
    display: grid;
    gap: 12px;
    min-height: 164px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75);
}

.caller-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-blue);
}

.caller-field {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-soft);
}

.field-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.field-value {
    color: var(--text);
    letter-spacing: 0.04em;
}

.keypad {
    margin: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px;
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.8);
}

.keypad button {
    background: linear-gradient(180deg, rgba(39, 51, 68, 0.9) 0%, rgba(19, 27, 40, 0.95) 100%);
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    height: 58px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75);
}

.keypad button:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(147, 255, 104, 0.25) 0%, rgba(25, 34, 48, 0.95) 100%);
}

.dial-controls {
    margin: 0 20px 20px;
    display: flex;
    gap: 12px;
}

.action {
    flex: 1;
    padding: 14px 0;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75);
    background: linear-gradient(180deg, rgba(39, 51, 68, 0.9) 0%, rgba(19, 27, 40, 0.95) 100%);
    color: var(--text);
}

.action.send {
    background: linear-gradient(180deg, rgba(147, 255, 104, 0.28) 0%, rgba(24, 80, 52, 0.9) 100%);
    color: #031b0d;
}

.action.clear {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.24) 0%, rgba(23, 52, 73, 0.95) 100%);
}

.map-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    padding: 20px 28px 28px;
    background: linear-gradient(180deg, rgba(9, 12, 18, 0.95), rgba(9, 12, 18, 0.8));
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.map {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.75);
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.16), rgba(9, 14, 22, 0.88));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75);
}

.map-grid {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    position: absolute;
    inset: 0;
}

.map-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    pointer-events: none;
}

.locator-spin {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(147, 255, 104, 0.3);
    border-top-color: rgba(56, 189, 248, 0.8);
    border-radius: 50%;
    animation: spin 6s linear infinite;
}

.locator-label {
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(12, 19, 29, 0.9);
    border: 1px solid rgba(147, 255, 104, 0.4);
    color: var(--accent-green);
    letter-spacing: 0.08em;
    font-size: 12px;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.incident-card {
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.75);
    background: linear-gradient(180deg, rgba(255, 182, 73, 0.28) 0%, rgba(68, 46, 18, 0.45) 100%);
    padding: 26px 30px;
    display: grid;
    gap: 16px;
    color: #201a10;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.incident-card::before {
    content: "";
    position: absolute;
    inset: -40% -40% auto;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%);
    opacity: 0.8;
    animation: sweep 8s linear infinite;
}

.incident-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.incident-meta {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(25, 21, 15, 0.75);
}

.incident-grid {
    display: grid;
    gap: 10px;
    font-size: 14px;
    color: rgba(25, 21, 15, 0.75);
}

.incident-grid .label {
    font-size: 11px;
    color: rgba(25, 21, 15, 0.6);
    letter-spacing: 0.12em;
}

.call-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

.call-modal.active {
    opacity: 1;
    pointer-events: all;
}

.call-modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 11, 17, 0.75);
    backdrop-filter: blur(2px);
}

.modal-window {
    position: relative;
    width: min(420px, 92vw);
    background: linear-gradient(180deg, rgba(28, 36, 50, 0.95) 0%, rgba(14, 19, 28, 0.98) 100%);
    border: 2px solid rgba(0, 0, 0, 0.85);
    border-radius: 6px;
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.8);
    padding: 22px 26px;
    display: grid;
    gap: 18px;
    animation: modalPop 0.28s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-eyebrow {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-blue);
}

.modal-title {
    margin: 6px 0 0;
    font-size: 26px;
    color: var(--accent-amber);
}

.modal-indicator {
    display: flex;
    gap: 6px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(147, 255, 104, 0.6);
    animation: blink 1.2s ease-in-out infinite;
}

.pulse-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.pulse-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.modal-body {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(0, 0, 0, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
}

.modal-body::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 60%);
    opacity: 0.6;
    mix-blend-mode: screen;
    animation: audioPulse 1.1s ease-in-out infinite;
}

.modal-body-content {
    position: relative;
    display: grid;
    gap: 12px;
}

.modal-wave {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.modal-wave span {
    display: inline-block;
    width: 6px;
    margin: 0 3px;
    height: 32px;
    background: linear-gradient(180deg, rgba(147, 255, 104, 0.85) 0%, rgba(56, 189, 248, 0.65) 100%);
    border-radius: 3px;
    opacity: 0.65;
    animation: waveBounce 0.8s ease-in-out infinite;
}

.modal-wave span:nth-child(2) {
    animation-delay: 0.1s;
}

.modal-wave span:nth-child(3) {
    animation-delay: 0.2s;
}

.modal-wave span:nth-child(4) {
    animation-delay: 0.3s;
}

.modal-wave span:nth-child(5) {
    animation-delay: 0.4s;
}

.modal-glitch {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-window.glitch-on .modal-glitch {
    opacity: 0.95;
}

.modal-window::before,
.modal-window::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-window.glitch-on::before {
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.07) 0,
        rgba(255, 255, 255, 0.07) 2px,
        transparent 2px,
        transparent 6px
    );
    mix-blend-mode: screen;
    animation: scan 1.2s linear infinite;
    opacity: 0.35;
}

.modal-window.glitch-on::after {
    background: repeating-linear-gradient(
            90deg,
            rgba(56, 189, 248, 0.08) 0,
            rgba(56, 189, 248, 0.08) 1px,
            transparent 1px,
            transparent 5px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(239, 68, 68, 0.15) 0,
            rgba(239, 68, 68, 0.15) 3px,
            transparent 3px,
            transparent 7px
        );
    mix-blend-mode: lighten;
    animation: jitter 0.18s steps(2) infinite;
    opacity: 0.25;
}

.glitch-band {
    position: absolute;
    left: -5%;
    width: 110%;
    height: 14%;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.08), rgba(255, 255, 255, 0.08));
    opacity: 0.45;
    filter: blur(0.6px);
    transform: skewX(-6deg);
    animation: glitchSlide 2.2s linear infinite;
}

.glitch-band.band-one {
    top: 18%;
    animation-duration: 2s;
}

.glitch-band.band-two {
    top: 46%;
    animation-duration: 1.6s;
    animation-delay: -0.6s;
}

.glitch-band.band-three {
    top: 74%;
    animation-duration: 2.6s;
    animation-delay: -1.1s;
}

.glitch-noise {
    position: absolute;
    inset: -10%;
    background-image: repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.08) 0,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(56, 189, 248, 0.05) 0,
            rgba(56, 189, 248, 0.05) 2px,
            transparent 2px,
            transparent 8px
        );
    opacity: 0.18;
    animation: noiseFlicker 0.35s steps(2) infinite;
}

.modal-map {
    display: grid;
    gap: 10px;
}

.modal-map-title {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.modal-map-body {
    position: relative;
    height: 180px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    overflow: hidden;
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.18), rgba(6, 10, 16, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.75);
}

.modal-map-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.5;
}

.modal-map-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-amber);
    border: 2px solid rgba(0, 0, 0, 0.85);
    box-shadow: 0 0 14px rgba(255, 182, 73, 0.55);
    transform: translate(-50%, -50%);
    transition: top 0.4s ease, left 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    top: 50%;
    left: 50%;
}

.modal-map-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(8, 12, 18, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 11px;
    color: var(--accent-blue);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.modal-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.modal-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.modal-value {
    font-size: 14px;
    color: var(--text);
    text-align: right;
    max-width: 230px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    min-width: 120px;
    padding: 10px 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.85);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.85);
    background: linear-gradient(180deg, rgba(37, 49, 66, 0.9) 0%, rgba(16, 22, 32, 0.95) 100%);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(0, 0, 0, 0.7);
}

.modal-btn.accept {
    background: linear-gradient(180deg, rgba(147, 255, 104, 0.3) 0%, rgba(25, 79, 50, 0.95) 100%);
    color: #031b0d;
}

.modal-btn.decline {
    background: linear-gradient(180deg, rgba(255, 95, 88, 0.3) 0%, rgba(88, 25, 25, 0.95) 100%);
    color: #1c0808;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(147, 255, 104, 0.3);
    }
    50% {
        box-shadow: 0 0 18px rgba(147, 255, 104, 0.65);
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(-30px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes popGlow {
    0% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    40% {
        box-shadow: 0 0 22px rgba(255, 255, 255, 0.25);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes glowActive {
    0% {
        box-shadow: 0 0 14px rgba(147, 255, 104, 0.24);
    }
    50% {
        box-shadow: 0 0 26px rgba(147, 255, 104, 0.4);
    }
    100% {
        box-shadow: 0 0 14px rgba(147, 255, 104, 0.24);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes sweep {
    0% {
        transform: translateX(-40%);
    }
    100% {
        transform: translateX(140%);
    }
}

@keyframes rowFlash {
    0% {
        background: rgba(147, 255, 104, 0.28);
    }
    100% {
        background: transparent;
    }
}

@keyframes beaconBlink {
    0%,
    100% {
        transform: translateY(-50%) scale(0.9);
        box-shadow:
            0 0 6px rgba(255, 95, 88, 0.45),
            0 0 14px rgba(255, 95, 88, 0.3);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
        box-shadow:
            0 0 10px rgba(255, 95, 88, 0.85),
            0 0 24px rgba(255, 95, 88, 0.55);
    }
}

@keyframes audioPulse {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.85);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes waveBounce {
    0%,
    100% {
        transform: scaleY(0.4);
        opacity: 0.4;
    }
    50% {
        transform: scaleY(1);
        opacity: 0.9;
    }
}

@keyframes glitchSlide {
    0% {
        transform: translateX(0) skewX(-6deg);
        opacity: 0.15;
    }
    20% {
        transform: translateX(6%) skewX(-4deg);
        opacity: 0.4;
    }
    40% {
        transform: translateX(-4%) skewX(-8deg);
        opacity: 0.28;
    }
    60% {
        transform: translateX(3%) skewX(-5deg);
        opacity: 0.35;
    }
    80% {
        transform: translateX(-2%) skewX(-7deg);
        opacity: 0.2;
    }
    100% {
        transform: translateX(0) skewX(-6deg);
        opacity: 0.15;
    }
}

@keyframes noiseFlicker {
    0% {
        opacity: 0.05;
        transform: translate(-2%, 0);
    }
    25% {
        opacity: 0.14;
        transform: translate(1%, -1%);
    }
    50% {
        opacity: 0.09;
        transform: translate(-3%, 1%);
    }
    75% {
        opacity: 0.16;
        transform: translate(2%, -2%);
    }
    100% {
        opacity: 0.05;
        transform: translate(0, 0);
    }
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes jitter {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(2px, -1px);
    }
    100% {
        transform: translate(-3px, 1px);
    }
}

@keyframes modalPop {
    0% {
        transform: scale(0.92);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@media (max-width: 1220px) {
    .app-shell {
        width: 96vw;
        height: auto;
        grid-template-rows: auto auto auto;
    }

    .main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .map-panel {
        grid-template-columns: 1fr;
    }
}
