﻿:root {
  --bg: #06080a;
  --panel: #0d1115;
  --panel-2: #12181f;
  --panel-3: #161d25;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f7f8;
  --muted: #9aa4ad;
  --green: #78d64b;
  --yellow: #f1c84d;
  --red: #f36a53;
  --wine: #70273a;
  --blue: #4d9fff;
  /* Topbar sizing tokens */
  --tb-h: clamp(30px, 2.2vw, 36px);
  --tb-gap: clamp(6px, 0.5vw, 10px);
  --tb-fs: clamp(11px, 0.8vw, 13px);
  --tb-px: clamp(8px, 0.7vw, 12px);
  --tb-r: 8px;
}
[data-theme="light"] {
  --bg: #eef0f3;
  --panel: #ffffff;
  --panel-2: #f4f6f9;
  --panel-3: #e8eaee;
  --line: rgba(0, 0, 0, 0.1);
  --text: #1a2027;
  --muted: #5a6472;
}
[data-theme="light"] body {
  background: linear-gradient(180deg, #e4e8ed, #eef0f3 40%, #e8ecf0);
  color: var(--text);
}
[data-theme="light"] .logo-bar { background: rgba(238,240,243,.97); border-bottom-color: rgba(0,0,0,.06); }
[data-theme="light"] .topbar { background: rgba(238,240,243,.96); border-bottom-color: rgba(0,0,0,.08); }
[data-theme="light"] .field-input { background: #f0f2f5; border-color: rgba(0,0,0,.12); color: var(--text); }
[data-theme="light"] .overview-panel,.detail-panel,.workspace-head,.view-panel,.modal-card { background: rgba(255,255,255,.96); border-color: var(--line); }
[data-theme="light"] .column { background: linear-gradient(180deg, rgba(244,246,249,.98), rgba(232,234,238,.98)); border-color: var(--line); }
[data-theme="light"] .kanban-card { background: linear-gradient(180deg, #fff, #f8f9fb); border-color: rgba(0,0,0,.09); }
[data-theme="light"] .ghost-button { background: var(--panel-3); color: var(--text); border-color: var(--line); }
[data-theme="light"] .role-select { background: var(--panel-3); color: var(--text); border-color: var(--line); }
[data-theme="light"] .finance-table th { background: var(--panel-3); color: var(--muted); }
[data-theme="light"] .finance-table td { border-bottom-color: var(--line); }
[data-theme="light"] input, [data-theme="light"] select, [data-theme="light"] textarea { background: var(--panel-3); color: var(--text); border-color: var(--line); }
[data-theme="light"] .overview-card { background: var(--panel-2); border-color: var(--line); }
[data-theme="light"] .dashboard-card { background: var(--panel-2); border-color: var(--line); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: "Segoe UI", sans-serif; color: var(--text); background: radial-gradient(circle at top left, rgba(120,214,75,.11), transparent 20%), radial-gradient(circle at bottom right, rgba(120,214,75,.08), transparent 18%), linear-gradient(180deg, #040506, #0a0d10 30%, #050608); }
button, input, select, textarea { font: inherit; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
/* ── Logo Bar ──────────────────────────────────────────────────────────── */
.logo-bar { position:fixed; top:0; left:0; width:100%; z-index:26; display:flex; justify-content:center; align-items:center; padding:10px 0 6px; background:rgba(6,8,10,.97); border-bottom:1px solid rgba(120,214,75,.08); overflow:hidden; }
.logo-flow-wrap { position:relative; cursor:default; display:flex; align-items:flex-end; overflow:visible; padding:4px 8px; }
.logo-text-img { height:44px; object-fit:contain; display:block; flex-shrink:0; position:relative; z-index:2; transform-origin:right center; }
.logo-arrow-track { flex-shrink:0; display:flex; align-items:flex-end; margin-left:-6.5px; z-index:1; }
.logo-arrow-img { height:44px; object-fit:contain; display:block; }

/* Hover: seta viaja até a borda direita, some, reaparece pela esquerda, passa por trás do logo */
.logo-flow-wrap:hover .logo-arrow-img { animation:arrow-orbit 2.2s cubic-bezier(.22,.61,.36,1); }
.logo-flow-wrap:hover .logo-text-img  { animation:text-recoil 2.2s cubic-bezier(.22,.61,.36,1); }

@keyframes arrow-orbit {
  0%   { transform:translateX(0);                   opacity:1; }
  6%   { transform:translateX(15px);                opacity:1; }
  42%  { transform:translateX(calc(50vw + 80px));   opacity:1; }
  48%  { transform:translateX(calc(50vw + 160px));  opacity:0; }
  49%  { transform:translateX(calc(-50vw - 160px)); opacity:0; }
  55%  { transform:translateX(calc(-50vw - 80px));  opacity:1; }
  88%  { transform:translateX(-8px);                opacity:1; }
  100% { transform:translateX(0);                   opacity:1; }
}

@keyframes text-recoil {
  0%   { transform:scaleX(1)    translateX(0); }
  5%   { transform:scaleX(0.97) translateX(2px); }
  16%  { transform:scaleX(1)    translateX(0); }
  82%  { transform:scaleX(1)    translateX(0); }
  90%  { transform:scaleX(0.97) translateX(-2px); }
  100% { transform:scaleX(1)    translateX(0); }
}


.topbar { display:flex; justify-content:space-between; gap:var(--tb-gap); align-items:center; padding:6px clamp(12px,1.5vw,24px); border-bottom:1px solid rgba(255,255,255,.05); position:fixed; top:60px; left:0; width:100%; z-index:25; background:rgba(6,8,10,.94); backdrop-filter:blur(12px); box-sizing:border-box; }
.brand-block h1,.workspace-head h2,.detail-panel h2,.modal-head h2 { margin:0; }
.brand-block h1 { display:none; }
.brand-block .subtitle { display:none; }
.eyebrow,.workspace-eyebrow,.detail-kicker { margin:0 0 2px; color:var(--green); text-transform:uppercase; letter-spacing:.16em; font-size:11px; font-weight:700; }
.subtitle { margin:6px 0 0; color:var(--muted); }
.topbar-actions { display:flex; align-items:center; gap:var(--tb-gap); flex-wrap:wrap; justify-content:flex-end; flex:1; }
.role-switch { display:flex; flex-direction:column; gap:3px; min-width:100px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.role-select { background:var(--panel-3); color:var(--text); padding:6px 10px; height:var(--tb-h); border-radius:var(--tb-r); border:1px solid var(--line); font-size:var(--tb-fs); text-transform:none; letter-spacing:normal; box-sizing:border-box; }
.impersonate-badge { background:rgba(120,214,75,.12); color:var(--green); border:1px solid rgba(120,214,75,.3); padding:6px 10px; border-radius:999px; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.view-switch { display:inline-flex; background:var(--panel-2); border:1px solid var(--line); border-radius:999px; padding:3px; gap:2px; }
.view-button,.ghost-button,.modal-close { border:0; cursor:pointer; }
.view-button { background:transparent; color:var(--muted); padding:6px var(--tb-px); border-radius:999px; font-size:var(--tb-fs); line-height:1.2; transition:background .15s,color .15s; }
.view-button:hover:not(.is-active) { background:rgba(255,255,255,.04); color:var(--text); }
.view-button.is-active { background:var(--green); color:#091007; font-weight:700; }
.ghost-button { background:var(--panel-3); color:var(--text); padding:6px var(--tb-px); height:var(--tb-h); border-radius:var(--tb-r); border:1px solid var(--line); font-size:var(--tb-fs); line-height:1.2; box-sizing:border-box; transition:background .15s,color .15s,border-color .15s; white-space:nowrap; }
.ghost-button.is-active { background:rgba(120,214,75,.14); color:var(--green); border-color:rgba(120,214,75,.34); font-weight:700; }
.ghost-button-accent { background: rgba(120,214,75,.12); color: var(--green); border-color: rgba(120,214,75,.3); }
.layout-shell { display:grid; grid-template-columns:270px minmax(0,1fr); gap:16px; padding:16px 24px 16px 16px; }
.overview-panel,.workspace { min-height:calc(100vh - 200px); }
.detail-panel { min-height:calc(100vh - 118px); }
.overview-panel,.detail-panel,.workspace-head,.view-panel,.modal-card { background:rgba(13,17,21,.94); border:1px solid var(--line); border-radius:20px; backdrop-filter:blur(8px); }
.overview-panel,.detail-panel { padding:16px; }
.layout-shell.kanban-detail-hidden { padding-right:16px; }
.detail-panel.is-hidden { display:none; }
.overview-panel { display:flex; flex-direction:column; gap:12px; }
.overview-card { padding:16px; background:var(--panel-2); border:1px solid var(--line); border-radius:16px; display:flex; flex-direction:column; gap:6px; }
.overview-card.highlight,.overview-card.success { background:linear-gradient(180deg, rgba(120,214,75,.12), rgba(18,24,31,.95)); }
.overview-label { color:var(--muted); text-transform:uppercase; font-size:12px; letter-spacing:.08em; }
.overview-value { font-size:42px; line-height:1; }
.overview-meta { color:var(--muted); font-size:13px; }
.filters-card h2 { margin:0 0 14px; font-size:18px; }
.field-label { display:block; margin-bottom:6px; font-size:12px; color:var(--muted); text-transform:uppercase; }
.field-input { width:100%; margin-bottom:12px; background:#0b0e12; border:1px solid rgba(255,255,255,.09); border-radius:12px; color:var(--text); padding:12px 14px; }
.workspace { display:flex; flex-direction:column; gap:14px; }
.workspace-head { padding:18px; display:flex; justify-content:space-between; gap:20px; align-items:flex-end; }
.workspace-legend { display:flex; gap:14px; flex-wrap:wrap; color:var(--muted); font-size:13px; }
.dot { width:10px; height:10px; display:inline-block; border-radius:50%; margin-right:6px; }
.dot.green { background:var(--green); } .dot.yellow { background:var(--yellow); } .dot.red { background:var(--red); } .dot.wine { background:var(--wine); }
.view-panel { flex:1; overflow:auto; display:none; padding:16px 24px; }
.view-panel.is-visible { display:block; }
.view-panel[data-view-panel="kanban"].is-visible { display:flex; flex-direction:column; padding:0; }
.board { display:flex; gap:10px; overflow-x:auto; padding:14px 24px 14px 14px; cursor:grab; user-select:none; align-items:flex-start; scrollbar-width:none; -ms-overflow-style:none; flex:1; min-height:0; }
.board::-webkit-scrollbar { display:none; }
.board.is-panning { cursor:grabbing; }
.column { width:270px; min-width:270px; background:linear-gradient(180deg, rgba(18,24,31,.98), rgba(10,13,17,.98)); border:1px solid var(--line); border-radius:18px; display:flex; flex-direction:column; }
.column-header { display:flex; justify-content:space-between; align-items:center; padding:14px 14px 10px; }
.column-header h3 { margin:0; font-size:14px; text-transform:uppercase; }
.column-header span { background:rgba(120,214,75,.16); color:var(--green); border-radius:999px; min-width:28px; text-align:center; padding:4px 9px; font-weight:700; }
.column-list { display:flex; flex-direction:column; gap:10px; padding:0 10px 12px; min-height:120px; }
.column-list.drag-over { outline:2px dashed rgba(120,214,75,.65); outline-offset:-4px; border-radius:16px; }
.kanban-card { padding:14px 16px; border-radius:16px; background:linear-gradient(180deg, #151b21, #101419); border:1px solid rgba(255,255,255,.08); cursor:grab; box-shadow:0 16px 30px rgba(0,0,0,.24); max-height:160px; overflow:hidden; }
.kanban-card.selected { border-color: rgba(120,214,75,.4); box-shadow: 0 0 0 1px rgba(120,214,75,.22), 0 16px 30px rgba(0,0,0,.24); }
.kanban-card.dragging { opacity:.5; }
.kanban-card:hover { max-height:none; overflow:visible; transform:translateY(-4px) scale(1.02); border-color:rgba(120,214,75,.35); z-index:5; position:relative; box-shadow:0 20px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(120,214,75,.12) inset; }
.column { transition:filter .12s ease; }
.board:has(.kanban-card:hover) .column { filter:blur(1.5px) brightness(.7); transition:filter .12s ease; }
.board:has(.kanban-card:hover) .column:has(.kanban-card:hover) { filter:none; transition:filter .08s ease; }
.kanban-card { transition:max-height .25s ease, transform .22s ease, border-color .22s ease, filter .12s ease; }
.board:has(.kanban-card:hover) .column:has(.kanban-card:hover) .kanban-card:not(:hover) { filter:blur(1.5px) brightness(.7); transition:filter .12s ease; }
.kanban-card.is-resale { background: linear-gradient(180deg, rgba(120,214,75,.09), rgba(16,20,25,.98)); border-color: rgba(120,214,75,.18); }
.kanban-card.is-resale .priority-pill { background: rgba(120,214,75,.14); color: var(--green); }
.kanban-card.is-calandra { border-color: rgba(120,214,75,.18); }
.kanban-card.is-calandra .stage-chip,
.kanban-card.is-calandra .deadline-chip { background: rgba(120,214,75,.14); color: var(--green); }
.kanban-card.is-calandra .card-product,
.kanban-card.is-calandra .card-quantity { color: var(--green); font-weight: 700; }
.kanban-card.is-calandra .card-order { color: var(--text); font-weight: 600; }
.kanban-card.is-calandra .card-grid dt { color: rgba(255,255,255,.6); }
.kanban-card.is-calandra .status-chip:empty { display: none; }
.kanban-card.is-calandra .card-footer { justify-content: flex-start; }
.card-thumb-wrap { display:none; width:100%; height:54px; overflow:hidden; border-radius:12px; margin-bottom:10px; background:rgba(255,255,255,.04); transition:height .22s ease; position:relative; }
.card-thumb-wrap.has-image { display:block; }
.card-thumb-image { width:100%; height:100%; object-fit:cover; display:block; cursor:pointer; }
.kanban-card:hover .card-thumb-wrap.has-image { height:150px; }
.card-topline,.card-footer { display:flex; justify-content:space-between; align-items:center; gap:6px; flex-wrap:wrap; }
.priority-pill,.stage-chip,.deadline-chip,.status-chip,.detail-chip { display:inline-flex; align-items:center; border-radius:999px; padding:4px 8px; font-size:10px; font-weight:700; white-space:nowrap; }
.priority-pill { background:rgba(255,255,255,.06); color:var(--muted); }
.stage-chip { background:rgba(120,214,75,.12); color:var(--green); }
.deadline-chip { background:rgba(255,255,255,.06); color:var(--muted); }
.status-chip { background:rgba(77,159,255,.12); color:var(--blue); }
.card-main { padding:10px 0 8px; }
.card-client { margin:0 0 4px; font-size:15px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.card-order { margin:0; color:var(--muted); font-size:12px; }
.card-grid,.detail-grid { display:grid; grid-template-columns:1fr 72px; gap:8px; }
.card-grid { margin:0 0 10px; }
.card-grid dt,.detail-grid dt { color:var(--muted); font-size:10px; text-transform:uppercase; margin-bottom:2px; letter-spacing:.04em; }
.card-grid dd,.detail-grid dd { margin:0; }
.card-consumption { display:none; margin:-4px 0 12px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.05); color:var(--text); font-size:12px; line-height:1.35; }
.card-consumption.is-visible { display:block; }
.card-consumption strong { color:var(--green); }
.card-items-title { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-bottom:6px; }
.card-items-list { display:flex; flex-direction:column; gap:8px; }
.card-item-row { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.04); border-radius:10px; padding:8px 10px; }
.card-item-head { display:flex; justify-content:space-between; gap:8px; font-size:12px; font-weight:600; color:var(--text); }
.card-item-head span { color:var(--green); font-weight:700; white-space:nowrap; }
.card-item-sub { margin-top:4px; font-size:11px; color:var(--muted); line-height:1.35; }
.card-item-sub strong { color:var(--green); }
.card-consumption-meta { display:none; margin:-2px 0 12px; }
.card-consumption-meta.is-visible { display:block; }
.card-weight-pill { display:inline-flex; align-items:center; border-radius:999px; padding:6px 12px; background:rgba(120,214,75,.16); color:var(--green); font-size:12px; font-weight:700; }
.card-weight-pill:empty { display:none; }
.kanban-card.is-calandra .card-consumption { background:rgba(120,214,75,.08); border-color:rgba(120,214,75,.15); }
.kanban-card.is-calandra .card-footer { display:flex; }
.detail-panel { display:none !important; }
.detail-empty,.detail-content { height:100%; }
.detail-empty { display:flex; flex-direction:column; justify-content:center; text-align:center; color:var(--muted); }
.detail-content { display:flex; flex-direction:column; gap:16px; }
.detail-header { padding-bottom:14px; border-bottom:1px solid var(--line); }
.detail-meta { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.detail-section { padding:14px; border-radius:16px; background:var(--panel-2); border:1px solid var(--line); }
.detail-section h3 { margin:0 0 12px; }
.detail-grid { grid-template-columns:1fr 1fr; gap:12px; }
.action-list { display:flex; flex-direction:column; gap:10px; }
.action-item { padding:12px; border-radius:12px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06); }
.checklist-box { display:flex; flex-direction:column; gap:12px; padding:14px; border-radius:14px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); }
.checklist-highlight { padding:14px; border-radius:14px; background:rgba(120,214,75,.12); border:1px solid rgba(120,214,75,.22); }
.checklist-highlight strong { display:block; font-size:18px; margin-top:4px; color:var(--green); }
.checklist-row { display:flex; align-items:flex-start; gap:10px; color:var(--text); }
.checklist-row input { margin-top:3px; }
.checklist-note { color:var(--muted); font-size:13px; }
.timeline-shell { height:100%; overflow:auto; padding:16px; }
.timeline-grid { min-width:max-content; display:grid; grid-auto-rows:minmax(84px, auto); border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.timeline-head,.timeline-cell,.timeline-label { min-height:84px; padding:12px; border-bottom:1px solid var(--line); border-right:1px solid var(--line); box-sizing:border-box; }
.timeline-head { background:#0d1217; color:var(--muted); text-transform:uppercase; font-size:11px; font-weight:700; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; min-width:56px; }
.timeline-head-day { color:#e5e7eb; font-size:14px; line-height:1; }
.timeline-head-month { letter-spacing:.08em; }
.timeline-head.is-today { background:rgba(122, 208, 74, 0.12); color:#d7f7b9; }
.timeline-label { background:#0d1217; position:sticky; left:0; z-index:3; width:260px; min-width:260px; }
.timeline-row-name { font-weight:700; margin-bottom:6px; }
.timeline-row-name[data-timeline-goto]:hover { color:var(--green); text-decoration:underline; }
.timeline-row-sub { color:var(--muted); font-size:12px; }
.timeline-cell { position:relative; background:rgba(255,255,255,.02); min-width:56px; padding:0; }
.timeline-cell.is-today { background:rgba(122, 208, 74, 0.05); }
.timeline-track,
.timeline-fill { position:absolute; top:50%; transform:translateY(-50%); height:12px; }
.timeline-track { left:0; right:0; background:rgba(95, 105, 123, 0.22); }
.timeline-fill { left:0; right:0; opacity:.98; }
.timeline-fill.green { background:linear-gradient(90deg, #4a9d2d, #79d24d); }
.timeline-fill.yellow { background:linear-gradient(90deg, #cf9f26, #f0c95a); }
.timeline-fill.red { background:linear-gradient(90deg, #bc543e, #f37c58); }
.timeline-fill.wine { background:linear-gradient(90deg, #5a2030, #8c3046); }
.timeline-overdue { position:absolute; top:50%; transform:translateY(-50%); left:0; right:0; height:12px; background:repeating-linear-gradient(90deg, rgba(220,38,38,.18), rgba(220,38,38,.18) 4px, transparent 4px, transparent 8px); }
.timeline-deadline.is-overdue { color:#f87171; font-weight:700; }
.timeline-track.cell-start,
.timeline-fill.cell-start { left:8px; border-top-left-radius:999px; border-bottom-left-radius:999px; }
.timeline-track.cell-end,
.timeline-fill.cell-end { right:8px; border-top-right-radius:999px; border-bottom-right-radius:999px; }
.timeline-track.is-single,
.timeline-fill.is-single { border-radius:999px; left:8px; right:8px; }
.timeline-marker { position:absolute; top:12px; left:50%; transform:translateX(-50%); min-width:36px; height:28px; padding:0 8px; border-radius:999px; background:#171d23; border:1px solid rgba(255,255,255,.14); color:var(--green); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; z-index:2; }
.timeline-marker.green { color:#79d24d; }
.timeline-marker.yellow { color:#f0c95a; }
.timeline-marker.red { color:#f37c58; }
.timeline-marker.wine { color:#d4708b; }
.timeline-stage-stack { position:absolute; top:10px; left:50%; transform:translateX(-50%); display:flex; flex-wrap:wrap; justify-content:center; gap:4px; max-width:48px; z-index:2; }
.timeline-stage-chip { min-width:24px; height:22px; padding:0 6px; border-radius:999px; background:#171d23; border:1px solid rgba(255,255,255,.14); color:#cfd6df; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; line-height:1; }
.timeline-stage-chip.is-current { color:#d7f7b9; border-color:rgba(122, 208, 74, 0.4); background:rgba(18, 40, 22, 0.96); }
.timeline-stage-stack.is-grouped .is-hidden-badge { display:none; }
.timeline-cell:hover .timeline-stage-stack.is-grouped .is-hidden-badge { display:flex; }
.timeline-deadline { position:absolute; bottom:10px; left:50%; transform:translateX(-50%); font-size:10px; line-height:1; color:#c7ccd4; background:rgba(9, 12, 17, 0.92); border:1px solid rgba(255,255,255,.1); border-radius:999px; padding:4px 8px; z-index:2; white-space:nowrap; }
.timeline-deadline.is-done { color:#d7f7b9; border-color:rgba(122, 208, 74, 0.32); }
.finance-shell { height:100%; display:flex; flex-direction:column; gap:16px; padding:16px; overflow:auto; }
.finance-summary { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.dashboard-shell { height:100%; display:flex; flex-direction:column; gap:16px; padding:16px; overflow:auto; }
.dashboard-section,.dashboard-card { background:var(--panel-2); border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.dashboard-section { padding:18px; }
.dashboard-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; }
.dashboard-card { display:flex; flex-direction:column; min-height:0; }
.dashboard-bank-summary-card { grid-column:1 / -1; overflow:visible; }
.dashboard-bank-pies { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; padding:14px; }
.bank-pie-panel { background:linear-gradient(180deg, rgba(13,17,21,.92), rgba(10,13,17,.98)); border:1px solid rgba(255,255,255,.06); border-radius:16px; overflow:hidden; min-height:230px; display:flex; flex-direction:column; }
.bank-pie-panel-featured { background:linear-gradient(180deg, rgba(120,214,75,.12), rgba(13,17,21,.98)); border-color:rgba(120,214,75,.18); min-height:230px; }
.bank-pie-slot { padding:8px 12px 12px; flex:1; min-height:0; display:flex; align-items:stretch; }
.bank-pie-chart { display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:flex-start; min-height:170px; width:100%; }
.bank-pie-chart.is-featured { min-height:170px; }
.bank-pie-visual { position:relative; display:flex; align-items:flex-start; justify-content:center; min-width:0; width:100%; margin-top:-6px; }
.bank-pie-svg { overflow:visible; max-width:100%; }
.bank-pie-svg-3d { filter:drop-shadow(0 20px 26px rgba(0,0,0,.26)); }
.bank-pie-slice { cursor:pointer; transition:transform .24s ease, opacity .24s ease, filter .24s ease; transform-box:fill-box; transform-origin:center; }
.bank-pie-slice-top { opacity:.98; }
.bank-pie-slice-side { opacity:.92; }
.bank-pie-slice:hover,
.bank-pie-slice.is-active { transform:translateY(-4px); opacity:1; filter:brightness(1.08); }
.bank-pie-track-empty { fill:#2a2e35; opacity:.92; }
.bank-pie-track-side { fill:#20242b; opacity:.96; }
.bank-pie-side { display:flex; flex-direction:column; gap:10px; min-width:0; width:100%; margin-top:-8px; }
.bank-pie-legend { display:flex; flex-direction:column; gap:8px; width:100%; }
.bank-pie-legend-item { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; color:var(--text); padding:8px 10px; border-radius:12px; background:rgba(255,255,255,.03); }
.bank-pie-legend-item.is-dimmed { opacity:.42; }
.bank-pie-legend-swatch { width:11px; height:11px; border-radius:3px; flex-shrink:0; }
.bank-pie-hover-card { display:none; position:absolute; z-index:3; min-width:220px; max-width:238px; padding:14px 14px 12px; border-radius:16px; background:rgba(8,11,15,.96); border:1px solid rgba(120,214,75,.24); box-shadow:0 22px 44px rgba(0,0,0,.34); backdrop-filter:blur(10px); }
.bank-pie-hover-card.is-visible { display:block; animation:bankPieFade .24s ease; }
.bank-pie-hover-card strong { display:block; margin-bottom:10px; font-size:13px; color:var(--text); text-transform:uppercase; letter-spacing:.08em; }
.bank-pie-hover-card ul { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.bank-pie-hover-card li { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; font-size:12px; color:var(--muted); }
.bank-pie-hover-rank { display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:22px; border-radius:999px; background:rgba(120,214,75,.14); color:var(--green); font-weight:700; }
.bank-pie-hover-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
.bank-pie-hover-value { color:var(--text); font-weight:800; white-space:nowrap; }
.bank-pie-hover-empty { color:var(--muted); font-size:12px; }
.bank-pie-note { color:var(--muted); font-size:12px; }
.bank-pie-total { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-top:auto; padding-top:12px; border-top:1px solid rgba(255,255,255,.08); }
.bank-pie-total span { color:var(--muted); text-transform:uppercase; font-size:11px; letter-spacing:.08em; }
.bank-pie-total strong { font-size:28px; line-height:1; color:var(--text); }
.bank-pie-chart.is-featured .bank-pie-total strong { font-size:34px; }
.bank-pie-total-secondary { margin-top:0; padding-top:8px; border-top:none; }
.bank-pie-total-secondary strong { font-size:20px; color:var(--muted); }
.bank-pie-chart.is-featured .bank-pie-total-secondary strong { font-size:24px; }
.legacy-bank-card { display:none; }
@keyframes bankPieFade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.dashboard-table-wrap { overflow:visible; }
.dashboard-table-wrap .finance-table { min-width:0; width:100%; table-layout:fixed; }
.dashboard-table-wrap th { width:60%; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-table-wrap td.finance-value { width:40%; text-align:right; }
.dashboard-metrics { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:12px; }
.section-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-end; margin-bottom:16px; }
.section-head.compact { padding:18px 18px 0; margin-bottom:0; }
.section-head h3 { margin:4px 0 0; font-size:24px; }
.inline-setting { display:flex; flex-direction:column; gap:6px; min-width:220px; }
.inline-setting label { color:var(--muted); font-size:12px; text-transform:uppercase; }
.inline-setting input { width:100%; background:#0b0e12; border:1px solid rgba(255,255,255,.09); border-radius:12px; color:var(--text); padding:12px 14px; }
.finance-card { padding:16px; border-radius:16px; background:linear-gradient(180deg, rgba(18,24,31,.96), rgba(10,13,17,.96)); border:1px solid var(--line); display:flex; flex-direction:column; gap:6px; }
.finance-card.highlight { background:linear-gradient(180deg, rgba(120,214,75,.12), rgba(18,24,31,.95)); }
.finance-card.alert { background:linear-gradient(180deg, rgba(243,106,83,.12), rgba(18,24,31,.95)); }
.finance-card span { color:var(--muted); text-transform:uppercase; font-size:11px; letter-spacing:.08em; }
.finance-card strong { font-size:32px; line-height:1.05; }
.finance-card small { color:var(--muted); font-size:13px; }
.finance-table-card { display:flex; flex-direction:column; background:var(--panel-2); border:1px solid var(--line); border-radius:18px; overflow:hidden; min-height:0; margin-bottom:16px; }
.finance-table-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-end; padding:18px; border-bottom:1px solid var(--line); }
.finance-table-head-tabs { align-items:center; }
.finance-table-head h3 { margin:4px 0 0; font-size:24px; }
.finance-note { margin:0; color:var(--muted); max-width:320px; text-align:right; }
.table-head-actions { display:flex; gap:14px; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; }
.finance-panel-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.finance-main-panel { display:none; min-height:0; padding:18px; }
.finance-main-panel.is-visible { display:block; }
.table-button-row { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.finance-table-wrap { overflow:auto; padding-right:12px; }
.finance-table { width:100%; border-collapse:collapse; min-width:900px; }
.finance-table th,.finance-table td { padding:14px 16px; border-bottom:1px solid var(--line); text-align:left; }
.finance-table th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; background:#0d1217; position:sticky; top:0; z-index:1; }
.finance-table tbody tr:hover { background:rgba(255,255,255,.03); }
.finance-customer { display:flex; flex-direction:column; gap:4px; }
.finance-customer span { color:var(--muted); font-size:12px; }
.finance-value { font-weight:700; color:var(--green); white-space:nowrap; }
.finance-profit { font-weight:700; white-space:nowrap; }
.finance-profit.positive { color:var(--green); }
.finance-profit.warning { color:var(--yellow); }
.finance-profit.negative { color:var(--red); }
.finance-status.good { background:rgba(120,214,75,.14); color:var(--green); }
.finance-status.warning { background:rgba(241,200,77,.14); color:var(--yellow); }
.finance-status.danger { background:rgba(243,106,83,.14); color:var(--red); }
.finance-status { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(77,159,255,.12); color:var(--blue); font-size:12px; font-weight:700; }
.finance-status.paid { background:rgba(120,214,75,.14); color:var(--green); }
.finance-status.partial { background:rgba(241,200,77,.14); color:var(--yellow); }
.finance-status.pending { background:rgba(243,106,83,.14); color:var(--red); }
.finance-empty { padding:24px 18px; color:var(--muted); }
.table-action-button { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); color:var(--text); border-radius:10px; padding:8px 12px; cursor:pointer; }
.table-action-button:hover { border-color:rgba(120,214,75,.28); color:var(--green); }
.finance-actions-cell { display:flex; gap:8px; flex-wrap:wrap; }
.table-action-button-danger { border-color:rgba(243,106,83,.28); color:var(--red); background:rgba(243,106,83,.08); }
.table-action-button-danger:hover { border-color:rgba(243,106,83,.42); color:#ffd0c8; }
.form-field.hidden-stage-field,
.form-field.form-field-full.hidden-stage-field { display:none; }
.form-field.hidden-stage-field.is-visible,
.form-field.form-field-full.hidden-stage-field.is-visible { display:flex; }

/* ── Bloco destacado de Impressão ─────────────────────────────────────── */
.impression-ops-block { display:none; grid-column:1/-1; }
.impression-ops-block:has(.is-visible) { display:block; border:2px solid rgba(120,214,75,.25); border-radius:12px; padding:14px 16px 16px; background:rgba(120,214,75,.04); margin-top:4px; }
.impression-ops-label { display:none; font-size:10px; font-weight:700; color:var(--green); text-transform:uppercase; letter-spacing:.12em; margin-bottom:10px; }
.impression-ops-block:has(.is-visible) .impression-ops-label { display:block; }
.impression-ops-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:10px; }
.impression-ops-block .form-field.hidden-stage-field.is-visible { display:flex; }
.impression-ops-block .form-field label { color:var(--green); font-size:11px; font-weight:600; }
.impression-ops-block .form-field select,
.impression-ops-block .form-field input { border-color:rgba(120,214,75,.18); background:rgba(6,8,10,.6); }
.impression-ops-block .form-field select:focus,
.impression-ops-block .form-field input:focus { border-color:rgba(120,214,75,.45); outline:none; box-shadow:0 0 0 2px rgba(120,214,75,.1); }
.impression-ops-block .checklist-highlight { border-color:rgba(120,214,75,.2); }
@media (max-width:768px) { .impression-ops-grid { grid-template-columns:1fr; gap:8px; } }
@media (max-width:480px) { .impression-ops-block:has(.is-visible) { padding:10px 12px 12px; } .impression-ops-grid { gap:6px; } }

.modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); display:flex; align-items:center; justify-content:center; padding:16px; z-index:30; animation:modalFadeIn .25s ease; }
.modal-backdrop.hidden { display:none; }
@keyframes modalFadeIn { from { opacity:0; backdrop-filter:blur(0); } to { opacity:1; backdrop-filter:blur(8px); } }
@keyframes modalCardIn { from { opacity:0; transform:scale(.92) translateY(12px); } to { opacity:1; transform:scale(1) translateY(0); } }

/* â”€â”€ Recebidos Agrupados â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rec-section { margin-top:16px; }
.rec-section-head { display:flex; align-items:center; gap:10px; padding:6px 0 10px; border-bottom:1px solid var(--line); margin-bottom:8px; }
.rec-section-title { color:#4ade80; font-size:13px; font-weight:600; }
.rec-section-count { background:rgba(74,222,128,.15); color:#86efac; font-size:11px; padding:1px 7px; border-radius:10px; margin-left:4px; font-weight:600; }
.rec-summary-filters { display:flex; gap:5px; margin-left:auto; }
.rec-filter-btn { padding:3px 10px; font-size:11px; }
.rec-groups-wrap { display:flex; flex-direction:column; gap:8px; padding-top:4px; }
.rec-group { border-radius:12px; overflow:hidden; border:1px solid var(--line); background:rgba(255,255,255,.025); }
.rec-group-revenda { border-color:rgba(74,222,128,.18); background:rgba(74,222,128,.04); }
.rec-group-head { display:flex; align-items:center; gap:12px; padding:10px 14px; cursor:pointer; background:rgba(255,255,255,.03); transition:background .15s; flex-wrap:wrap; }
.rec-group-head:hover { background:rgba(255,255,255,.06); }
.rec-group-revenda .rec-group-head { background:rgba(74,222,128,.05); }
.rec-group-revenda .rec-group-head:hover { background:rgba(74,222,128,.09); }
.rec-group.is-pinned .rec-group-head { background:rgba(255,255,255,.07); }
.rec-group-revenda.is-pinned .rec-group-head { background:rgba(74,222,128,.11); }
.rec-group-order-info { display:flex; flex-direction:column; gap:1px; min-width:60px; }
.rec-group-num { font-size:13px; font-weight:700; color:#fff; }
.rec-group-product { font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px; }
.rec-group-client-info { flex:1; display:flex; flex-direction:column; gap:2px; min-width:0; }
.rec-group-client-info strong { font-size:13px; color:#e5e7eb; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rec-type-badge { display:inline-block; font-size:10px; padding:1px 7px; border-radius:4px; font-weight:600; align-self:flex-start; }
.rec-type-badge.is-confeccao { background:rgba(79,142,247,.15); color:#93c5fd; }
.rec-type-badge.is-revenda { background:rgba(74,222,128,.15); color:#86efac; }
.rec-group-total { font-size:14px; font-weight:700; color:#fff; white-space:nowrap; margin-left:auto; }
.rec-group-date { font-size:11px; color:var(--muted); white-space:nowrap; }
.rec-history-btn { background:rgba(79,142,247,.12); border:1px solid rgba(79,142,247,.25); color:#93c5fd; font-size:11px; padding:3px 10px; border-radius:6px; cursor:pointer; flex-shrink:0; opacity:0; transition:opacity .15s; }
.rec-group-head:hover .rec-history-btn { opacity:1; }
.rec-history-btn:hover { background:rgba(79,142,247,.22); }
.rec-pin-icon { font-size:12px; opacity:0; transition:opacity .15s; flex-shrink:0; }
.rec-group-head:hover .rec-pin-icon { opacity:.45; }
.rec-group.is-pinned .rec-pin-icon { opacity:1; filter:saturate(2); }
.rec-group-lines { display:flex; flex-direction:column; max-height:0; overflow:hidden; transition:max-height .22s ease, opacity .18s ease; opacity:0; border-top:1px solid transparent; }
.rec-group:hover .rec-group-lines,
.rec-group.is-pinned .rec-group-lines { max-height:600px; opacity:1; border-top-color:var(--line); }
.rec-group-revenda:hover .rec-group-lines,
.rec-group-revenda.is-pinned .rec-group-lines { border-top-color:rgba(74,222,128,.12); }
.rec-pay-line { display:flex; align-items:center; gap:10px; padding:8px 14px; border-bottom:1px solid rgba(255,255,255,.04); font-size:12px; transition:background .12s; }
.rec-pay-line:last-child { border-bottom:none; }
.rec-pay-line:hover { background:rgba(255,255,255,.03); }
.rec-pay-partial-line { opacity:.85; }
.rec-pay-icon { width:18px; text-align:center; flex-shrink:0; font-size:12px; }
.rec-pay-desc { flex:1; color:#d1d5db; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rec-pay-bank { color:#9ca3af; min-width:80px; }
.rec-pay-date { color:#6b7280; min-width:80px; }
.rec-pay-amount { color:#fff; font-weight:600; min-width:90px; text-align:right; }
.rec-pay-actions { display:flex; gap:5px; flex-shrink:0; margin-left:8px; }
.rec-empty { color:var(--muted); font-size:13px; padding:12px 14px; margin:0; }

/* â”€â”€ HistÃ³rico do Pedido â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.oh-header { background:rgba(255,255,255,.04); border:1px solid var(--line); border-radius:14px; padding:16px 18px; margin-bottom:16px; }
.oh-header-main { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.oh-kicker { font-size:11px; text-transform:uppercase; color:var(--muted); letter-spacing:.06em; display:block; margin-bottom:4px; }
.oh-meta-row { color:#d1d5db; font-size:14px; display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.oh-sep { color:var(--muted); }
.oh-value-block { text-align:right; flex-shrink:0; }
.oh-value-label { font-size:11px; color:var(--muted); display:block; margin-bottom:2px; }
.oh-value-num { font-size:22px; font-weight:700; color:#fff; }
.oh-age-bar { display:flex; gap:20px; flex-wrap:wrap; padding-top:12px; border-top:1px solid var(--line); }
.oh-age-item { display:flex; flex-direction:column; gap:2px; }
.oh-age-num { font-size:20px; font-weight:700; color:#fff; line-height:1; }
.oh-age-num-sm { font-size:14px; font-weight:600; color:#e5e7eb; }
.oh-age-label { font-size:11px; color:var(--muted); }
.oh-age-date { margin-left:auto; }
.oh-section { margin-bottom:20px; }
.oh-section-title { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:10px; padding-bottom:6px; border-bottom:1px solid var(--line); }
.oh-stage-list { display:flex; flex-direction:column; gap:6px; }
.oh-stage-row { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:10px; background:rgba(255,255,255,.03); border:1px solid transparent; transition:background .15s; }
.oh-stage-row.is-active { background:rgba(79,142,247,.08); border-color:rgba(79,142,247,.22); }
.oh-stage-row.is-alert { background:rgba(239,68,68,.07); border-color:rgba(239,68,68,.22); }
.oh-stage-dot { width:10px; height:10px; border-radius:50%; background:var(--muted); flex-shrink:0; }
.oh-stage-dot.is-active { background:#4f8ef7; box-shadow:0 0 6px rgba(79,142,247,.6); }
.oh-stage-dot.is-alert { background:#ef4444; }
.oh-stage-info { flex:1; min-width:0; }
.oh-stage-name { font-size:13px; font-weight:600; color:#e5e7eb; display:block; }
.oh-stage-dates { font-size:11px; color:var(--muted); }
.oh-stage-right { display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex-shrink:0; }
.oh-stage-dur { font-size:12px; color:#9ca3af; }
.oh-stage-dur.is-alert { color:#f87171; font-weight:600; }
.oh-alert-badge { font-size:10px; background:rgba(239,68,68,.15); color:#fca5a5; border:1px solid rgba(239,68,68,.3); border-radius:5px; padding:2px 7px; white-space:nowrap; }
.oh-pay-list { display:flex; flex-direction:column; gap:6px; }
.oh-pay-row { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:10px; background:rgba(255,255,255,.03); border:1px solid transparent; }
.oh-pay-row.is-entrada { background:rgba(79,142,247,.06); border-color:rgba(79,142,247,.18); }
.oh-pay-row.is-paid { background:rgba(22,163,74,.06); border-color:rgba(22,163,74,.18); }
.oh-pay-row.is-partial-open { background:rgba(245,158,11,.06); border-color:rgba(245,158,11,.2); }
.oh-pay-row.is-pending { background:rgba(156,163,175,.04); border-color:rgba(156,163,175,.12); }
.oh-pay-row.is-estorno { background:rgba(239,68,68,.05); border-color:rgba(239,68,68,.15); }
.oh-pay-icon { width:28px; height:28px; border-radius:50%; background:rgba(255,255,255,.07); display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.oh-pay-info { flex:1; min-width:0; }
.oh-pay-label { font-size:13px; font-weight:600; color:#e5e7eb; display:block; }
.oh-pay-sub { font-size:11px; color:var(--muted); }
.oh-pay-right { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.oh-pay-amount { font-size:14px; font-weight:700; color:#fff; }
.oh-pay-date { font-size:11px; color:var(--muted); }
.oh-finance-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.oh-finance-item { padding:12px 16px; border-radius:10px; background:rgba(255,255,255,.04); border:1px solid var(--line); }
.oh-finance-total { background:rgba(255,255,255,.07); }
.oh-finance-label { font-size:11px; color:var(--muted); display:block; margin-bottom:4px; }
.oh-finance-val { font-size:16px; font-weight:700; color:#fff; }
.oh-finance-val.is-cost { color:#f87171; }
.oh-finance-val.is-positive { color:#4ade80; }
.oh-finance-val.is-negative { color:#f87171; }
.oh-notes-text { font-size:13px; color:#9ca3af; line-height:1.6; padding:10px 14px; background:rgba(255,255,255,.03); border-radius:8px; margin:0; }
.oh-empty { color:var(--muted); font-size:13px; margin:0; padding:10px 0; }
[data-finance-order-id] { cursor:pointer; }
[data-finance-order-id]:hover td { background:rgba(255,255,255,.04); }
.modal-card { width:min(820px, 100%); max-height:calc(100vh - 32px); padding:24px; display:flex; flex-direction:column; overflow:hidden; background:rgba(14,18,23,.82); backdrop-filter:blur(40px) saturate(1.4); -webkit-backdrop-filter:blur(40px) saturate(1.4); border:1px solid rgba(255,255,255,.12); border-radius:20px; box-shadow:0 24px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06) inset, 0 1px 0 rgba(255,255,255,.08) inset; animation:modalCardIn .3s cubic-bezier(.16,1,.3,1); }
.modal-card-wide { width:min(1180px, 100%); }
.modal-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:14px; flex-shrink:0; }
.modal-close { background:transparent; color:var(--muted); }
.form-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; overflow:auto; padding-right:16px; }
.form-field { display:flex; flex-direction:column; gap:6px; }
.form-field label { color:var(--muted); font-size:12px; text-transform:uppercase; }
.form-field input,.form-field select,.form-field textarea { width:100%; background:#0b0e12; border:1px solid rgba(255,255,255,.09); border-radius:12px; color:var(--text); padding:12px 14px; }
/* ── Smart Autocomplete ──────────────────────────────────────────────────── */
.ac-wrapper { position:relative; display:flex; align-items:stretch; }
.ac-wrapper input { flex:1; border-top-right-radius:0; border-bottom-right-radius:0; min-width:0; }
.ac-toggle { display:flex; align-items:center; justify-content:center; width:38px; background:#0b0e12; border:1px solid rgba(255,255,255,.09); border-left:none; border-radius:0 12px 12px 0; color:var(--muted); cursor:pointer; font-size:11px; transition:color .15s, background .15s; flex-shrink:0; }
.ac-toggle:hover { color:var(--text); background:rgba(255,255,255,.06); }
.ac-dropdown { position:absolute; top:100%; left:0; right:0; z-index:900; max-height:220px; overflow-y:auto; background:#0d1115; border:1px solid rgba(255,255,255,.12); border-radius:12px; margin-top:4px; box-shadow:0 12px 40px rgba(0,0,0,.55); display:none; }
.ac-dropdown.is-open { display:block; }
.ac-dropdown-item { padding:10px 14px; color:var(--text); font-size:13px; cursor:pointer; transition:background .1s; }
.ac-dropdown-item:hover,.ac-dropdown-item.is-active { background:rgba(120,214,75,.12); }
.ac-dropdown-empty { padding:10px 14px; color:var(--muted); font-size:12px; font-style:italic; }
[data-theme="light"] .ac-toggle { background:#f0f2f5; border-color:rgba(0,0,0,.12); }
[data-theme="light"] .ac-dropdown { background:#fff; border-color:rgba(0,0,0,.12); box-shadow:0 8px 24px rgba(0,0,0,.15); }
[data-theme="light"] .ac-dropdown-item:hover,[data-theme="light"] .ac-dropdown-item.is-active { background:rgba(120,214,75,.1); }
.form-field-full { grid-column:1 / -1; }
.modal-actions { grid-column:1 / -1; display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:8px; position:sticky; bottom:0; background:linear-gradient(180deg, rgba(13,17,21,0), rgba(13,17,21,.96) 20%); padding-top:14px; }
.modal-actions-left,.modal-actions-right { display:flex; align-items:center; gap:10px; }
.danger-button { background:rgba(243,106,83,.14); color:var(--red); border:1px solid rgba(243,106,83,.28); }
.danger-button:hover { border-color:rgba(243,106,83,.42); color:#ffd0c8; }
.customer-history-card { display:flex; flex-direction:column; gap:6px; padding:14px; border-radius:14px; background:rgba(120,214,75,.08); border:1px solid rgba(120,214,75,.18); color:var(--text); }
.customer-history-card span { color:var(--muted); }
.resale-toggle-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border-radius:16px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); }
.resale-toggle-label { color:var(--text); font-size:14px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.resale-toggle-button { min-width:140px; padding:10px 14px; border-radius:999px; border:1px solid rgba(120,214,75,.25); background:rgba(255,255,255,.05); color:var(--muted); cursor:pointer; }
.resale-toggle-button.is-on { background:rgba(120,214,75,.18); color:var(--green); border-color:rgba(120,214,75,.45); }
.resale-toggle-button:disabled { opacity:.55; cursor:not-allowed; }
.resale-panel { display:none; }
.resale-panel.is-visible { display:flex; }
.paste-zone { min-height:86px; border:1px dashed rgba(120,214,75,.32); border-radius:14px; background:rgba(120,214,75,.05); color:var(--muted); display:flex; align-items:center; justify-content:center; text-align:center; padding:18px; }
.paste-zone:focus { outline:2px solid rgba(120,214,75,.45); }
.extra-products-stack { display:flex; flex-direction:column; gap:14px; }
.extra-product-card { padding:16px; border-radius:16px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); }
.extra-product-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.extra-product-head strong { font-size:15px; }
.extra-product-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; }
.image-preview-wrap { display:none; }
.image-preview-wrap.is-visible { display:block; }
.image-preview-wrap img { width:100%; max-height:220px; object-fit:contain; border-radius:14px; background:#0b0e12; border:1px solid rgba(255,255,255,.08); }
.image-hover-preview { position:fixed; inset:auto 24px 24px auto; width:min(34vw, 420px); height:min(50vh, 420px); background:rgba(8,10,12,.96); border:1px solid rgba(255,255,255,.12); border-radius:18px; padding:12px; box-shadow:0 24px 50px rgba(0,0,0,.45); z-index:80; display:none; pointer-events:none; }
.image-hover-preview.is-visible { display:block; }
.image-hover-preview.is-tall { width:min(48vw, 600px); height:min(82vh, 600px); }
.image-hover-preview img { width:100%; height:100%; object-fit:contain; border-radius:12px; display:block; background:#0b0e12; }
@media (max-width:1500px){ .layout-shell{grid-template-columns:240px 1fr; padding-right:16px;} .detail-panel{position:static; grid-column:1/-1; width:auto; height:auto; min-height:auto; overflow:visible;} .dashboard-metrics{grid-template-columns:repeat(3, minmax(0,1fr));} }
@media (max-width:1100px){ .form-grid,.extra-product-grid{grid-template-columns:repeat(2, minmax(0, 1fr));} .modal-card-wide{width:min(980px, 100%);} .finance-summary,.dashboard-metrics{grid-template-columns:repeat(2, minmax(0,1fr));} .dashboard-grid{grid-template-columns:1fr;} .dashboard-bank-pies{grid-template-columns:repeat(2, minmax(0,1fr));} .bank-pie-chart,.bank-pie-chart.is-featured{grid-template-columns:1fr; min-height:auto;} .bank-pie-visual{justify-content:flex-start;} }
@media (max-width:900px){ .topbar,.workspace-head,.modal-head,.finance-table-head,.section-head,.modal-actions{flex-direction:column; align-items:flex-start;} .layout-shell{grid-template-columns:1fr;} .overview-panel,.workspace,.detail-panel{min-height:auto;} .form-grid{grid-template-columns:1fr;} .modal-card,.modal-card-wide{width:min(100%, 100%);} .finance-summary,.dashboard-metrics{grid-template-columns:1fr;} .finance-note{text-align:left; max-width:none;} .inline-setting{min-width:100%; width:100%;} .table-head-actions,.table-button-row,.modal-actions-right,.modal-actions-left,.topbar-actions{justify-content:flex-start; width:100%;} .topbar{padding-right:24px;} .topbar-actions{position:static; top:auto; right:auto;} }

/* â”€â”€ MÃ³dulo de Clientes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.clientes-shell { display:grid; grid-template-columns:360px minmax(0,1fr); height:calc(100vh - 200px); overflow:hidden; gap:0; }
.clientes-list-col { display:flex; flex-direction:column; border-right:1px solid var(--line); overflow:hidden; }
.clientes-list-head { padding:16px; border-bottom:1px solid var(--line); flex-shrink:0; }
.clientes-list-title-row { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.clientes-list-title-row h3 { margin:0; font-size:16px; color:#fff; }
.clientes-count-badge { background:rgba(79,142,247,.15); color:#93c5fd; font-size:11px; padding:2px 8px; border-radius:10px; font-weight:600; }
.clientes-search { width:100%; background:#0e1117; color:#fff; border:1px solid #2d3148; border-radius:8px; padding:8px 12px; font-size:13px; box-sizing:border-box; margin-bottom:8px; }
.clientes-filter-row { display:flex; gap:5px; }
.clientes-filter-row .ghost-button { padding:3px 10px; font-size:11px; }
.clientes-list-body { flex:1; overflow-y:auto; padding:8px; }
.clientes-list-card { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; border:1px solid transparent; cursor:pointer; transition:background .12s,border-color .12s; margin-bottom:4px; }
.clientes-list-card:hover { background:rgba(255,255,255,.04); border-color:var(--line); }
.clientes-list-card.is-active { background:rgba(79,142,247,.08); border-color:rgba(79,142,247,.25); }
.clientes-list-card.is-revenda { border-left:3px solid rgba(74,222,128,.35); }
.clientes-list-card.is-revenda.is-active { background:rgba(74,222,128,.07); border-color:rgba(74,222,128,.3); }
.clientes-card-avatar { width:36px; height:36px; border-radius:50%; background:rgba(79,142,247,.18); color:#93c5fd; font-size:15px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.clientes-list-card.is-revenda .clientes-card-avatar { background:rgba(74,222,128,.15); color:#86efac; }
.clientes-card-info { flex:1; min-width:0; }
.clientes-card-name { font-size:13px; font-weight:600; color:#e5e7eb; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.clientes-card-meta { font-size:11px; color:var(--muted); display:flex; gap:4px; flex-wrap:wrap; margin-top:1px; }
.clientes-card-stats { display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex-shrink:0; }
.clientes-card-orders { font-size:11px; color:var(--muted); }
.clientes-card-value { font-size:12px; font-weight:600; color:#fff; }
.clientes-card-last { font-size:10px; color:#6b7280; }
.clientes-empty { color:var(--muted); font-size:13px; padding:16px; text-align:center; }
/* detail col */
.clientes-detail-col { overflow-y:auto; padding:20px; }
.clientes-detail-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; text-align:center; color:var(--muted); gap:8px; }
.clientes-detail-empty h3 { color:#e5e7eb; margin:0; }
.clientes-detail-header { display:flex; align-items:flex-start; gap:14px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.clientes-detail-avatar { width:52px; height:52px; border-radius:50%; background:rgba(79,142,247,.18); color:#93c5fd; font-size:22px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.clientes-detail-info { flex:1; display:flex; flex-direction:column; gap:4px; }
.clientes-detail-info h3 { margin:0; font-size:18px; color:#fff; }
.clientes-detail-meta { font-size:12px; color:#9ca3af; }
.clientes-detail-contacts { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.clientes-metrics-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:20px; }
.clientes-metric-card { background:rgba(255,255,255,.04); border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.clientes-metric-credit { background:rgba(74,222,128,.05); border-color:rgba(74,222,128,.2); }
.clientes-metric-label { font-size:11px; color:var(--muted); display:block; margin-bottom:4px; }
.clientes-metric-val { font-size:16px; font-weight:700; color:#fff; }
.clientes-metric-positive { color:#4ade80; }
.clientes-metric-negative { color:#f87171; }
.clientes-metric-warn { color:#fbbf24; }
.clientes-notes { background:rgba(255,255,255,.03); border-radius:8px; padding:10px 14px; margin-bottom:16px; }
.clientes-notes-label { font-size:11px; color:var(--muted); text-transform:uppercase; display:block; margin-bottom:4px; }
.clientes-notes p { margin:0; font-size:13px; color:#9ca3af; line-height:1.6; }
.clientes-orders-section { margin-top:4px; }
.clientes-orders-head { display:flex; justify-content:space-between; align-items:center; padding-bottom:8px; border-bottom:1px solid var(--line); margin-bottom:10px; }
.clientes-section-label { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:600; }
.clientes-order-row { cursor:pointer; }
.clientes-order-row:hover td { background:rgba(255,255,255,.04); }
.clientes-order-badge { display:inline-block; font-size:10px; padding:2px 7px; border-radius:4px; font-weight:600; }
.clientes-order-badge.is-paid { background:rgba(74,222,128,.12); color:#86efac; }
.clientes-order-badge.is-open { background:rgba(251,191,36,.12); color:#fcd34d; }
.clientes-no-orders { color:var(--muted); font-size:13px; padding:16px 0; }

/* â”€â”€ Revenda View â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.revenda-shell {
  padding: 24px;
  max-width: 1400px;
}
.revenda-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.revenda-header h3 {
  margin: 0;
  font-size: 20px;
  color: #f9fafb;
}
.revenda-list-card {
  background: #13161f;
  border: 1px solid #1e2235;
  border-radius: 12px;
  overflow: hidden;
}
.revenda-list-card table {
  width: 100%;
}
.revenda-history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 16px;
}
.revenda-history-head h3 {
  margin: 0;
  font-size: 20px;
  color: #f9fafb;
}
.revenda-history-search {
  min-width: min(420px, 100%);
}
.revenda-history-search input {
  width: 100%;
  background: #0e1117;
  color: #fff;
  border: 1px solid #2d3148;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  box-sizing: border-box;
}
.revenda-history-search small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
  text-align: right;
}
.revenda-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.revenda-history-filters,
.revenda-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.revenda-history-filters .ghost-button.is-active {
  background: rgba(132, 204, 22, 0.16);
  border-color: rgba(132, 204, 22, 0.45);
  color: #d9f99d;
}
.revenda-bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid #2d3148;
  border-radius: 12px;
  color: #d1d5db;
  font-size: 13px;
}
.revenda-bulk-bar.is-visible {
  display: flex;
}
.revenda-bulk-bar strong {
  color: #f9fafb;
}
.revenda-select-cell {
  width: 44px;
}
.revenda-select-cell input,
#revendaCompletedToggleAll {
  width: 16px;
  height: 16px;
  accent-color: #84cc16;
  cursor: pointer;
}
.revenda-row-actions {
  display: flex;
  justify-content: flex-end;
}
.revenda-row-actions .ghost-button {
  font-size: 11px;
  padding: 4px 10px;
}
.revenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.revenda-actions .ghost-button {
  font-size: 12px;
  padding: 4px 10px;
}
.revenda-actions .ghost-button-success {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.revenda-finance-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #2d3148;
  font-size: 11px;
  font-weight: 600;
  color: #d1d5db;
  background: rgba(17, 24, 39, 0.7);
}
.revenda-finance-status.is-received {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(20, 83, 45, 0.25);
}
.revenda-finance-status.is-pending {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(120, 53, 15, 0.22);
}
.revenda-finance-status.is-missing {
  color: #9ca3af;
}
@media (max-width:900px){
  .revenda-history-head {
    align-items: stretch;
  }
  .revenda-history-toolbar {
    align-items: stretch;
  }
  .revenda-history-search {
    min-width: 100%;
  }
  .revenda-history-filters,
  .revenda-history-actions {
    width: 100%;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MOBILE & TABLET â€” adaptaÃ§Ã£o responsiva
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Tablet intermediÃ¡rio: 769px â€“ 900px â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 900px) and (min-width: 769px) {
  /* topbar volta para linha Ãºnica mas aÃ§Ãµes ficam estÃ¡ticas */
  .topbar { padding: 6px 16px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-start; }
  .logo-bar { padding: 8px 0 4px; }
  .logo-text-img { height: 36px; }
  .logo-arrow-img { height: 36px; }
  .layout-shell { grid-template-columns: 1fr; padding-right: 16px; }
  .detail-panel { position: static; grid-column: 1/-1; width: auto; height: auto; min-height: auto; overflow: visible; }
  .overview-panel { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .overview-card { flex: 1 1 180px; min-width: 160px; }
  .filters-card { flex: 1 1 100%; }
  .overview-value { font-size: 30px; }
  .dashboard-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .finance-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* â”€â”€ Mobile geral: â‰¤ 768px â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {

  /* â€” Topbar: compacto em 2 linhas â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .logo-bar { padding: 6px 0 4px; }
  .logo-text-img { height: 30px; }
  .logo-arrow-img { height: 30px; }
  .logo-flow-wrap { padding-right: 44px; }
  .topbar {
    top: 48px;
    flex-direction: column;
    align-items: stretch;
    padding: 6px 10px;
    gap: 5px;
  }
  .eyebrow, .subtitle { display: none; }
  .brand-block { display: none; }

  .topbar-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    width: 100%;
    gap: 6px;
  }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .view-switch { flex-shrink: 0; }
  .view-button { padding: 5px 8px; font-size: 11px; white-space: nowrap; }
  .role-switch { flex-direction: row; align-items: center; gap: 4px; min-width: auto; flex-shrink: 0; font-size: 9px; }
  .role-select { padding: 4px 8px; font-size: 11px; height: 28px; }
  .ghost-button { padding: 5px 8px; font-size: 11px; height: 28px; flex-shrink: 0; }
  .logout-button { width: 28px; height: 28px; }

  /* â€” Layout: bloco simples, sem grid, sem padding lateral â€”â€”â€”â€”â€”â€”â€”â€”*/
  .layout-shell,
  .layout-shell.kanban-detail-hidden {
    display: block;
    padding: 0;
    /* padding-top dinâmico via JS syncTopbarWidth */
  }

  /* â€” Overview panel: completamente oculto no mobile â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”
     O Kanban precisa de toda a tela. Filtros ficam no drawer lateral. */
  .overview-panel { display: none !important; }

  /* â€” Workspace: ocupa toda a Ã¡rea disponÃ­vel â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .workspace {
    min-height: auto;
    border-radius: 0;
    border: none;
    background: transparent;
    gap: 0;
  }

  /* CabeÃ§alho da workspace (tÃ­tulo + legenda): oculto */
  .workspace-head { display: none; }

  /* â€” View panels: cada um recebe altura total disponÃ­vel â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .view-panel.is-visible {
    display: block;
    height: calc(100vh - 142px);
    overflow: hidden;
  }

  /* â€” Kanban board: tela cheia com scroll horizontal por toque â€”â€”â€”*/
  .board {
    height: 100%;
    padding: 8px 6px;
    gap: 8px;
  }

  /* colunas um pouco mais largas para toque confortÃ¡vel */
  .column { width: 272px; min-width: 272px; }

  /* lista de cards usa a altura total menos header da coluna */
  .column-list { }

  /* cards: Ã¡rea de toque generosa */
  .kanban-card { max-height: none; }
  .kanban-card:hover { max-height: none; transform: none; }

  /* â€” Detail panel: drawer subindo do rodapÃ© â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .detail-panel {
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 74vh;
    border-radius: 20px 20px 0 0;
    z-index: 50;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,.55);
    padding: 0 14px 24px;
  }
  /* alÃ§a visual */
  .detail-panel::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
    margin: 12px auto 8px;
  }

  /* â€” Finance â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .finance-shell { padding: 10px; }
  .finance-summary { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .finance-card strong { font-size: 24px; }
  .finance-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .finance-table { min-width: 640px; }
  .finance-table th, .finance-table td { padding: 9px 11px; font-size: 12px; }
  .finance-table-head { padding: 12px; gap: 8px; }
  .finance-table-head h3 { font-size: 17px; }
  .table-head-actions, .table-button-row { flex-wrap: wrap; gap: 6px; }

  /* â€” Dashboard â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .dashboard-shell { padding: 10px; }
  .dashboard-section { padding: 12px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .dashboard-bank-pies { grid-template-columns: 1fr; gap: 10px; padding: 10px; }
  .bank-pie-panel,
  .bank-pie-panel-featured { min-height: 240px; }
  .section-head h3 { font-size: 17px; }
  .inline-setting { min-width: 100%; }

  /* â€” Modais: sheet do rodapÃ© â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-card {
    width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
    padding: 14px 12px;
  }
  .modal-card-wide { width: 100%; }
  .form-grid, .extra-product-grid { grid-template-columns: 1fr; }
  .modal-head h2 { font-size: 17px; }
  .modal-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }

  /* â€” Revenda â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”â€”*/
  .revenda-shell { padding: 10px; }
  .revenda-header { flex-direction: column; gap: 8px; }
  .table-head-actions,.modal-actions-right,.modal-actions-left { justify-content: flex-start; width: 100%; }
  .finance-note { text-align: left; max-width: none; }
}

/* â”€â”€ Admin Panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.admin-shell { display:grid; grid-template-columns:220px minmax(0,1fr); gap:0; height:calc(100vh - 118px); overflow:hidden; }
.admin-sidebar { border-right:1px solid var(--line); padding:20px 12px; display:flex; flex-direction:column; gap:4px; flex-shrink:0; }
.admin-sidebar-title { margin:0 0 16px 8px; font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.14em; font-weight:700; }
.admin-nav-btn { background:transparent; border:0; color:var(--muted); padding:10px 14px; border-radius:10px; cursor:pointer; text-align:left; font-size:14px; transition:background .15s,color .15s; width:100%; }
.admin-nav-btn:hover { background:rgba(255,255,255,.06); color:var(--text); }
.admin-nav-btn.is-active { background:rgba(120,214,75,.12); color:var(--green); font-weight:700; }
[data-theme="light"] .admin-nav-btn:hover { background:rgba(0,0,0,.05); }
.admin-content { padding:28px; overflow-y:auto; }
.admin-section-head { margin-bottom:22px; }
.admin-section-head h3 { margin:0 0 6px; font-size:18px; color:var(--text); }
.admin-section-desc { margin:0; color:var(--muted); font-size:13px; }
.admin-actions-row { margin-top:20px; display:flex; gap:8px; }
/* ── Admin: Reposição Cadastro ── */
.sep-adm-list { display:flex; flex-direction:column; gap:8px; max-width:700px; }
.sep-adm-card { display:flex; align-items:center; gap:12px; background:var(--panel-2); border:1px solid var(--line); border-radius:10px; padding:12px 16px; }
.sep-adm-card.is-editing { flex-direction:column; align-items:stretch; }
.sep-adm-card-info { flex:1; min-width:0; }
.sep-adm-card-title { display:block; font-size:14px; font-weight:700; color:var(--text); margin-bottom:3px; }
.sep-adm-card-sub { display:block; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sep-adm-card-name-row { display:flex; gap:8px; margin-bottom:10px; }
.sep-adm-name-input { background:var(--panel-3); border:1px solid var(--line); border-radius:8px; color:var(--text); padding:8px 10px; font-size:13px; }
.sep-adm-pieces-wrap { display:flex; flex-direction:column; gap:6px; margin-bottom:2px; }
.sep-adm-piece-row { display:flex; gap:6px; align-items:center; }
.sep-adm-piece-input { flex:1; background:var(--panel-3); border:1px solid var(--line); border-radius:8px; color:var(--text); padding:7px 10px; font-size:12px; }
.sep-adm-piece-del, .sep-adm-piece-del-new { background:none; border:none; cursor:pointer; color:var(--muted); font-size:12px; padding:4px 8px; border-radius:6px; }
.sep-adm-piece-del:hover, .sep-adm-piece-del-new:hover { color:#f87171; background:rgba(239,68,68,.1); }

/* Admin â€“ Colunas */
.admin-cols-list { display:flex; flex-direction:column; gap:8px; max-width:700px; }
.admin-col-row { display:flex; align-items:center; gap:10px; background:var(--panel-2); border:1px solid var(--line); border-radius:10px; padding:10px 14px; }
.admin-col-label { flex:1; background:var(--panel-3); border:1px solid var(--line); border-radius:8px; color:var(--text); padding:8px 10px; font-size:13px; min-width:0; }
.admin-col-id-badge { font-size:11px; color:var(--muted); background:var(--panel-3); border:1px solid var(--line); padding:3px 8px; border-radius:6px; white-space:nowrap; }
.admin-col-color { width:34px; height:34px; border:none; border-radius:8px; cursor:pointer; padding:2px; background:none; }
.admin-col-color-wrap { display:flex; align-items:center; gap:4px; }
.admin-col-color-reset { background:transparent; border:1px solid var(--line); color:var(--muted); border-radius:6px; width:22px; height:22px; font-size:11px; cursor:pointer; display:flex; align-items:center; justify-content:center; line-height:1; }
.admin-col-color-reset:disabled { opacity:.3; cursor:not-allowed; }
.admin-col-order-btns { display:flex; flex-direction:column; gap:2px; }
.admin-col-btn-up,.admin-col-btn-down { background:var(--panel-3); border:1px solid var(--line); color:var(--muted); border-radius:4px; width:22px; height:19px; font-size:9px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.admin-col-btn-up:disabled,.admin-col-btn-down:disabled { opacity:.3; cursor:not-allowed; }

/* Admin â€“ Tema */
.admin-theme-options { display:flex; gap:20px; flex-wrap:wrap; margin-top:4px; }
.admin-theme-option { display:flex; flex-direction:column; align-items:center; gap:10px; cursor:pointer; }
.admin-theme-option input { display:none; }
.admin-theme-option span { font-size:13px; color:var(--muted); font-weight:600; }
.admin-theme-option.is-active span { color:var(--green); }
.admin-theme-preview { width:128px; height:86px; border-radius:10px; border:2px solid var(--line); overflow:hidden; transition:border-color .2s; }
.admin-theme-option.is-active .admin-theme-preview { border-color:var(--green); box-shadow:0 0 0 3px rgba(120,214,75,.18); }
.admin-theme-preview-bar { height:20px; }
.admin-theme-preview-cols { display:flex; gap:4px; padding:5px; height:calc(100% - 20px); }
.admin-theme-preview-cols > div { flex:1; border-radius:5px; }
.admin-theme-dark { background:#0d1115; }
.admin-theme-dark .admin-theme-preview-bar { background:#161d25; }
.admin-theme-dark .admin-theme-preview-cols > div { background:#12181f; border:1px solid rgba(255,255,255,.07); }
.admin-theme-light { background:#f0f2f5; }
.admin-theme-light .admin-theme-preview-bar { background:#e4e8ed; }
.admin-theme-light .admin-theme-preview-cols > div { background:#fff; border:1px solid rgba(0,0,0,.09); }

/* Admin â€“ UsuÃ¡rios */
.admin-users-list { display:flex; flex-direction:column; gap:8px; max-width:760px; }
.admin-user-row { display:flex; align-items:center; gap:10px; padding:10px 14px; flex-wrap:wrap; }
.admin-user-name { flex:1; background:var(--panel-3); border:1px solid var(--line); border-radius:8px; color:var(--text); padding:8px 10px; font-size:13px; min-width:0; }
.admin-user-role-wrap { display:flex; align-items:center; gap:4px; }
.admin-user-role { background:var(--panel-3); border:1px solid var(--line); border-radius:8px; color:var(--text); padding:8px 10px; font-size:13px; width:120px; }
.admin-role-master-badge { font-size:14px; color:var(--yellow); line-height:1; flex-shrink:0; }
.admin-user-active { width:17px; height:17px; cursor:pointer; accent-color:var(--green); flex-shrink:0; }
.admin-user-delete { padding:6px 10px !important; font-size:12px !important; }
.admin-perm-toggle { font-size:12px !important; padding:6px 12px !important; white-space:nowrap; }
.admin-perm-toggle.is-active { background:rgba(120,214,75,.12); color:var(--green); border-color:rgba(120,214,75,.3); }
.admin-user-block { display:flex; flex-direction:column; background:var(--panel-2); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.admin-user-block .admin-user-row { background:transparent; border:none; border-radius:0; margin:0; }
.admin-perm-panel { border-top:1px solid var(--line); padding:16px 20px; display:flex; flex-direction:column; gap:16px; background:rgba(0,0,0,.12); }
[data-theme="light"] .admin-perm-panel { background:rgba(0,0,0,.03); }
.admin-perm-group { display:flex; flex-direction:column; gap:8px; }
.admin-perm-group-title { margin:0; font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.1em; font-weight:700; }
.admin-perm-checks { display:flex; flex-direction:column; gap:6px; }
.admin-perm-cols-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:12px; }
.admin-perm-col-section { display:flex; flex-direction:column; gap:8px; }
.perm-cols-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:4px 12px; padding-left:4px; transition:opacity .2s; }
.perm-all-cols-row { border-bottom:1px solid var(--line); padding-bottom:8px; }
.perm-check-row { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:13px; color:var(--text); user-select:none; }
.perm-check-row input[type="checkbox"] { width:15px; height:15px; accent-color:var(--green); cursor:pointer; flex-shrink:0; }
.admin-perm-save-row { display:flex; justify-content:flex-end; padding-top:4px; }
.danger-button { color:var(--red) !important; border-color:rgba(243,106,83,.28) !important; }
.danger-button:hover { background:rgba(243,106,83,.1) !important; }
.danger-button:disabled { opacity:.4; cursor:not-allowed; }

/* overlay escuro atrÃ¡s do painel lateral no mobile */
.detail-panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 49;
}
@media (max-width: 768px) {
  .detail-panel-backdrop.is-visible { display: block; }
}

/* â”€â”€ Mobile pequeno: â‰¤ 480px â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 480px) {
  .logo-text-img { height: 22px; }
  .logo-arrow-img { height: 22px; }
  .logo-flow-wrap { padding-right: 30px; }
  .view-button { padding: 4px 7px; font-size: 10px; }
  .ghost-button { padding: 4px 7px; font-size: 10px; height: 26px; }
  .logout-button { width: 26px; height: 26px; }
  .role-select { height: 26px; font-size: 10px; }

  .finance-summary { grid-template-columns: 1fr; }
  .finance-card strong { font-size: 20px; }
  .dashboard-metrics { grid-template-columns: 1fr; }

  .column { width: 252px; min-width: 252px; }
  .detail-panel { height: 80vh; }
}

/* â”€â”€ Tela de Login â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: #0e1117;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #13161f;
  border: 1px solid #1e2d1e;
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.login-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4ade80;
  margin: 0 0 6px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
  margin: 0 0 28px;
}

.login-form { display: flex; flex-direction: column; gap: 14px; }

.login-error {
  color: #f87171;
  font-size: 13px;
  margin: 0;
  padding: 10px 12px;
  background: rgba(248,113,113,0.1);
  border-radius: 6px;
}

.login-submit { width: 100%; justify-content: center; margin-top: 6px; padding: 12px; font-size: 15px; height: auto; border-radius: 12px; }

.logout-button { width:var(--tb-h); height:var(--tb-h); padding:0; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(239,68,68,.08); color:#f87171; border:1px solid rgba(239,68,68,.18); }
.logout-button:hover { background:rgba(239,68,68,.18); color:#ef4444; border-color:rgba(239,68,68,.35); }
.logout-button svg { width:clamp(14px,1.1vw,16px); height:clamp(14px,1.1vw,16px); flex-shrink:0; }

/* â”€â”€ Painel de Problemas de Corte â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cut-panel { display: flex; flex-direction: column; gap: 14px; }

.cut-problems-list { display: flex; flex-direction: column; gap: 6px; }

.cut-problem-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  flex-wrap: wrap;
}

.cut-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: #1e2d1e;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cut-tag-error {
  background: rgba(248,113,113,0.15);
  color: #f87171;
}

.cut-problem-date {
  font-size: 10px;
  color: #6b7280;
  margin-left: auto;
}

.cut-remove-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.cut-remove-btn:hover { color: #f87171; background: rgba(248,113,113,0.1); }

.cut-empty { font-size: 13px; color: #6b7280; margin: 4px 0; }

.cut-form { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #1e2d1e; padding-top: 14px; }

.cut-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cut-form-row .form-field { flex: 1; min-width: 120px; }

.cut-add-btn { align-self: flex-start; }

/* â”€â”€ Card de ReposiÃ§Ã£o â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-card.is-reposition {
  border-left: 3px solid #f59e0b;
  background: rgba(245,158,11,0.06);
}

.reposition-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f59e0b;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

/* â”€â”€ Card com problemas â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-card.has-cut-problems {
  border-left: 3px solid #f87171;
}

.problems-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #f87171;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

/* ── Card com erro na Calandra (visível em qualquer coluna) ── */
.kanban-card.has-calandra-error {
  border-color: rgba(236,72,153,.35);
  border-right: 5px solid #ec4899;
  background: linear-gradient(180deg, rgba(236,72,153,.08), #101419);
}
.kanban-card.has-calandra-error .card-client { color: #f9a8d4; }
.kanban-card.has-calandra-error .stage-chip { background: rgba(236,72,153,.14); color: #f472b6; }

/* ── Card com erro na Laser (visível em qualquer coluna) ── */
.kanban-card.has-laser-error {
  border-color: rgba(245,158,11,.35);
  border-left: 5px solid #f59e0b;
  background: linear-gradient(180deg, rgba(245,158,11,.08), #101419);
}
.kanban-card.has-laser-error .card-client { color: #fcd34d; }
.laser-error-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

/* ── Card com corte parcial na laser (pronto p/ separação) ── */
.kanban-card.has-partial-cut {
  border-color: rgba(251,191,36,.5);
  border-left: 5px solid #fbbf24;
  background: linear-gradient(180deg, rgba(251,191,36,.12), #101419);
  animation: partialCutPulse 2s ease-in-out infinite;
}
@keyframes partialCutPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } 50% { box-shadow: 0 0 12px 2px rgba(251,191,36,.2); } }
.partial-cut-badge {
  display: inline-block; font-size: 9px; font-weight: 700; color: #fbbf24;
  background: rgba(251,191,36,.15); border: 1px solid rgba(251,191,36,.35);
  border-radius: 4px; padding: 2px 6px; margin-bottom: 4px; letter-spacing: .03em;
}

/* ── Card com AMBOS os erros (calandra + laser) ── */
.kanban-card.has-calandra-error.has-laser-error {
  border-left: 4px solid #f59e0b;
  border-right: 4px solid #ec4899;
  background: linear-gradient(180deg, rgba(236,72,153,.06), rgba(245,158,11,.06), #101419);
}

/* ── Card com AMBOS os erros (calandra + corte) ── */
.kanban-card.has-calandra-error.has-cut-problems {
  border-left: 4px solid #f87171;
  border-right: 4px solid #ec4899;
  background: linear-gradient(180deg, rgba(239,68,68,.06), rgba(236,72,153,.06), #101419);
}
.calandra-error-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #f472b6;
  background: rgba(236,72,153,0.12);
  border: 1px solid rgba(236,72,153,0.25);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

/* ── Cards agrupados (aguardando reposição) ─────────────────── */
.kanban-card.is-grouped {
  border: 2px solid rgba(96,165,250,.5);
  background: linear-gradient(180deg, rgba(96,165,250,.08), rgba(16,20,25,.98));
  box-shadow: 0 0 0 1px rgba(96,165,250,.12) inset, 0 16px 30px rgba(0,0,0,.24);
}
.kanban-card.is-grouped .card-client { color: #93c5fd; }
.grouped-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(96,165,250,.12);
  border: 1px solid rgba(96,165,250,.25);
  white-space: nowrap;
}

/* ── Modal Calandra ─────────────────────────────────────────── */
.calandra-edit-body { padding: 0 4px; }
.calandra-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.calandra-info-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 14px;
}
.calandra-info-card.full { grid-column: 1 / -1; }
.calandra-info-card .calandra-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.calandra-info-card .calandra-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
}
.calandra-info-card .calandra-value.alert { color: #f59e0b; }
.calandra-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.calandra-confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(120,214,75,.06);
  border: 1px solid rgba(120,214,75,.15);
  margin-bottom: 10px;
  cursor: pointer;
}
.calandra-confirm-row input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: var(--green); cursor: pointer;
}
.calandra-confirm-row span { font-size: 14px; font-weight: 600; }
.calandra-error-section {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(239,68,68,.05);
  border: 1px solid rgba(239,68,68,.12);
}
.calandra-error-section.active {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.3);
}
.calandra-error-section textarea {
  width: 100%;
  margin-top: 10px;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px;
  color: var(--text);
  padding: 10px;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
}
.calandra-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.calandra-actions .ghost-button { flex: 1; }
.calandra-bobbin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.calandra-bobbin-grid .form-field { margin: 0; }
.calandra-bobbin-grid input {
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: var(--text);
  padding: 8px;
  font-size: 13px;
  width: 100%;
}
.calandra-bobbin-grid label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

/* ── Painel lateral read-only hint ──────────────────────────── */
.detail-edit-hint {
  text-align: center;
  padding: 10px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

/* â”€â”€ BotÃ£o e hint de reposiÃ§Ã£o no painel de corte â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cut-reposition-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #1e2d1e;
  padding-top: 14px;
  margin-top: 4px;
}

.cut-reposition-btn {
  align-self: flex-start;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}
.cut-reposition-btn:hover {
  background: rgba(245,158,11,0.1) !important;
}

.cut-reposition-hint {
  font-size: 11px;
  color: #6b7280;
}

/* â”€â”€ Painel de detalhe â€” ReposiÃ§Ã£o â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.reposition-detail-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 8px;
}

.reposition-image-section { padding-top: 0; }
.reposition-ref-image {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #1e2d1e;
  background: #0e1117;
}

.reposition-problems-list {
  font-size: 12px;
  line-height: 1.7;
  color: #f87171;
}

/* â”€â”€ Bloco de impacto de reposiÃ§Ã£o no pedido original â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.reposition-impact-block {
  margin-top: 14px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reposition-impact-title {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reposition-impact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #d1d5db;
}

.impact-cost     { color: #f87171; font-weight: 700; }
.impact-negative { color: #f87171; font-weight: 700; }
.impact-reduced  { color: #fbbf24; font-weight: 700; }

.reposition-impact-note {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

/* ── Estorno / Reversal ──────────────────────────────────────────────────── */
.ghost-button-warn {
  background: rgba(239,68,68,.12);
  color: #f87171;
  border-color: rgba(239,68,68,.3);
}
.ghost-button-warn:hover { background: rgba(239,68,68,.22); }

.detail-reversal-section { margin-top: 8px; }
.detail-reversal-section .ghost-button-warn { width: 100%; text-align: center; }

.reversal-pending-badge {
  padding: 8px 12px;
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.25);
  border-radius: 10px;
  color: #fbbf24;
  font-size: 13px;
  text-align: center;
}

/* Botão sino no topbar */
.reversal-bell-btn {
  position: relative;
  font-size: 16px;
  padding: 8px 12px;
}
.reversal-badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Painel flutuante de notificações de estorno */
.reversal-notif-panel {
  position: fixed;
  top: 70px;
  right: 16px;
  width: 420px;
  max-height: 80vh;
  background: var(--panel-1, #0d1115);
  border: 1px solid var(--line, #1e2732);
  border-radius: 16px;
  flex-direction: column;
  z-index: 9000;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  overflow: hidden;
}
.reversal-notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line, #1e2732);
}
.reversal-notif-header h3 { margin: 0; font-size: 15px; }
.reversal-notif-close {
  background: transparent;
  border: none;
  color: var(--muted, #6b7280);
  font-size: 18px;
  cursor: pointer;
}
.reversal-notif-list {
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(80vh - 60px);
}
.reversal-empty {
  text-align: center;
  color: var(--muted, #6b7280);
  font-size: 13px;
  padding: 20px 0;
}
.reversal-group-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted, #6b7280);
  margin: 4px 0 2px;
}
.reversal-notif-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, #1e2732);
  background: var(--panel-2, #121820);
}
.reversal-notif-item.reversal-pending {
  border-color: rgba(251,191,36,.25);
  background: rgba(251,191,36,.05);
}
.reversal-notif-item.reversal-approved {
  border-color: rgba(120,214,75,.2);
  background: rgba(120,214,75,.04);
}
.reversal-notif-item.reversal-denied {
  border-color: rgba(239,68,68,.2);
  background: rgba(239,68,68,.04);
}
.reversal-notif-info strong {
  font-size: 14px;
}
.reversal-reason {
  font-size: 13px;
  color: var(--text, #e5e7eb);
  margin: 4px 0 2px;
}
.reversal-meta {
  font-size: 11px;
  color: var(--muted, #6b7280);
  display: block;
}
.reversal-notif-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.reversal-notif-actions .ghost-button {
  flex: 1;
  text-align: center;
  padding: 7px 10px;
  font-size: 13px;
}
.reversal-approve-btn { background: rgba(120,214,75,.12); color: var(--green, #78d64b); border-color: rgba(120,214,75,.3); }
.reversal-approve-btn:hover { background: rgba(120,214,75,.22); }
.reversal-deny-btn { background: rgba(239,68,68,.12); color: #f87171; border-color: rgba(239,68,68,.3); }
.reversal-deny-btn:hover { background: rgba(239,68,68,.22); }

/* ── PLANNER ──────────────────────────────────────────────────────────────── */
:root {
  --planner-green: #4ade80;
  --planner-yellow: #f59e0b;
  --planner-orange: #f97316;
  --planner-red: #ef4444;
  --planner-card-bg: var(--panel-3);
  --planner-day-bg: var(--panel-2);
  --planner-weekend-bg: rgba(255,255,255,.02);
  --planner-outside-bg: rgba(0,0,0,.15);
}
/* ── SEPARAÇÃO WORKSPACE ──────────────────────────────────────────────────── */
/* ── SEPARAÇÃO v2 ── */
.sep-mat-bar { display:flex; gap:6px; flex-wrap:wrap; align-items:center; padding:10px 14px; border-radius:10px; background:rgba(255,255,255,.03); border:1px solid var(--line); margin-bottom:14px; }
.sep-mat-label { color:var(--muted); font-size:11px; text-transform:uppercase; margin-right:2px; }
.sep-mat-btn { padding:6px 14px; font-size:12px; border-radius:8px; border:1px solid var(--line); background:transparent; color:var(--muted); cursor:pointer; }
.sep-mat-btn.is-current { background:rgba(120,214,75,.2); color:var(--green); border-color:rgba(120,214,75,.4); font-weight:700; }
.sep-mat-btn.is-checked { background:rgba(96,165,250,.12); color:#93c5fd; border-color:rgba(96,165,250,.25); }
.sep-ok-btn { margin-left:auto; padding:6px 14px; font-size:11px; border-radius:8px; border:1px solid rgba(120,214,75,.25); background:transparent; color:#4ade80; cursor:pointer; }
.sep-ok-btn:hover { background:rgba(120,214,75,.1); }
.sep-pieces-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:12px; }
.sep-tile { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:72px; border-radius:12px; border:2px solid var(--line); background:var(--panel-3); cursor:pointer; transition:border-color .15s, background .15s; user-select:none; }
.sep-tile:hover { border-color:rgba(120,214,75,.4); background:rgba(120,214,75,.06); }
.sep-tile.is-sel { border-color:var(--green); background:rgba(120,214,75,.14); }
.sep-tile-full { grid-column: 1 / -1; min-height:52px; }
.sep-tile.has-err { border-color:rgba(239,68,68,.45); background:rgba(239,68,68,.08); }
.sep-tile.is-sel.has-err { border-color:#f87171; background:rgba(239,68,68,.15); }
.sep-tile-name { font-size:12px; font-weight:700; color:var(--text); text-align:center; padding:0 6px; }
.sep-tile.is-sel .sep-tile-name { color:var(--green); }
.sep-tile.has-err .sep-tile-name { color:#f87171; }
.sep-tile-badge { position:absolute; top:6px; right:8px; background:#ef4444; color:#fff; font-size:10px; font-weight:700; border-radius:10px; padding:1px 6px; }
.sep-reg-panel { background:rgba(120,214,75,.05); border:1px solid rgba(120,214,75,.2); border-radius:12px; padding:14px 16px; margin-bottom:12px; display:flex; flex-direction:column; gap:10px; }
.sep-reg-header { display:flex; align-items:center; gap:8px; }
.sep-reg-piece { font-size:14px; font-weight:700; color:var(--green); }
.sep-reg-step { font-size:11px; color:var(--muted); }
.sep-reg-sizes { display:flex; gap:6px; flex-wrap:wrap; }
.sep-size-chip { padding:7px 13px; border-radius:8px; border:1px solid var(--line); background:var(--panel-3); color:var(--muted); cursor:pointer; font-size:13px; font-weight:600; transition:background .12s, color .12s; }
.sep-size-chip:hover { border-color:rgba(120,214,75,.4); color:var(--text); }
.sep-size-chip.is-active { background:rgba(120,214,75,.18); color:var(--green); border-color:rgba(120,214,75,.4); }
.sep-reg-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sep-qty-ctrl { display:flex; align-items:center; gap:0; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.sep-qty-btn { width:34px; height:34px; background:var(--panel-3); border:none; color:var(--text); font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.sep-qty-btn:hover { background:rgba(255,255,255,.08); }
.sep-qty-num { min-width:34px; text-align:center; font-size:14px; font-weight:700; color:var(--text); padding:0 4px; }
.sep-error-sel { flex:1; min-width:120px; padding:7px 10px; border-radius:8px; border:1px solid var(--line); background:var(--panel-2); color:var(--text); font-size:12px; }
.sep-add-btn { white-space:nowrap; padding:7px 18px !important; font-size:13px !important; }
.sep-reg-hint { text-align:center; color:var(--muted); font-size:12px; padding:14px; border:1px dashed var(--line); border-radius:12px; margin-bottom:12px; }
.sep-problems-section { background:var(--panel-2); border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
.sep-problems-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; font-size:13px; font-weight:700; color:var(--text); }
.sep-problems-count { font-size:12px; font-weight:600; color:var(--muted); }
.sep-problems-count.has-issues { color:var(--green); }
.sep-problems-list { display:flex; flex-direction:column; gap:6px; }
.sep-problem-row { display:flex; justify-content:space-between; align-items:center; padding:7px 10px; background:var(--panel-3); border:1px solid var(--line); border-radius:8px; }
.sep-problem-info { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:12px; }
.sep-problem-piece { font-weight:700; color:var(--text); }
.sep-problem-dot { color:var(--line); }
.sep-problem-size { color:var(--green); font-weight:600; }
.sep-problem-qty { color:var(--text); font-weight:600; }
.sep-problem-error { color:#f87171; font-size:11px; }
.sep-problem-name { color:#fbbf24; font-size:11px; font-weight:600; }
.sep-name-input { flex:1; min-width:90px; padding:7px 10px; border-radius:8px; border:1px solid var(--line); background:var(--panel-2); color:var(--text); font-size:12px; }
.sep-remove { background:none; border:none; cursor:pointer; color:var(--muted); font-size:11px; padding:2px 6px; border-radius:4px; }
.sep-remove:hover { color:#f87171; background:rgba(239,68,68,.1); }
.sep-empty-msg { color:var(--muted); font-size:12px; text-align:center; padding:8px 0; }
/* ── Produto seleção ── */
.sep-prod-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.sep-prod-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.sep-prod-card { background:var(--panel-3); border:2px solid var(--line); border-radius:12px; padding:14px 16px; cursor:pointer; transition:border-color .15s,background .15s; }
.sep-prod-card:hover { border-color:var(--green); background:rgba(120,214,75,.08); }
.sep-prod-name { display:block; font-size:14px; font-weight:700; color:var(--text); margin-bottom:4px; }
.sep-prod-pieces { display:block; font-size:11px; color:var(--muted); line-height:1.4; }
/* Chip do produto ativo na barra de material */
.sep-prod-chip { display:inline-flex; align-items:center; padding:4px 10px; border-radius:20px; background:rgba(120,214,75,.15); border:1px solid rgba(120,214,75,.35); color:var(--green); font-size:11px; font-weight:700; cursor:pointer; user-select:none; }
.sep-prod-chip:hover { background:rgba(120,214,75,.25); }
/* Novo produto: lista de inputs de peças */
.sep-new-pieces-list { display:flex; flex-direction:column; gap:6px; }
.sep-new-piece-input { width:100%; box-sizing:border-box; padding:7px 10px; border-radius:8px; border:1px solid var(--line); background:var(--panel-2); color:var(--text); font-size:12px; }
.sep-ok-product-btn { width:100%; margin-top:10px; padding:13px; border-radius:12px; border:2px solid rgba(120,214,75,.4); background:rgba(120,214,75,.1); color:var(--green); font-size:14px; font-weight:700; cursor:pointer; transition:background .15s, border-color .15s; }
.sep-ok-product-btn:hover { background:rgba(120,214,75,.2); border-color:rgba(120,214,75,.7); }
.sep-ok-product-btn:disabled { opacity:.5; cursor:not-allowed; }
@media (max-width:600px) { .sep-pieces-grid { grid-template-columns:repeat(2,1fr); } .sep-reg-controls { flex-direction:column; align-items:stretch; } }

.planner-btn { background:rgba(120,214,75,.08) !important; border-color:rgba(120,214,75,.25) !important; }
.planner-btn.is-active { background:rgba(120,214,75,.18) !important; border-color:rgba(120,214,75,.45) !important; color:var(--green) !important; }
#plannerContainer { font-size:14px; }
.planner-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:0.85em; margin-bottom:1.1em; }
.planner-header-left { display:flex; flex-direction:column; gap:2px; }
.planner-header-nav { display:flex; align-items:center; gap:0.5em; flex-wrap:wrap; }
.planner-header-nav button { padding:0.4em 1em; font-size:0.85em; }
.planner-month-title { font-size:1.3em; font-weight:700; min-width:10em; text-align:center; }
.planner-capacity-label { font-size:0.85em; color:var(--muted); }
.planner-zoom-group { display:flex; gap:0.25em; margin-left:0.5em; }
.planner-zoom-btn { padding:0.25em 0.6em; font-size:0.75em; border-radius:6px; background:var(--panel-3); border:1px solid var(--line); color:var(--muted); cursor:pointer; }
.planner-zoom-btn.is-active { background:rgba(120,214,75,.14); color:var(--green); border-color:rgba(120,214,75,.3); }
.planner-weekday-header { display:grid; grid-template-columns:repeat(7, 1fr); gap:0.3em; margin-bottom:0.3em; }
.planner-weekday-header span { text-align:center; font-size:0.78em; font-weight:700; text-transform:uppercase; color:var(--muted); padding:0.4em 0; }
.planner-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:0.3em; }
.planner-day { background:var(--planner-day-bg); border:1px solid var(--line); border-radius:0.7em; padding:0.55em; min-height:8.5em; display:flex; flex-direction:column; gap:0.3em; transition:border-color .2s; }
.planner-day.is-today { border-color:var(--green); border-width:2px; }
.planner-day.is-weekend { background:var(--planner-weekend-bg); }
.planner-day.is-outside { background:var(--planner-outside-bg); border-color:transparent; min-height:2.8em; }
.planner-day.is-overload { background:rgba(239,68,68,.06); border-color:rgba(239,68,68,.25); }
.planner-day-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:0.3em; }
.planner-day-number { font-size:0.92em; font-weight:700; color:var(--text); }
.planner-day.is-outside .planner-day-number { color:var(--muted); opacity:.4; }
.planner-day-counter { font-size:0.72em; font-weight:600; color:var(--muted); }
.planner-day.is-overload .planner-day-counter { color:var(--planner-red); }
.planner-capacity-bar { height:0.28em; border-radius:0.14em; background:rgba(255,255,255,.06); overflow:hidden; }
.planner-capacity-fill { height:100%; border-radius:0.14em; transition:width .3s; }
.planner-capacity-fill.green { background:var(--planner-green); }
.planner-capacity-fill.yellow { background:var(--planner-yellow); }
.planner-capacity-fill.orange { background:var(--planner-orange); }
.planner-capacity-fill.red { background:var(--planner-red); }
.planner-day-cards { display:flex; flex-direction:column; gap:0.2em; max-height:14em; overflow-y:auto; flex:1; }
.planner-card { background:var(--planner-card-bg); border:1px solid var(--line); border-radius:0.4em; padding:0.4em 0.5em; font-size:0.78em; line-height:1.35; }
.planner-card.is-late { border-color:rgba(239,68,68,.4); background:rgba(239,68,68,.06); }
.planner-card-top { display:flex; justify-content:space-between; gap:0.3em; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.planner-card-bottom { display:flex; justify-content:space-between; gap:0.3em; color:var(--muted); font-size:0.88em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.planner-markers { display:flex; flex-wrap:wrap; gap:0.15em; margin-top:0.15em; }
.planner-marker { display:inline-flex; align-items:center; padding:0.1em 0.3em; border-radius:0.2em; font-size:0.68em; font-weight:700; line-height:1; letter-spacing:0.02em; text-transform:uppercase; }
.planner-marker.marker-stage { background:rgba(255,255,255,.08); color:var(--muted); }
.planner-marker.marker-urgente { background:rgba(239,68,68,.15); color:#f87171; }
.planner-marker.marker-alta { background:rgba(245,158,11,.15); color:#f59e0b; }
.planner-marker.marker-baixa { background:rgba(107,114,128,.15); color:#9ca3af; }
.planner-marker.marker-atencao { background:rgba(245,158,11,.12); color:#f59e0b; }
.planner-marker.marker-planejado_apos_prazo { background:rgba(239,68,68,.12); color:#f87171; }
.planner-marker.marker-atrasado { background:rgba(220,38,38,.18); color:#ef4444; }
.planner-marker.marker-responsible { background:rgba(96,165,250,.12); color:#60a5fa; }
.planner-marker.marker-overflow { background:rgba(255,255,255,.05); color:var(--muted); font-size:0.6em; }
.planner-priority-trigger { background:none; border:none; padding:0.1em 0.2em; font-size:0.7em; color:var(--muted); cursor:pointer; opacity:.4; transition:opacity .2s; line-height:1; flex-shrink:0; }
.planner-card:hover .planner-priority-trigger { opacity:.8; }
.planner-priority-trigger:hover { opacity:1 !important; color:var(--green); }
.planner-priority-trigger.has-priority { opacity:.7; }
.planner-priority-popover { position:fixed; z-index:50; background:var(--panel-3); border:1px solid var(--line); border-radius:10px; padding:0.4em; box-shadow:0 12px 40px rgba(0,0,0,.5); backdrop-filter:blur(12px); min-width:9em; }
.planner-priority-option { display:flex; align-items:center; gap:0.5em; padding:0.4em 0.6em; border-radius:6px; cursor:pointer; font-size:0.82em; font-weight:500; color:var(--text); border:none; background:none; width:100%; text-align:left; }
.planner-priority-option:hover { background:rgba(255,255,255,.06); }
.planner-priority-option.is-active { background:rgba(120,214,75,.1); font-weight:700; }
.planner-priority-option[disabled] { opacity:.4; cursor:wait; }
.planner-priority-dot { width:0.6em; height:0.6em; border-radius:50%; flex-shrink:0; }
.planner-priority-dot.dot-urgente { background:#f87171; }
.planner-priority-dot.dot-alta { background:#f59e0b; }
.planner-priority-dot.dot-normal { background:#6b7280; }
.planner-priority-dot.dot-baixa { background:#4b5563; }
.planner-tooltip { position:fixed; z-index:60; background:var(--panel-3); border:1px solid var(--line); border-radius:12px; padding:12px 16px; box-shadow:0 12px 40px rgba(0,0,0,.5); max-width:280px; pointer-events:none; animation:plannerTooltipIn .15s ease; }
@keyframes plannerTooltipIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.planner-tooltip-title { font-size:13px; font-weight:700; color:var(--text); margin-bottom:8px; padding-bottom:6px; border-bottom:1px solid var(--line); }
.planner-tooltip-rows { display:flex; flex-direction:column; gap:3px; }
.planner-tooltip-row { display:flex; justify-content:space-between; gap:12px; }
.planner-tooltip-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); white-space:nowrap; }
.planner-tooltip-value { font-size:12px; color:var(--text); text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.planner-card[draggable="true"] { cursor:grab; }
.planner-card[draggable="true"]:active { cursor:grabbing; }
.planner-card.dragging { opacity:.4; }
.planner-day.drag-over-ok { border-color:var(--green) !important; background:rgba(120,214,75,.08); }
.planner-day.drag-over-warn { border-color:var(--planner-red) !important; background:rgba(239,68,68,.08); }
.planner-day.drag-over-blocked { border-color:var(--muted) !important; background:rgba(255,255,255,.03); opacity:.6; }
.planner-saving-overlay { position:absolute; inset:0; background:rgba(0,0,0,.3); display:flex; align-items:center; justify-content:center; border-radius:0.7em; z-index:5; font-size:0.78em; color:var(--muted); pointer-events:none; }
@media (max-width:768px) {
  .planner-grid { grid-template-columns:1fr; }
  .planner-weekday-header { display:none; }
  .planner-day { min-height:auto; }
  .planner-day.is-outside { display:none; }
  .planner-zoom-group { display:none; }
}

/* Modal de orçamento (Publicidade) */
.orcamento-body .form-field { position: relative; margin-bottom: 12px; }
.orc-item-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 14px; }
.orc-prod-wrap { position: relative; flex: 1 1 220px; min-width: 200px; }
.orc-prod-wrap .field-input { width: 100%; }
.suggestions-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px);
  background: #11161d; border: 1px solid var(--line); border-radius: 10px;
  max-height: 240px; overflow-y: auto; box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.suggestion-item { padding: 9px 12px; font-size: 13px; cursor: pointer; color: var(--text); }
.suggestion-item:hover,
.suggestion-item.is-active { background: rgba(120,214,75,.16); color: var(--green); }
.orc-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 13px; }
.orc-table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.orc-table td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.05); }
.orc-table td:nth-child(4) { font-weight: 700; color: var(--green); white-space: nowrap; }
.orc-del { background: transparent; border: 0; color: #f87171; cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.orc-del:hover { background: rgba(239,68,68,.12); }
.orc-totals { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 8px 0 14px; }
.orc-discount { display: flex; align-items: center; gap: 8px; }
.orc-discount label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.orc-total-label { font-size: 18px; font-weight: 700; color: var(--muted); }
.orc-total-label strong { color: var(--green); font-size: 22px; }
.orc-payments { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.orc-pay-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.orc-pay-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.orc-falta { font-weight: 700; }
.orc-pay-line-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.orc-pay-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.orc-pay-grid .form-field { margin-bottom: 0; }
@media (max-width: 640px) { .orc-pay-grid { grid-template-columns: 1fr; } }
.orc-pay-info { font-size: 12px; color: #f1c40f; margin-top: 8px; }
.orc-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Detalhe (visualização) do card de Publicidade */
.pub-view-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
.pub-view-meta > div { display: flex; flex-direction: column; gap: 2px; }
.pub-view-meta span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pub-view-meta strong { font-size: 14px; }
.pub-view-payments { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.pub-view-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.pub-view-pay-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; }
.pub-view-total { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin-bottom: 14px; }
.pub-view-total > div { display: flex; gap: 10px; align-items: baseline; }
.pub-view-total span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pub-view-total strong { font-size: 16px; color: var(--green); }
.pub-view-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
/* Anexos (prints) do orçamento */
.orc-attachments { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.orc-attach-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.orc-attach-thumb { position: relative; width: 88px; height: 88px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.orc-attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.orc-attach-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; }

/* Sub-rótulo de ambiente nas listas de colunas do perfil */
.perm-col-ws-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green); margin: 4px 0 4px; opacity: .85; }

/* Editor de colunas: abas Confecção | Publicidade */
.admin-cols-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.admin-cols-tab { appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 7px 16px; border-radius: 9px; cursor: pointer; }
.admin-cols-tab.is-active { background: rgba(120,214,75,.16); color: var(--green); box-shadow: 0 0 0 1px rgba(120,214,75,.25) inset; }
.admin-col-flags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-col-flags label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.admin-col-del { background: transparent; border: 0; color: #f87171; cursor: pointer; font-size: 15px; padding: 2px 6px; border-radius: 6px; }
.admin-col-del:hover { background: rgba(239,68,68,.12); }

/* Toggle de workspace (Confecção | Publicidade). */
.workspace-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin: 0 0 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 12px;
}
/* Variante global na topbar (seletor de ambiente). */
.workspace-switch-global {
  margin: 0 14px;
  align-self: center;
  background: rgba(120,214,75,.06);
  border-color: rgba(120,214,75,.2);
}
.workspace-switch-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 0 8px 0 6px;
}
.workspace-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.workspace-button:hover { color: var(--text); }
.workspace-button.is-active {
  background: rgba(120,214,75,.16);
  color: var(--green);
  box-shadow: 0 0 0 1px rgba(120,214,75,.25) inset;
}

/* CALANDRA — exibe o bloco "Itens do pedido" no modo resumido também.
   O conteúdo já é gerado pelo JS (buildCardHoverDetails) e marcado com
   .is-visible; só estava sendo cortado pelo max-height:160px do card. */
.kanban-card.is-calandra {
  max-height: none;
  overflow: visible;
}

/* Card de publicidade: mostra os itens do orçamento no modo resumido também. */
.kanban-card.is-publicidade {
  max-height: none;
  overflow: visible;
}

/* Financeiro Publicidade: grupo de parcelas expansível (parcelado = laranja) */
.pub-rec-group-head:hover { background: rgba(245,158,11,.14) !important; }
.pub-group-caret { color: #f59e0b; font-size: 12px; font-weight: 600; white-space: nowrap; }

/* Recebido via cartão (laranja, total único — não vai pra contas a receber) */
.rec-group-cartao { border-color: rgba(245,158,11,.35) !important; background: rgba(245,158,11,.06) !important; }
.rec-cartao-badge { display:inline-block; background: rgba(245,158,11,.18); color:#f59e0b; border:1px solid rgba(245,158,11,.35); border-radius:999px; padding:2px 8px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; margin-left:6px; }

/* Modal da Calandra em 2 colunas: foto grande à esquerda, infos à direita. */
.calandra-2col {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 1fr);
  gap: 18px;
  align-items: start;
}
.calandra-2col-left { position: sticky; top: 0; }
.calandra-2col-left .calandra-ref-visual-big { margin-bottom: 0; }
.calandra-2col-right { min-width: 0; }
@media (max-width: 860px) {
  .calandra-2col { grid-template-columns: 1fr; }
  .calandra-2col-left { position: static; }
}

/* Card já aberto/conferido na calandra — marcador discreto. */
.kanban-card.is-calandra.calandra-visited {
  border-color: rgba(120,214,75,.45);
  box-shadow: 0 0 0 1px rgba(120,214,75,.25), 0 16px 30px rgba(0,0,0,.24);
}
.kanban-card.is-calandra.calandra-visited::before {
  content: "✓ Conferido";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(120,214,75,.16);
  border: 1px solid rgba(120,214,75,.3);
  border-radius: 999px;
  padding: 3px 8px;
  pointer-events: none;
}
.kanban-card.is-calandra { position: relative; }

