:root {
    color-scheme: light;
    --bg: #f4f6fa; --panel: #fff; --nav: #121c30; --nav-alt: #1b2941; --nav-text: #aebbd0;
    --ink: #16233b; --muted: #50617a; --line: #dfe5ee; --blue: #1b56c7; --blue-soft: #e8f0ff;
    --ok: #087657; --ok-soft: #e4f6ee; --warn: #935013; --warn-soft: #fff1da;
    --error: #af2638; --error-soft: #fde8ed;
    font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 15px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .57; }
:focus-visible { outline: 3px solid #4d82f8; outline-offset: 3px; }
.skip { position: fixed; z-index: 5; left: 12px; top: -60px; padding: 12px; background: white; }
.skip:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 242px; background: var(--nav); color: #fff; padding: 25px 17px; display: flex; flex-direction: column; z-index: 3; overflow: auto; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 46px; padding-left: 8px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: #3776f1; color: #fff; font-size: 22px; font-weight: 800; box-shadow: inset 0 0 0 1px #fff3; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.035em; line-height: 1.12; }
.brand small, .sidebar-bottom small { display: block; color: var(--nav-text); font-size: .77rem; margin-top: 4px; }
.studio-label { margin: 32px 8px 7px; color: var(--nav-text); font-size: .76rem; }
.sidebar select { background: var(--nav-alt); color: #fff; border-color: #3b4a64; width: 100%; }
.sidebar nav { margin-top: 23px; display: grid; gap: 4px; }
.sidebar nav a { color: var(--nav-text); display: flex; gap: 12px; align-items: center; border-radius: 8px; padding: 10px 12px; font-size: .91rem; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { color: #fff; background: #243759; text-decoration: none; }
.sidebar nav a[aria-current="page"] { box-shadow: inset 3px 0 #6f9eff; }
.nav-mark { width: 17px; color: #a8bde4; text-align: center; font-size: 16px; }
.sidebar-bottom { margin-top: auto; padding: 20px 8px 0; display: flex; align-items: center; gap: 9px; font-size: .82rem; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--blue-soft); font-weight: 750; color: var(--blue); }
.avatar-dark { background: #29436f; color: white; }
.workspace { margin-left: 242px; }
.topbar { height: 69px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); background: #fff; gap: 12px; }
.crumb, .top-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.crumb span { color: var(--muted); }
.divider { color: #8290a5; }
.environment, .badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow-wrap: anywhere; padding: 4px 9px; border-radius: 999px; color: var(--muted); background: #eef2f7; font-size: .76rem; font-weight: 650; }
.environment { color: #8a4610; background: #fff0d7; white-space: nowrap; border: 1px solid #f6dcb8; }
.environment::before, .dot { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; display: inline-block; flex: none; }
.badge.good { color: var(--ok); background: var(--ok-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.bad { color: var(--error); background: var(--error-soft); }
.badge.info { color: var(--blue); background: var(--blue-soft); }
.mobile-menu { display: none; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 6px 9px; }
#workspace { margin: 0 auto; max-width: 1500px; padding: 28px 32px 44px; outline: none; }
.notice { padding: 10px 13px; border: 1px solid #bed2f5; border-radius: 8px; background: #eef4ff; color: #24487e; font-size: .87rem; margin: 0 0 20px; }
.notice.warn { background: var(--warn-soft); border-color: #edd6b2; color: var(--warn); }
.notice.bad { background: var(--error-soft); border-color: #f2c2ca; color: var(--error); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3.4vw, 2.13rem); line-height: 1.15; letter-spacing: -.04em; }
h2 { font-size: 1.1rem; letter-spacing: -.022em; }
h3 { font-size: .97rem; }
.muted, .page-heading p { color: var(--muted); }
.page-heading p { margin-top: 7px; }
.small { font-size: .83rem; }
.cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 19px; }
.card, .panel, .auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 2px 3px #0c1a3005; }
.card { padding: 16px; min-height: 128px; }
.card .metric { display: block; font-size: 1.89rem; letter-spacing: -.055em; line-height: 1.18; margin: 7px 0; font-weight: 750; overflow-wrap: anywhere; }
.card .card-label { color: var(--muted); font-size: .86rem; font-weight: 650; }
.card .metric.good { color: var(--ok); }
.card .metric.warn { color: var(--warn); }
.card a { font-size: .79rem; }
.panel { min-width: 0; padding: 19px; margin-bottom: 16px; overflow-wrap: anywhere; }
.panel > h2 { margin-bottom: 14px; }
.panel-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.columns { display: grid; grid-template-columns: minmax(0,1.52fr) minmax(0,1fr); gap: 16px; align-items: start; }
.columns.equal { grid-template-columns: repeat(2,minmax(0,1fr)); }
.actions, .form-actions, .toolbar, .tabs { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; }
.toolbar, .tabs { margin-bottom: 15px; }
.form-actions { justify-content: flex-end; }
.fields { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
label.control { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .81rem; min-width: 113px; }
label.control.wide { flex: 1 1 180px; }
.button, select, input:not([type="checkbox"]):not([type="range"]), textarea { border: 1px solid #cad4e3; border-radius: 7px; padding: 7px 10px; min-height: 36px; }
input:not([type="checkbox"]):not([type="range"]), textarea { width: 100%; }
select, input, textarea { background: white; }
input[type="range"] { accent-color: var(--blue); width: 100%; }
textarea { min-height: 76px; }
.button { display: inline-flex; align-items: center; justify-content: center; font-weight: 650; line-height: 1.2; font-size: .86rem; text-decoration: none; }
.button:hover { filter: brightness(.96); text-decoration: none; }
.primary { background: var(--blue); border-color: var(--blue); color: white; }
.secondary { background: white; color: var(--ink); }
.danger { background: var(--error); color: white; border-color: var(--error); }
button.tab { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; }
button.tab[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); border-color: #b3ccfa; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; text-align: left; white-space: nowrap; }
th { font-size: .76rem; color: var(--muted); background: #f3f6fb; }
th, td { padding: 10px 11px; border-bottom: 1px solid #e7ecf3; }
tr:last-child td { border-bottom: 0; }
td a { font-weight: 650; }
.rowlist { display: grid; margin: 0; padding: 0; list-style: none; }
.rowlist li { padding: 10px 0; border-bottom: 1px solid #e7ecf3; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.rowlist li:last-child { border-bottom: 0; }
dl.data { display: grid; grid-template-columns: minmax(7rem,1fr) 1fr; gap: 8px 13px; margin: 0; }
.data dt { color: var(--muted); }
.data dd { margin: 0; font-weight: 620; }
.chart { width: 100%; height: auto; display: block; min-height: 126px; }
.chart-key { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: .8rem; margin-top: 7px; }
.chart-key span { display: inline-flex; align-items: center; gap: 5px; }
.chart-key .blue { color: #2059bd; }
.chart-key .green { color: #008469; }
.pagination { margin-top: 12px; display: flex; justify-content: flex-end; gap: 9px; }
.auth-card { margin: 14vh auto 0; padding: 30px; width: min(92vw, 440px); }
.auth-card .brand { padding: 0; margin-bottom: 25px; }
.auth-card .brand small { color: var(--muted); }
.auth-card p { margin: 14px 0; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 23px; width: min(92vw, 500px); color: var(--ink); }
dialog::backdrop { background: #101b36a8; }
dialog p { margin: 10px 0; color: var(--muted); }
#confirm-fields { display: grid; gap: 10px; }
.confirmation-check { display: block; margin: 17px 0 10px; }
.dialog-error { color: var(--error); }
.replay-layout { display: grid; grid-template-columns: minmax(0,420px) minmax(0,1fr); gap: 20px; align-items: center; margin-top: 8px; }
.replay-layout .data { margin-top: 10px; }
.replay-board { width: min(100%, 380px); height: auto; display: block; margin: 0 auto; }
.replay-controls { margin-top: 17px; }
.section-gap { margin-top: 13px; }
.config-field { display: grid; grid-template-columns: minmax(155px,1fr) minmax(90px,190px); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.config-field:last-child { border-bottom: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .79rem; }
@media (max-width: 1050px) {
    .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .columns, .columns.equal { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media (max-width: 880px) {
    .replay-layout { grid-template-columns: minmax(0,1fr); gap: 10px; }
    .sidebar { display: none; width: min(260px, 80vw); box-shadow: 9px 0 40px #11203469; }
    .sidebar.open { display: flex; }
    .workspace { margin-left: 0; }
    .mobile-menu { display: inline-flex; }
    .topbar { padding: 0 14px; height: 60px; }
    #workspace { padding: 20px 14px 30px; }
    .crumb > span { display: none; }
    .panel { padding: 15px; }
    .card { min-height: 112px; }
}
@media (max-width: 405px) {
    .top-actions { gap: 6px; }
    .environment { font-size: .69rem; }
    .cards { gap: 9px; }
    .card { padding: 11px; }
    .card .metric { font-size: 1.57rem; }
    .config-field { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 365px) {
    .topbar { gap: 6px; padding-inline: 9px; }
    .crumb { gap: 5px; }
    .top-actions .button { padding-inline: 7px; }
    .environment { padding-inline: 6px; font-size: .63rem; white-space: normal; }
    .page-heading { align-items: flex-start; flex-wrap: wrap; overflow-wrap: anywhere; }
}
.audit-correlation { white-space: normal; overflow-wrap: anywhere; display: block; min-width: 10ch; }
.chart-readout { min-height: 1.4em; margin-top: 7px; }
