/* DC Reporting — screen styles. Colour carries meaning: green = good, amber = warning, red = critical. */
:root {
  --bg: #f3f5f8; --surface: #fff; --ink: #172b37; --ink-2: #405661; --muted: #5e7380; --line: #e4e9ee;
  --green: #157a63; --green-bg: #edf8f2; --red: #ac3544; --red-bg: #fff0f0; --amber: #8a5a12; --amber-bg: #fff6e6;
  --blue: #2a5f9e; --blue-bg: #eef4fb; --navy: #142c3b;
  --gap: 20px; --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 'Segoe UI', Arial, sans-serif; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: Consolas, monospace; font-size: .92em; background: #eef2f5; padding: 1px 5px; border-radius: 4px; }
button, input, select { font: inherit; }
h1 { font-size: 28px; letter-spacing: -.6px; line-height: 1.25; margin: 8px 0 4px; font-weight: 650; }
h2 { font-size: 16px; letter-spacing: -.2px; margin: 0 0 6px; font-weight: 650; }
h3 { font-size: 14px; margin: 10px 0 4px; }
p { color: var(--muted); margin: 4px 0 12px; }
.muted { color: #7d8f99; }
.small { font-size: 12px; }
.right { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d3dce3; background: #fff; color: var(--ink);
  padding: 9px 15px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none; min-height: 40px; }
button:hover, .button:hover { border-color: var(--green); background: #f1f8f5; text-decoration: none; }
.primary, button.primary { background: var(--green); color: #fff; border-color: var(--green); }
.primary:hover, button.primary:hover { background: #126751; color: #fff; }
.ghost { background: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #60c6a8; outline-offset: 2px; }

/* Header & navigation */
.top { position: sticky; top: 0; z-index: 20; height: 72px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 18px; color: var(--ink); font-weight: 650; letter-spacing: -.4px; }
.brand:hover { text-decoration: none; }
.brand b { color: #b7c4cc; font-weight: 400; margin: 0 6px; }
.brand small { display: block; font-size: 9px; letter-spacing: 2px; font-weight: 600; color: var(--muted); margin-top: 1px; }
.mark { font-size: 28px; line-height: 44px; color: var(--green); background: #edf6f2; width: 44px; height: 44px; text-align: center; border-radius: 11px; }
.top-right { display: flex; align-items: center; gap: 20px; }
.live { color: #4b6d60; font-size: 12px; }
nav { position: sticky; top: 72px; z-index: 19; display: flex; gap: 2px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 24px; overflow-x: auto; }
nav a { padding: 15px 13px 12px; color: #5e717d; font-size: 13px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.active { color: var(--green); border-bottom-color: var(--green); }

/* Layout */
main { max-width: 1680px; margin: 0 auto; padding: 28px 32px 48px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.page-heading p { font-size: 13px; margin-bottom: 0; }
.heading-aside { display: flex; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.eyebrow { font-size: 10px; letter-spacing: 1.6px; font-weight: 700; color: #637885; }
.date-chip { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 7px; font-size: 12px; white-space: nowrap; }
.date-chip span { display: block; color: var(--muted); font-size: 10px; }
.period-form label { font-size: 10px; }
.period-form select { min-height: 38px; padding: 7px 10px; margin-top: 4px; min-width: 170px; }
.grid { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.grid > * { min-width: 0; }
.two { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.two-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; margin-bottom: var(--gap); box-shadow: 0 2px 6px #2036450a; }
.grid > .card { margin-bottom: 0; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.card-heading p { font-size: 12px; margin: 0; }
.card-heading > a { font-size: 12px; white-space: nowrap; }
.flush { padding: 0; overflow: hidden; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 14px; }
.section-title h2 { margin: 0; }
.section-title h2 span { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 8px; }
.tiny { font-size: 10px; letter-spacing: .6px; color: #596f7c; }
.inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mono { font-family: Consolas, monospace; font-size: 12px; color: var(--ink-2); }

/* Notices & empty states */
.notice { background: var(--green-bg); border: 1px solid #cfe8da; border-radius: 8px; color: #2c6c53; padding: 12px 16px; margin-bottom: var(--gap); font-size: 13px; }
.notice.bad { background: var(--red-bg); border-color: #f2cfd3; color: var(--red); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.empty-state { display: grid; place-items: center; min-height: 120px; height: 100%; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; background: #fafbfc; border: 1px dashed #d9e1e7; border-radius: 8px; }
.empty-state.good { color: var(--green); background: var(--green-bg); border-color: #cfe8da; }
.card.empty-state { margin-bottom: var(--gap); }

/* Badges */
.badge { display: inline-block; border: 1px solid #e1e6ea; background: #f3f5f7; color: #4f606b; padding: 2px 8px; font-size: 11px; font-weight: 600; border-radius: 5px; white-space: nowrap; margin: 1px 4px 1px 0; }
.badge.critical { background: var(--red-bg); color: var(--red); border-color: #f5d5d9; }
.badge.warning { background: var(--amber-bg); color: var(--amber); border-color: #f2e2c3; }
.badge.good { background: var(--green-bg); color: #1f6d55; border-color: #d1eadc; }
.badge.info { background: var(--blue-bg); color: var(--blue); border-color: #d6e4f4; }

/* Dashboard banner & score gauge */
.overview-banner { border-radius: 13px; background: radial-gradient(ellipse at 62% 25%, #244a53, transparent 60%), var(--navy); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.5fr) auto minmax(0, .8fr); gap: 32px; align-items: center; padding: 30px 36px; margin-bottom: var(--gap); }
.overview-banner .eyebrow { color: #8db7b6; }
.overview-banner h2 { font-size: 28px; line-height: 1.2; margin: 10px 0; letter-spacing: -.5px; }
.overview-banner p { font-size: 13px; color: #b9cbd2; line-height: 1.6; max-width: 520px; }
.banner-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.overview-banner .primary { background: #53d3ae; color: #123b36; border: 0; }
.overview-banner .ghost { color: #d9e8ec; border-color: #ffffff33; }
.overview-banner .ghost:hover { background: #ffffff12; }
.score { --c: #5cd9b4; height: 184px; width: 184px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--score) * 1%), #35525b 0); padding: 10px; justify-self: center; }
.score.warning { --c: #f2c172; }
.score.critical { --c: #f08b97; }
.score > div { background: #1b3743; width: 100%; height: 100%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score strong { font-size: 46px; font-weight: 650; line-height: 1.1; letter-spacing: -2px; }
.score small { font-size: 15px; color: #aac2cb; letter-spacing: 0; margin-left: 3px; }
.score span { font-size: 11px; color: #c7d6dc; }
.score b { font-size: 11px; margin-top: 8px; padding: 3px 10px; border-radius: 10px; font-weight: 600; background: #5cd9b422; color: #8ce6c9; }
.score.warning b { background: #f5ba5b22; color: #f2c172; }
.score.critical b { background: #f08b9722; color: #ffb3bc; }
.banner-meta { border-left: 1px solid #ffffff19; padding-left: 26px; }
.banner-meta > span { font-size: 10px; letter-spacing: 1.4px; color: #9bb8c0; }
.banner-meta strong { display: block; font-size: 18px; margin: 8px 0; }
.banner-meta p { margin: 0; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; margin: 0 0 var(--gap); }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 15px 15px 13px; min-width: 0; border-top: 3px solid transparent; }
.kpi span { display: block; font-size: 12px; color: #536b77; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi strong { display: block; font-size: 26px; font-weight: 650; margin: 4px 0 2px; letter-spacing: -.6px; }
.kpi small { display: block; font-size: 11px; color: #637885; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.ok { border-top-color: #4cc29d; }
.kpi.warn { border-top-color: #e3a73f; }
.kpi.warn strong { color: var(--amber); }
.kpi.bad { border-top-color: #d75c6b; }
.kpi.bad strong { color: var(--red); }

/* Charts & heatmap */
.chart { height: 260px; position: relative; min-width: 0; }
.chart canvas { display: block; max-width: 100%; }
.heatmap { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; }
.heatmap i { border-radius: 3px; aspect-ratio: 1; min-height: 10px; background: #edf2f4; }
.heatmap i.l1, .legend i.l1 { background: #c6e8dc; }
.heatmap i.l2, .legend i.l2 { background: #8dd0b8; }
.heatmap i.l3, .legend i.l3 { background: #3fae8b; }
.heatmap i.l4, .legend i.l4 { background: #157a63; }
.heatmap span, .heatmap label { font-size: 10px; color: #596f7c; line-height: 1.6; font-weight: 400; }
.legend { font-size: 11px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 14px 0 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.finding { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid #eef1f3; }
.finding:last-child { border-bottom: 0; }
.finding > div { flex: 1; min-width: 0; }
.finding strong { font-size: 13px; }
.finding p { font-size: 12px; margin: 2px 0 0; }
.alert-icon { display: grid; place-items: center; background: #fbecef; color: var(--red); border-radius: 8px; width: 32px; height: 32px; font-weight: 700; flex-shrink: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { background: #f8fafb; color: #5e717d; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
th, td { padding: 11px 16px; border-bottom: 1px solid #edf0f3; vertical-align: top; }
td { color: var(--ink-2); }
td strong { font-weight: 600; color: #263e4c; }
td.empty { color: var(--muted); text-align: center; padding: 28px 16px; }
td.flags { white-space: normal; }
tbody tr:hover { background: #fbfcfd; }
.sub { display: block; font-size: 12px; color: #6a7f8b; }

/* Filters & forms */
.filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 15px 16px; margin-bottom: var(--gap); }
.filters.inset { border-color: #edf0f3; background: #fafbfc; }
.filters label { min-width: 150px; flex: 0 1 190px; }
.filters label.grow { flex: 1 1 220px; }
label { font-size: 12px; font-weight: 600; color: #536b77; display: block; }
input, select { display: block; width: 100%; border: 1px solid #d5dee4; border-radius: 6px; background: #fff; color: #253f4e; padding: 8px 11px; margin-top: 5px; min-height: 40px; }
input[type=file] { padding: 7px; }
.pagination { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin: -6px 0 var(--gap); color: var(--muted); font-size: 12px; }
.pagination span { margin-right: auto; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.segmented a { padding: 6px 12px; font-size: 12px; color: var(--muted); font-weight: 600; }
.segmented a.active { background: var(--green-bg); color: var(--green); }

/* Alerts */
.alert-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-left: 4px solid #d9dfe4; }
.alert-card.critical { border-left-color: #d75c6b; }
.alert-card.warning { border-left-color: #e3a73f; }
.alert-card.info { border-left-color: #6d9fd6; }
.alert-card.acked { opacity: .78; }
.alert-card h2 { margin: 10px 0 4px; }
.alert-card p { margin: 0 0 6px; font-size: 13px; }
.alert-body { min-width: 0; }
.ack-meta { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }

/* Groups, GPO, devices */
.group-card h2 { margin-top: 12px; }
.group-card p { font-size: 13px; }
.group-card.privileged { border-top: 3px solid #d8a650; }
details { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
summary { font-size: 13px; color: var(--green); cursor: pointer; font-weight: 600; }
.members { list-style: none; padding: 0; margin: 10px 0 0; }
.members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f1f4f6; font-size: 13px; color: var(--ink-2); }
dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); font-size: 13px; gap: 8px 14px; margin: 12px 0 0; }
dt { color: #637885; }
dd { margin: 0; color: #2b4959; overflow-wrap: anywhere; }
.policy-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.policy { border: 1px solid var(--line); border-radius: 8px; padding: 14px; border-top: 3px solid #4cc29d; }
.policy.fail { border-top-color: #d75c6b; }
.policy p { font-size: 12px; margin: 0 0 4px; }
.policy .target, .target { color: #637885; }
.device-summary > strong { font-size: 64px; letter-spacing: -3px; display: block; line-height: 1.1; margin-top: 10px; }
.device-summary > strong.ok { color: var(--green); }
.device-summary > strong.bad { color: var(--red); }
.device-summary p { font-size: 13px; max-width: 520px; }
.meter { position: relative; height: 10px; border-radius: 5px; background: #edf1f4; margin: 18px 0 6px; max-width: 520px; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: #3fae8b; }
.meter b { position: absolute; top: -5px; width: 2px; height: 20px; background: var(--ink); }

/* Reports & settings */
.report-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); margin-top: 4px; }
.report-steps > div { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-weight: 700; font-size: 12px; }
pre { padding: 14px 16px; background: #173242; color: #aee0cd; overflow-x: auto; border-radius: 6px; font-size: 12px; margin: 0; white-space: pre-wrap; word-break: break-all; }
.settings-form { max-width: 1040px; }
.settings-form h2 { font-size: 20px; margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; margin-top: 16px; }
.form-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 2px; }
.unit { font-weight: 400; color: var(--muted); }
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 84px; border: 1px dashed #d5dee4; border-radius: 8px; background: #153342; padding: 10px; }
.logo-preview img { max-height: 64px; max-width: 100%; }
.form-actions { display: flex; justify-content: flex-end; }

/* Account drawer */
.link { border: 0; padding: 4px 6px; min-height: 0; background: none; color: var(--green); font-size: 12px; }
dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100vw); height: 100%; max-height: 100%; border: 0; padding: 30px; box-shadow: -10px 0 50px #102d3b33; }
dialog::backdrop { background: #142b3b55; }
.close { float: right; }
dialog h2 { margin-top: 6px; }

footer { border-top: 1px solid var(--line); padding: 18px 32px; font-size: 12px; color: #607684; display: flex; justify-content: space-between; gap: 16px; background: #fff; }

/* Laptop (1366) and below */
@media (max-width: 1440px) {
  .kpi { padding: 13px 12px 11px; }
  .kpi strong { font-size: 24px; }
  .kpi span, .kpi small { font-size: 11px; }
}
@media (max-width: 1200px) {
  main { padding: 24px; }
  .top { padding: 0 24px; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .overview-banner { grid-template-columns: minmax(0, 1fr) auto; }
  .banner-meta { display: none; }
  .policy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.three-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .live, .mark { display: none; }
  .page-heading { flex-direction: column; align-items: flex-start; }
  .overview-banner { grid-template-columns: 1fr; }
  .two, .two-even, .three, .report-steps, .form-grid, .form-grid.three-col { grid-template-columns: 1fr; }
  .kpis, .kpis.five, .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-grid { grid-template-columns: 1fr 1fr; }
  .alert-card { flex-direction: column; align-items: flex-start; }
  footer { flex-direction: column; }
}
