:root {
    color-scheme: dark;
    --ink: #f4f4f7;
    --muted: #a0a0b1;
    --line: #2b2b3b;
    --paper: #0a0a0f;
    --surface: #0f0f18;
    --raised: #151520;
    --accent: #ea3d24;
    --accent-bright: #ff8e7b;
    --accent-soft: #2a1518;
    --red: #ff9d91;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }

button {
    border: 1px solid #3a3a4c;
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--raised);
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

button:hover { background: #20202e; border-color: #555568; }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

button.primary {
    background: #c7281e;
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 18px #ea3d2414;
}

button.primary:hover { background: #ae2219; border-color: #ff6a4f; }
button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
button.quiet:hover { background: var(--raised); color: var(--ink); }
a { color: var(--accent-bright); text-underline-offset: 3px; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -1.2px; font-weight: 650; }
h2 { font-size: 16px; letter-spacing: -.3px; font-weight: 600; }
h3 { font-size: 15px; }

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #c3c3d0;
    font-size: 12px;
    font-weight: 500;
}

input, select {
    min-width: 0;
    border: 1px solid #626276;
    background: #0a0a0f;
    color: var(--ink);
    border-radius: 7px;
    padding: 10px 11px;
    min-height: 40px;
    font-size: 13px;
}

input:hover, select:hover { border-color: #85859a; }
input:focus, select:focus { border-color: var(--accent-bright); }
input::placeholder { color: #9191a4; }
input[type="checkbox"] { accent-color: var(--accent); }
input[type="search"] { appearance: none; }
.muted { color: var(--muted); line-height: 1.6; }
.small { font-size: 12px; }
.eyebrow { color: var(--accent-bright); font-size: 10px; font-weight: 650; letter-spacing: 1.8px; margin-bottom: 10px; }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: 2px;
    font-weight: 700;
    text-decoration: none;
}

.brand-logo { display: block; width: 43px; height: 43px; object-fit: contain; flex-shrink: 0; }
.brand-sub { display: block; font-size: 8px; letter-spacing: 3px; margin-top: 5px; color: var(--muted); }
.application { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
    background: radial-gradient(ellipse at 0 0, #ea3d240b, transparent 60%), #050508;
    border-right: 1px solid var(--line);
    color: var(--ink);
    padding: 32px 20px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
}

.sidebar .brand { padding-left: 5px; font-size: 15px; letter-spacing: 1px; }
.sidebar nav { display: grid; gap: 5px; margin: 32px 0 24px; }
.nav-group { display: grid; gap: 5px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sidebar nav button { text-align: left; border: 1px solid transparent; background: none; color: #b4b4c3; font-size: 13px; padding: 12px; }
.sidebar nav button:hover { background: var(--surface); border-color: var(--line); color: #fff; }
.sidebar nav button.active { color: #ffc1b6; background: var(--accent-soft); border-color: #63302d; box-shadow: inset 2px 0 var(--accent); }
.nav-section { color: var(--muted); font-size: 10px; letter-spacing: 1.4px; padding: 0 12px 6px; }
.nav-icon { display: inline-block; width: 28px; font-size: 18px; vertical-align: middle; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 18px 8px 0; font-size: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; overflow-wrap: anywhere; }
.sidebar-bottom button { padding: 7px 0; font-size: 11px; }

main {
    padding: 0 34px;
    min-width: 0;
    max-width: 1800px;
    width: 100%;
    margin: 0 auto;
    background: radial-gradient(ellipse 700px 320px at 45% 0, #ea3d2407, transparent);
}

.topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 67px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 33px 0 26px; }
.page-header > div { min-width: 0; }
.page-header .muted { margin-top: 9px; font-size: 13px; }
.refresh-tools { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.refresh-tools .muted { margin-right: 12px; font-size: 11px; }
.refresh-tools button { font-size: 12px; }

.page-header.with-chart { min-height: 238px; gap: 40px; }
.checkout-summary { width: min(440px, 48%); flex-shrink: 0; padding-left: 24px; border-left: 1px solid var(--line); }
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-heading > div { display: flex; align-items: baseline; gap: 14px; }
.summary-label { font-size: 12px; color: var(--muted); }
#checkout-total { font-size: 32px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
#chart-reset { font-size: 11px; padding: 6px 0 6px 8px; }
#checkout-coverage { margin: 4px 0 12px; font-size: 11px; }
.checkout-chart-plot { display: block; width: 100%; height: 84px; overflow: visible; touch-action: pan-y; user-select: none; cursor: crosshair; }
.checkout-chart-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.checkout-chart-hit { fill: transparent; }
.checkout-chart-bar { fill: #ad3829; }
.checkout-chart-bar.is-empty { fill: #414152; }
.checkout-chart-bucket.is-active .checkout-chart-bar, .checkout-chart-bucket.is-selected .checkout-chart-bar { fill: #ff8e7b; }
.checkout-chart-bucket:focus { outline: none; }
.checkout-chart-bucket:focus-visible .checkout-chart-hit { stroke: var(--accent-bright); stroke-width: 1; }
.checkout-chart-selection { fill: #ea3d2433; stroke: #ff8e7b; stroke-width: 1; pointer-events: none; }
.checkout-chart-axis { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.checkout-chart-readout { margin-top: 6px; min-height: 30px; font-size: 11px; line-height: 1.45; color: #d0c5c5; font-variant-numeric: tabular-nums; }

#site-picker { margin-bottom: 22px; min-width: 0; }
#site-picker .eyebrow { color: var(--muted); margin-bottom: 12px; }
#site-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
#site-limit-note { margin-top: 10px; }
.site-tab { padding: 10px 16px; border-color: var(--line); background: var(--surface); color: #bdbdcc; font-size: 12px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.site-tab:hover { border-color: #8c4039; color: var(--ink); background: #21151c; }
.site-tab.active, .site-tab[aria-pressed="true"] { color: #ffc1b6; border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 18px #ea3d2410; }
.view-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.checkbox-label { flex-direction: row; align-items: center; gap: 9px; margin-top: 15px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; }

.filter-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 19px 20px; margin-bottom: 24px; }
.filter-row { display: flex; gap: 13px; align-items: flex-end; flex-wrap: wrap; }
.filter-row label { min-width: min(140px, 100%); flex: 1; }
.filter-row .search-label { flex: 2; min-width: min(210px, 100%); }
.filter-row button { font-size: 12px; min-height: 40px; }
#field-search { width: 100%; }
#custom-range { margin-top: 15px; }
#custom-range .small { flex: 1; min-width: min(130px, 100%); padding: 8px 0; }
summary { color: #b5b5c5; font-size: 12px; cursor: pointer; padding-top: 16px; width: fit-content; }
summary:hover { color: var(--accent-bright); }
.advanced-row { padding-top: 18px; }
.field-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; }
.field-filter-heading button { font-size: 11px; padding: 8px 10px; }
.field-filter { display: grid; grid-template-columns: minmax(0, 1fr) 155px minmax(0, 2fr) 36px; gap: 9px; margin-top: 10px; }
.field-filter button { padding: 5px; }

.notice, .error-banner {
    border: 1px solid #6f352d;
    background: #261719;
    color: #f5c2b9;
    border-radius: 9px;
    margin-bottom: 20px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow-wrap: anywhere;
}

.notice button { background: none; border: none; color: var(--accent-bright); padding: 5px; font-size: 12px; }
.notice button:hover { color: #fff; }
.error-banner { background: #2b151c; border-color: #76343e; color: var(--red); }
.loading { padding: 0 0 15px; color: var(--muted); font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric { border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, #151520, #0f0f18); padding: 23px; }
.metric > span { font-size: 12px; color: #c2c2d0; }
.metric strong { display: block; font-size: 36px; font-weight: 600; letter-spacing: -1.5px; padding: 15px 0 16px; font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted); font-size: 11px; line-height: 1.5; }
#metric-errors { color: var(--accent-bright); }
#metric-rejections { color: #f4cd87; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.panel-header { padding: 21px 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.panel-header > div { min-width: 0; }
.panel-header p { margin-top: 7px; }
.panel-header button { font-size: 12px; }
.recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.recent-event {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    text-align: left;
    white-space: normal;
    font-weight: 400;
}

.recent-event:hover { background: var(--raised); border-color: var(--line); }
.recent-event:focus-visible { outline-offset: -3px; }
.recent-event .event-icon { width: 31px; height: 31px; border-radius: 8px; background: #2c1a1d; color: #ffad9c; display: grid; place-items: center; flex-shrink: 0; }
.recent-event.error .event-icon { color: #ff9da6; background: #2e1925; }
.recent-event.queue .event-icon { color: #b9a6f0; background: #241e37; }
.recent-text { min-width: 0; flex: 1; }
.recent-text .recent-title { display: block; max-width: 100%; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-text small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; overflow-wrap: anywhere; }
.recent-event time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.empty-note { padding: 25px 22px; color: var(--muted); font-size: 12px; }
.table-scroll { max-width: 100%; overflow: auto; scrollbar-color: #545464 var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
th { background: var(--raised); color: #b7b7c8; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; padding: 14px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { border-bottom: 1px solid #232332; padding: 17px 20px; max-width: 300px; min-width: 110px; color: #d5d5df; vertical-align: top; }
td .cell-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; display: block; }
td .small { display: block; margin-top: 5px; font-size: 10px; white-space: nowrap; }
tr:hover td { background: #15151f; }
td button { padding: 7px 10px; font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.cell-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-width: 180px; line-height: 1.65; }
button.text-button { background: none; border: 0; border-radius: 3px; color: var(--accent-bright); padding: 0; font-weight: 500; text-align: left; }
button.text-button:hover { text-decoration: underline; }
.user-link { color: var(--accent-bright); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.user-link:hover { text-decoration: underline; }
.unverified-user { display: grid; gap: 4px; }
.claimed-user-link { color: var(--accent-bright); font-size: 12px; width: fit-content; }
.recent-text .user-link { display: inline; }
button.recent-title { color: var(--ink); font-weight: 600; font-size: inherit; }
.button-link { display: inline-flex; align-items: center; padding: 9px 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface); text-decoration: none; font-size: 12px; }
.button-link:hover { background: var(--raised); border-color: var(--muted); }
.user-profile { padding: 20px; margin-bottom: 20px; }
.profile-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.profile-heading .mono { overflow-wrap: anywhere; }
.page-header h1 { overflow-wrap: anywhere; }
.table-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.result-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.context-cell, .activity-cell { min-width: 180px; }
.context-cell > span, .activity-cell > span { display: block; }
td .small { white-space: normal; }
td .mono { white-space: nowrap; }
.site-badge { display: inline-block; background: var(--accent-soft); border: 1px solid #59302d; border-radius: 5px; padding: 5px 8px; color: #ffb4a6; font-size: 11px; }
.pagination { padding: 17px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagination > div { display: flex; gap: 6px; }
.pagination button { font-size: 11px; padding: 8px 12px; }
.empty-state { text-align: center; padding: 55px 20px; color: var(--muted); }
.empty-state > span { font-size: 35px; color: var(--accent-bright); }
.empty-state h3 { margin: 14px 0 9px; color: #d3d3df; }
.empty-state p { font-size: 12px; line-height: 1.6; }

.columns-panel { border-top: 1px solid var(--line); background: #0c0c13; padding: 18px 22px; }
#column-options { display: grid; gap: 7px; margin-top: 14px; max-height: 400px; overflow: auto; padding: 4px; scrollbar-color: #545464 #0c0c13; }
.column-option { display: grid; grid-template-columns: 36px minmax(0, 1fr) 72px 32px; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.column-option label { min-width: 0; flex-direction: row; align-items: center; gap: 10px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.column-option input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 0; flex-shrink: 0; }
.column-option .drag-handle { display: grid; place-items: center; padding: 3px; width: 36px; min-height: 36px; font-size: 20px; line-height: 1; background: #1c1c29; border-color: #3e3e50; color: #bdbdcf; cursor: grab; touch-action: none; user-select: none; }
.column-option .drag-handle:hover { background: #2a2028; border-color: #87504a; color: #ffb4a6; }
.column-option .drag-handle:active { cursor: grabbing; }
.column-option .position-input { width: 100%; min-height: 36px; padding: 7px 9px; font-size: 12px; }
.remove-column { padding: 4px; width: 32px; height: 32px; background: transparent; color: var(--muted); font-size: 19px; border-color: transparent; }
.remove-column:hover { color: #ff9d91; border-color: #76343e; background: #2b151c; }
.column-add { margin: 14px 4px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.column-add label { max-width: 360px; }
.column-option.dragging { opacity: .55; border-color: var(--accent-bright); background: #291a22; }
.column-option.drop-target { border-color: var(--accent-bright); background: #2b1a21; }
.column-option.drop-before { box-shadow: inset 0 3px var(--accent); }
.column-option.drop-after { box-shadow: inset 0 -3px var(--accent); }

.page-footer { padding: 29px 0; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 10px; line-height: 1.6; }

.login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 15% 20%, #ea3d2415, transparent 50%), radial-gradient(ellipse at 85% 90%, #ea3d240b, transparent 45%), #050508;
    padding: 28px;
}

.login-card { width: 100%; max-width: 460px; padding: 38px; background: #0f0f18; border: 1px solid #35303b; border-radius: 16px; box-shadow: 0 30px 90px #0008, 0 0 60px #ea3d2407; }
.login-card .brand { margin-bottom: 40px; }
.login-card .brand-logo { width: 49px; height: 49px; }
.login-card h1 { font-size: 27px; }
.login-card > .muted { font-size: 13px; margin-top: 12px; }
.login-card form { display: grid; gap: 20px; margin-top: 30px; }
.login-card form button { display: flex; justify-content: space-between; padding: 13px 15px; }
.error-text { color: var(--red); font-size: 12px; line-height: 1.6; min-height: 0; overflow-wrap: anywhere; }
.error-text:empty { display: none; }

.detail-dialog {
    position: fixed;
    margin: 0 0 0 auto;
    height: 100dvh;
    max-height: 100dvh;
    width: min(880px, 100%);
    max-width: 100%;
    border: 0;
    border-left: 1px solid #3b303a;
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    box-shadow: -10px 0 60px #0007;
}

dialog::backdrop { background: #050508b3; backdrop-filter: blur(3px); }
.detail-header { position: sticky; top: 0; background: var(--surface); z-index: 1; padding: 20px 25px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.detail-header .eyebrow { margin-bottom: 6px; }
.detail-header h2 { overflow-wrap: anywhere; line-height: 1.4; }
.detail-header > button { flex-shrink: 0; }
#detail-content { padding: 25px; }
#detail-content > [role="status"], #detail-content > [role="alert"] { margin-bottom: 16px; }
.detail-section { min-width: 0; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.detail-section h3 { margin-bottom: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.detail-section dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 12px; line-height: 1.7; }
.detail-section dt { color: var(--muted); overflow-wrap: anywhere; }
.detail-section dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
pre { min-width: 0; max-width: 100%; margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; background: #08080e; border: 1px solid var(--line); padding: 14px; border-radius: 8px; color: #c5c5d6; font: 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; max-height: 440px; overflow: auto; }
.detail-section summary { max-width: 100%; padding: 10px 0; font-size: 12px; line-height: 1.6; color: var(--accent-bright); overflow-wrap: anywhere; }
.raw-event > button { display: block; margin-top: 10px; }
#detail-content > button { margin: 12px 0; }
.detail-section > button { margin-bottom: 12px; font-size: 11px; }
.operation { display: flex; gap: 12px; border-left: 2px solid #614239; padding: 8px 15px; margin-bottom: 4px; font-size: 12px; overflow-wrap: anywhere; }
.operation > pre { min-width: 0; flex: 1; margin: 0; }
.operation.error { border-color: var(--accent); }
.save-dialog { border: 1px solid #44313a; border-radius: 12px; padding: 25px; width: 380px; max-width: calc(100% - 32px); color: var(--ink); background: var(--surface); box-shadow: 0 25px 80px #0008; }
.save-dialog form { display: grid; gap: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); border: 1px solid #824239; border-radius: 9px; background: #29181c; color: #ffe0d9; padding: 12px 20px; z-index: 10; max-width: 90%; box-shadow: 0 8px 30px #0008; overflow-wrap: anywhere; }
.detail-section .cell-value { white-space: pre-wrap; max-width: none; overflow-wrap: anywhere; }
.detail-heading { flex: 1; min-width: 0; }
#detail-back { flex-shrink: 0; font-size: 19px; }
.action-bar, .diagnostic-actions, .diagnostic-body-controls { display: flex; min-width: 0; max-width: 100%; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-section > .action-bar { margin-top: 18px; }
.diagnostic-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.action-bar > button, .diagnostic-actions > button { margin: 0; }
.action-bar > button, .diagnostic-action { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.diagnostic-body-controls { margin: 10px 0; gap: 6px; }
.diagnostic-body-controls button { margin: 0; padding: 6px 10px; font-size: 11px; }
.diagnostic-body-controls button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }
.diagnostic-body-notice { color: #f4cd87; font-size: 12px; margin: 10px 0; }
#export-status { margin-top: 16px; }
#export-dialog .dialog-actions { margin-top: 20px; }
.run-row { cursor: pointer; }
.run-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.diagnostic-note { margin: 12px 0; line-height: 1.65; overflow-wrap: anywhere; }
.diagnostic-warning { color: #f4cd87; font-size: 12px; }
.detail-section .diagnostic-facts { margin: 14px 0; }
.diagnostic-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.diagnostic-title { min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.diagnostic-badge { display: inline-block; justify-self: end; white-space: nowrap; border: 1px solid currentColor; border-radius: 5px; padding: 3px 7px; font-size: 10px; line-height: 1.4; }
.diagnostic-success { color: #8ad9b0; }
.diagnostic-error { color: var(--red); }
.diagnostic-info { color: #a6c6f4; }
.diagnostic-neutral { color: #b7b7c8; }
.diagnostic-meta, .diagnostic-relation { margin: 6px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.diagnostic-time { margin: 0 0 10px; line-height: 1.6; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.diagnostic-action { margin: 0; padding: 8px 11px; font-size: 11px; }
.diagnostic-error-message { color: var(--red); }
.diagnostic-message { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; margin: 10px 0 0; }
.diagnostic-successes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 15px; border: 1px solid #30594a; border-radius: 8px; margin: 16px 0; }
.diagnostic-successes strong { display: block; flex-basis: 100%; font-size: 12px; color: #8ad9b0; }
.diagnostic-timeline { --indent-step: 20px; margin: 20px 0 0; padding: 0 0 0 18px; list-style: none; border-left: 1px solid #454157; }
.diagnostic-entry { --depth: 0; position: relative; min-width: 0; padding: 14px 16px; margin: 0 0 12px calc(var(--depth) * var(--indent-step)); border: 1px solid var(--line); border-radius: 9px; background: var(--raised); }
.diagnostic-entry[data-depth="1"] { --depth: 1; }
.diagnostic-entry[data-depth="2"] { --depth: 2; }
.diagnostic-entry[data-depth="3"] { --depth: 3; }
.diagnostic-entry::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #ad94e0; left: -23px; top: 19px; }
.diagnostic-entry:not([data-depth="0"]) { border-left: 2px solid #756294; }
.diagnostic-entry:not([data-depth="0"])::before { width: 10px; height: 12px; border-radius: 0 0 0 4px; border-left: 1px solid #756294; border-bottom: 1px solid #756294; background: none; left: -16px; top: 14px; }
.diagnostic-entry[data-kind="log"] { background: #11111b; }
.diagnostic-entry:last-child { margin-bottom: 0; }
.diagnostic-entry > :last-child { margin-bottom: 0; }
.diagnostic-request-container { margin-top: 12px; }
.diagnostic-request-container:empty { display: none; }
.diagnostic-attributes { margin-top: 10px; }
.diagnostic-entry .diagnostic-facts { grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr); }
.diagnostic-exchange { margin: 10px 0; padding: 0 12px; background: #0c0c14; border: 1px solid var(--line); border-radius: 8px; }
.diagnostic-exchange:first-child { margin-top: 0; }
.diagnostic-exchange:last-child { margin-bottom: 0; }
.diagnostic-http-message { margin: 16px 0; }
.diagnostic-http-message h4 { margin: 12px 0 0; font-size: 12px; }
.diagnostic-url { white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (min-width: 1600px) {
    main { padding: 0 50px; }
    .metrics { gap: 22px; }
}

@media (max-width: 1100px) {
    .application { grid-template-columns: 194px minmax(0, 1fr); }
    .sidebar { padding: 25px 13px; }
    main { padding: 0 22px; }
    .metric { padding: 21px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recent-grid { gap: 16px; }
    .panel-header, .recent-event { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 800px) {
    .application { display: block; }
    .sidebar { height: auto; position: static; padding: 18px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar .brand { font-size: 17px; padding: 0; }
    .sidebar .brand-logo { width: 35px; height: 35px; }
    .brand-sub { font-size: 7px; }
    .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; margin: 0; width: 100%; }
    .sidebar nav > button { grid-column: 1 / -1; justify-self: start; }
    .nav-group { margin-top: 0; padding-top: 10px; }
    .sidebar nav button { font-size: 12px; padding: 10px; }
    .nav-section { font-size: 9px; padding: 0 10px 3px; }
    .nav-icon { display: none; }
    .sidebar-bottom { border: 0; padding: 0; margin-top: 0; }
    .sidebar-bottom > span { display: none; }
    main { padding: 0 18px; }
    .topline { min-height: 52px; }
    .metrics { gap: 12px; }
    .metric { padding: 19px; }
    .recent-grid { grid-template-columns: minmax(0, 1fr); }
    .page-header { padding-top: 25px; align-items: flex-start; }
    h1 { font-size: 28px; }
    .refresh-tools .muted { display: none; }
    .refresh-tools button { padding: 8px; font-size: 11px; }
    .page-header.with-chart { gap: 24px; }
    .checkout-summary { width: 52%; padding-left: 15px; }
    .field-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 36px; }
    .field-filter input:first-child { grid-column: 1 / -1; }
    .field-filter-heading { align-items: flex-start; }
    .page-footer { align-items: flex-start; }
}

@media (max-width: 480px) {
    .sidebar { padding: 16px; gap: 18px 10px; }
    .sidebar nav { order: 3; flex: 1 1 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-group:last-child { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-group:last-child .nav-section { grid-column: 1 / -1; }
    .sidebar nav button { flex: 1; text-align: center; padding: 10px 5px; }
    main { padding: 0 14px; }
    .topline { font-size: 10px; }
    .page-header { flex-direction: column; gap: 17px; padding-bottom: 22px; }
    .refresh-tools { gap: 2px; }
    .page-header.with-chart { min-height: 0; }
    .checkout-summary { width: 100%; border-left: 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
    .site-tab { padding: 9px 12px; }
    .filter-panel { padding: 16px; }
    .filter-row { gap: 14px 10px; }
    .filter-row label, .filter-row .search-label { flex: 1 1 100%; }
    .filter-row > button { flex: 1; }
    .field-filter-heading { flex-wrap: wrap; }
    .metrics { grid-template-columns: minmax(0, 1fr); }
    .metric { padding: 20px; }
    .metric strong { font-size: 34px; padding: 12px 0; }
    .panel-header { padding: 18px 15px; }
    .panel-header > .small { font-size: 10px; text-align: right; }
    .recent-event { padding: 15px; gap: 9px; }
    .columns-panel { padding: 16px 11px; }
    .column-option { grid-template-columns: 32px minmax(0, 1fr) 50px 28px; gap: 6px; padding: 7px; }
    .column-option label { gap: 7px; font-size: 11px; }
    .column-option .drag-handle { width: 32px; }
    .column-option .position-input { padding: 7px 5px; }
    .remove-column { width: 28px; }
    .pagination { padding: 16px 15px; }
    .notice { align-items: flex-start; flex-direction: column; }
    .page-footer { flex-direction: column; gap: 8px; padding: 23px 0; }
    .login-screen { padding: 18px; }
    .login-card { padding: 27px 23px; }
    .login-card h1 { font-size: 25px; }
    .detail-header, #detail-content { padding: 16px; }
    .detail-section dl, .diagnostic-entry .diagnostic-facts { grid-template-columns: minmax(0, 1fr); gap: 5px; }
    .detail-section dd { margin-bottom: 13px; }
    .diagnostic-timeline { --indent-step: 12px; padding-left: 12px; }
    .diagnostic-entry { padding: 12px; }
    .diagnostic-entry::before { left: -17px; }
    .diagnostic-heading { gap: 8px; }
    .diagnostic-time { font-size: 11px; }
    .diagnostic-exchange { padding: 0 10px; }
    .detail-section pre { padding: 10px; }
    .operation { gap: 8px; padding-left: 10px; padding-right: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    button, input, select { transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
}


#diagnostic-breadcrumbs { margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#diagnostic-breadcrumbs button { font-size: 12px; }
.breadcrumb-current { color: var(--ink); font-size: 12px; font-weight: 600; }
.diagnostic-match { border-left: 3px solid #c8ad6a; }
.diagnostic-match-label { color: #e5c780; font-size: .75rem; }
.diagnostic-focused { outline: 2px solid #c8ad6a; outline-offset: 3px; }
.diagnostic-match-navigation { padding: 10px 0; background: var(--surface); flex-wrap: wrap; }
mark { color: #171717; background: #f2d68e; border-radius: 2px; }
