:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #102535;
  background: #f4f7f9;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f4f7f9; color: #102535; }
button, input { font: inherit; }

.shell { width: min(1400px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 60px; }
.topbar, .section-heading, .hero-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { margin-bottom: 18px; }
h1, h2 { margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 800; color: #417BAF; margin-bottom: 6px; }
.muted { color: #647887; font-size: 14px; }
.status-pill { background: #eaf3f9; border: 1px solid #c8deed; color: #21496A; padding: 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { border: 1px solid #cfdbe3; background: #fff; color: #21496A; padding: 9px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.tab.active { background: #21496A; color: #fff; border-color: #21496A; }
.tab:disabled { opacity: .45; cursor: not-allowed; }

.panel { background: #fff; border: 1px solid #d8e2e8; border-radius: 16px; padding: 20px; margin-bottom: 18px; box-shadow: 0 4px 14px rgba(16,37,53,.04); }
.field-wrap { position: relative; margin-top: 16px; }
label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 7px; }
input { width: 100%; padding: 12px 13px; border: 1px solid #cbd8e1; border-radius: 10px; background: #fff; color: #102535; outline: none; }
input:focus { border-color: #5DA2D5; box-shadow: 0 0 0 3px rgba(93,162,213,.13); }

.results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #cfdbe3; border-radius: 12px; overflow: hidden; max-height: 360px; overflow-y: auto; box-shadow: 0 16px 36px rgba(16,37,53,.14); }
.result-item { padding: 12px 14px; border-bottom: 1px solid #edf2f5; cursor: pointer; }
.result-item:last-child { border-bottom: 0; }
.result-item:hover { background: #f3f8fb; }
.result-title { font-weight: 800; }
.result-sub { margin-top: 3px; font-size: 13px; color: #6a7f8e; }
.hidden { display: none !important; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { background: #fff; border: 1px solid #d8e2e8; border-radius: 14px; padding: 18px; }
.metric-card span { display: block; font-size: 12px; color: #647887; font-weight: 700; margin-bottom: 8px; }
.metric-card strong { font-size: 22px; }
.metric-card small { display: block; margin-top: 6px; color: #7a8e9b; font-size: 12px; }
.metric-card.attention { border-color: #f0d4a0; background: #fffaf0; }
.metric-card.danger { border-color: #efb9b9; background: #fff5f5; }
.flag-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.flag { border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 800; background: #edf4f8; color: #21496A; }
.flag.warn { background: #fff2d9; color: #8a5b00; }

.table-wrap { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 11px 10px; border-bottom: 1px solid #edf2f5; text-align: left; font-size: 13px; vertical-align: top; }
th { color: #647887; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.num { text-align: right; }
.empty-row td { text-align: center; color: #7a8e9b; padding: 24px; }

.secondary-button { border: 1px solid #cbd8e1; background: #fff; color: #21496A; border-radius: 10px; padding: 9px 13px; font-weight: 800; cursor: pointer; }
.secondary-button:hover { background: #f3f8fb; }

.queue-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.queue-filter { border: 1px solid #d3dee5; background: #fff; color: #21496A; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; cursor: pointer; }
.queue-filter.active { background: #21496A; border-color: #21496A; color: #fff; }

.priority-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; border-radius: 999px; padding: 5px 8px; font-size: 10px; letter-spacing: .05em; font-weight: 900; }
.priority-pill.new { background: #eaf6ef; color: #176139; }
.priority-pill.today { background: #fff2d9; color: #8a5b00; }
.priority-pill.overdue { background: #fdeaea; color: #8e1f1f; }

.message { padding: 13px 15px; border-radius: 10px; margin-top: 14px; }
.message.error { background: #fdeaea; color: #8e1f1f; border: 1px solid #f3c4c4; }
.message.ok { background: #eaf6ef; color: #176139; border: 1px solid #c8e8d4; }

@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar, .hero-card, .section-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 18px, 1400px); padding-top: 14px; }
  .summary-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
}
