/* NIRRON · Sistema de OS
   Verde da marca #264E36. Tipografia: Inter (corpo) e Inter Display ExtraBold (títulos),
   o peso do título ecoa o logotipo. Menu lateral escuro, área de trabalho clara. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/Inter-Bold.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 800; font-display: swap; src: url("fonts/InterDisplay-ExtraBold.woff") format("woff"); }

:root {
  --brand: #264E36; --brand-dark: #1B3A28; --brand-deep: #14291D; --brand-soft: #E7EFE9; --brand-line: #C9D9CE;
  --canvas: #F1F4F1; --card: #FFFFFF; --text: #17251D; --muted: #5D6E63; --line: #DDE4DE; --line-strong: #C4CFC7;
  --red: #B3342A; --red-bg: #FCEBE8; --amber: #8A5A00; --amber-bg: #FFF1CC; --green: #1D7A45; --green-bg: #E1F3E8;
  --blue: #245D9E; --blue-bg: #E4EEF9; --purple: #62399B; --purple-bg: #EFE7FA; --gray: #55625A; --gray-bg: #E9EDEA;
  --radius: 10px; --radius-sm: 7px; --side: 244px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  /* compatibilidade com nomes antigos */
  --bg: var(--canvas); --primary: var(--brand); --primary-dark: var(--brand-dark);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14.5px/1.5 var(--font); background: var(--canvas); color: var(--text); font-feature-settings: "tnum" 1, "calt" 1; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; color: var(--brand-deep); }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 0 0 4px; } h2 { font-size: 1.1rem; margin: 0 0 14px; } h3 { font-size: .98rem; margin: 16px 0 8px; }
small { font-size: .82rem; } .muted { color: var(--muted); } .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; word-break: break-all; font-size: .88em; }
.pre { white-space: pre-line; } .num { text-align: right; }
:focus-visible { outline: 3px solid #8FC3A3; outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- estrutura ---------- */
body.with-nav { padding-left: var(--side); }
.container { max-width: 1680px; margin: 0 auto; padding: 28px 32px 90px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin: 2px 0 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 18px; align-items: start; }
.span-2 { grid-column: span 2; } .span-full { grid-column: 1 / -1; }

/* ---------- menu lateral ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--brand-dark); color: #fff; display: flex; flex-direction: column; padding: 22px 14px 14px; gap: 6px; z-index: 20; overflow-y: auto; }
.side-logo { display: block; padding: 2px 8px 18px; } .side-logo img { display: block; width: 138px; height: auto; }
.side-new { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 4px 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fff; color: var(--brand-dark); font-weight: 700; }
.side-new:hover { background: var(--brand-soft); text-decoration: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm); color: #BFD2C6; font-weight: 500; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.side-nav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.side-nav a.on::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 5px; background: #fff; clip-path: polygon(0 0, 100% 22%, 100% 100%, 0 100%); }
.side-group { margin: 18px 12px 6px; font-size: .78rem; font-weight: 600; color: #8FAA99; }
.ico { width: 19px; height: 19px; flex: none; }
.pill { margin-left: auto; background: #fff; color: var(--brand-dark); border-radius: 99px; font-size: .75rem; font-weight: 700; padding: 0 7px; line-height: 19px; }
.side-user { display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 10px; }
.side-user .who { flex: 1; min-width: 0; line-height: 1.25; } .side-user strong { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: #8FAA99; }
.side-out { background: transparent; border: 1px solid rgba(255,255,255,.28); color: #fff; border-radius: var(--radius-sm); padding: 5px 11px; cursor: pointer; font: inherit; font-size: .84rem; }
.side-out:hover { background: rgba(255,255,255,.1); }
@media (max-width: 960px) {
  body.with-nav { padding-left: 0; }
  .side { position: static; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 8px; }
  .side-logo { padding: 0 8px 0 0; } .side-new { margin: 0; padding: 7px 12px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; order: 5; } .side-nav a.on::before { display: none; }
  .side-group { display: none; } .side-user { border: 0; margin: 0; padding: 0; margin-left: auto; }
  .container { padding: 20px 16px 70px; } .two-col { grid-template-columns: 1fr; }
}

/* ---------- formulários ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .86rem; color: var(--text); }
label small { font-weight: 400; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; align-self: end; }
input, select, textarea { font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input:focus, select:focus, textarea:focus { outline: 3px solid #BBD8C5; border-color: var(--brand); }
input[type=file] { padding: 7px; }
input::placeholder, textarea::placeholder { color: #8A9A90; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.info-box { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; align-self: end; }
#required-docs { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.form-card { display: block; } .form-card .grid + h2, .form-card h2 + .grid { margin-top: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; }
details summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-weight: 600; transition: background .12s; }
.btn:hover { background: var(--brand-soft); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-dark); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; } .btn-danger:hover { background: #962B22; }
.btn-ghost { background: transparent; } .btn-sm { padding: 4px 10px; font-size: .82rem; } .btn-block { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions.sticky { position: sticky; bottom: 0; background: linear-gradient(rgba(241,244,241,0), var(--canvas) 38%); padding: 22px 0 10px; z-index: 5; }

.alert { padding: 11px 15px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.alert-success { background: var(--green-bg); border-color: #B5DEC4; color: var(--green); }
.alert-error { background: var(--red-bg); border-color: #F0BDB6; color: var(--red); }
.alert-warning { background: var(--amber-bg); border-color: #EBD088; color: var(--amber); }
.alert a { font-weight: 700; text-decoration: underline; }

.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.msg { padding: 8px 11px; border-radius: var(--radius-sm); font-size: .9rem; margin-top: 6px; }
.msg-list .msg { margin-top: 0; } small.msg { display: inline-block; margin: 0; }
.msg-danger { background: var(--red-bg); color: var(--red); } .msg-warn { background: var(--amber-bg); color: var(--amber); }
.msg-ok { background: var(--green-bg); color: var(--green); } .msg-info { background: var(--blue-bg); color: var(--blue); }
.msg .btn { margin-left: 6px; }
.side-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 16px; } .side-panels h3 { margin-top: 0; }

.badge, .tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--gray-bg); color: var(--gray); white-space: nowrap; }
.badge-amber, .tag-amber { background: var(--amber-bg); color: var(--amber); } .badge-blue, .tag-blue { background: var(--blue-bg); color: var(--blue); }
.badge-red, .tag-red { background: var(--red-bg); color: var(--red); } .badge-green, .tag-green { background: var(--green-bg); color: var(--green); }
.badge-purple { background: var(--purple-bg); color: var(--purple); } .badge-gray, .tag-gray { background: var(--gray-bg); color: var(--gray); }

/* ---------- tabelas ---------- */
.filters { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; padding: 12px 14px; }
.filters input[type=search] { flex: 1; min-width: 240px; width: auto; } .filters select { width: auto; }
.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; font-weight: 600; color: var(--muted); background: #F8FAF8; white-space: nowrap; }
th.num { text-align: right; } td.num, th.num { white-space: nowrap; } tbody tr:hover { background: #F7FAF7; } tr:last-child td { border-bottom: 0; }
td.empty { text-align: center; color: var(--muted); padding: 30px; }
.due-overdue { color: var(--red); font-weight: 600; } .due-soon { color: var(--amber); font-weight: 600; }
td small, dd small { display: block; }

.dl { display: grid; grid-template-columns: 150px 1fr; gap: 9px 16px; margin: 0; } .dl dt { color: var(--muted); } .dl dd { margin: 0; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; } .file-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.steps { padding-left: 20px; margin: 10px 0 0; color: var(--muted); } .steps li { margin-bottom: 6px; } .steps li.done { color: var(--green); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 14px; font-size: .9rem; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; width: min(640px, 94vw); }
dialog::backdrop { background: rgba(20, 41, 29, .5); }
.inst-tools { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 8px; } .inst-tools label { width: 160px; }
.inst-table-wrap { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
#inst-table td { vertical-align: top; padding: 8px; } #inst-table input { padding: 6px 8px; } #inst-table .w-line { min-width: 260px; }
.paste-box { margin-top: 10px; } .paste-box textarea { margin: 8px 0; }

/* ---------- abas, indicadores ---------- */
.tabs { display: flex; gap: 2px; margin: 0 0 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line-strong); }
.tabs a, .tabs button { padding: 9px 15px; color: var(--muted); font-weight: 600; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover, .tabs button:hover { color: var(--brand-deep); text-decoration: none; }
.tabs a.active, .tabs button.active { color: var(--brand-deep); border-bottom-color: var(--brand); }
.tabs .count { background: var(--gray-bg); border-radius: 99px; padding: 0 8px; font-size: .78rem; margin-left: 5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1.15; letter-spacing: -.02em; color: var(--brand-deep); } .stat span { color: var(--muted); font-size: .86rem; }
.stat.stat-alert b { color: var(--red); }

/* ---------- quadro (estilo Pipefy) ---------- */
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.view-toggle a { padding: 7px 14px; font-weight: 600; color: var(--muted); } .view-toggle a.on { background: var(--brand); color: #fff; } .view-toggle a:hover { text-decoration: none; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { flex: 1 1 260px; width: auto; max-width: 420px; } .toolbar select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: #fff; font-weight: 600; font-size: .86rem; color: var(--muted); }
.chip:hover { text-decoration: none; background: var(--brand-soft); } .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; align-items: start; }
.col { min-width: 0; background: #E5EBE6; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 9px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; }
.col-head h2 { margin: 0; font-size: .95rem; flex: 1; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.col-head .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c, #8A9A90); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.col-head .n { background: rgba(0,0,0,.08); border-radius: 99px; padding: 0 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.col-sum { padding: 0 4px 4px; color: var(--muted); font-size: .8rem; }
.col-empty { padding: 18px 8px; text-align: center; color: #86968B; font-size: .85rem; border: 1px dashed #BFCBC2; border-radius: 8px; }
.col-more { text-align: center; font-size: .84rem; padding: 4px; }
.kcard { display: block; position: relative; background: #fff; border-radius: 9px; padding: 11px 13px 11px 15px; border: 1px solid var(--line); color: var(--text); box-shadow: 0 1px 2px rgba(20,41,29,.06); transition: box-shadow .15s, transform .15s; }
.kcard::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 4px; border-radius: 0 3px 3px 0; background: var(--c, #C4CFC7); }
.kcard:hover { text-decoration: none; box-shadow: 0 6px 16px rgba(20,41,29,.13); transform: translateY(-1px); }
.kcard .top { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.kcard .top .sp { flex: 1; }
.kcard .who { font-weight: 700; margin: 5px 0 1px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kcard .what { color: var(--muted); font-size: .84rem; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 8px; }
.kcard .row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.kcard .val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }
.kcard .due { margin-left: auto; white-space: nowrap; font-size: .8rem; font-weight: 600; color: var(--muted); } .kcard .due.late { color: var(--red); } .kcard .due.soon { color: var(--amber); }
.kcard .foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.kcard .foot .ava { width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .66rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kcard .foot .area { margin-left: auto; font-weight: 600; }
.kcard.urgent { --c: var(--red); } .kcard.late { --c: var(--red); } .kcard.warn { --c: #D49A1B; }

/* ---------- tela da OS ---------- */
.os-head { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.os-head .title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .os-head h1 { margin: 0; }
.os-head .sub { color: var(--muted); margin-top: 4px; }
.os-head .key { display: flex; gap: 28px; flex-wrap: wrap; text-align: right; } .os-head .key div { display: flex; flex-direction: column; }
.os-head .key span { color: var(--muted); font-size: .8rem; } .os-head .key b { font-family: var(--display); font-size: 1.25rem; letter-spacing: -.01em; }
@media (max-width: 760px) { .os-head { grid-template-columns: 1fr; } .os-head .key { text-align: left; } }
.attn { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--amber-bg); color: var(--amber); margin-bottom: 14px; }
.attn.bad { background: var(--red-bg); color: var(--red); } .attn b { white-space: nowrap; } .attn ul { margin: 4px 0 0; padding-left: 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; font-size: .84rem; font-weight: 600; cursor: default; }
.chk.ok { background: var(--green-bg); color: var(--green); } .chk.warn { background: var(--amber-bg); color: var(--amber); }
.chk.bad { background: var(--red-bg); color: var(--red); } .chk.info { background: var(--gray-bg); color: var(--gray); }
.check-details { margin-top: 12px; } .check-details li { margin-bottom: 4px; }
.flow { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); color: var(--muted); }
.flow li { position: relative; padding: 0 0 13px 14px; }
.flow li::before { content: ""; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #B4C2B9; }
.flow li.done::before, .flow li.step-approved::before { background: var(--green); border-color: var(--green); }
.flow li.done { color: var(--green); font-weight: 600; }
.flow li.now::before { background: #D49A1B; border-color: #D49A1B; box-shadow: 0 0 0 4px var(--amber-bg); }
.flow li.step-rejected::before { background: var(--red); border-color: var(--red); } .flow li.step-returned::before { background: #D49A1B; border-color: #D49A1B; }
.flow li.step-cancelled { opacity: .55; } .flow li.step-approved, .flow li.now, .flow li.step-pending, .flow li.step-rejected, .flow li.step-returned { color: inherit; }
.decide { border: 2px solid var(--brand); }
.check-list strong { margin-right: 4px; }
.matrix td, .matrix th { vertical-align: top; } .matrix select { width: 100%; margin-bottom: 4px; }

/* ---------- financeiro ---------- */
.bulk { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 16px; }
.bulk input[type=date], .inline-form input[type=date] { width: auto; }
tr.more > td { background: #F6F9F6; padding: 16px 20px; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; } @media (max-width: 900px) { .more-grid { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: 8px; align-items: center; }

/* ---------- relatórios ---------- */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr auto; gap: 12px; align-items: center; padding: 6px 0; font-size: .9rem; }
.bar-row .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bar-row .val { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { display: block; background: #E6ECE7; height: 10px; border-radius: 99px; overflow: hidden; } .bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 2px; }
.bar-fill.alt { background: #D49A1B; } .bar-fill.red { background: var(--red); }
.delta-up { color: var(--red); font-weight: 600; } .delta-down { color: var(--green); font-weight: 600; }
.cols-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 6px; }
.cols-chart .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: .78rem; color: var(--muted); }
.cols-chart .c i { display: block; width: 100%; max-width: 46px; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 2px; }
.cols-chart .c b { color: var(--text); font-size: .76rem; font-weight: 600; white-space: nowrap; }

/* ---------- entrada ---------- */
body.bare { background: var(--brand-dark); }
body.bare .container { max-width: none; padding: 0; margin: 0; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); }
.login-art { position: relative; overflow: hidden; background: var(--brand); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art::after { content: ""; position: absolute; right: -170px; bottom: -150px; width: 520px; height: 520px; background: url("img/simbolo-branco.png") no-repeat center / contain; opacity: .07; }
.login-art img { width: 210px; height: auto; position: relative; z-index: 1; }
.login-art p { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 3.2vw, 2.7rem); line-height: 1.12; letter-spacing: -.025em; margin: 0; max-width: 14ch; position: relative; z-index: 1; }
.login-art small { color: #A9C4B3; position: relative; z-index: 1; }
.login-form { background: var(--canvas); display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.login-card { width: min(380px, 100%); } .login-card h1 { font-size: 1.6rem; } .login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.login-card .btn-primary { padding: 11px 15px; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login-art { padding: 28px; min-height: 190px; } .login-art p { display: none; } .login-art small { display: none; } }

/* ---------- tela da OS: avisos, conferência, resumo ---------- */
.attn-box { background: var(--amber-bg); border: 1px solid #EBD088; border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; }
.attn-box.bad { background: var(--red-bg); border-color: #F0BDB6; }
.attn-box summary { color: var(--amber); } .attn-box.bad summary { color: var(--red); }
.attn-box .msg-list { margin-top: 10px; } .attn-box .msg { background: rgba(255,255,255,.65); }
.card.slim { padding: 14px 18px; margin-bottom: 16px; }
.check-details { margin-top: 12px; } .check-details .msg-list { margin-top: 10px; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; } .sum-grid .span-2 { grid-column: 1 / -1; }
.sum-grid .dl { grid-template-columns: 112px 1fr; } @media (max-width: 760px) { .sum-grid { grid-template-columns: 1fr; } }
.side-col { position: sticky; top: 16px; } @media (max-width: 960px) { .side-col { position: static; } }
.cancel-box { padding: 12px 18px; } .cancel-box summary { color: var(--red); } .cancel-box form { margin-top: 12px; }
.tabpane[hidden] { display: none; }

/* ---------- formulário da OS ---------- */
.os-form { max-width: 980px; }
.stepno { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 .8rem var(--font); letter-spacing: 0; vertical-align: 2px; }
.opt-box { border-top: 1px dashed var(--line-strong); padding-top: 12px; }
details.card.opt-box { border: 1px solid var(--line); padding: 14px 20px; }
.opt-box > .grid, .opt-box > label { margin-top: 12px; }
.opt-box[open] > summary { margin-bottom: 4px; }

td strong a, td a strong { white-space: nowrap; }
td > a:first-child > strong { white-space: nowrap; }
.side-user .whoname { color: #fff; } .side-user .whoname:hover { text-decoration: underline; }
td select { min-width: 150px; } td .actions { flex-wrap: nowrap; }

.kcard .top > span:first-child { white-space: nowrap; }
.kcard .top { flex-wrap: wrap; }
.matrix label.check { align-self: auto; margin-bottom: 4px; } .matrix .ceo { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-strong); color: var(--muted); }
.profiles-pick { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 18px; } .profiles-pick legend { font-weight: 600; padding: 0 6px; } .profiles-pick label.check { align-self: auto; }
td input[name=name], td input[name=email] { min-width: 230px; }

/* ---------- faixa "Para você" ---------- */
.todo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.todo-title { font-weight: 700; color: var(--brand-deep); margin-right: 4px; }
.todo-item { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.todo-item:hover { text-decoration: none; border-color: var(--brand); }
.todo-item b { display: inline-flex; min-width: 24px; height: 24px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 99px; font-size: .82rem; background: var(--gray-bg); color: var(--gray); }
.todo-item.t-red b { background: var(--red-bg); color: var(--red); } .todo-item.t-amber b { background: var(--amber-bg); color: var(--amber); }
.kcard .foot { min-width: 0; } .kcard .foot > span:not(.ava) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .foot .area { flex: 0 1 auto; }

/* ---------- lista com busca ---------- */
.combo { position: relative; width: 100%; }
.combo-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; left: 0; bottom: 0; }
.combo-input { padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%235D6E63' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center; }
.combo-input:disabled { background-color: #F4F6F4; color: var(--muted); }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 10px 24px rgba(20,41,29,.14); font-weight: 400; }
.combo-list li { padding: 7px 10px; border-radius: 5px; cursor: pointer; font-size: .92rem; }
.combo-list li.on, .combo-list li:hover { background: var(--brand-soft); }
.combo-list li[aria-selected="true"] { font-weight: 600; color: var(--brand-deep); }
.combo-list li.combo-empty { color: var(--muted); cursor: default; background: none; }

/* ---------- preencher pela NF ---------- */
.autofill { border: 1.5px dashed var(--brand-line); background: #F8FBF8; }
.autofill.drag { border-color: var(--brand); background: var(--brand-soft); }
.autofill-head { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.autofill-head h2 { margin: 0 0 4px; } .autofill-head p { margin: 0; max-width: 70ch; }
.file-btn { position: relative; overflow: hidden; white-space: nowrap; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#autofill-box:not(:empty) { margin-top: 14px; }
.form-sep { border-top: 1px dashed var(--line-strong); margin: 2px 0; }

/* =====================================================================
   v3 · linguagem visual
   Trilho de ícones (menos texto), cartões sem borda dura, números como protagonistas
   e o corte diagonal do símbolo NIRRON como assinatura (botão Nova OS, trilha de etapas, marcador do menu).
   ===================================================================== */
:root {
  --ink: #0F2418; --brand: #264E36; --brand-2: #2F6447; --brand-dark: #1B3A28; --brand-deep: #10261A;
  --mint: #DCEBE0; --mint-soft: #EEF5F0; --canvas: #F2F5F2; --line: #E2E8E3; --line-strong: #CBD5CD;
  --text: #13241A; --muted: #66776C; --amber: #9A6400; --amber-bg: #FFF3D6; --red: #B8352B; --red-bg: #FCEBE8;
  --rail: 88px; --side: var(--rail); --radius: 14px; --radius-sm: 9px;
  --lift: 0 1px 2px rgba(15,36,24,.05), 0 0 0 1px rgba(15,36,24,.055);
  --lift-2: 0 10px 28px rgba(15,36,24,.12), 0 0 0 1px rgba(15,36,24,.06);
  --cut: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
body { background: var(--canvas); }
.card { border: 0; box-shadow: var(--lift); border-radius: var(--radius); }
h1 { font-size: 1.9rem; letter-spacing: -.03em; }
.page-head { align-items: center; margin-bottom: 18px; }
.page-head .sub { font-size: .9rem; }
.container { padding: 26px 34px 90px; }

/* ---- trilho ---- */
.rail { width: var(--rail); padding: 18px 10px 14px; align-items: center; gap: 4px; background: var(--ink); overflow: visible; }
.rail-logo { display: block; padding: 0 0 16px; } .rail-logo img { width: 34px; height: 34px; display: block; }
.rail-new { flex-direction: column; gap: 2px; width: 60px; height: 58px; margin: 0 0 14px; padding: 0; border-radius: 12px;
  background: #fff; color: var(--brand-dark); font-size: .68rem; font-weight: 700; line-height: 1.1; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); }
.rail-new .ico { width: 22px; height: 22px; stroke-width: 2.4; }
.rail-new:hover { background: var(--mint); }
.rail-nav { align-items: stretch; width: 100%; gap: 2px; }
.rail-nav a { flex-direction: column; gap: 4px; padding: 10px 2px 8px; border-radius: 12px; color: #9DB8A7; font-size: .7rem; font-weight: 600; text-align: center; line-height: 1.1; }
.rail-nav a .ico { width: 22px; height: 22px; }
.rail-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.rail-nav a.on { background: rgba(255,255,255,.1); color: #fff; }
.rail-nav a.on::before { left: -10px; top: 12px; bottom: 12px; width: 5px; }
.rail-nav .pill { position: absolute; top: 4px; right: 12px; margin: 0; min-width: 18px; line-height: 18px; padding: 0 5px; font-size: .66rem; background: #F2B33D; color: var(--ink); }
.rail-user { margin-top: auto; position: relative; }
.rail-user summary { list-style: none; cursor: pointer; } .rail-user summary::-webkit-details-marker { display: none; }
.rail-user .ava { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-2); color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.rail-user[open] .ava, .rail-user summary:hover .ava { box-shadow: 0 0 0 2px #fff; }
.rail-menu { position: absolute; left: calc(100% + 14px); bottom: 0; width: 240px; background: #fff; color: var(--text); border-radius: 12px; box-shadow: var(--lift-2); padding: 14px; display: flex; flex-direction: column; gap: 2px; z-index: 40; }
.rail-menu strong { font-size: .95rem; } .rail-menu small { color: var(--muted); margin-bottom: 8px; }
.rail-menu a, .rail-menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-weight: 500; cursor: pointer; width: 100%; text-align: left; }
.rail-menu a:hover, .rail-menu button:hover { background: var(--mint-soft); text-decoration: none; }
.rail-menu .ico { width: 18px; height: 18px; color: var(--muted); }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 22px; padding: 4px; background: #fff; border-radius: 12px; box-shadow: var(--lift); width: fit-content; max-width: 100%; }
.subnav a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.subnav a:hover { color: var(--text); text-decoration: none; background: var(--mint-soft); }
.subnav a.on { background: var(--brand); color: #fff; }
@media (max-width: 960px) {
  .rail { flex-direction: row; width: auto; padding: 8px 12px; overflow-x: auto; }
  .rail-logo { padding: 0 6px 0 0; } .rail-new { width: 50px; height: 46px; margin: 0 6px 0 0; }
  .rail-nav { flex-direction: row; width: auto; order: 0; flex: 1; } .rail-nav a { min-width: 64px; }
  .rail-user { margin: 0 0 0 auto; } .rail-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 10px); }
}

/* ---- botões e campos ---- */
.btn { border-radius: 10px; border-color: var(--line-strong); padding: 9px 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 2px 6px rgba(38,78,54,.25); }
.btn-primary:hover { background: var(--brand-2); }
.btn .ico { width: 17px; height: 17px; }
input, select, textarea { border-radius: 10px; border-color: var(--line-strong); background-color: #fff; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(38,78,54,.12); }
label { font-size: .84rem; color: #2B3D31; }
.chip { background: #fff; border-color: var(--line); box-shadow: var(--lift); border: 0; }
.chip.on { background: var(--ink); color: #fff; }
.alert { border-radius: 12px; border: 0; box-shadow: var(--lift); }
.tabs { border: 0; gap: 4px; background: #fff; padding: 4px; border-radius: 12px; box-shadow: var(--lift); width: fit-content; max-width: 100%; }
.tabs a, .tabs button { border: 0; margin: 0; border-radius: 9px; padding: 7px 14px; }
.tabs a.active, .tabs button.active { background: var(--brand); color: #fff; }
.tabs a.active .count, .tabs button.active .count { background: rgba(255,255,255,.2); color: #fff; }
th { background: transparent; color: var(--muted); font-size: .78rem; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: var(--mint-soft); }
.stat { border: 0; box-shadow: var(--lift); border-radius: var(--radius); padding: 16px 18px; }
.stat b { font-size: 1.85rem; }

/* ---- quadro ---- */
.head-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; } .search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; width: 300px; max-width: 70vw; background: #fff; border-color: transparent; box-shadow: var(--lift); }
.view-toggle { border: 0; box-shadow: var(--lift); border-radius: 10px; padding: 3px; gap: 2px; display: inline-flex; }
.view-toggle a { border-radius: 8px; padding: 6px 13px; } .view-toggle a.on { background: var(--ink); }
.todo { margin-bottom: 18px; } .todo-title { display: none; }
.todo-item { border: 0; box-shadow: var(--lift); border-radius: 12px; padding: 8px 14px 8px 8px; }
.todo-item b { min-width: 30px; height: 30px; border-radius: 9px; font-size: .9rem; }
.col { background: transparent; padding: 0; gap: 10px; }
.col-head { padding: 0 2px; }
.col-head .dot { width: 9px; height: 18px; border-radius: 0; clip-path: polygon(0 0, 100% 0, 40% 100%, 0 100%); }
.col-head h2 { font-size: .9rem; }
.col-head .n { background: #fff; box-shadow: var(--lift); color: var(--text); }
.col-sum { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--brand-deep); padding: 0 2px; letter-spacing: -.01em; }
.col-empty { border: 1.5px dashed #CFDAD2; border-radius: 12px; color: #93A399; padding: 22px 8px; }
.kcard { border: 0; border-radius: 12px; box-shadow: var(--lift); padding: 12px 13px 11px 15px; }
.kcard::before { top: 12px; bottom: 12px; width: 3px; }
.kcard:hover { box-shadow: var(--lift-2); transform: translateY(-2px); }
.kcard .top { font-size: .72rem; letter-spacing: .01em; }
.kcard .who { font-size: .93rem; margin: 4px 0 6px; }
.kcard .what { display: none; }
.kcard .val { font-family: var(--display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.015em; color: var(--brand-deep); }
.kcard .due { background: var(--mint-soft); border-radius: 99px; padding: 1px 8px; font-size: .74rem; }
.kcard .due.late { background: var(--red-bg); } .kcard .due.soon { background: var(--amber-bg); }
.kcard .foot { border-top: 0; padding-top: 0; margin-top: 10px; }
.kcard .foot .ava { width: 22px; height: 22px; background: var(--mint); color: var(--brand-dark); }

/* ---- trilha de etapas (assinatura) ---- */
.track { display: flex; gap: 4px; margin: 14px 0 2px; }
.track span { flex: 1; position: relative; padding: 7px 18px 7px 12px; font-size: .74rem; font-weight: 700; color: #7F9086; background: #E4ECE6;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track span:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.track span:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 8px 8px 0; }
.track span.done { background: var(--brand); color: #fff; }
.track span.now { background: #F2B33D; color: var(--ink); }
.track span.bad { background: var(--red); color: #fff; }
.track span.off { background: #D5DCD7; color: #66776C; }

/* ---- tela da OS ---- */
.os-head { border: 0; box-shadow: var(--lift); border-radius: var(--radius); display: block; padding: 20px 24px 18px; }
.os-head .row1 { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.os-head h1 { font-size: 1.7rem; }
.os-head .sub { font-size: .92rem; }
.os-head .key { gap: 26px; } .os-head .key b { font-size: 1.45rem; letter-spacing: -.02em; color: var(--brand-deep); }
.os-head .tools { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.flow { border-left: 2px solid var(--line); padding-left: 18px; }
.flow li { padding: 0 0 14px 16px; }
.flow li .who { display: flex; align-items: center; gap: 8px; }
.flow .ava { width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .72rem; flex: none; }
.flow li.step-approved .ava { background: var(--brand); color: #fff; } .flow li.now .ava { background: #F2B33D; color: var(--ink); }
.flow li.step-rejected .ava { background: var(--red); color: #fff; }
.flow li::before { left: -26px; top: 9px; }
.decide { border: 0; box-shadow: 0 0 0 2px var(--brand), var(--lift-2); }
.attn-box { border: 0; box-shadow: var(--lift); }

/* ---- formulário ---- */
.form-wrap { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; align-items: start; }
.steps-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; }
.steps-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.steps-nav a:hover { background: #fff; text-decoration: none; color: var(--text); }
.steps-nav a i { width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: .78rem; font-weight: 700; border-radius: 8px; background: #fff; box-shadow: var(--lift); color: var(--muted); }
.steps-nav a.done i { background: var(--brand); color: #fff; box-shadow: none; }
.steps-nav a.done { color: var(--text); }
.steps-nav .meter { height: 6px; background: #DCE5DE; border-radius: 99px; overflow: hidden; margin: 12px 10px 0; }
.steps-nav .meter b { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .3s; }
.steps-nav small { margin: 6px 10px 0; color: var(--muted); }
@media (max-width: 1100px) { .form-wrap { grid-template-columns: 1fr; } .steps-nav { display: none; } }
.os-form { max-width: 1000px; }
.form-card h2 { display: flex; align-items: center; font-size: 1.05rem; }
.stepno { width: 28px; height: 28px; border-radius: 8px; background: var(--mint); color: var(--brand-dark); clip-path: none; }
.autofill { display: flex; align-items: center; gap: 16px; border: 1.5px dashed #BFD1C4; background: linear-gradient(120deg, #fff 0%, var(--mint-soft) 100%); box-shadow: none; padding: 16px 18px; flex-wrap: wrap; }
.autofill .af-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.autofill .af-ico .ico { width: 24px; height: 24px; }
.autofill .af-txt { flex: 1; min-width: 200px; } .autofill .af-txt b { display: block; font-size: 1rem; } .autofill .af-txt small { color: var(--muted); }
.autofill #autofill-box { flex-basis: 100%; }
.autofill.drag { border-color: var(--brand); background: var(--mint); }
.hint { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: var(--mint); color: var(--brand-dark); font-size: .68rem; font-weight: 800; align-items: center; justify-content: center; cursor: help; vertical-align: 1px; margin-left: 4px; }
.sup-row { display: flex; gap: 8px; align-items: center; } .sup-row .combo { flex: 1; }
.actions.sticky { background: linear-gradient(rgba(242,245,242,0), var(--canvas) 40%); }

/* ---- entrada ---- */
.login-art { background: var(--ink); }
.login-art::before { content: ""; position: absolute; inset: auto -10% -30% 30%; height: 70%; background: var(--brand); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); opacity: .9; }

.board { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.col-head h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .foot .area { margin-left: 0; font-weight: 500; }
.login-art::after { display: none; }
.prio { display: inline-flex; padding: 3px; gap: 2px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; width: fit-content; }
.prio label { flex-direction: row; margin: 0; cursor: pointer; }
.prio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prio span { padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.prio input:checked + span { background: var(--ink); color: #fff; }
.prio input[value=urgent]:checked + span { background: var(--red); }
.prio input:focus-visible + span { outline: 3px solid #8FC3A3; }
.field { display: flex; flex-direction: column; gap: 5px; } .flabel { font-weight: 600; font-size: .84rem; color: #2B3D31; }
.btn-sm { padding: 5px 11px; font-size: .82rem; border-radius: 8px; }
td .actions { gap: 6px; } td .btn-sm { white-space: nowrap; }
@media (max-width: 960px) {
  .rail { flex-wrap: nowrap; gap: 6px; }
  .rail-nav, .side-nav.rail-nav { flex-wrap: nowrap; flex: 1 1 auto; order: 0; overflow-x: auto; gap: 2px; }
  .rail-nav a { min-width: 58px; padding: 6px 2px; font-size: .64rem; }
  .rail-logo img { width: 28px; height: 28px; }
  .rail-user .ava { width: 34px; height: 34px; }
  .page-head h1 { font-size: 1.5rem; }
  .head-tools { width: 100%; } .search input { width: 100%; max-width: none; } .search { flex: 1 1 100%; }
}
@media (max-width: 960px) { .rail-new span { display: none; } .rail-new { height: 42px; width: 46px; } }
.flow li.step-skipped { opacity: .6; } .flow li.step-skipped::before { background: #B4C2B9; border-color: #B4C2B9; }
.reassign { margin-top: 6px; } .reassign summary { font-size: .84rem; } .reassign form { margin-top: 8px; } .reassign select { width: auto; flex: 1; }
.rail-nav a.rail-config span { font-size: .6rem; letter-spacing: -.01em; }
#type-request-dialog { width: min(560px, 94vw); }

.ref-tag { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: var(--mint, #e4f1e8); color: var(--ink, #12281d); font-weight: 600; }

/* ---------- módulo de NF e documentos ---------- */
.nf-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.doc-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.doc-slot { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: #FBFCFB; cursor: pointer; min-height: 84px; justify-content: center; transition: border-color .12s, background .12s; }
.doc-slot:hover, .doc-slot:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.doc-slot input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; }
.doc-slot-title { font-weight: 700; color: var(--brand-deep); }
.doc-slot-name { font-weight: 400; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.doc-slot.has-file { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.doc-slot.has-file .doc-slot-name { color: var(--text); font-weight: 600; }
.doc-slot-extra { cursor: default; }
.doc-slot-extra select { padding: 6px 9px; }
.doc-slot-pick { position: relative; display: block; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.doc-slot-pick input[type=file] { position: absolute; inset: 0; }
@media (max-width: 640px) { .nf-data { grid-template-columns: 1fr; } }
.doc-slot-extra { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 0; }
.doc-slot-extra .doc-slot-title { min-width: 140px; }
.doc-slot-extra select { width: 200px; }
.doc-slot-extra .doc-slot-pick { flex: 1 1 240px; }

/* ---------- relatórios: painel ---------- */
.rp-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0; margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; background: var(--brand-dark); color: #fff; }
.rp-hero-main { padding: 24px 28px; display: flex; flex-direction: column; gap: 6px; }
.rp-hero-label { color: #BFD3C6; font-weight: 600; font-size: .9rem; }
.rp-hero-num { font-family: var(--display); font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rp-hero-sub { color: #D5E3DA; font-size: .95rem; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.rp-delta { padding: 2px 10px; border-radius: 99px; font-weight: 700; font-size: .82rem; background: rgba(255,255,255,.14); }
.rp-delta.up { background: #F3D58A; color: #4A3500; } .rp-delta.down { background: #BFE3CB; color: #123A22; }
.rp-hero-side { display: flex; flex-direction: column; background: rgba(0,0,0,.18); }
.rp-hero-side a { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 12px 24px; color: #fff; border-top: 1px solid rgba(255,255,255,.1); }
.rp-hero-side a:first-child { border-top: 0; }
.rp-hero-side a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.rp-hero-side b { font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-hero-side span { color: #C7DACD; font-size: .86rem; text-align: right; }
.rp-attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 14px; }
.rp-attn-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--radius); background: #fff; border-left: 5px solid var(--line-strong); color: var(--text); box-shadow: var(--lift); }
.rp-attn-card:hover { text-decoration: none; transform: translateY(-2px); }
.rp-attn-card.red { border-left-color: var(--red); } .rp-attn-card.amber { border-left-color: #D49A1B; }
.rp-attn-card b { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; }
.rp-attn-card.red b { color: var(--red); }
.rp-attn-card span { color: var(--muted); font-size: .88rem; }
.rp-attn-card i { font-style: normal; font-size: .8rem; color: var(--brand); font-weight: 600; margin-top: 4px; }
.rp-ok { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.rp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; align-items: start; margin-bottom: 16px; }
.rp-split-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rp-split-head h2 { margin: 0; }
.seg { display: inline-flex; background: var(--canvas); border-radius: 99px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-size: .84rem; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 99px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--brand-deep); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rp-split-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut-wrap { position: relative; width: 190px; height: 190px; }
.donut { width: 100%; height: 100%; }
.donut-bg { fill: none; stroke: #E6ECE7; stroke-width: 14; }
.donut-arc { fill: none; stroke-width: 14; cursor: pointer; transition: opacity .15s, stroke-width .15s; }
.donut-arc:hover { stroke-width: 17; } .donut-arc.dim { opacity: .28; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 34px; pointer-events: none; }
.donut-center b { font-family: var(--display); font-size: 1.02rem; line-height: 1.15; }
.donut-center small { color: var(--muted); font-size: .76rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rp-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 38px; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: .88rem; cursor: default; }
.rp-legend li.on, .rp-legend li:focus { background: var(--brand-soft); outline: 0; }
.rp-legend i { width: 10px; height: 10px; border-radius: 3px; }
.rp-legend .lg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-legend .lg-val { font-weight: 600; font-variant-numeric: tabular-nums; } .rp-legend small { color: var(--muted); text-align: right; }
.rp-cols .c { cursor: default; border-radius: 6px; } .rp-cols .c:hover i, .rp-cols .c:focus i { filter: brightness(1.25); } .rp-cols .c:focus { outline: 0; }
.rp-cols .c i.now { background: #6FA383; }
.rp-note { margin: 12px 0 0; font-size: .84rem; }
.rp-more { margin-bottom: 16px; } .rp-more > summary { font-size: .95rem; }
.rp-tip { position: absolute; z-index: 60; background: var(--brand-deep); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: .82rem; font-weight: 600; pointer-events: none; max-width: 280px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
@media (max-width: 760px) { .rp-hero { grid-template-columns: 1fr; } .rp-split-body { grid-template-columns: 1fr; justify-items: center; } .rp-legend { width: 100%; } .rp-two { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .donut-arc, .rp-attn-card { transition: none; } }

/* ---------- relatórios: outras abas ---------- */
.warn-num { color: #F3D58A; }
.rp-hero-actions a { align-items: center; }
.wait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.wait-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: #FBFCFB; border: 1px solid var(--line); color: var(--text); }
.wait-card:hover { text-decoration: none; border-color: var(--brand); background: var(--brand-soft); }
.wait-card.mid { border-left: 4px solid #D49A1B; } .wait-card.late { border-left: 4px solid var(--red); }
.wait-who { color: var(--muted); font-size: .84rem; }
.wait-time { font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.wait-card.late .wait-time { color: var(--red); }
.bar-row[data-tip] { border-radius: 8px; } .bar-row[data-tip]:hover, .bar-row[data-tip]:focus { background: var(--brand-soft); outline: 0; }
.rp-weeks .c { background: none; border: 0; font: inherit; padding: 0 2px; cursor: pointer; }
.rp-weeks .c.sel i { background: var(--brand-deep); outline: 3px solid #BBD8C5; }
.rp-weeks .c.is-late i { background: var(--red); }
.wk-detail { margin-top: 14px; border-top: 1px dashed var(--line-strong); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.wk-detail h3 { margin: 0 0 4px; font-size: 1rem; }
.wk-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm); background: #FBFCFB; color: var(--text); font-size: .9rem; }
.wk-row:hover { text-decoration: none; background: var(--brand-soft); }
.wk-row.warn { box-shadow: inset 4px 0 0 #D49A1B; }
.wk-sup { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wk-due, .wk-state { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.wk-row b { font-variant-numeric: tabular-nums; }
.kind-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kind-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: #fff; color: var(--muted); box-shadow: var(--lift); border-bottom: 3px solid transparent; }
.kind-tile:hover { text-decoration: none; border-bottom-color: var(--brand-line); }
.kind-tile b { font-family: var(--display); font-size: 1.5rem; color: var(--brand-deep); line-height: 1.1; }
.kind-tile span { font-size: .84rem; font-weight: 600; }
.kind-tile.on { border-bottom-color: var(--brand); background: var(--brand-soft); }
.div-list { display: flex; flex-direction: column; gap: 10px; }
.div-card { display: block; padding: 12px 16px; border-radius: var(--radius-sm); background: #fff; border-left: 5px solid #D49A1B; color: var(--text); box-shadow: var(--lift); }
.div-card.danger { border-left-color: var(--red); }
.div-card:hover { text-decoration: none; transform: translateY(-1px); }
.div-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .div-top small { margin-left: auto; }
.div-card p { margin: 6px 0 0; }
@media (max-width: 760px) { .wk-row { grid-template-columns: 1fr auto; } .wk-sup, .wk-due, .wk-state { grid-column: 1 / -1; } }
#rp-wait { margin-bottom: 14px; } .div-list { margin-bottom: 16px; }
