/*! EU Consent Hub dashboard */
:root {
	--c-accent: #2F5DD3;
	--c-accent-600: #254BB0;
	--c-accent-50: #EEF2FC;
	--c-bg: #F6F7FB;
	--c-surface: #FFFFFF;
	--c-border: #E4E7EE;
	--c-border-strong: #CDD3DF;
	--c-text: #111827;
	--c-muted: #64748B;
	--c-ok: #0F8A5F;
	--c-ok-bg: #E7F6EF;
	--c-warn: #9A6700;
	--c-warn-bg: #FFF6DB;
	--c-bad: #C0392B;
	--c-bad-bg: #FDECEA;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05);
	--font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--c-bg); color: var(--c-text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
h3 { font-size: 13px; font-weight: 650; margin-bottom: 8px; }
code { font-family: var(--mono); font-size: 12.5px; background: #F1F3F8; padding: 1px 5px; border-radius: 5px; }
small, .small { font-size: 12.5px; }
.muted { color: var(--c-muted); }
.strong { font-weight: 600; }
.block { display: block; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 18px; }
.pre { white-space: pre-wrap; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--c-border-strong); border-radius: 8px; background: var(--c-surface); color: var(--c-text); font: 500 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { background: #F7F8FB; text-decoration: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .btn-link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.btn-primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-600); border-color: var(--c-accent-600); }
.btn-danger { background: var(--c-bad); border-color: var(--c-bad); color: #fff; }
.btn-danger:hover { background: #A93226; }
.btn-danger-ghost { color: var(--c-bad); border-color: #F1C2BC; }
.btn-danger-ghost:hover { background: var(--c-bad-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; height: 42px; font-size: 14.5px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--c-accent); font: inherit; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
form.inline { display: inline-flex; margin: 0; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], select, textarea {
	width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--c-border-strong); border-radius: 8px; background: #fff; color: var(--c-text); font: 14px var(--font);
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input[type=file] { font: 13px var(--font); }
.stack { display: grid; gap: 14px; }
.stack label { display: grid; gap: 6px; font-weight: 550; font-size: 13px; }
label.check { display: flex !important; align-items: flex-start; gap: 8px; font-weight: 450 !important; }
label.check input { margin-top: 3px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Auth pages */
body.auth { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 50% -10%, #E7EDFB 0, var(--c-bg) 60%); }
.auth-wrap { width: 100%; max-width: 400px; padding: 32px 16px; }
.auth-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-card { padding: 28px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card > .muted { margin: 0 0 20px; }
.auth-card form + form { margin-top: 14px; }
.auth-foot { text-align: center; color: var(--c-muted); font-size: 12px; margin-top: 18px; }
.otp { font-family: var(--mono); font-size: 20px !important; letter-spacing: .35em; text-align: center; height: 48px !important; }
.qr { display: flex; justify-content: center; margin: 6px 0 4px; }
.qr svg { border: 1px solid var(--c-border); border-radius: 10px; }
.key { display: inline-block; font-size: 12.5px; letter-spacing: .02em; white-space: nowrap; cursor: copy; padding: 6px 10px; margin-bottom: 14px; }

/* Brand */
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--c-accent); color: #fff; display: grid; place-items: center; flex: none; }
.brand-mark .ico { width: 20px; height: 20px; }
.side-brand, .auth-brand { display: flex; align-items: center; gap: 10px; color: var(--c-text); }
.side-brand:hover { text-decoration: none; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 14px; }
.brand-text small { color: var(--c-muted); font-size: 12px; }

/* Shell */
body.dash { display: flex; min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--c-surface); border-right: 1px solid var(--c-border); display: flex; flex-direction: column; padding: 18px 14px; z-index: 20; }
.side-brand { padding: 4px 8px 18px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #334155; font-weight: 500; }
.side-nav a:hover { background: #F3F5F9; text-decoration: none; }
.side-nav a.is-active { background: var(--c-accent-50); color: var(--c-accent); }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--c-border); }
.side-user form { margin-left: auto; flex: none; }
.side-user .btn-link { white-space: nowrap; font-size: 13px; }
.side-user-name { display: grid; font-weight: 550; font-size: 13px; line-height: 1.25; min-width: 0; }
.side-user-name small { color: var(--c-muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--c-accent-50); color: var(--c-accent); display: grid; place-items: center; font-weight: 650; flex: none; }
.main { flex: 1; margin-left: 248px; min-width: 0; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 18px 32px; background: rgba(246, 247, 251, .92); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.top h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.content { padding: 8px 32px 48px; display: grid; gap: 20px; max-width: 1400px; }
.nav-burger, .nav-scrim { display: none; }

/* Flash & alerts */
.flash { margin: 0 32px 4px; padding: 11px 14px; border-radius: 10px; font-weight: 500; border: 1px solid; }
.flash-ok { background: var(--c-ok-bg); border-color: #B9E4D1; color: #0B6B4A; }
.flash-warn { background: var(--c-warn-bg); border-color: #F2DE9C; color: var(--c-warn); }
.flash-bad { background: var(--c-bad-bg); border-color: #F3C1BB; color: #9B2C20; }
.alert { padding: 10px 12px; border-radius: 8px; margin: 0 0 16px; font-size: 13.5px; }
.alert-bad { background: var(--c-bad-bg); color: #9B2C20; }
.alert-warn { background: var(--c-warn-bg); color: var(--c-warn); }

/* Cards */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-highlight { border-color: #BFCDF3; background: linear-gradient(180deg, #F5F8FF, #fff); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.empty { color: var(--c-muted); margin: 6px 0; }
.empty.ok { color: var(--c-ok); }
.empty-state { text-align: center; padding: 28px 20px; }
.empty-state p { max-width: 480px; margin: 6px auto 16px; }
.step { display: inline-block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--c-accent); margin-bottom: 6px; }
.crumbs { margin: 0; color: var(--c-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpis-tight { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.kpis-tight .kpi { box-shadow: none; background: #FAFBFD; }
.kpi-label { color: var(--c-muted); font-size: 12.5px; font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--c-muted); font-size: 12px; }
.kpi.tone-accent .kpi-value { color: var(--c-accent); }
.kpi.tone-warn .kpi-value { color: var(--c-warn); }

/* Pills */
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; vertical-align: middle; }
.pill-ok { background: var(--c-ok-bg); color: var(--c-ok); }
.pill-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.pill-bad { background: var(--c-bad-bg); color: var(--c-bad); }
.pill-muted { background: #EEF1F5; color: var(--c-muted); }

/* Segmented range */
.seg { display: inline-flex; background: #ECEFF5; border-radius: 9px; padding: 3px; }
.seg a { padding: 6px 11px; border-radius: 7px; color: #475569; font-weight: 500; font-size: 13px; }
.seg a:hover { text-decoration: none; color: var(--c-text); }
.seg a.is-on { background: #fff; color: var(--c-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* Chart */
.chart-wrap { width: 100%; }
.chart { width: 100%; height: 240px; display: block; }
.chart .grid { stroke: #EDF0F5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { fill: var(--c-muted); font-size: 11px; font-family: var(--font); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(47, 93, 211, .06); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; color: #475569; font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Meters */
.meter { margin-bottom: 14px; }
.meter-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.meter-head strong { font-variant-numeric: tabular-nums; }
.meter-track { height: 8px; border-radius: 99px; background: #EEF1F6; overflow: hidden; }
.meter-track span { display: block; height: 100%; background: var(--c-accent); border-radius: 99px; }
.meter small { color: var(--c-muted); display: block; margin-top: 4px; }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--c-muted); padding: 8px 10px; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid #F0F2F6; vertical-align: middle; }
.table tbody tr:hover td { background: #FAFBFD; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .cb { width: 32px; }
.table.compact td { padding: 7px 10px; }
.table form.inline + form.inline { margin-left: 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar-right { display: flex; gap: 8px; }
.toolbar-right select { width: auto; }

/* Lists */
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issues li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 9px 12px; border-radius: 8px; background: #F8F9FC; border-left: 3px solid var(--c-border-strong); }
.issues li.sev-bad { border-left-color: var(--c-bad); background: #FFF7F6; }
.issues li.sev-warn { border-left-color: #E0B23F; background: #FFFCF3; }
.issues li a { font-weight: 600; }
.issues li span { color: #475569; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.feed li small { display: block; color: var(--c-muted); font-size: 11.5px; }
.feed-type { flex: none; min-width: 92px; text-align: center; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 2px 6px; border-radius: 6px; background: #EEF1F5; color: #475569; }
.feed-type.t-registered, .feed-type.t-updated, .feed-type.t-version { background: var(--c-ok-bg); color: var(--c-ok); }
.feed-type.t-update_failed, .feed-type.t-revoked, .feed-type.t-deleted { background: var(--c-bad-bg); color: var(--c-bad); }
.feed-type.t-push, .feed-type.t-release, .feed-type.t-rollout { background: var(--c-accent-50); color: var(--c-accent); }
.dl { display: grid; grid-template-columns: minmax(130px, 42%) 1fr; gap: 9px 14px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--c-muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.codes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.codes code { display: block; text-align: center; padding: 8px; font-size: 14px; background: #fff; border: 1px solid var(--c-border); }
.codebox { background: #F6F8FC; border: 1px dashed var(--c-border-strong); border-radius: 10px; padding: 12px; overflow-wrap: anywhere; }
.codebox code { background: none; padding: 0; font-size: 12.5px; }
.danger { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.copied { position: relative; }
.copied::after { content: "Copied"; position: absolute; top: -28px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }

/* Responsive */
@media (max-width: 1100px) {
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
	.nav-toggle:checked ~ .side { transform: none; }
	.nav-toggle:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 15; }
	.main { margin-left: 0; }
	.nav-burger { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--c-border-strong); border-radius: 8px; background: #fff; cursor: pointer; flex: none; }
	.nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 16px; height: 2px; background: #334155; border-radius: 2px; position: relative; content: ""; }
	.nav-burger span::before { position: absolute; top: -5px; }
	.nav-burger span::after { position: absolute; top: 5px; }
	.top { flex-wrap: wrap; padding: 14px 16px; }
	.top-actions { width: 100%; justify-content: flex-start; }
	.content { padding: 8px 16px 40px; }
	.flash { margin: 0 16px 4px; }
	.kpis-tight { grid-template-columns: 1fr; }
	.dl { grid-template-columns: 1fr; gap: 2px; }
	.dl dd { margin-bottom: 8px; }
	.toolbar input[type=search] { max-width: none; }
}
