
:root {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #202b3c;
    background: #f4f6f9;
    font-synthesis: none;
    --blue: #2463a6;
    --blue-dark: #174b83;
    --text: #202b3c;
    --muted: #8290a2;
    --border: #e7ebf0;
    --panel: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background: #f4f6f9;
}

button, input, select {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 245px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 42px;
}

.brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: linear-gradient(145deg, #2e79bd, #174b83);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: -1px;
    box-shadow: 0 5px 12px #2463a633;
}

.brand-name {
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1.2px;
}

.brand-subtitle {
    font-size: 9px;
    color: #8b98a9;
    letter-spacing: 2.2px;
    margin-top: 3px;
}

.nav-label, .panel-kicker, .eyebrow {
    color: #96a2b1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.nav-label {
    padding: 0 12px 12px;
}

nav {
    display: grid;
    gap: 6px;
}

.nav-item {
    text-decoration: none;
    color: #647287;
    padding: 12px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
}

.nav-item.active {
    color: var(--blue);
    background: #edf4fb;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-bottom {
    margin-top: auto;
}

.host-card {
    background: #f5f8fb;
    border: 1px solid #e9eef4;
    border-radius: 10px;
    padding: 13px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.host-indicator, .mini-dot, .status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d6a13b;
    flex-shrink: 0;
}

.host-card strong, .host-card span {
    display: block;
}

.host-card strong {
    font-size: 12px;
}

.host-card span {
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px;
}

.sidebar-version {
    color: #a4adba;
    font-size: 9px;
    letter-spacing: 1px;
    padding: 20px 4px 0;
}

.main-content {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 28px 36px 20px;
}

.topbar, .topbar-right, .welcome-row, .panel-header,
.target-legend, .results-footer, .footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

h1 {
    font-size: 25px;
    margin: 5px 0 0;
    letter-spacing: -0.6px;
}

.topbar-right {
    gap: 20px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #647287;
    font-size: 12px;
}

.status-dot.online, .host-indicator.online, .mini-dot.online {
    background: #24a477;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e7eef7;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

.welcome-row {
    padding: 26px 0 22px;
}

h2 {
    font-size: 19px;
    margin: 0 0 5px;
}

.welcome-row p {
    color: var(--muted);
    margin: 0;
    font-size: 13px;
}

.date-display {
    color: #8491a1;
    font-size: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card, .panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px #25364a08;
}

.stat-card {
    padding: 18px 20px;
    min-height: 118px;
}

.stat-heading {
    font-size: 9px;
    letter-spacing: 1.2px;
    color: #96a2b1;
    font-weight: 700;
}

.stat-value {
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -0.8px;
    margin: 11px 0 7px;
}

.stat-foot {
    color: #93a0af;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.mini-dot {
    width: 6px;
    height: 6px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(300px, 1.1fr);
    gap: 16px;
    align-items: stretch;
}

.panel {
    padding: 21px;
    min-width: 0;
}

.panel-header {
    margin-bottom: 21px;
}

.panel-header h3 {
    margin: 5px 0 0;
    font-size: 16px;
}

.panel-icon {
    color: #8a9aab;
    font-size: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #8c99a8;
    font-size: 9px;
    letter-spacing: 1.1px;
    font-weight: 700;
    margin-bottom: 7px;
}

.form-group input, .form-group select {
    width: 100%;
    height: 41px;
    border: 1px solid #e1e7ee;
    border-radius: 7px;
    padding: 0 11px;
    color: #344256;
    background: #fff;
    outline: none;
    font-size: 12px;
}

.form-group input:focus, .form-group select:focus {
    border-color: #6c9dce;
    box-shadow: 0 0 0 3px #2463a614;
}

.button {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.button:active {
    transform: translateY(1px);
}

.button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.button-primary {
    background: var(--blue);
    color: white;
}

.button-primary:hover:not(:disabled) {
    background: var(--blue-dark);
}

.button-secondary {
    background: #edf3f9;
    color: var(--blue);
    border: 1px solid #dce8f4;
}

.button-secondary:hover:not(:disabled) {
    background: #e2edf8;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8794a4;
    font-size: 11px;
    margin-top: 13px;
}

.session-state-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c4ccd5;
}

.session-info.active .session-state-dot {
    background: #24a477;
}

.divider {
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.muted-text {
    color: #8996a5;
    font-size: 11px;
    line-height: 1.5;
    margin: 9px 0 12px;
}

.notice {
    color: #a1aab6;
    font-size: 9px;
    text-align: center;
    margin-top: 9px;
}

.live-badge {
    color: #27946e;
    background: #eaf7f1;
    border-radius: 20px;
    padding: 6px 9px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-badge span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #27946e;
}

.target-area {
    min-height: 315px;
    display: grid;
    place-items: center;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 9px;
    padding: 15px;
    overflow: hidden;
}

.target {
    width: min(100%, 290px);
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    background: #fff;
    border: 1px solid #9ca8b5;
    overflow: hidden;
    box-shadow: 0 3px 10px #1c2e4212;
}

.ring {
    position: absolute;
    border: 1px solid #7f8a96;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 { width: 10%; height: 10%; background: #202b3c; border-color: #202b3c; }
.ring-2 { width: 20%; height: 20%; border-color: white; }
.ring-3 { width: 30%; height: 30%; }
.ring-4 { width: 40%; height: 40%; }
.ring-5 { width: 50%; height: 50%; }
.ring-6 { width: 60%; height: 60%; }
.ring-7 { width: 70%; height: 70%; }
.ring-8 { width: 80%; height: 80%; }
.ring-9 { width: 90%; height: 90%; }
.ring-10 { width: 100%; height: 100%; }

.crosshair {
    position: absolute;
    background: #9ba6b2;
    opacity: .55;
}

.crosshair.horizontal {
    width: 100%;
    height: 1px;
    top: 50%;
}

.crosshair.vertical {
    height: 100%;
    width: 1px;
    left: 50%;
}

.target-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.shot-marker {
    position: absolute;
    width: 9px;
    height: 9px;
    border: 2px solid white;
    border-radius: 50%;
    background: #d94c42;
    box-shadow: 0 1px 4px #0008;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.target-legend {
    color: #8996a5;
    font-size: 10px;
    padding: 13px 2px 0;
}

.target-legend span:first-child {
    display: flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d94c42;
}

.results-panel {
    grid-column: 1 / -1;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 11px;
}

th {
    color: #96a2b1;
    font-size: 9px;
    letter-spacing: .8px;
    text-align: left;
    padding: 10px 12px;
    background: #f8fafc;
}

td {
    padding: 12px;
    border-bottom: 1px solid #edf0f4;
    color: #566579;
}

.empty-row td {
    color: #a1acb9;
    text-align: center;
    padding: 25px 10px;
}

.results-footer {
    color: #96a2b1;
    font-size: 10px;
    padding-top: 14px;
}

.footer {
    color: #a1aab6;
    font-size: 9px;
    padding-top: 22px;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    max-width: min(380px, calc(100vw - 44px));
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    background: #26384d;
    box-shadow: 0 5px 20px #0002;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: .2s;
    z-index: 20;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 1250px) {
    .workspace-grid {
        grid-template-columns: minmax(270px, .8fr) minmax(360px, 1.2fr);
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 205px;
    }

    .main-content {
        padding: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        padding: 13px 15px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        padding: 0;
    }

    .sidebar .nav-label, .sidebar nav, .sidebar-bottom {
        display: none;
    }

    .main-content {
        padding: 18px 14px;
    }

    .topbar {
        padding-bottom: 17px;
    }

    .system-status {
        font-size: 0;
    }

    .welcome-row {
        align-items: flex-start;
        gap: 10px;
    }

    .date-display {
        text-align: right;
        max-width: 110px;
    }

    .stats-grid {
        gap: 9px;
    }

    .stat-card {
        padding: 14px;
        min-height: 105px;
    }

    .stat-value {
        font-size: 21px;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .results-panel {
        grid-column: auto;
    }

    .target-area {
        min-height: 280px;
    }

    .footer {
        align-items: flex-start;
        gap: 8px;
        flex-direction: column;
    }
}
