:root { color-scheme: light; --ink:#173746; --muted:#5d7580; --line:#d5e2e8; --paper:#f4f7f8; --card:#fff; --accent:#15566b; --accent-2:#e7f3f7; --alert:#8a3b12; --alert-bg:#fff1e8; --ok:#1d6b45; --ok-bg:#e7f6ee; --warn:#8a5d14; --warn-bg:#fff6e4; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.brand small, .eyebrow { display: block; color: var(--muted); letter-spacing: .14em; font-size: 11px; font-weight: 700; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 73px); }
nav { padding: 18px; border-right: 1px solid var(--line); background: #fff; }
nav button, nav a { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 10px 12px; margin-bottom: 4px; text-decoration: none; }
nav button[aria-current="true"], nav button:hover { background: var(--accent-2); }
main { padding: 22px; min-width: 0; overflow-wrap: anywhere; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; overflow-wrap: anywhere; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea { background: #fff; border: 1px solid #c5d5dc; border-radius: 10px; padding: 10px 12px; min-width: 0; }
textarea { width: 100%; min-height: 90px; }
button.primary, button.ghost, button.warn { border-radius: 10px; padding: 10px 14px; border: 1px solid transparent; }
button.primary { background: var(--accent); color: #fff; }
button.ghost { background: #fff; border-color: var(--line); }
button.warn { background: #fff; color: #8d2d2d; border-color: #e7c7c7; }
button:disabled { opacity: .55; cursor: wait; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; background: var(--accent-2); color: var(--accent); font-size: 12px; font-weight: 700; }
.pill.alert { background: var(--alert-bg); color: var(--alert); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.muted { color: var(--muted); }
.error { background: #fdecec; color: #8d2d2d; border-radius: 10px; padding: 10px 12px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(440px, 100%); display: grid; gap: 12px; }
.cards { display: grid; gap: 12px; }
.item { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.item:hover { border-color: #9fc3d0; }
.item h3 { margin: 0; font-size: 18px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.timeline { display: grid; gap: 0; margin: 8px 0 0; }
.step { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; }
.rail { display: flex; flex-direction: column; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #c5d5dc; margin-top: 4px; }
.step.feito .dot { background: var(--ok); }
.step.previsto .dot { background: var(--accent); }
.step.atrasado .dot { background: var(--alert); }
.line { width: 2px; flex: 1; background: #d7e3e8; min-height: 18px; }
.step:last-child .line { display: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 10px; }
.facts div { background: #f8fbfc; border-radius: 12px; padding: 10px 12px; }
.facts b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
th, td { overflow-wrap: anywhere; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font-size: 12px; color: var(--muted); background: #f8fbfc; }
.old, .new { display: block; border-radius: 8px; padding: 6px 8px; white-space: pre-wrap; }
.old { background: #fdecec; }
.new { background: #e7f6ee; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
dialog { border: 0; border-radius: 16px; padding: 18px; width: min(560px, calc(100% - 24px)); box-shadow: 0 16px 60px rgba(23,55,70,.2); }
dialog::backdrop { background: rgba(23,55,70,.35); }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  nav { display: flex; gap: 6px; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  nav button, nav a { width: auto; white-space: nowrap; }
  table, thead, tbody, tr, td, th { display: block; }
  thead { display: none; }
  tr { border-bottom: 8px solid var(--paper); }
  td { border: 0; }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
}
.queue { display: grid; gap: 10px; margin-top: 12px; }
.qgroup { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.qhead { overflow-wrap: anywhere; padding: 7px 10px; font-weight: 650; background: #f8fbfc; border-bottom: 1px solid var(--line); font-size: 14px; }
.qficha { overflow-wrap: anywhere; margin: 0; padding: 6px 10px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.qtable { table-layout: fixed; width: 100%; border-radius: 0; }
.qtable th, .qtable td { padding: 6px 8px; font-size: 13px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.qtable th:nth-child(1) { width: 34px; }
.qtable th:nth-child(2) { width: 120px; }
.qtable th:nth-child(5) { width: 20%; }
.qtable th:nth-child(6) { width: 96px; }
.qtable .old, .qtable .new { display: block; padding: 2px 6px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.qtable td.actions { display: table-cell; }
.qtable .actions button { display: block; width: 100%; padding: 3px 8px; font-size: 12px; margin-bottom: 4px; }
.qactions > * { min-width: 0; max-width: 100%; }
@media (max-width: 899px) {
  .qtable, .qtable thead, .qtable tbody, .qtable tr, .qtable td, .qtable th { display: block; width: 100%; }
  .qtable thead { display: none; }
  .qtable tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .qtable td { border: 0; padding: 3px 10px; }
  .qtable td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
  .qtable td:first-child:empty { display: none; }
  .qtable td.actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .qtable td.actions button { width: auto; margin: 0; }
  .qtable td.actions:empty { display: none; }
  .qtable td.actions::before { content: none; }
}
.qactions { display: flex; gap: 8px; align-items: center; padding: 8px 10px; flex-wrap: wrap; }
.qactions input, .qactions select { padding: 6px 8px; }
a.ghost { display: inline-block; border-radius: 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; }
