/*
 * Frontline operational analytics
 * Scoped to "Запуски и матчи" and "Ошибки проекта" only.
 */

:root {
    /* Surfaces/ink follow the v3 readability tokens from admin-theme.css
       (fallbacks keep the file usable standalone). */
    --analytics-canvas: var(--os-bg, #14171e);
    --analytics-surface: var(--os-panel, #1d222c);
    --analytics-surface-raised: var(--os-panel-3, #242a36);
    --analytics-surface-soft: var(--os-panel-2, #181c25);
    --analytics-line: var(--os-border, rgba(151, 168, 195, 0.14));
    --analytics-line-strong: var(--os-border-strong, rgba(151, 168, 195, 0.26));
    --analytics-text: var(--os-text, #e7ebf2);
    --analytics-muted: var(--os-muted, #a7b1c2);
    --analytics-faint: var(--os-muted-2, #7f8ba0);
    --analytics-cyan: #69d7d0;
    --analytics-blue: #75bdf2;
    --analytics-orange: #f0b36b;
    --analytics-red: #ff8290;
    --analytics-green: #7bd8a7;
    --analytics-violet: #b0a1f5;
    --analytics-radius: 12px;
    --analytics-radius-sm: 8px;
    --analytics-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.game-launch-analytics,
#search-area:has(.error-analytics-toolbar),
#dashboard-area:has(.error-analytics-health),
.error-analytics-state,
.error-group-table-panel,
.error-detail-overlay {
    --os-panel: var(--analytics-surface);
    --os-panel-2: var(--analytics-surface-raised);
    --os-border: var(--analytics-line);
    --os-border-strong: var(--analytics-line-strong);
    --os-accent: var(--analytics-cyan);
    --os-accent-hover: #a1f1ed;
    --os-accent-soft: rgba(105, 215, 208, 0.11);
    --os-accent-border: rgba(105, 215, 208, 0.34);
    --an-ink: var(--analytics-text);
    --an-ink-2: var(--analytics-muted);
    --an-ink-3: var(--analytics-faint);
    --an-hairline: rgba(151, 166, 188, 0.11);
    --an-good: var(--analytics-green);
    --an-good-soft: rgba(123, 216, 167, 0.1);
    --an-good-border: rgba(123, 216, 167, 0.27);
    --an-warn: var(--analytics-orange);
    --an-warn-soft: rgba(240, 179, 107, 0.1);
    --an-warn-border: rgba(240, 179, 107, 0.29);
    --an-danger: var(--analytics-red);
    --an-danger-soft: rgba(255, 130, 144, 0.1);
    --an-danger-border: rgba(255, 130, 144, 0.3);
    --an-info: var(--analytics-blue);
    --an-info-soft: rgba(117, 189, 242, 0.1);
    --an-info-border: rgba(117, 189, 242, 0.27);
    --an-violet: var(--analytics-violet);
    --an-violet-soft: rgba(176, 161, 245, 0.1);
    --an-violet-border: rgba(176, 161, 245, 0.28);
    color: var(--analytics-text);
}

/* -------------------------------------------------------------------------- */
/* Launches and matches                                                       */
/* -------------------------------------------------------------------------- */

.game-launch-analytics.an-shell {
    display: grid;
    gap: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.game-launch-analytics .an-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 18px;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-surface);
    box-shadow: var(--analytics-shadow);
}

.game-launch-analytics .an-head__copy {
    max-width: 760px;
}

.game-launch-analytics .an-head__kicker {
    margin-bottom: 5px;
    color: var(--analytics-cyan);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.game-launch-analytics .an-head__title {
    color: var(--analytics-text);
    font-size: clamp(20px, 1.45vw, 25px);
    font-weight: 650;
    letter-spacing: -0.025em;
}

.game-launch-analytics .an-head__sub {
    max-width: 72ch;
    margin-top: 4px;
    color: var(--analytics-muted);
    font-size: 14px;
    line-height: 1.5;
}

.game-launch-analytics .an-head__sub strong {
    color: var(--analytics-text);
    font-weight: 650;
}

.game-launch-analytics .an-head__actions {
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.game-launch-analytics .an-toolbar,
.game-launch-analytics .game-launch-toolbar {
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-surface);
}

.game-launch-analytics .an-meta {
    display: flex;
    align-items: center;
    gap: 8px 14px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius-sm);
    background: var(--analytics-surface-soft);
    color: var(--analytics-faint);
    font-size: 12px;
    line-height: 1.35;
}

.game-launch-analytics .an-meta > span {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.game-launch-analytics .an-meta .an-badge--good {
    color: var(--analytics-muted);
}

.game-launch-analytics .an-meta .an-badge--good::before {
    background: var(--analytics-green);
}

.game-launch-analytics .an-seg {
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--analytics-line);
    border-radius: 9px;
    background: var(--analytics-canvas);
}

.game-launch-analytics .an-seg__btn {
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 6px;
    color: var(--analytics-muted);
    font-size: 12px;
    font-weight: 650;
}

.game-launch-analytics .an-seg__btn:hover {
    color: var(--analytics-text);
    background: rgba(255, 255, 255, 0.04);
}

.game-launch-analytics .an-seg__btn.is-active {
    background: rgba(105, 215, 208, 0.14);
    color: #c9f8f5;
    box-shadow: inset 0 0 0 1px rgba(105, 215, 208, 0.18);
}

.game-launch-analytics .an-btn,
.game-launch-analytics .an-select,
.game-launch-analytics .an-input,
.game-launch-analytics .an-search input {
    min-height: 40px;
    border: 1px solid var(--analytics-line-strong);
    border-radius: var(--analytics-radius-sm);
    background: var(--analytics-surface-soft);
    color: var(--analytics-text);
    font-size: 13px;
}

.game-launch-analytics .an-field > span {
    color: var(--analytics-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.game-launch-analytics .an-btn {
    padding: 8px 12px;
    font-weight: 650;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.game-launch-analytics .an-btn:hover {
    border-color: rgba(105, 215, 208, 0.5);
    background: rgba(105, 215, 208, 0.08);
    color: #efffff;
}

.game-launch-analytics .an-btn--primary {
    border-color: rgba(105, 215, 208, 0.4);
    background: rgba(105, 215, 208, 0.13);
    color: #c7f8f4;
}

.game-launch-analytics .an-btn--sm {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
}

.game-launch-analytics .an-btn:focus-visible,
.game-launch-analytics .an-select:focus-visible,
.game-launch-analytics .an-input:focus-visible,
.game-launch-analytics .an-search input:focus-visible,
.game-launch-analytics .an-seg__btn:focus-visible,
.game-launch-analytics .an-expand > summary:focus-visible,
.game-launch-analytics [role="button"]:focus-visible {
    outline: 2px solid var(--analytics-cyan);
    outline-offset: 2px;
}

.game-launch-analytics .an-kpis,
.game-launch-analytics .game-launch-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
    gap: 10px;
}

.game-launch-analytics .an-kpi {
    position: relative;
    min-height: 104px;
    padding: 14px 15px;
    overflow: hidden;
    border: 1px solid var(--analytics-line);
    border-radius: 10px;
    background: var(--analytics-surface);
    box-shadow: none;
}

.game-launch-analytics .an-kpi:hover {
    transform: none;
    border-color: var(--analytics-line-strong);
    background: var(--analytics-surface-raised);
}

.game-launch-analytics .an-kpi__label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--analytics-muted);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.025em;
}

.game-launch-analytics .an-kpi__label i {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 11px;
}

.game-launch-analytics .an-kpi__value,
.game-launch-analytics .an-launch-count strong,
.game-launch-analytics .game-launch-insight__value {
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.035em;
}

.game-launch-analytics .an-kpi__value {
    margin-top: 8px;
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 700;
    line-height: 1;
}

.game-launch-analytics .an-kpi__meta {
    margin-top: 8px;
    color: var(--analytics-faint);
    font-size: 12px;
    line-height: 1.35;
}

.game-launch-analytics .an-kpi--live,
.game-launch-analytics .an-kpi--alert,
.game-launch-analytics .an-kpi--primary {
    background: linear-gradient(145deg, rgba(105, 215, 208, 0.075), var(--analytics-surface) 58%);
}

.game-launch-analytics .an-kpi--alert {
    border-color: var(--an-warn-border);
    background: linear-gradient(145deg, rgba(240, 179, 107, 0.075), var(--analytics-surface) 58%);
}

.game-launch-analytics .game-launch-insights,
.game-launch-analytics .launch-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-line);
}

.game-launch-analytics .game-launch-insight,
.game-launch-analytics .launch-insight {
    min-width: 0;
    padding: 13px 15px;
    background: var(--analytics-surface-soft);
}

.game-launch-analytics .game-launch-insight__label,
.game-launch-analytics .launch-insight__label {
    color: var(--analytics-faint);
    font-size: 12px;
}

.game-launch-analytics .game-launch-insight__value,
.game-launch-analytics .launch-insight__value {
    display: block;
    margin-top: 5px;
    font-size: 20px;
    font-weight: 700;
}

.game-launch-analytics .an-panel {
    overflow: clip;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-surface);
    box-shadow: none;
}

.game-launch-analytics .an-panel--warn {
    border-color: var(--an-warn-border);
}

.game-launch-analytics .an-panel__head {
    min-height: 54px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--analytics-line);
    background: rgba(255, 255, 255, 0.012);
}

.game-launch-analytics .an-panel__title {
    color: var(--analytics-text);
    font-size: 14px;
    font-weight: 680;
    letter-spacing: 0;
    text-transform: none;
}

.game-launch-analytics .an-panel__title small,
.game-launch-analytics .an-panel__aside {
    color: var(--analytics-faint);
    font-size: 12px;
}

.game-launch-analytics .an-panel__body {
    padding: 14px;
}

.game-launch-analytics .an-panel__body--flush {
    padding: 0;
}

.game-launch-analytics .an-chart {
    height: 230px;
    min-height: 230px;
    padding: 4px 6px 2px;
}

.game-launch-analytics .game-launch-overview-grid,
.game-launch-analytics .launch-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
    gap: 14px;
    align-items: stretch;
}

.game-launch-analytics .an-badge {
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
}

.game-launch-analytics .an-table {
    width: 100%;
    margin: 0;
    border-spacing: 0;
}

.game-launch-analytics .an-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px 12px;
    border-bottom: 1px solid var(--analytics-line);
    background: #121b25;
    color: var(--analytics-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.game-launch-analytics .an-table td {
    padding: 10px 12px;
    border-bottom-color: var(--an-hairline);
    color: var(--analytics-muted);
    font-size: 13px;
    line-height: 1.4;
}

.game-launch-analytics .an-table tbody tr:hover {
    background: rgba(117, 189, 242, 0.045);
}

.game-launch-analytics .an-table tbody tr[tabindex] {
    cursor: pointer;
}

.game-launch-analytics .an-table tbody tr[tabindex]:focus-visible {
    outline: 2px solid var(--analytics-cyan);
    outline-offset: -2px;
}

.game-launch-analytics .an-cell-main {
    color: var(--analytics-text);
    font-size: 13px;
    font-weight: 620;
}

.game-launch-analytics .an-cell-sub {
    margin-top: 3px;
    color: var(--analytics-faint);
    font-size: 12px;
    line-height: 1.35;
}

.game-launch-analytics .an-cell-mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.game-launch-analytics .an-expand {
    border-bottom: 1px solid var(--an-hairline);
}

.game-launch-analytics .an-expand > summary {
    min-height: 66px;
    padding: 10px 13px;
    cursor: pointer;
    transition: background 150ms ease;
}

.game-launch-analytics .an-expand > summary:hover {
    background: rgba(117, 189, 242, 0.04);
}

.game-launch-analytics .an-expand[open] > summary {
    background: rgba(105, 215, 208, 0.045);
    box-shadow: inset 3px 0 0 rgba(105, 215, 208, 0.62);
}

.game-launch-analytics .an-expand__children {
    gap: 10px;
    padding: 10px 12px 14px;
    border-top: 1px solid var(--an-hairline);
    background: var(--analytics-canvas);
}

/* ---------------------------------------------------------------- */
/* Server sessions workspace                                        */
/* ---------------------------------------------------------------- */

/* Ratio strip — the secondary numbers under the KPI row. */
.game-launch-analytics .gl-ratios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-line);
}

.game-launch-analytics .gl-ratio {
    min-width: 0;
    padding: 11px 14px;
    background: var(--analytics-surface-soft);
}

.game-launch-analytics .gl-ratio__label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--analytics-faint);
    font-size: 11px;
    font-weight: 650;
}

.game-launch-analytics .gl-ratio__label i {
    flex: 0 0 auto;
    font-size: 10px;
}

.game-launch-analytics .gl-ratio__value {
    display: block;
    margin-top: 5px;
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.game-launch-analytics .gl-ratio--warn .gl-ratio__label,
.game-launch-analytics .gl-ratio--warn .gl-ratio__value {
    color: var(--an-warn);
}

/* Collapsible chart panel. */
.game-launch-analytics .gl-collapse > summary {
    display: flex;
    list-style: none;
    cursor: pointer;
}

.game-launch-analytics .gl-collapse > summary::-webkit-details-marker {
    display: none;
}

.game-launch-analytics .gl-collapse > summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.game-launch-analytics .gl-collapse > summary:focus-visible {
    outline: 2px solid var(--analytics-cyan);
    outline-offset: -2px;
}

.game-launch-analytics .gl-collapse__chevron {
    color: var(--analytics-faint);
    font-size: 11px;
    transition: transform 200ms ease;
}

.game-launch-analytics .gl-collapse[open] .gl-collapse__chevron {
    transform: rotate(180deg);
}

/* Filter bar: search + sort on the first row, facet chips on the second. */
.game-launch-analytics .gl-controls {
    display: grid;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-surface);
}

.game-launch-analytics .gl-controls__row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
}

.game-launch-analytics .gl-controls__row--chips {
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--an-hairline);
    gap: 6px 8px;
}

.game-launch-analytics .gl-controls__search {
    flex: 1 1 320px;
}

.game-launch-analytics .gl-controls__sort {
    flex: 0 1 240px;
}

.game-launch-analytics .gl-sort-field {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.game-launch-analytics .gl-sort-field .an-select {
    flex: 1 1 auto;
    min-width: 0;
}

.game-launch-analytics .gl-dir {
    flex: 0 0 auto;
    display: grid;
    width: 40px;
    padding: 0;
    place-items: center;
}

.game-launch-analytics .gl-chips__label {
    color: var(--analytics-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.game-launch-analytics .gl-chips__label--gap {
    margin-left: 10px;
}

.game-launch-analytics .gl-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 11px;
    border: 1px solid var(--analytics-line-strong);
    border-radius: 999px;
    background: var(--analytics-surface-soft);
    color: var(--analytics-muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.game-launch-analytics .gl-chip:hover {
    border-color: rgba(105, 215, 208, 0.45);
    color: var(--analytics-text);
}

.game-launch-analytics .gl-chip:focus-visible {
    outline: 2px solid var(--analytics-cyan);
    outline-offset: 2px;
}

.game-launch-analytics .gl-chip b {
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.game-launch-analytics .gl-chip.is-active {
    border-color: rgba(105, 215, 208, 0.5);
    background: rgba(105, 215, 208, 0.13);
    color: #c9f8f5;
}

.game-launch-analytics .gl-chip.is-active b {
    color: #eafffd;
}

.game-launch-analytics .gl-chip__dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--analytics-faint);
}

.game-launch-analytics .gl-chip--good .gl-chip__dot { background: var(--an-good); }
.game-launch-analytics .gl-chip--warn .gl-chip__dot { background: var(--an-warn); }
.game-launch-analytics .gl-chip--danger .gl-chip__dot { background: var(--an-danger); }
.game-launch-analytics .gl-chip--info .gl-chip__dot { background: var(--an-info); }
.game-launch-analytics .gl-chip--accent .gl-chip__dot { background: var(--analytics-cyan); }

.game-launch-analytics .gl-controls__count {
    margin-left: auto;
    color: var(--analytics-faint);
    font-size: 12px;
    white-space: nowrap;
}

.game-launch-analytics .gl-controls__count strong {
    color: var(--analytics-text);
    font-variant-numeric: tabular-nums;
}

/* Session list: shared 7-column track for the header and every row. */
.game-launch-analytics .an-launch-row,
.game-launch-analytics .gl-head {
    grid-template-columns:
        minmax(230px, 1.75fr)
        minmax(150px, 1fr)
        minmax(146px, 0.95fr)
        minmax(122px, 0.7fr)
        minmax(92px, 0.5fr)
        minmax(126px, 0.75fr)
        68px;
    gap: 12px;
    align-items: center;
}

.game-launch-analytics .gl-head {
    display: grid;
    padding: 0 13px;
    border-bottom: 1px solid var(--analytics-line);
    background: #121b25;
}

.game-launch-analytics .gl-sort {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--analytics-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 140ms ease;
}

.game-launch-analytics .gl-sort:hover {
    color: var(--analytics-text);
}

.game-launch-analytics .gl-sort:focus-visible {
    outline: 2px solid var(--analytics-cyan);
    outline-offset: -2px;
}

.game-launch-analytics .gl-sort i {
    font-size: 9px;
    opacity: 0;
    transition: opacity 140ms ease;
}

.game-launch-analytics .gl-sort:hover i {
    opacity: 0.45;
}

.game-launch-analytics .gl-sort.is-active {
    color: var(--analytics-cyan);
}

.game-launch-analytics .gl-sort.is-active i {
    opacity: 1;
}

.game-launch-analytics .gl-sort--num {
    justify-content: center;
    text-align: center;
}

/* A status rail on the left edge makes state readable without reading. */
.game-launch-analytics .gl-session > summary {
    min-height: 62px;
    padding: 9px 13px;
}

.game-launch-analytics .gl-session[data-status="running"] > summary { box-shadow: inset 3px 0 0 var(--an-good); }
.game-launch-analytics .gl-session[data-status="starting"] > summary { box-shadow: inset 3px 0 0 var(--an-info); }
.game-launch-analytics .gl-session[data-status="completed"] > summary { box-shadow: inset 3px 0 0 rgba(105, 215, 208, 0.6); }
.game-launch-analytics .gl-session[data-status="abandoned"] > summary { box-shadow: inset 3px 0 0 var(--an-warn); }
.game-launch-analytics .gl-session[data-status="failed"] > summary { box-shadow: inset 3px 0 0 var(--an-danger); }
.game-launch-analytics .gl-session[data-status="unknown"] > summary { box-shadow: inset 3px 0 0 var(--analytics-line-strong); }

.game-launch-analytics .gl-session[open] > summary {
    background: rgba(105, 215, 208, 0.05);
}

.game-launch-analytics .gl-cell {
    min-width: 0;
}

.game-launch-analytics .gl-server {
    display: flex;
    align-items: center;
    gap: 9px;
}

.game-launch-analytics .gl-server__icon {
    display: grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--analytics-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--analytics-muted);
    font-size: 12px;
}

.game-launch-analytics .gl-session[data-status="running"] .gl-server__icon {
    border-color: var(--an-good-border);
    background: var(--an-good-soft);
    color: var(--an-good);
}

.game-launch-analytics .gl-session[data-status="abandoned"] .gl-server__icon {
    border-color: var(--an-warn-border);
    background: var(--an-warn-soft);
    color: var(--an-warn);
}

.game-launch-analytics .gl-server__body {
    min-width: 0;
}

.game-launch-analytics .an-cell-main.is-missing,
.game-launch-analytics .an-cell-sub.is-missing {
    color: var(--analytics-faint);
    font-style: italic;
    font-weight: 500;
}

.game-launch-analytics .gl-status {
    display: grid;
    gap: 4px;
    justify-items: start;
}

.game-launch-analytics .gl-status .an-cell-sub {
    margin-top: 0;
}

.game-launch-analytics .gl-plat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    color: var(--analytics-text);
    font-size: 13px;
    font-weight: 620;
}

.game-launch-analytics .gl-plat i {
    color: var(--analytics-blue);
    font-size: 12px;
}

.game-launch-analytics .gl-plat--android i {
    color: var(--analytics-green);
}

.game-launch-analytics .gl-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.game-launch-analytics .gl-icon-btn,
.game-launch-analytics .gl-copy {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--analytics-faint);
    font-size: 12px;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.game-launch-analytics .gl-icon-btn:hover,
.game-launch-analytics .gl-copy:hover,
.game-launch-analytics .gl-icon-btn:focus-visible,
.game-launch-analytics .gl-copy:focus-visible {
    border-color: rgba(105, 215, 208, 0.5);
    background: rgba(105, 215, 208, 0.1);
    color: var(--analytics-text);
    outline: none;
}

.game-launch-analytics .gl-panel-actions {
    display: inline-flex;
    gap: 6px;
}

/* Expanded session body. */
.game-launch-analytics .gl-children {
    display: grid;
    gap: 10px;
}

.game-launch-analytics .gl-children__bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.game-launch-analytics .gl-children__hint {
    margin-left: auto;
    color: var(--analytics-faint);
    font-size: 12px;
}

.game-launch-analytics .gl-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--analytics-line);
    border-radius: 10px;
    background: var(--analytics-line);
}

.game-launch-analytics .gl-fact {
    min-width: 0;
    padding: 10px 13px;
    background: var(--analytics-surface-soft);
}

.game-launch-analytics .gl-fact > span {
    display: block;
    margin-bottom: 4px;
    color: var(--analytics-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.game-launch-analytics .gl-fact__value {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.game-launch-analytics .gl-fact__value strong {
    min-width: 0;
    overflow: hidden;
    color: var(--analytics-text);
    font-size: 13px;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-launch-analytics .gl-matches .an-table td {
    vertical-align: top;
}

.game-launch-analytics .gl-matches__go {
    width: 34px;
    color: var(--analytics-faint);
    text-align: right;
}

.game-launch-analytics .gl-matches .an-table tbody tr:hover .gl-matches__go {
    color: var(--analytics-cyan);
}

.game-launch-analytics .gl-score {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.game-launch-analytics .gl-score__o { color: var(--analytics-orange); }
.game-launch-analytics .gl-score__b { color: var(--analytics-blue); }

.game-launch-analytics .gl-score__sep {
    color: var(--analytics-faint);
    font-style: normal;
    font-weight: 500;
}

.game-launch-analytics .gl-footnote {
    flex-wrap: wrap;
}

.game-launch-analytics .an-launch-count strong {
    color: var(--analytics-text);
    font-size: 17px;
}

.game-launch-analytics .an-launch-count span {
    color: var(--analytics-faint);
    font-size: 11px;
}

.game-launch-analytics .an-pager {
    min-height: 54px;
    padding: 9px 12px;
    border-top: 1px solid var(--analytics-line);
    background: var(--analytics-surface-soft);
}

.game-launch-analytics .an-pager__info {
    color: var(--analytics-muted);
    font-size: 12px;
}

.game-launch-analytics .an-empty,
.game-launch-analytics .an-state {
    color: var(--analytics-muted);
}

.game-launch-analytics .an-state {
    min-height: 190px;
    border: 1px dashed var(--analytics-line-strong);
    border-radius: var(--analytics-radius);
    background: var(--analytics-surface);
}

.game-launch-analytics .an-state h3 {
    color: var(--analytics-text);
    font-size: 16px;
}

.game-launch-analytics .an-state p,
.game-launch-analytics .an-empty {
    font-size: 13px;
    line-height: 1.5;
}

/* -------------------------------------------------------------------------- */
/* Project errors                                                             */
/* -------------------------------------------------------------------------- */

.error-analytics-toolbar,
.error-analytics-health,
.error-analytics-kpis,
.error-analytics-analysis-grid,
.error-group-table-panel,
.error-detail {
    color: var(--analytics-text);
}

/* The analytics toolbar is a large workspace section, not a sticky utility bar.
   Keeping it pinned hid the trend and table behind it while the user scrolled. */
#search-area:has(> .error-analytics-toolbar) {
    position: static;
    top: auto;
    z-index: auto;
}

.error-analytics-toolbar {
    container-type: inline-size;
    padding: 17px 18px 12px;
    overflow: visible;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-surface);
    box-shadow: var(--analytics-shadow);
}

.error-analytics-toolbar__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--analytics-line);
}

.error-analytics-toolbar__heading {
    max-width: 760px;
}

.error-analytics-toolbar__kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    color: var(--analytics-cyan);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.error-analytics-toolbar__heading h2 {
    color: var(--analytics-text);
    font-size: clamp(20px, 1.45vw, 25px);
    font-weight: 650;
    letter-spacing: -0.025em;
}

.error-analytics-toolbar__heading p {
    max-width: 74ch;
    margin-top: 4px;
    color: var(--analytics-muted);
    font-size: 14px;
    line-height: 1.5;
}

.error-analytics-toolbar__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.error-analytics-toolbar__button,
.error-analytics-toolbar__reset,
.error-analytics-state__action,
.error-detail-load-more,
.error-analytics-advanced > summary {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--analytics-line-strong);
    border-radius: var(--analytics-radius-sm);
    background: var(--analytics-surface-soft);
    color: var(--analytics-text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.error-analytics-toolbar__button:hover,
.error-analytics-toolbar__reset:hover,
.error-analytics-state__action:hover,
.error-detail-load-more:hover,
.error-analytics-advanced > summary:hover {
    border-color: rgba(105, 215, 208, 0.5);
    background: rgba(105, 215, 208, 0.08);
    color: #efffff;
}

.error-analytics-toolbar__button--primary {
    border-color: rgba(105, 215, 208, 0.4);
    background: rgba(105, 215, 208, 0.13);
    color: #c7f8f4;
}

.error-analytics-toolbar__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-analytics-filter {
    gap: 10px;
}

.error-analytics-filter--primary,
.error-analytics-commandbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0 11px;
}

.error-analytics-filter__group {
    min-width: 0;
}

.error-analytics-filter__group--period {
    margin-left: auto;
}

.error-analytics-filter--secondary,
.error-analytics-querybar {
    display: grid;
    grid-template-columns: minmax(280px, 1.8fr) minmax(160px, 0.8fr) minmax(150px, 0.75fr);
    align-items: end;
    gap: 10px;
    padding: 0;
}

.error-analytics-filter__field,
.error-analytics-filter__field--search {
    min-width: 0;
}

.error-analytics-filter__label {
    display: grid;
    gap: 6px;
    color: var(--analytics-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.error-analytics-filter__search-wrap {
    position: relative;
    display: block;
}

.error-analytics-filter__search-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: var(--analytics-faint);
    transform: translateY(-50%);
    pointer-events: none;
}

.error-analytics-toolbar input[type="search"],
.error-analytics-toolbar input[type="date"],
.error-analytics-select,
.error-detail textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--analytics-line-strong);
    border-radius: var(--analytics-radius-sm);
    background: var(--analytics-surface-soft);
    color: var(--analytics-text);
    font-size: 13px;
}

.error-analytics-toolbar input[type="search"] {
    padding: 8px 11px 8px 36px;
}

.error-analytics-toolbar input[type="date"],
.error-analytics-select {
    padding: 8px 32px 8px 11px;
}

.error-analytics-toolbar input::placeholder,
.error-detail textarea::placeholder {
    color: #6f7e92;
}

.error-analytics-segment {
    display: flex;
    gap: 3px;
    padding: 3px;
    overflow-x: auto;
    border: 1px solid var(--analytics-line);
    border-radius: 9px;
    background: var(--analytics-canvas);
    scrollbar-width: none;
}

.error-analytics-segment::-webkit-scrollbar {
    display: none;
}

.error-analytics-segment__button {
    min-height: 34px;
    padding: 6px 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--analytics-muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.error-analytics-segment__button:hover {
    color: var(--analytics-text);
    background: rgba(255, 255, 255, 0.04);
}

.error-analytics-segment__button.is-active,
.error-analytics-segment__button[aria-pressed="true"] {
    background: rgba(105, 215, 208, 0.14);
    color: #c9f8f5;
    box-shadow: inset 0 0 0 1px rgba(105, 215, 208, 0.18);
}

.error-analytics-custom-range {
    display: flex;
    align-items: end;
    gap: 10px;
    margin: 0 0 11px;
    padding: 11px;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius-sm);
    background: var(--analytics-surface-soft);
}

.error-analytics-advanced {
    position: relative;
    min-width: 158px;
}

.error-analytics-advanced > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: fit-content;
    list-style: none;
    cursor: pointer;
    white-space: nowrap;
}

.error-analytics-advanced__chevron {
    color: var(--analytics-faint);
    font-size: 11px;
    transition: transform 160ms ease;
}

.error-analytics-advanced[open] .error-analytics-advanced__chevron {
    transform: rotate(180deg);
}

.error-analytics-advanced > summary::-webkit-details-marker {
    display: none;
}

.error-analytics-advanced[open] > summary {
    border-color: var(--os-accent-border);
    background: var(--os-accent-soft);
    color: #c7f8f4;
}

.error-analytics-advanced__count {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    background: rgba(105, 215, 208, 0.15);
    color: #c7f8f4;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
}

.error-analytics-advanced__panel,
.error-analytics-filter--advanced {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 11px;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius-sm);
    background: var(--analytics-surface-soft);
}

.error-analytics-toolbar__meta {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    min-height: 33px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--analytics-line);
    color: var(--analytics-faint);
    font-size: 12px;
}

.error-analytics-toolbar__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.error-analytics-toolbar__meta span:last-of-type {
    margin-left: auto;
}

.error-analytics-toolbar__reset {
    min-height: 30px;
    margin-left: 0;
    padding: 5px 8px;
    color: var(--analytics-muted);
    font-size: 12px;
}

.error-analytics-health {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.error-analytics-health__item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 14px 12px 18px;
    overflow: hidden;
    border: 1px solid var(--analytics-line);
    border-radius: 10px;
    background: var(--analytics-surface);
    box-shadow: none;
}

.error-analytics-health__item::before {
    position: absolute;
    inset: 10px auto 10px 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--analytics-faint);
    content: '';
}

.error-analytics-health__item--ok::before {
    background: var(--analytics-green);
}

.error-analytics-health__item--stale::before {
    background: var(--analytics-orange);
}

.error-analytics-health__copy,
.error-analytics-health__metrics {
    min-width: 0;
}

.error-analytics-health__copy > strong {
    color: var(--analytics-text);
    font-size: 14px;
    font-weight: 680;
}

.error-analytics-health__copy > span,
.error-analytics-health__metrics > span {
    color: var(--analytics-muted);
    font-size: 12px;
    line-height: 1.45;
}

.error-analytics-health__metrics {
    display: grid;
    justify-items: end;
    gap: 3px;
    text-align: right;
}

.error-analytics-health__metrics b {
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.error-analytics-health__warning {
    display: block;
    margin-top: 3px;
    color: var(--analytics-orange) !important;
}

.error-analytics-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.error-analytics-kpi {
    position: relative;
    min-height: 100px;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px solid var(--analytics-line);
    border-radius: 10px;
    background: var(--analytics-surface);
    box-shadow: none;
}

.error-analytics-kpi:hover {
    transform: none;
    border-color: var(--analytics-line-strong);
    background: var(--analytics-surface-raised);
}

.error-analytics-kpi--primary {
    border-color: rgba(105, 215, 208, 0.23);
    background: linear-gradient(145deg, rgba(105, 215, 208, 0.07), var(--analytics-surface) 62%);
}

.error-analytics-kpi--danger {
    background: linear-gradient(145deg, rgba(255, 130, 144, 0.07), var(--analytics-surface) 62%);
}

.error-analytics-kpi--danger {
    border-color: var(--an-danger-border);
}

.error-analytics-kpi--info {
    background: linear-gradient(145deg, rgba(117, 189, 242, 0.07), var(--analytics-surface) 62%);
}

.error-analytics-kpi--attention {
    border-color: rgba(240, 179, 107, 0.23);
    background: linear-gradient(145deg, rgba(240, 179, 107, 0.07), var(--analytics-surface) 62%);
}

.error-analytics-kpi__label {
    color: var(--analytics-muted);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.025em;
}

.error-analytics-kpi__value {
    display: block;
    margin-top: 8px;
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.035em;
}

.error-analytics-kpi__value small,
.error-analytics-kpi__meta {
    color: var(--analytics-faint);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

.error-analytics-kpi__meta {
    display: block;
    margin-top: 8px;
    line-height: 1.35;
}

.error-analytics-analysis-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(260px, 0.75fr);
    gap: 10px;
}

.error-analytics-timeline,
.error-analytics-breakdown,
.error-analytics-state,
.error-detail__workflow,
.error-event-list,
.error-event-inspector {
    overflow: clip;
    border: 1px solid var(--analytics-line);
    border-radius: var(--analytics-radius);
    background: var(--analytics-surface);
    box-shadow: none;
}

.error-analytics-timeline > header,
.error-analytics-breakdown > header,
.error-detail__workflow > header,
.error-event-list__header,
.error-event-inspector__header,
.error-event-environment-section > header,
.error-event-block > header {
    min-height: 52px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--analytics-line);
    background: rgba(255, 255, 255, 0.012);
}

.error-analytics-timeline h3,
.error-analytics-breakdown h3,
.error-detail__workflow h3,
.error-event-list h3,
.error-event-inspector h3,
.error-event-environment-section h4,
.error-event-block h4 {
    color: var(--analytics-text);
    font-size: 14px;
    font-weight: 680;
    letter-spacing: 0;
    text-transform: none;
}

.error-analytics-timeline header span,
.error-analytics-breakdown header span,
.error-detail__workflow header span,
.error-event-list__header span,
.error-event-inspector__header span,
.error-event-environment-section header span,
.error-event-block header span {
    color: var(--analytics-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.error-analytics-chart-container {
    height: 230px;
    min-height: 230px;
    padding: 8px 10px 7px;
}

.error-analytics-breakdown__list {
    display: grid;
    gap: 0;
    padding: 8px 11px;
}

.error-analytics-breakdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 39px;
    padding: 7px 5px;
    border: 0;
    border-bottom: 1px solid var(--an-hairline);
    background: transparent;
    color: var(--analytics-muted);
    font-size: 13px;
    text-align: left;
}

button.error-analytics-breakdown__item:hover,
button.error-analytics-breakdown__item:focus-visible {
    color: var(--analytics-text);
    background: rgba(117, 189, 242, 0.045);
}

.error-analytics-breakdown__item:last-child {
    border-bottom: 0;
}

.error-analytics-breakdown__item strong {
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

/* Error table: calmer rows and stronger information order. */
.error-group-table-panel {
    overflow: hidden;
    border: 1px solid var(--analytics-line) !important;
    border-radius: var(--analytics-radius) !important;
    background: var(--analytics-surface) !important;
    box-shadow: none !important;
}

.error-group-table-panel #empty-state {
    padding: 0 !important;
}

.error-group-table {
    width: 100%;
    margin: 0;
    border-spacing: 0;
}

.error-group-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 11px 14px !important;
    border-bottom: 1px solid var(--analytics-line) !important;
    background: #121b25 !important;
    color: var(--analytics-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
}

.error-group-table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--an-hairline) !important;
    background: transparent !important;
    color: var(--analytics-text) !important;
    font-size: 14px !important;
    line-height: 1.48;
    vertical-align: middle;
}

#admin-data-table.error-group-table {
    min-width: 1280px;
}

.error-group-table th:nth-child(1) { width: 172px; }
.error-group-table th:nth-child(2) { width: 43%; }
.error-group-table th:nth-child(3) { width: 170px; }
.error-group-table th:nth-child(4) { width: 144px; }
.error-group-table th:nth-child(5) { width: 176px; }
.error-group-table th:nth-child(6) { width: 188px; }
.error-group-table th:last-child { width: 68px; }

.error-group-table tbody tr:hover td,
.error-group-row:hover td {
    background: rgba(117, 189, 242, 0.045) !important;
}

.error-group-row:focus-visible,
.error-group-row:focus-within {
    outline: 2px solid var(--analytics-cyan);
    outline-offset: -2px;
}

.error-group-row--unresolved td:first-child,
.error-group-row--open td:first-child {
    box-shadow: inset 3px 0 0 rgba(255, 130, 144, 0.62);
}

.error-group-row--investigating td:first-child {
    box-shadow: inset 3px 0 0 rgba(240, 179, 107, 0.62);
}

.error-group-row--resolved td:first-child,
.error-group-row--ignored td:first-child {
    box-shadow: inset 3px 0 0 rgba(123, 216, 167, 0.5);
}

.error-group-sort,
.error-group-message,
.error-group-open {
    border-radius: 7px;
}

.error-group-sort {
    color: var(--analytics-muted);
    font-size: 12px;
    font-weight: 650;
}

.error-group-sort:hover,
.error-group-sort:focus-visible,
.error-group-sort.is-active {
    color: var(--analytics-text);
}

.error-group-message {
    width: 100%;
    padding: 3px 4px;
    text-align: left;
}

.error-group-message__title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--analytics-text);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.42;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.error-group-message__frame,
.error-group-source__meta,
.error-group-metric span,
.error-group-impact span,
.error-group-impact small,
.error-group-time span {
    color: var(--analytics-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.error-group-message__frame {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-group-source {
    gap: 6px;
}

.error-group-source__meta {
    display: -webkit-box;
    overflow: hidden;
    color: var(--analytics-muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.error-group-source-cell {
    min-width: 0;
}

.error-group-metric strong,
.error-group-impact strong,
.error-group-time strong {
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.error-group-open {
    display: inline-grid;
    width: 38px;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--analytics-line-strong);
    background: var(--analytics-surface-soft);
    color: var(--analytics-muted);
}

.error-group-open:hover,
.error-group-open:focus-visible {
    border-color: var(--os-accent-border);
    background: var(--os-accent-soft);
    color: #d2faf8;
}

.error-badge {
    min-height: 27px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.error-badge--status-unresolved,
.error-badge--status-open,
.error-badge--level-error,
.error-badge--level-fatal,
.error-badge--level-exception {
    color: var(--analytics-red) !important;
}

.error-badge--status-investigating,
.error-badge--level-warning {
    color: var(--analytics-orange) !important;
}

.error-badge--status-resolved,
.error-badge--status-ignored {
    color: var(--analytics-green) !important;
}

.error-analytics-state {
    min-height: 170px;
    padding: 24px;
    border-style: dashed;
    color: var(--analytics-muted);
}

.error-analytics-state h3 {
    color: var(--analytics-text);
    font-size: 16px;
}

.error-analytics-state p,
.error-analytics-timeline__empty,
.error-analytics-breakdown__empty {
    color: var(--analytics-muted);
    font-size: 13px;
    line-height: 1.5;
}

.error-analytics-state--error {
    border-color: var(--an-danger-border);
}

/* Detail explorer: one page scroll, only the event list remains independently scrollable. */
.error-detail-overlay {
    padding: 16px;
    overflow: auto;
    background: rgba(3, 6, 10, 0.76);
    backdrop-filter: blur(8px);
}

.error-detail-overlay > div {
    min-height: 0;
}

.error-detail {
    width: min(1480px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border: 1px solid var(--analytics-line-strong);
    border-radius: 14px;
    background: var(--analytics-canvas);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

.error-detail__header {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 16px 18px;
    border-bottom: 1px solid var(--analytics-line);
    background: rgba(16, 23, 32, 0.96);
    backdrop-filter: blur(10px);
}

.error-detail__identity h2 {
    color: var(--analytics-text);
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.error-detail__identity code,
.error-detail-fingerprint code,
.error-event-environment code {
    color: var(--analytics-muted);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
}

.error-detail-top-frame {
    color: var(--analytics-faint);
    font-size: 12px;
}

.error-detail__actions button,
.error-detail__workflow button,
.error-event-inspector button {
    min-height: 38px;
    border-color: var(--analytics-line-strong);
    border-radius: var(--analytics-radius-sm);
    background: var(--analytics-surface-soft);
    color: var(--analytics-text);
    font-size: 12px;
}

.error-detail__summary {
    padding: 14px 16px;
    border-bottom: 1px solid var(--analytics-line);
    background: var(--analytics-surface-soft);
}

.error-detail__kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.error-detail__kpis > div {
    min-height: 78px;
    padding: 11px 12px;
    border: 1px solid var(--analytics-line);
    border-radius: 9px;
    background: var(--analytics-surface);
}

.error-detail__kpis span {
    color: var(--analytics-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: none;
}

.error-detail__kpis strong {
    margin-top: 6px;
    color: var(--analytics-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.error-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 12px;
    padding: 14px 16px 18px;
    overflow: visible;
}

.error-detail__main,
.error-detail__side {
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.error-detail__main {
    display: grid;
    gap: 12px;
}

.error-detail__side {
    display: grid;
    align-content: start;
    gap: 12px;
}

.error-detail__workflow,
.error-event-list,
.error-event-inspector {
    border-radius: 10px;
}

.error-detail__workflow form {
    gap: 9px;
    padding: 12px;
}

.error-detail__workflow textarea {
    min-height: 96px;
    padding: 10px 11px;
    line-height: 1.5;
    resize: vertical;
}

.error-event-list__items {
    max-height: 420px;
    overflow: auto;
    overscroll-behavior: contain;
}

.error-event-item {
    min-height: 58px;
    border-bottom-color: var(--an-hairline);
    color: var(--analytics-muted);
}

.error-event-item:hover,
.error-event-item.is-selected,
.error-event-item--selected {
    background: rgba(117, 189, 242, 0.045);
}

.error-event-item.is-selected,
.error-event-item--selected {
    box-shadow: inset 3px 0 0 var(--analytics-cyan);
}

.error-event-item strong,
.error-event-list__header h3,
.error-event-inspector__header h3 {
    color: var(--analytics-text);
    font-size: 13px;
}

.error-event-item span:not(.error-badge),
.error-event-list__footer,
.error-event-list__empty,
.error-event-inspector__empty,
.error-event-environment span {
    color: var(--analytics-faint);
    font-size: 12px;
}

.error-event-stack,
.error-event-context {
    max-height: 260px;
    overflow: auto;
    border-color: var(--analytics-line);
    background: #0a1018;
    color: #cad5e2;
    font-size: 12px;
    line-height: 1.55;
    overscroll-behavior: contain;
}

/* Shared focus language for the error workspace. */
.error-analytics-toolbar button:focus-visible,
.error-analytics-toolbar input:focus-visible,
.error-analytics-toolbar select:focus-visible,
.error-analytics-breakdown__item:focus-visible,
.error-group-table button:focus-visible,
.error-detail button:focus-visible,
.error-detail textarea:focus-visible,
.error-detail select:focus-visible {
    outline: 2px solid var(--analytics-cyan);
    outline-offset: 2px;
}

@container (max-width: 980px) {
    .error-analytics-filter--primary,
    .error-analytics-commandbar {
        align-items: stretch;
        flex-direction: column;
    }

    .error-analytics-filter__group--period {
        margin-left: 0;
    }

    .error-analytics-filter--secondary,
    .error-analytics-querybar {
        grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(150px, 1fr));
    }

    .error-analytics-advanced {
        grid-column: 1 / -1;
    }

    .error-analytics-advanced > summary {
        width: max-content;
    }
}

@media (max-width: 1180px) {
    .game-launch-analytics .an-head {
        flex-direction: column;
    }

    .game-launch-analytics .an-head__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .game-launch-analytics .game-launch-overview-grid,
    .game-launch-analytics .launch-overview-grid,
    .error-analytics-analysis-grid {
        grid-template-columns: 1fr;
    }

    .game-launch-analytics .an-launch-row,
    .game-launch-analytics .gl-head {
        grid-template-columns:
            minmax(200px, 1.6fr)
            minmax(128px, 0.95fr)
            minmax(132px, 0.9fr)
            minmax(108px, 0.65fr)
            minmax(78px, 0.45fr)
            minmax(112px, 0.7fr)
            62px;
        gap: 8px;
    }

    .error-analytics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .error-detail__layout {
        grid-template-columns: 1fr;
    }

    .error-event-list__items {
        max-height: 360px;
    }
}

@media (max-width: 900px) {
    .game-launch-analytics .an-grid--2,
    .game-launch-analytics .an-expand__children {
        grid-template-columns: 1fr;
    }

    .game-launch-analytics .an-head,
    .error-analytics-toolbar {
        padding: 14px;
    }

    /* Below the sortable-header breakpoint the row becomes a stacked card:
       server + status + actions on top, then arena/matches and platform/launch. */
    .game-launch-analytics .gl-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px 10px;
    }

    .game-launch-analytics .gl-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
    .game-launch-analytics .gl-row > :nth-child(3) { grid-column: 2; grid-row: 1; }
    .game-launch-analytics .gl-row > :nth-child(7) { grid-column: 3; grid-row: 1; }
    .game-launch-analytics .gl-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
    .game-launch-analytics .gl-row > :nth-child(5) { grid-column: 2 / -1; grid-row: 2; text-align: right; }
    .game-launch-analytics .gl-row > :nth-child(4) { grid-column: 1; grid-row: 3; }
    .game-launch-analytics .gl-row > :nth-child(6) { grid-column: 2 / -1; grid-row: 3; text-align: right; }

    .game-launch-analytics .gl-status {
        justify-items: end;
        text-align: right;
    }

    .game-launch-analytics .gl-head {
        display: none;
    }

    .game-launch-analytics .gl-children__hint {
        display: none;
    }

    .error-analytics-toolbar__top {
        flex-direction: column;
    }

    .error-analytics-toolbar__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .error-analytics-filter--primary,
    .error-analytics-commandbar {
        align-items: stretch;
        flex-direction: column;
    }

    .error-analytics-filter__group--period {
        margin-left: 0;
    }

    .error-analytics-filter--secondary,
    .error-analytics-querybar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .error-analytics-filter__field--search {
        grid-column: 1 / -1;
    }

    .error-analytics-advanced {
        grid-column: 1 / -1;
    }

    .error-analytics-advanced__panel,
    .error-analytics-filter--advanced {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .error-analytics-health {
        grid-template-columns: 1fr;
    }

    .error-detail__header {
        position: static;
    }

    .error-detail__kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    /* Base theme turns the table into labelled cards here; undo the desktop
       minimum width so each card uses the available viewport. */
    #admin-data-table.error-group-table {
        min-width: 0;
    }

    .error-group-table td {
        font-size: 14px !important;
    }

    .error-group-table td::before {
        color: var(--analytics-muted);
        font-size: 11px;
        grid-column: 1;
        grid-row: 1 / -1;
    }

    .error-group-table td > * {
        grid-column: 2;
    }

    .error-group-metric strong,
    .error-group-impact strong,
    .error-group-time strong {
        grid-row: 1;
    }

    .error-group-metric span,
    .error-group-impact span,
    .error-group-time span {
        grid-row: 2;
    }

    .error-group-impact small {
        grid-row: 3;
    }

    .error-group-message__title {
        font-size: 14px;
    }

    .error-group-source__meta {
        display: block;
    }
}

@media (max-width: 620px) {
    .game-launch-analytics,
    #search-area:has(.error-analytics-toolbar),
    #dashboard-area:has(.error-analytics-health) {
        font-size: 14px;
    }

    .game-launch-analytics .an-head__title,
    .error-analytics-toolbar__heading h2 {
        font-size: 20px;
    }

    .game-launch-analytics .an-head__actions,
    .error-analytics-toolbar__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .game-launch-analytics .an-btn,
    .game-launch-analytics .an-select,
    .game-launch-analytics .an-input,
    .game-launch-analytics .an-search input,
    .game-launch-analytics .an-seg__btn,
    .game-launch-analytics .gl-chip,
    .game-launch-analytics .gl-sort,
    .error-analytics-toolbar__button,
    .error-analytics-toolbar input[type="search"],
    .error-analytics-toolbar input[type="date"],
    .error-analytics-select,
    .error-analytics-segment__button,
    .error-analytics-advanced > summary,
    .error-group-open,
    .error-detail__actions button,
    .error-detail__workflow button,
    .error-event-inspector button {
        min-height: 44px;
    }

    .game-launch-analytics .an-kpis,
    .game-launch-analytics .game-launch-kpis,
    .error-analytics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-launch-analytics .an-kpi,
    .error-analytics-kpi {
        min-height: 96px;
        padding: 12px;
    }

    .game-launch-analytics .an-chart,
    .error-analytics-chart-container {
        height: 210px;
        min-height: 210px;
    }

    .error-analytics-filter--secondary,
    .error-analytics-querybar,
    .error-analytics-advanced__panel,
    .error-analytics-filter--advanced {
        grid-template-columns: 1fr;
    }

    .error-analytics-filter__field--search,
    .error-analytics-advanced {
        grid-column: auto;
    }

    .error-analytics-custom-range {
        align-items: stretch;
        flex-direction: column;
    }

    .error-analytics-toolbar__meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .error-analytics-toolbar__meta span:last-of-type {
        margin-left: 0;
    }

    .error-analytics-health__item {
        grid-template-columns: 1fr;
    }

    .error-analytics-health__metrics {
        justify-items: start;
        text-align: left;
    }

    .error-group-table-panel {
        border: 0 !important;
        background: transparent !important;
    }

    .error-group-table td {
        font-size: 13px !important;
    }

    .error-detail-overlay {
        padding: 0;
    }

    .error-detail {
        width: 100vw;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .error-detail__header,
    .error-detail__summary,
    .error-detail__layout {
        padding-right: 12px;
        padding-left: 12px;
    }
}

@media (max-width: 420px) {
    .game-launch-analytics .an-kpis,
    .game-launch-analytics .game-launch-kpis,
    .error-analytics-kpis,
    .error-detail__kpis {
        grid-template-columns: 1fr;
    }

    .game-launch-analytics .gl-controls__count {
        margin-left: 0;
        width: 100%;
    }

    .game-launch-analytics .gl-chips__label--gap {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-launch-analytics *,
    .error-analytics-toolbar *,
    .error-group-table-panel *,
    .error-detail * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
