:root { color-scheme: light; }
  * { box-sizing: border-box; }
  body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
         background: #f6f8fb; color: #101828; }
  header { background: #101828; color: #fff; padding: 14px 20px; display: flex;
           align-items: center; gap: 16px; flex-wrap: wrap; }
  header h1 { font-size: 16px; margin: 0; font-weight: 600; }
  header .spacer { flex: 1; }
  button { font: inherit; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer;
           background: #1462d6; color: #fff; font-weight: 600; }
  button.ghost { background: rgba(255,255,255,.14); }
  button.soft { background: #eef4ff; color: #1462d6; }
  button.danger { background: #b42318; }
  button:disabled { opacity: .5; cursor: not-allowed; }
  main { max-width: 1180px; margin: 0 auto; padding: 20px; }
  .cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .card { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(16,24,40,.06); }
  .card .label { font-size: 12px; color: #667085; text-transform: uppercase; letter-spacing: .04em; }
  .card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
  .card.alert .value { color: #b42318; }
  section { margin-top: 26px; }
  section h2 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
  .count { font-size: 12px; font-weight: 700; background: #fef3f2; color: #b42318;
           border-radius: 999px; padding: 1px 8px; }
  .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
  select, input { font: inherit; padding: 7px 10px; border-radius: 8px;
                  border: 1px solid #d0d5dd; background: #fff; }
  table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px;
          overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.06); font-size: 13px; }
  th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #eaecf0; vertical-align: top; }
  th { background: #f9fafb; font-size: 11px; text-transform: uppercase; color: #667085; letter-spacing: .04em; }
  td.actions { white-space: nowrap; }
  td.actions button { padding: 5px 9px; font-size: 12px; }
  .tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
  .tag.ok { background: #ecfdf3; color: #027a48; }
  .tag.warn { background: #fffaeb; color: #b54708; }
  .tag.bad { background: #fef3f2; color: #b42318; }
  .muted { color: #667085; }
  .login { max-width: 380px; margin: 60px auto; background: #fff; padding: 24px;
           border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.1); }
  .login h2 { margin: 0 0 6px; font-size: 18px; }
  .login p { margin: 0 0 16px; color: #667085; font-size: 13px; }
  .login label { display: block; font-size: 12px; color: #667085; margin: 12px 0 4px; }
  .login input { width: 100%; }
  .login button { width: 100%; margin-top: 16px; }
  .msg { margin-top: 12px; font-size: 13px; }
  .msg.error { color: #b42318; }
  .msg.ok { color: #027a48; }
  .hidden { display: none !important; }
  /* painel lateral de detalhe */
  .drawer-bg { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex;
               justify-content: flex-end; z-index: 10; }
  .drawer { width: min(560px, 100%); background: #fff; height: 100%; overflow-y: auto; padding: 20px; }
  .drawer h3 { margin: 0 0 4px; font-size: 16px; }
  .drawer h4 { margin: 20px 0 6px; font-size: 12px; text-transform: uppercase;
               letter-spacing: .04em; color: #667085; }
  .kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; font-size: 13px; }
  .kv div:nth-child(odd) { color: #667085; }
  .timeline { font-size: 12px; border-left: 2px solid #eaecf0; padding-left: 12px; }
  .timeline div { margin-bottom: 8px; }

.who { color: #d0d5dd; }
.row.spread { justify-content: space-between; }
.kv.mb { margin-bottom: 8px; }
.row.mt { margin-top: 20px; }
