﻿:root {
    --screen: rgba(18, 18, 22, 0.84);
    --panel: rgba(22, 22, 28, 0.88);
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.13);
    --stroke-soft: rgba(255, 255, 255, 0.09);
    --text: rgba(255, 255, 255, 0.93);
    --muted: rgba(255, 255, 255, 0.66);
    --muted-soft: rgba(255, 255, 255, 0.5);
    --primary: #b8ff2a;
    --primary-strong: #d4ff67;
    --danger: #ff3b57;
    --danger-strong: #ff6481;
    --warn: #f6c65f;
    --good: #7fff6a;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --ease: cubic-bezier(0.2, 0.9, 0.1, 1);
    --shadow-1: 0 12px 34px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 24px 64px rgba(0, 0, 0, 0.38);
    --shadow-3: 0 38px 120px rgba(0, 0, 0, 0.56);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 255, 42, 0.7) rgba(255, 255, 255, 0.08);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(184, 255, 42, 0.45);
    border: 2px solid rgba(0, 0, 0, 0.35);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 255, 42, 0.65);
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: transparent !important;
}

body {
    color: var(--text);
    line-height: 1.3;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.web-mode {
    background:
        radial-gradient(1200px 700px at -5% -18%, rgba(184, 255, 42, 0.18) 0%, transparent 58%),
        radial-gradient(950px 540px at 102% -20%, rgba(84, 153, 255, 0.2) 0%, transparent 63%),
        radial-gradient(800px 460px at 50% 118%, rgba(184, 255, 42, 0.12) 0%, transparent 68%),
        linear-gradient(160deg, #07080d 0%, #10121a 50%, #090b12 100%);
    position: relative;
}

body.web-mode::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.012) 0,
            rgba(255, 255, 255, 0.012) 1px,
            transparent 1px,
            transparent 8px
        ),
        linear-gradient(110deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 45%);
}

body.web-mode .app {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

body.nui-mode {
    background: transparent !important;
}

.hidden {
    display: none !important;
}

.app {
    width: min(1720px, 96vw);
    height: calc(100vh - 2.2rem);
    margin: 1.1rem auto;
    border-radius: 24px;
    border: 1px solid var(--stroke);
    background:
        radial-gradient(130% 110% at 5% -15%, rgba(184, 255, 42, 0.08), rgba(184, 255, 42, 0) 38%),
        linear-gradient(180deg, rgba(7, 8, 12, 0.97), rgba(6, 7, 11, 0.98));
    box-shadow:
        0 30px 110px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.app::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

body.nui-mode .app {
    width: min(1650px, 95vw);
    height: calc(100vh - 1rem);
    margin: 0.5rem auto;
}

.topbar {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 18px rgba(184, 255, 42, 0.85);
    flex: 0 0 auto;
}

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

#panelTitle {
    font-size: 1.95rem;
    line-height: 1;
    letter-spacing: 0.08em;
    font-weight: 900;
    white-space: nowrap;
}

#serverName {
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.84rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0.85rem;
    flex: 1;
    min-height: 0;
    padding: 0.85rem;
}

.sidebar {
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: var(--screen);
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.8rem;
    overflow: auto;
    min-height: 0;
}

.sidebar-head {
    padding: 0.3rem 0.2rem 0.55rem;
    border-bottom: 1px solid var(--stroke-soft);
    margin-bottom: 0.15rem;
}

.sidebar-title {
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.sidebar-sub {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0.72rem 0.78rem;
    text-align: left;
    font-weight: 800;
    font-size: 0.79rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 0.16s var(--ease),
        background-color 0.18s var(--ease),
        border-color 0.18s var(--ease),
        box-shadow 0.2s var(--ease);
}

.tab-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(184, 255, 42, 0.55);
    background: rgba(184, 255, 42, 0.12);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.tab-btn.active {
    border-color: rgba(184, 255, 42, 0.66);
    background: rgba(184, 255, 42, 0.2);
    box-shadow:
        0 0 0 1px rgba(184, 255, 42, 0.18) inset,
        0 12px 30px rgba(0, 0, 0, 0.3);
}

.content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: var(--panel);
    box-shadow: var(--shadow-1);
    min-height: 0;
    overflow: auto;
    padding: 0.85rem;
}

.tab-pane {
    display: none;
    animation: tab-fade 0.18s var(--ease);
}

.tab-pane.active {
    display: block;
}

@keyframes tab-fade {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
    box-shadow: var(--shadow-1);
    padding: 0.9rem;
    margin-bottom: 0.85rem;
}

.panel:last-child {
    margin-bottom: 0;
}

h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.65rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.65rem;
}

.cards-compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.card {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    padding: 0.7rem;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.15s var(--ease);
}

.card:hover {
    border-color: rgba(184, 255, 42, 0.45);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.card .label {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card .value {
    margin-top: 0.38rem;
    font-size: 1.2rem;
    font-weight: 900;
}

.cards-compact .card .value {
    font-size: 1.02rem;
}

.metric-card {
    border-width: 2px;
}

.metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.health-pill,
.state-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 900;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-technical {
    margin-top: 0.85rem;
    grid-template-columns: 1fr 1.2fr;
}

.health-summary {
    border: 1px solid var(--stroke-soft);
    border-radius: 12px;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.6rem;
    font-size: 0.84rem;
    font-weight: 800;
}

.alerts-list {
    margin-top: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.alert-item {
    border: 1px solid var(--stroke-soft);
    border-radius: 11px;
    padding: 0.46rem 0.6rem;
    font-size: 0.81rem;
    font-weight: 700;
}

.level-good {
    border-color: rgba(127, 255, 106, 0.56) !important;
    color: #d5ffd1;
    background: rgba(42, 111, 35, 0.24);
}

.level-warn {
    border-color: rgba(246, 198, 95, 0.65) !important;
    color: #ffe7ba;
    background: rgba(126, 89, 20, 0.28);
}

.level-bad {
    border-color: rgba(255, 59, 87, 0.68) !important;
    color: #ffd0d7;
    background: rgba(122, 29, 45, 0.32);
}

.level-neutral {
    border-color: rgba(138, 166, 196, 0.55) !important;
    color: #dde8f5;
    background: rgba(52, 63, 76, 0.28);
}

.split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0.85rem;
}

.reports-layout {
    grid-template-columns: 360px 1fr;
}

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

.inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.inline:last-child {
    margin-bottom: 0;
}

.inline input,
.inline select {
    min-width: 0;
}

input,
select,
textarea,
button {
    color: var(--text);
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.22);
    padding: 0.58rem 0.67rem;
    outline: none;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(184, 255, 42, 0.52);
    box-shadow: 0 0 0 3px rgba(184, 255, 42, 0.15);
    background: rgba(0, 0, 0, 0.28);
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2rem;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.75) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.75) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 53%,
        calc(100% - 11px) 53%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

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

button {
    border-radius: 12px;
    border: 1px solid rgba(184, 255, 42, 0.5);
    background: linear-gradient(165deg, rgba(184, 255, 42, 0.23), rgba(124, 185, 31, 0.25));
    color: rgba(255, 255, 255, 0.94);
    padding: 0.56rem 0.72rem;
    font-weight: 900;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition:
        transform 0.15s var(--ease),
        border-color 0.18s var(--ease),
        box-shadow 0.18s var(--ease),
        background-color 0.18s var(--ease);
}

button:hover {
    transform: translateY(-1px);
    border-color: rgba(212, 255, 103, 0.8);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

button:active {
    transform: translateY(0);
}

button:focus-visible {
    outline: 2px solid rgba(184, 255, 42, 0.8);
    outline-offset: 1px;
}

button.danger {
    border-color: rgba(255, 91, 122, 0.62);
    background: linear-gradient(165deg, rgba(255, 59, 87, 0.28), rgba(181, 31, 62, 0.3));
}



button.secondary {
    border-color: rgba(255, 255, 255, 0.28);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
}

button.secondary:hover {
    border-color: rgba(255, 255, 255, 0.45);
}

button:disabled,
#reportActionGrid button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.35);
    transform: none;
    box-shadow: none;
}

.table-wrap {
    border-radius: 13px;
    border: 1px solid var(--stroke-soft);
    overflow: auto;
    background: rgba(0, 0, 0, 0.16);
}

.table-compact table {
    min-width: 520px;
}

.resources-scroll {
    max-height: 390px;
    overflow-y: auto;
    overflow-x: auto;
}

.resources-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(2px);
}

table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.55rem 0.62rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
}

th {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.69rem;
    background: rgba(255, 255, 255, 0.04);
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

tr.selected {
    background: rgba(184, 255, 42, 0.18);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.meta-label {
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.58rem;
}

.log,
.report {
    border-radius: 13px;
    border: 1px solid var(--stroke-soft);
    background: rgba(255, 255, 255, 0.045);
    padding: 0.7rem;
}

.log .meta,
.report .meta {
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.78rem;
    color: #d5f2be;
    white-space: pre-wrap;
    margin-bottom: 0.7rem;
}

.report-item {
    border: 1px solid var(--stroke-soft);
    border-radius: 12px;
    padding: 0.62rem;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), transform 0.15s var(--ease);
}

.report-item:hover {
    border-color: rgba(184, 255, 42, 0.48);
    transform: translateY(-1px);
}

.report-item.active {
    border-color: rgba(184, 255, 42, 0.66);
    background: rgba(184, 255, 42, 0.16);
}

.report-item .title {
    font-weight: 900;
    margin-bottom: 0.3rem;
}

.report-item .snippet {
    color: var(--muted);
    font-size: 0.82rem;
}

.report-list {
    max-height: 62vh;
    overflow: auto;
    padding-right: 0.2rem;
}

.chat-messages {
    border-radius: 12px;
    border: 1px solid var(--stroke-soft);
    min-height: 300px;
    max-height: 48vh;
    overflow: auto;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
}

.chat-line {
    margin-bottom: 0.46rem;
}

.chat-line .meta {
    color: var(--muted);
    font-size: 0.73rem;
    margin-bottom: 0.2rem;
}

.chat-bubble {
    border: 1px solid var(--stroke-soft);
    border-radius: 11px;
    padding: 0.54rem 0.64rem;
    font-size: 0.88rem;
}

.chat-bubble.player {
    background: rgba(83, 111, 172, 0.3);
    border-color: rgba(148, 180, 245, 0.56);
}

.chat-bubble.admin {
    background: rgba(62, 133, 44, 0.32);
    border-color: rgba(180, 255, 155, 0.58);
}

.chat-bubble.system {
    background: rgba(98, 76, 28, 0.33);
    border-color: rgba(221, 188, 104, 0.62);
}

.chat-compose {
    margin-top: 0.55rem;
    display: grid;
    gap: 0.45rem;
}

.chat-actions {
    display: flex;
    gap: 0.45rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.chat-actions button {
    min-width: 92px;
}

.report-tools {
    margin-top: 0.8rem;
    border-top: 1px solid var(--stroke-soft);
    padding-top: 0.75rem;
}

.report-tools h3,
.live-report-panel h4 {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.52rem;
}

#reportTargetInfo {
    min-height: 150px;
}

.player-vehicles {
    margin-top: 0.8rem;
    border-top: 1px solid var(--stroke-soft);
    padding-top: 0.75rem;
}

.player-vehicles-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.player-vehicles h3 {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.player-vehicles-wrap {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: auto;
}

.player-vehicles-wrap table {
    min-width: 680px;
}

.player-vehicles-wrap button {
    padding: 0.4rem 0.55rem;
    font-size: 0.66rem;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(5, 7, 10, 0.64);
    backdrop-filter: blur(7px);
}

.auth-card {
    width: min(700px, 100%);
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background:
        radial-gradient(380px 180px at 0% 0%, rgba(184, 255, 42, 0.1), transparent 78%),
        linear-gradient(165deg, rgba(12, 14, 20, 0.96), rgba(9, 11, 16, 0.97));
    padding: 1.15rem;
    box-shadow: var(--shadow-2);
}

.auth-card h1 {
    margin-bottom: 0.52rem;
    font-size: 1.65rem;
    letter-spacing: 0.04em;
}

.auth-card p {
    color: var(--muted);
    margin-bottom: 0.72rem;
}

.auth-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.auth-step-item {
    border: 1px solid var(--stroke-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.56rem 0.62rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.auth-step-item span {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(184, 255, 42, 0.56);
    background: rgba(184, 255, 42, 0.2);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 900;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.auth-field {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
}

.auth-field label {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.auth-server-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
    align-items: end;
    margin-bottom: 0.4rem;
}

.auth-server-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

.auth-server-row button {
    min-width: 170px;
}

.auth-inline-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.auth-inline-meta p {
    margin: 0;
}

.auth-inline-meta button {
    flex: 0 0 auto;
}

.auth-status-row {
    margin-bottom: 0.55rem;
}

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border-radius: 999px;
    border: 1px solid var(--stroke-soft);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 800;
    padding: 0.4rem 0.6rem;
}

.auth-status-pill.good {
    border-color: rgba(127, 255, 106, 0.5);
    background: rgba(127, 255, 106, 0.18);
    color: #dcffd6;
}

.auth-status-pill.warn {
    border-color: rgba(246, 198, 95, 0.52);
    background: rgba(246, 198, 95, 0.18);
    color: #ffe8b3;
}

.auth-status-pill.bad {
    border-color: rgba(255, 59, 87, 0.58);
    background: rgba(255, 59, 87, 0.19);
    color: #ffd2da;
}

.auth-note {
    margin-top: 0.15rem;
    margin-bottom: 0.65rem;
}

.auth-tab {
    text-align: center;
}

.auth-tab.active {
    border-color: rgba(184, 255, 42, 0.72);
    background: rgba(184, 255, 42, 0.24);
}

.auth-pane {
    display: block;
}

.auth-pane-help {
    margin-bottom: 0.55rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.error {
    color: #ffc2cd !important;
    min-height: 1.1rem;
    margin-top: 0.45rem;
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 130;
    border: 1px solid rgba(184, 255, 42, 0.42);
    border-radius: 12px;
    background: rgba(9, 11, 16, 0.95);
    padding: 0.62rem 0.82rem;
    box-shadow: var(--shadow-1);
    opacity: 0;
    transform: translateY(18px);
    transition: all 0.2s var(--ease);
    pointer-events: none;
}

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

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(3px);
}

.confirm-modal-card {
    position: relative;
    width: min(560px, 96vw);
    border-radius: 18px;
    border: 1px solid rgba(184, 255, 42, 0.35);
    background:
        radial-gradient(360px 160px at 0% 0%, rgba(184, 255, 42, 0.1), transparent 80%),
        linear-gradient(165deg, rgba(12, 14, 20, 0.97), rgba(8, 10, 15, 0.98));
    box-shadow: var(--shadow-3);
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    animation: confirm-pop 0.18s var(--ease);
}

.confirm-modal-card h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.confirm-modal-card p {
    color: var(--muted);
    white-space: pre-line;
    line-height: 1.45;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.confirm-modal-actions button {
    min-width: 120px;
}

@keyframes confirm-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}

.image-modal-card {
    position: relative;
    width: min(1120px, 96vw);
    max-height: 94vh;
    overflow: auto;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: linear-gradient(165deg, rgba(11, 13, 19, 0.97), rgba(7, 9, 14, 0.98));
    padding: 0.78rem;
    box-shadow: var(--shadow-3);
}

.image-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.52rem;
}

.image-modal-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.image-modal-body {
    display: block;
}

.image-view {
    min-width: 0;
}

#screenshotStreamState.stream-on {
    color: var(--primary-strong);
}

#screenshotImage {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--stroke-soft);
    background: rgba(0, 0, 0, 0.28);
}

.live-report-panel {
    border-left: 1px solid var(--stroke-soft);
    padding-left: 0.75rem;
    min-width: 300px;
}

.live-report-messages {
    min-height: 220px;
    max-height: 44vh;
}

.image-modal-card.with-live-report {
    width: min(1460px, 96vw);
}

.image-modal-card.with-live-report .image-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
    gap: 0.74rem;
}

.reporter-app {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: min(450px, 93vw);
    z-index: 150;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: linear-gradient(165deg, rgba(12, 14, 20, 0.96), rgba(8, 10, 15, 0.97));
    box-shadow: var(--shadow-2);
    padding: 0.85rem;
}

.reporter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.reporter-app .chat-messages {
    min-height: 220px;
    max-height: 38vh;
}

@media (max-width: 1420px) {
    .layout {
        grid-template-columns: 220px 1fr;
    }

    #panelTitle {
        font-size: 1.72rem;
    }
}

@media (max-width: 1180px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 1px solid var(--stroke);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .sidebar-head {
        width: 100%;
    }

    .tab-btn {
        flex: 1 1 calc(33.33% - 0.45rem);
        text-align: center;
    }

    .split,
    .reports-layout,
    .dashboard-technical {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .app {
        width: min(98vw, 98vw);
        height: calc(100vh - 0.9rem);
        margin: 0.45rem auto;
        border-radius: 18px;
    }

    .topbar {
        min-height: 88px;
        padding: 0.88rem;
        flex-wrap: wrap;
    }

    #panelTitle {
        font-size: 1.46rem;
    }

    .top-actions {
        width: 100%;
    }

    .resources-scroll {
        max-height: 320px;
    }

    .image-modal-card.with-live-report .image-modal-body {
        grid-template-columns: 1fr;
    }

    .live-report-panel {
        border-left: none;
        border-top: 1px solid var(--stroke-soft);
        padding-left: 0;
        padding-top: 0.65rem;
    }

    body.web-mode .app {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 760px) {
    .content {
        padding: 0.65rem;
    }

    .tab-btn {
        flex: 1 1 calc(50% - 0.45rem);
    }

    .grid-2,
    .inline {
        grid-template-columns: 1fr;
    }

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

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

    .auth-inline-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-inline-meta button {
        width: 100%;
    }

    .chat-actions {
        justify-content: stretch;
    }

    .chat-actions button {
        flex: 1 1 calc(50% - 0.45rem);
    }

    .confirm-modal-actions button {
        flex: 1 1 calc(50% - 0.45rem);
    }

    .image-modal-head {
        flex-wrap: wrap;
    }

    .image-modal-actions {
        width: 100%;
    }

    #screenshotImage {
        max-height: 56vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

