:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #fff;
  --input: #fbfcfe;
  --line: #dce3ec;
  --text: #142235;
  --muted: #51637b;
  --accent: #faad33;
  --blue: #1756a1;
  --green: #186347;
  --red: #a32d22;
  --radius: 14px;
}
body { background: var(--bg); }
button,.btn { padding: 9px 14px; min-height: 39px; }
button:hover,.btn:hover { border-color: #8e9fb4; }
.primary { background: #f4aa35; border-color: #e9a02d; color: #241802; }
.primary:hover { background: #ffbb51; border-color: #e9a02d; }
input, select, textarea { background: var(--input); }
h1 { line-height: 1.15; }
h2 { margin-bottom: 14px; }
p { color: var(--muted); }
.panel { padding: 21px; box-shadow: 0 2px 5px #172b4510; }
.app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.side { background: #101e31; color: white; padding: 25px 16px; }
.side .brand { padding: 0 7px 25px; color: #fff; align-items: center; font-size: 17px; }
.side .brand:hover { text-decoration: none; }
.mark { width: 39px; height: 39px; font-size: 14px; font-weight: 850; background: #f4aa35; }
.brand small { display: block; color: #aabbd1; font-size: 8px; letter-spacing: .13em; margin-top: 3px; }
.nav-group { display: grid; gap: 3px; margin-bottom: 19px; }
.nav-group > span { color: #9eaec4; padding: 5px 11px; font-weight: 700; font-size: 11px; letter-spacing: .10em; text-transform: uppercase; }
.nav-group a { display: block; color: #d8e3f1; padding: 10px 12px; border-radius: 8px; border-inline-start: 3px solid transparent; font-size: 14px; }
.nav-group a:hover { background: #20314a; text-decoration: none; }
.nav-group a[aria-current] { border-inline-start-color: #f4aa35; background: #223650; color: white; font-weight: 750; }
.workspace { min-width: 0; }
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px clamp(16px,3vw,32px); background: white; border-bottom: 1px solid var(--line); }
.top-title { font-weight: 750; }
.account { display: flex; align-items: center; gap: 13px; min-width: 0; }
.account a { overflow-wrap: anywhere; }
#nav-toggle { display: none; }
.workspace-content { width: 100%; max-width: 1500px; padding: 29px clamp(16px,3vw,32px) 60px; }
.overview { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 26px 28px; margin-bottom: 21px; border-radius: 17px; color: white; background: radial-gradient(ellipse at 86% 0%, #285277, transparent 54%), #162942; }
.overview h1 { margin: 8px 0; }
.overview p { margin-bottom: 0; color: #d3ddeb; }
.overview .btn:not(.primary) { color: white; background: #203957; border-color: #64809e; }
.date-line { color: #ffd28d; font-size: .83rem; font-weight: 700; }
.metric { border-top: 4px solid #7d91ad; box-shadow: 0 2px 4px #172b450c; padding: 16px; }
.metric:hover { border-color: #809ab5; text-decoration: none; }
.metric span { display: block; min-height: 22px; font-size: 13px; font-weight: 690; }
.metric strong { margin-top: 8px; font-size: clamp(1.35rem,2.7vw,1.9rem); overflow-wrap: anywhere; }
.metric-gold { border-top-color: #d08319; }
.metric-blue { border-top-color: #387bb5; }
.metric-green { border-top-color: #328d70; }
.overview + .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel-heading,.strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-heading { margin-bottom: 12px; flex-wrap: wrap; }
.panel-heading h2,.panel-heading h3,.panel-heading p { margin-bottom: 0; }
.strip { border-block-end: 1px solid var(--line); padding: 11px 0; align-items: start; }
.strip:last-child { border-block-end: 0; }
.strip details { min-width: 72px; }
.strip form { min-width: 140px; }
.record { padding: 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.record p { margin-bottom: 10px; overflow-wrap: anywhere; }
.queue { display: grid; gap: 15px; }
.queue a { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; color: var(--text); font-size: 13px; }
.queue i { display: block; height: 7px; background: #eaf0f6; border-radius: 9px; grid-column: 1/-1; overflow: hidden; }
.queue b { display: block; height: 100%; background: #557ba3; border-radius: 9px; }
.queue .fill-waiting { background: #d08319; }
.queue .fill-working { background: #316aaf; }
.queue .fill-ready { background: #26866d; }
.status { color: #294362; background: #e5eef9; }
.status.waiting,.status.partial,.status.open { color: #7c4a06; background: #fceccd; }
.status.ready,.status.done,.status.received,.status.attended,.status.confirmed { color: #145640; background: #d7f0e5; }
.status.cancelled,.notice.error { color: #8c2922; background: #fbe8e6; }
.warning { color: #8a5005; }
.notice { background: #dff2e9; color: #155a40; }
.align-start { align-items: start; }
.filter { align-items: end; }
.filter label { flex: 0 1 auto; min-width: min(138px,100%); }
.compact-panel { padding: 13px 16px; }
.timeline > div { display: grid; gap: 4px; border-left: 2px solid #e2eaf4; padding: 0 0 15px 13px; }
.timeline > div:last-child { padding-bottom: 0; }
.timeline p { margin-bottom: 0; overflow-wrap: anywhere; }
summary { color: var(--blue); font-weight: 650; cursor: pointer; }
.scroll { max-width: 100%; }
th { background: #f1f5fa; }
td { overflow-wrap: anywhere; }
@media (min-width: 1320px) {
  .overview + .metrics { grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); }
}
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 198px minmax(0,1fr); }
  .dashboard-columns,.layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .side { display: none; }
  .nav-open .side { display: block; position: absolute; inset: 64px 0 auto; z-index: 2; max-height: calc(100vh - 64px); overflow: auto; }
  #nav-toggle { display: inline-flex; }
  .top-title { display: none; }
  .overview { padding: 20px; align-items: start; flex-direction: column; }
  .overview + .metrics { grid-template-columns: repeat(auto-fit,minmax(min(100%,148px),1fr)); }
  .workspace-content { padding-top: 20px; }
  .panel { padding: 15px; }
  .cols { grid-template-columns: minmax(0,1fr); }
}
@media print {
  .print .panel { box-shadow: none; }
  th { background: white; }
}
