:root { color-scheme: light; }
body { display: grid; grid-template-columns: 268px minmax(0, 1fr); background: #e8e2d6; color: #171717; font-family: Consolas, "Courier New", monospace; }
.sidebar {
  position: sticky; top: 0; width: auto; height: 100vh; padding: 28px 20px; background: #181818; color: #f7f2e7;
  border-right: 10px solid #ef6c32;
}
.brand { border: 2px solid #ef6c32; padding: 14px; }
.brand-mark { border-radius: 0; background: #ef6c32; color: #181818; }
.brand span, .sidebar nav a { color: #f7f2e7; }
.sidebar nav a { border: 1px solid #555; border-radius: 0; text-transform: uppercase; font-size: 12px; }
.sidebar nav a:hover, .sidebar nav a.active { background: #ef6c32; border-color: #ef6c32; color: #181818; }
.side-panel { border: 1px dashed #ef6c32; border-radius: 0; background: #242424; }
main { min-width: 0; margin-left: 0; padding: 30px 34px 48px; }
.topbar { border-bottom: 4px solid #181818; padding-bottom: 18px; }
.topbar h1 { max-width: 760px; font-family: "Arial Narrow", Arial, sans-serif; font-size: clamp(30px, 4vw, 46px); line-height: 1; text-transform: uppercase; }
.topbar p { max-width: 760px; color: #52504a; }
.actions button, .button { border: 2px solid #181818; border-radius: 0; background: #ef6c32; color: #181818; box-shadow: 4px 4px 0 #181818; }
.button.secondary { background: #f7f2e7; }
.metric-grid { gap: 0; border: 2px solid #181818; }
.metric { border: 0; border-right: 2px solid #181818; border-radius: 0; background: #f7f2e7; box-shadow: none; }
.metric:last-child { border-right: 0; }
.metric strong { font-family: Impact, "Arial Narrow", sans-serif; letter-spacing: 0; color: #181818; }
.metric.danger, .metric.warning, .metric.money { background: #f7f2e7; }
.metric.danger { box-shadow: inset 0 7px #b83b2d; }
.metric.warning { box-shadow: inset 0 7px #ef6c32; }
.metric.money { box-shadow: inset 0 7px #b8a22c; }
.split { grid-template-columns: minmax(0, 1.5fr) minmax(290px, .8fr); gap: 20px; }
.panel { border: 2px solid #181818; border-radius: 0; background: #f7f2e7; box-shadow: 6px 6px 0 #181818; }
.panel-heading { border-bottom: 2px solid #181818; background: #ded6c7; }
.label { color: #b83b2d; text-transform: uppercase; }
select { border: 2px solid #181818; border-radius: 0; background: #fff; }
.case-list > *, .automation-list > *, .playbook-grid > * { border-radius: 0; border-style: dashed; }
.advance-button { min-height: 44px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: #fff; color: #181818; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.panel-heading { align-items: flex-start; }
.panel-heading > div:first-child { min-width: 170px; }
.result-count { margin-top: 6px; color: #5f5b53; font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.toolbar input, .toolbar select { min-height: 42px; border: 2px solid #181818; border-radius: 0; background: #fff; color: #181818; font: inherit; }
.toolbar input { width: min(280px, 100%); padding: 0 12px; }
.tertiary-button { min-height: 42px; border: 2px solid #181818 !important; background: #ded6c7 !important; color: #181818 !important; box-shadow: none !important; }
.empty-state, .error-message { padding: 28px 18px; border: 1px dashed #8e8679; text-align: center; }
.empty-state p, .error-message p { margin-top: 8px; color: #5f5b53; }
button:disabled { cursor: wait; opacity: .65; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #2361d1; outline-offset: 3px; }
@media (max-width: 1180px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .actions { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  body { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 10px solid #ef6c32; }
  .sidebar nav { display: grid; grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .toolbar { width: 100%; justify-content: flex-start; }
}
@media (max-width: 620px) {
  main { padding: 22px 14px 38px; }
  .topbar h1 { font-size: 32px; overflow-wrap: anywhere; }
  .actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 12px; }
  .actions .session-status { width: 100%; max-width: none; white-space: normal; }
  .actions .button, .actions button { white-space: nowrap; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .case-row { grid-template-columns: minmax(0, 1fr); }
  .case-actions { justify-items: start; }
  .panel-heading { align-items: stretch; }
  .toolbar > * { width: 100%; }
}
