/* Dois i Finanças — troque as cores da marca aqui */
:root {
  --navy: #0f2347;
  --navy-2: #16305e;
  --primary: #1f6feb;
  --primary-d: #1859c2;
  --accent: #19c3b1;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --bg: #f3f5f9;
  --card: #ffffff;
  --line: #e3e8f0;
  --txt: #1b2333;
  --muted: #6b7489;
  --radius: 10px;
  --neon: #1fb6ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--txt); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; }
h3 { font-size: 15px; margin-bottom: 12px; }
h3.sec { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

/* layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex: none; background: var(--navy); color: #c9d4ea; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 20px 18px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand img { height: 30px; }
.brand-txt { font-weight: 800; color: #fff; font-size: 20px; }
.brand small { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; }
.sidebar nav { padding: 10px 8px; flex: 1; overflow: auto; }
.sidebar nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: #c9d4ea; margin-bottom: 2px; }
.sidebar nav a:hover { background: var(--navy-2); text-decoration: none; color: #fff; }
.sidebar nav a.on { background: var(--primary); color: #fff; }
.sidebar .ic { width: 18px; text-align: center; opacity: .85; }
.me { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; align-items: center; }
.me .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--navy); font-weight: 800; display: grid; place-items: center; }
.me-info strong { color: #fff; display: block; font-size: 13px; }
.me-info small { color: #8ea0c2; }
.me-links { grid-column: 1 / -1; display: flex; gap: 12px; font-size: 12px; }
.me-links a { color: #8ea0c2; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 19px; }
.hamb { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }
.content { padding: 20px 24px; flex: 1; min-width: 0; }

/* componentes */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel.narrow { max-width: 560px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--txt); cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #f6f8fb; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
input, select, textarea { font: inherit; color: inherit; padding: 8px 10px; border: 1.5px solid rgba(31,182,255,.75); border-radius: 8px; background: #fff; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--neon); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(31,182,255,.22), 0 0 14px rgba(31,182,255,.45); }
input:disabled, input[readonly] { background: #f4f8fc; border-color: rgba(31,182,255,.35); }
input[type=file] { padding: 6px; }
input[type=checkbox] { width: auto; }
input[type=color] { padding: 2px; width: 44px; height: 36px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #4a5468; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select, .toolbar input[type=month] { width: auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-btns { display: flex; gap: 10px; margin-top: 10px; }
.inline { display: inline; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input:not([type=color]), .inline-form select { width: auto; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.g2 .span2 { grid-column: 1 / -1; }
.input-btn { display: flex; gap: 6px; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.alert-ok { background: #ecfdf3; border-color: #a6e9c0; color: #0f5132; }
.alert-erro { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; background: #eef2f7; font-size: 11px; font-weight: 700; color: #4a5468; }
.tag-ok { background: #dcfce7; color: #166534; }
.tag-warn { background: #fef3c7; color: #92400e; }
.tag-master { background: #ede9fe; color: #5b21b6; }
.tag-admin { background: #dbeafe; color: #1e40af; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; }
.tbl th.right, .tbl td.right { text-align: right; }
.tbl tfoot th { background: #f1f5f9; color: var(--txt); font-size: 13px; text-transform: none; }
.tbl tr.inativo td { opacity: .55; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.tbl-map select { min-width: 170px; font-size: 12px; padding: 5px; }
.tbl-map select.mapped { border-color: var(--ok); background: #f0fdf4; }
.tbl-map td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; margin: 0; }
.dl dt { color: var(--muted); font-size: 12px; }
.dl dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; }
.timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: #c3cddc; }
.timeline li.log-fechado::before { background: var(--ok); }
.timeline .when { display: block; font-size: 11px; color: var(--muted); }
.badge { background: var(--primary); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; }
.badge:empty { display: none; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; z-index: 100; max-width: 420px; white-space: pre-line; }
.toast.show { opacity: 1; transform: none; }
.toast-erro { background: var(--danger); }

/* KPIs / barras */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi small { color: var(--muted); display: block; font-weight: 600; }
.kpi b { display: block; font-size: 24px; margin: 4px 0 2px; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi-ok b { color: var(--ok); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 170px; gap: 12px; align-items: center; }
.bar-l { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bar-track { background: #eef2f7; height: 14px; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; min-width: 2px; }
.bar-v { text-align: right; }
.bar-v small { display: block; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--cor, #999); flex: none; }
.vbars { display: flex; gap: 12px; height: 220px; align-items: stretch; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.vbar-v { font-size: 11px; color: var(--muted); height: 16px; white-space: nowrap; }
.vbar-track { flex: 1; width: 70%; display: flex; align-items: flex-end; background: #f3f5f9; border-radius: 6px; }
.vbar-fill { width: 100%; background: var(--ok); border-radius: 6px; min-height: 2px; }
.vbar-l { font-size: 12px; text-align: center; }
.vbar-l small { display: block; color: var(--muted); }

/* Kanban */
.page-kanban .content { display: flex; flex-direction: column; overflow: hidden; height: calc(100vh - 62px); }
.board-total { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.board-total span { font-size: 11px; color: var(--muted); }
.board-total b { font-size: 16px; }
.board { display: flex; gap: 14px; overflow-x: auto; flex: 1; padding-bottom: 10px; align-items: stretch; }
.col { flex: 0 0 290px; display: flex; flex-direction: column; background: #e9edf4; border-radius: 12px; max-height: 100%; border-top: 4px solid var(--cor); }
.col-h { padding: 10px 12px 8px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
.col-n { font-weight: 700; display: flex; align-items: center; gap: 7px; min-width: 0; }
.col-n .cnt { background: rgba(0,0,0,.08); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.col-tot { grid-column: 1; font-size: 13px; font-weight: 700; color: var(--navy-2); }
.col-add { grid-column: 2; grid-row: 1 / span 2; border: 0; background: rgba(255,255,255,.7); width: 28px; height: 28px; border-radius: 8px; font-size: 18px; cursor: pointer; color: var(--muted); }
.col-add:hover { background: #fff; color: var(--primary); }
.col-b { flex: 1; overflow-y: auto; padding: 4px 10px 12px; min-height: 120px; border-radius: 0 0 12px 12px; transition: background .15s; }
.col-b.over { background: rgba(31,111,235,.08); }
.card { background: #fff; border-radius: 9px; padding: 10px 11px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: grab; border: 1px solid transparent; }
.card:hover { border-color: #c9d6ea; }
.card.dragging { opacity: .35; }
.card-ph { height: 64px; border: 2px dashed #9bb3d8; border-radius: 9px; margin-bottom: 8px; background: rgba(255,255,255,.5); }
.card-t { font-weight: 700; }
.card-s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card-v { font-weight: 700; color: var(--navy-2); margin-top: 6px; }
.card-v small { font-weight: 500; color: var(--muted); }
.card-f { display: flex; gap: 5px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.chip { font-size: 11px; background: #f1f4f9; border-radius: 6px; padding: 1px 6px; color: #4a5468; }
.chip.warn { background: #fef3c7; color: #92400e; }
.chip.old { background: #fee2e2; color: #991b1b; }
.chip.ok { background: #dcfce7; color: #166534; }
.av { width: 24px; height: 24px; border-radius: 50%; background: var(--navy-2); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.av-none { background: #cbd5e1; }
.empty { color: var(--muted); text-align: center; font-size: 12px; padding: 20px 0; }
.col-fechado { background: #e7f6ec; }
.drop-fechar { border: 2px dashed #86d19f; border-radius: 10px; padding: 26px 14px; text-align: center; color: #166534; display: flex; flex-direction: column; gap: 10px; height: 100%; justify-content: center; }
.drop-fechar small { color: #3f6b4d; }
.col-b.over .drop-fechar { background: #d1f2dc; border-color: var(--ok); }
.loading { padding: 40px; color: var(--muted); }

/* Botão flutuante (colunas) */
.fab { position: fixed; right: 28px; bottom: 28px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab-btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px 0 16px; border-radius: 99px; border: 0;
  background: linear-gradient(135deg, var(--primary), #4f8dff); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 10px 24px rgba(31,111,235,.40); transition: transform .15s, box-shadow .15s; }
.fab-btn span { font-size: 22px; line-height: 1; transition: transform .2s; }
.fab-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(31,111,235,.50); }
.fab.open .fab-btn span { transform: rotate(45deg); }
.fab-menu { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 16px 40px rgba(15,23,42,.18); min-width: 220px; opacity: 0; transform: translateY(8px) scale(.97); pointer-events: none; transition: .15s; }
.fab.open .fab-menu { opacity: 1; transform: none; pointer-events: auto; }
.fab-menu button, .fab-menu a { display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 10px 12px;
  border-radius: 10px; font: inherit; font-weight: 600; color: var(--txt); cursor: pointer; }
.fab-menu button:hover, .fab-menu a:hover { background: #eef4ff; color: var(--primary-d); text-decoration: none; }
.fab-ic { width: 28px; height: 28px; border-radius: 8px; background: #eef4ff; color: var(--primary); display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g6 .c2 { grid-column: span 2; } .g6 .c3 { grid-column: span 3; } .g6 .c4 { grid-column: span 4; } .g6 .c6 { grid-column: 1 / -1; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow: auto; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(0,0,0,.25); display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.modal-lg { max-width: 920px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px 6px; }
.modal-head h2 { font-size: 18px; flex: 1; }
.x { border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs button:disabled { opacity: .4; cursor: not-allowed; }
.modal-body { padding: 16px 20px; overflow: auto; flex: 1; }
.modal-foot { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.upload-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.upload-box select { width: 200px; }
.upload-box input[type=file] { flex: 1; min-width: 200px; background: #fff; }

/* Editor de contratos */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.ed-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; position: sticky; top: 0; background: #fff; padding: 4px 0; z-index: 2; }
.ed-bar button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 9px; cursor: pointer; font: inherit; font-size: 12px; }
.ed-bar button:hover { background: #f1f5f9; }
.editor { min-height: 600px; outline: none; }
.editor-html { width: 100%; min-height: 600px; font-family: ui-monospace, monospace; font-size: 12px; }
.ph-list { position: sticky; top: 10px; max-height: calc(100vh - 40px); overflow: auto; }
.ph { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #f8fafc; border-radius: 7px; padding: 6px 8px; margin-bottom: 5px; cursor: pointer; font: 12px ui-monospace, monospace; color: var(--primary-d); }
.ph small { display: block; font: 11px -apple-system, "Segoe UI", sans-serif; color: var(--muted); }
.ph:hover { background: #eef4ff; }
.doc-paper { background: #fff; width: 21cm; max-width: 100%; min-height: 29.7cm; margin: 0 auto 30px; padding: 2.5cm 2cm; box-shadow: 0 4px 16px rgba(0,0,0,.12); font-family: "Times New Roman", Times, serif; font-size: 12pt; line-height: 1.5; color: #111; }
.editor.doc-paper { padding: 1.5cm 1.6cm; min-height: 600px; }
.doc-paper h1 { font-size: 15pt; text-align: center; margin: 0 0 18pt; }
.doc-paper h2 { font-size: 12pt; margin: 16pt 0 6pt; }
.doc-paper p { margin: 0 0 8pt; text-align: justify; }
.doc-paper .vazio { color: #b45309; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 12px 20px; background: var(--navy); color: #fff; }
.print-bar .muted { color: #9fb0d0; }
.dica { text-align: center; color: var(--muted); font-size: 12px; margin: 12px; }

/* Login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(circle at 20% 10%, var(--navy-2), var(--navy) 60%); padding: 20px; }
.login-card { background: #fff; border-radius: 16px; padding: 30px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.login-brand { background: var(--navy); margin: -30px -30px 6px; padding: 22px 30px; border-radius: 16px 16px 0 0; display: flex; align-items: center; gap: 12px; }
.login-brand img { height: 34px; }
.login-brand span { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }

/* Responsivo */
@media (max-width: 960px) {
  .cols2, .editor-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 120px 1fr 110px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: -260px; z-index: 60; transition: left .2s; }
  .sidebar.open { left: 0; }
  .hamb { display: block; }
  .content { padding: 14px; }
  .g3, .g2, .grid.g6 { grid-template-columns: 1fr; }
  .g6 > * { grid-column: auto !important; }
  .span2 { grid-column: auto; }
  .col { flex-basis: 82vw; }
  .dl { grid-template-columns: 1fr; }
}

/* ---- Finanças ---- */
.kpi-danger b { color: var(--danger); }
.kpi-warn b { color: var(--warn); }
.kpi-blue b { color: var(--primary); }
.tag-danger { background: #fee2e2; color: #991b1b; }
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-gray { background: #e5e7eb; color: #4b5563; }
.val-in { color: var(--ok); font-weight: 700; }
.val-out { color: var(--danger); font-weight: 700; }
.mes-nav { display: flex; align-items: center; gap: 8px; }
.mes-nav b { min-width: 150px; text-align: center; font-size: 16px; }
.tabs-page { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px -18px 16px; padding: 0 12px; overflow-x: auto; }
.tabs-page button { border: 0; background: none; padding: 10px 12px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-page button.on { color: var(--primary); border-bottom-color: var(--primary); }
.itens-tbl input { padding: 6px 8px; }
.itens-tbl td { padding: 4px; border: 0; }
.fluxo-chart { display: flex; gap: 10px; align-items: flex-end; height: 240px; padding-top: 10px; }
.fc-mes { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; height: 100%; }
.fc-bars { flex: 1; width: 100%; display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.fc-bar { width: 42%; max-width: 26px; border-radius: 5px 5px 0 0; min-height: 2px; position: relative; }
.fc-bar.in { background: var(--ok); } .fc-bar.out { background: var(--danger); }
.fc-bar.prev { opacity: .45; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 4px, transparent 4px 8px); }
.fc-l { font-size: 11px; color: var(--muted); text-align: center; }
.fc-l b { display: block; color: var(--txt); font-size: 12px; }
.fc-l .neg { color: var(--danger); } .fc-l .pos { color: var(--ok); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.acoes { display: flex; flex-direction: column; gap: 8px; }
.acoes .btn { width: 100%; }
.pix-box { display: flex; gap: 16px; align-items: center; border: 1.5px dashed rgba(31,182,255,.7); border-radius: 12px; padding: 14px; margin-top: 18px; break-inside: avoid; }
.pix-box .qr { width: 150px; height: 150px; flex: none; }
.pix-box .qr img, .pix-box .qr svg { width: 100%; height: 100%; }
.pix-code { font: 11px ui-monospace, monospace; word-break: break-all; background: #f4f8fc; padding: 8px; border-radius: 6px; margin: 6px 0; }
.fatura-doc { font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 13px; line-height: 1.5; }
.fatura-doc .fh { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--navy); padding-bottom: 14px; margin-bottom: 16px; }
.fatura-doc .fh h1 { font-size: 22px; color: var(--navy); }
.fatura-doc .fbox { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.fatura-doc .fbox > div { background: #f6f9fc; border-radius: 10px; padding: 12px 14px; }
.fatura-doc .fbox small { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .06em; font-weight: 700; }
.fatura-doc table { width: 100%; border-collapse: collapse; }
.fatura-doc th, .fatura-doc td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.fatura-doc th { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.fatura-doc .tot td { border: 0; padding: 3px 6px; }
.fatura-doc .tot .grand td { font-size: 17px; font-weight: 800; color: var(--navy); border-top: 2px solid var(--navy); padding-top: 8px; }
.fatura-doc .stamp { display: inline-block; padding: 4px 12px; border-radius: 99px; font-weight: 800; font-size: 12px; letter-spacing: .05em; }
.public-body { background: #e9eef5; padding: 24px 12px; }
.public-body .doc-paper { font-family: inherit; padding: 1.6cm 1.6cm; min-height: 0; }
@media print { .no-print { display: none !important; } body, .public-body { background: #fff; padding: 0; } .doc-paper { box-shadow: none; margin: 0; padding: 0 !important; width: auto; } }
.tbl td.right { white-space: nowrap; }
