/* =====================================================================
   Canteiro · sistema visual
   ===================================================================== */
:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --surface-3: #f1efea;
  --ink: #1b1a17;
  --ink-2: #45423c;
  --muted: #7a756c;
  --line: #e8e4dd;
  --line-2: #d8d3c9;
  --accent: #ea580c;
  --accent-strong: #c2410c;
  --accent-soft: #fff0e6;
  --accent-ink: #ffffff;
  --ok: #16a34a;
  --ok-soft: #e7f6ec;
  --warn: #d97706;
  --warn-soft: #fdf3e1;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --info: #2563eb;
  --info-soft: #e9f0fe;
  --violet: #7c3aed;
  --violet-soft: #f0eafe;
  --slate: #475569;
  --slate-soft: #eef1f5;
  --series-in: #2a78d6;
  --series-in-planned: #9ec5f4;
  --series-out: #eb6834;
  --series-line: #45423c;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(24, 20, 14, .06);
  --shadow: 0 1px 2px rgba(24, 20, 14, .05), 0 6px 20px rgba(24, 20, 14, .06);
  --shadow-lg: 0 18px 50px rgba(24, 20, 14, .22);
  --sidebar: 236px;
  --topbar: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111110; --surface: #1a1918; --surface-2: #201f1d; --surface-3: #282623;
    --ink: #f2efea; --ink-2: #d4d0c8; --muted: #a29c92; --line: #2e2c29; --line-2: #3b3834;
    --accent: #fb923c; --accent-strong: #fdba74; --accent-soft: #3a2314; --accent-ink: #1a1918;
    --ok: #4ade80; --ok-soft: #12291a; --warn: #fbbf24; --warn-soft: #2d230e; --bad: #f87171; --bad-soft: #321616;
    --info: #93b4ff; --info-soft: #172038; --violet: #c4b5fd; --violet-soft: #241b3a; --slate: #cbd5e1; --slate-soft: #232830;
    --series-in: #3987e5; --series-in-planned: #2a4f7d; --series-out: #d95926; --series-line: #d4d0c8;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255, 255, 255, .02); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111110; --surface: #1a1918; --surface-2: #201f1d; --surface-3: #282623;
  --ink: #f2efea; --ink-2: #d4d0c8; --muted: #a29c92; --line: #2e2c29; --line-2: #3b3834;
  --accent: #fb923c; --accent-strong: #fdba74; --accent-soft: #3a2314; --accent-ink: #1a1918;
  --ok: #4ade80; --ok-soft: #12291a; --warn: #fbbf24; --warn-soft: #2d230e; --bad: #f87171; --bad-soft: #321616;
  --info: #93b4ff; --info-soft: #172038; --violet: #c4b5fd; --violet-soft: #241b3a; --slate: #cbd5e1; --slate-soft: #232830;
    --series-in: #3987e5; --series-in-planned: #2a4f7d; --series-out: #d95926; --series-line: #d4d0c8;
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255, 255, 255, .02); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 750; }
h2 { font-size: 1.08rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 650; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stack { display: grid; gap: 12px; }
.stack > *, .grid > * { min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt { margin-top: 16px; }
.mt-sm { margin-top: 8px; }
.gap-lg { gap: 18px; }

/* ---------------------------------------------------------------- boot */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 14px; text-align: center; color: var(--muted); }
.boot-logo { width: 46px; height: 46px; margin: 0 auto; border-radius: 14px; background: var(--accent); animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { transform: scale(.92); opacity: .7; } 50% { transform: scale(1); opacity: 1; } }

/* ---------------------------------------------------------------- casca */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; color: var(--ink); font-weight: 800; font-size: 1.08rem; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 4px; font-weight: 650; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2);
  font-weight: 560; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-link .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: .75rem; font-weight: 750; color: #fff; background: var(--slate);
}
.avatar.sm { width: 22px; height: 22px; font-size: .62rem; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 12px;
  padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-weight: 700; font-size: 1.02rem; }
.search-btn {
  margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 240px; padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.search-btn kbd { margin-left: auto; }
kbd { font-family: var(--mono); font-size: .72rem; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); }
.content { padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }
.view-enter-active { animation: fadeUp .25s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head p { color: var(--muted); margin-top: 4px; }

.bottom-nav { display: none; }
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 56px; height: 56px; border-radius: 18px; border: none;
  background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(234, 88, 12, .4);
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s;
}
.fab:hover { transform: translateY(-2px) scale(1.03); }
.fab:active { transform: scale(.96); }

/* ---------------------------------------------------------------- botões e campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; text-decoration: none;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(234, 88, 12, .25); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: .85rem; border-radius: 8px; }
.btn-icon { padding: 7px; width: 36px; height: 36px; }
.btn-icon.btn-sm { width: 30px; height: 30px; padding: 5px; }
.btn-block { width: 100%; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--line); gap: 2px; }
.seg button {
  border: none; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.field { display: grid; gap: 5px; }
.field > span { font-size: .78rem; font-weight: 650; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .seg button:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=range] { padding: 0; accent-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 550; cursor: pointer; }
.money-input { position: relative; }
.money-input::before { content: "R$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.money-input input { padding-left: 34px; font-variant-numeric: tabular-nums; font-weight: 650; }

/* ---------------------------------------------------------------- cartões, kpis e etiquetas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.kpi .label { display: flex; align-items: center; gap: 7px; font-size: .74rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-size: 1.42rem; font-weight: 780; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .hint { font-size: .78rem; color: var(--muted); }
.kpi.highlight { background: linear-gradient(135deg, var(--accent), #f97316); border-color: transparent; color: #fff; }
.kpi.highlight .label, .kpi.highlight .hint { color: rgba(255, 255, 255, .85); }
.kpi .kpi-icon { position: absolute; right: 12px; top: 12px; opacity: .12; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap; line-height: 1.6;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.accent { background: var(--accent-soft); color: var(--accent-strong); }
.badge.slate { background: var(--slate-soft); color: var(--slate); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.code-chip { font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--ink); color: var(--surface); }

.status-orcamento { --st: var(--violet); --st-soft: var(--violet-soft); }
.status-andamento { --st: var(--info); --st-soft: var(--info-soft); }
.status-concluido { --st: var(--warn); --st-soft: var(--warn-soft); }
.status-fechado { --st: var(--ok); --st-soft: var(--ok-soft); }
.status-cancelado { --st: var(--muted); --st-soft: var(--surface-3); }
.status-a_fazer { --st: var(--slate); --st-soft: var(--slate-soft); }
.status-fazendo { --st: var(--info); --st-soft: var(--info-soft); }
.status-feito { --st: var(--ok); --st-soft: var(--ok-soft); }
.st-badge { background: var(--st-soft); color: var(--st); }

.progress { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s var(--ease); }
.progress.ok > span { background: var(--ok); }
.progress.info > span { background: var(--info); }
.progress.bad > span { background: var(--bad); }
.progress.thin { height: 5px; }

/* listas */
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item.clickable { cursor: pointer; border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.list-item.clickable:hover { background: var(--surface-2); }
.date-chip { width: 50px; flex: none; text-align: center; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); padding: 4px 0; line-height: 1.15; }
.date-chip b { display: block; font-size: 1.1rem; }
.date-chip small { font-size: .62rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.date-chip.soon { border-color: var(--warn); background: var(--warn-soft); }
.date-chip.late { border-color: var(--bad); background: var(--bad-soft); }
.date-chip.today { border-color: var(--accent); background: var(--accent-soft); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty .icon-wrap { width: 44px; height: 44px; border-radius: 14px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--surface-3); }

/* tabelas */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; }
th.num, td.num { text-align: right; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.clickable { cursor: pointer; }
tr.voided td { color: var(--muted); text-decoration: line-through; }
tfoot td { font-weight: 750; border-bottom: none; }
td .sub { display: block; color: var(--muted); font-size: .78rem; }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; }

/* ---------------------------------------------------------------- abas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: none; background: none; padding: 10px 14px; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------- modais, gavetas, toasts e paleta */
.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(15, 12, 8, .42); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; animation: fadeIn .18s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: pop .22s var(--ease);
}
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 12px 20px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.drawer-overlay { place-items: stretch end; padding: 0; }
.drawer {
  width: min(480px, 100vw); height: 100vh; overflow: auto; background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg); animation: slideIn .25s var(--ease); display: flex; flex-direction: column;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.toasts { position: fixed; z-index: 120; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 13px; background: #1f1d1a; color: #f6f3ee;
  box-shadow: var(--shadow-lg); animation: toastIn .25s var(--ease); font-weight: 550;
}
.toast.bad { background: #7f1d1d; }
.toast .btn { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.palette { width: min(620px, 100%); align-self: start; margin-top: 10vh; }
.palette input { border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 1.02rem; box-shadow: none !important; }
.palette-list { max-height: 50vh; overflow: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette-item.on { background: var(--accent-soft); color: var(--accent-strong); }
.palette-item .hint { margin-left: auto; color: var(--muted); font-size: .8rem; }
.palette-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 12px 4px; font-weight: 700; }

.popover {
  position: fixed; z-index: 90; width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 14px; animation: pop .18s var(--ease);
}

/* ---------------------------------------------------------------- arrastar e soltar */
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.drag-ghost {
  position: fixed; z-index: 200; pointer-events: none; transform: rotate(2deg) scale(1.03);
  box-shadow: 0 20px 40px rgba(20, 16, 10, .28) !important; opacity: .96; transition: none !important;
}
.is-dragged { opacity: .35; }
.drop-placeholder { border: 2px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); min-height: 54px; transition: height .12s; }
[data-draggable] { touch-action: manipulation; -webkit-touch-callout: none; }

/* ---------------------------------------------------------------- kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.column { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-height: 220px; transition: background .15s, border-color .15s; }
.column.drop-active { border-color: var(--accent); background: var(--accent-soft); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.column-head .dot { background: var(--st); }
.column-head h3 { flex: 1; }
.column-sum { font-size: .76rem; color: var(--muted); padding: 0 14px 8px; }
.column-body { padding: 4px 10px 12px; display: grid; gap: 9px; overflow-y: auto; align-content: start; min-height: 80px; flex: 1; }
.kcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-sm);
  cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s; display: grid; gap: 8px;
  border-left: 3px solid var(--st, var(--line));
}
.kcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kcard.locked { cursor: pointer; }
.kcard .k-title { font-weight: 650; line-height: 1.3; }
.kcard .k-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted); }
.add-inline { display: flex; gap: 6px; padding: 0 10px 10px; }
.add-inline input { padding: 7px 10px; }

/* ---------------------------------------------------------------- calendário */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-toolbar .month { font-size: 1.25rem; font-weight: 750; min-width: 200px; }
.cal-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: .8rem; font-weight: 650; cursor: pointer; color: var(--muted);
}
.chip-toggle.on { color: var(--ink); border-color: var(--line-2); }
.chip-toggle .dot { opacity: .35; }
.chip-toggle.on .dot { opacity: 1; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-head div { padding: 8px 10px; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(118px, auto); }
.cal-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; transition: background .12s; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover { background: var(--surface-2); }
.cal-day.other { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cal-day.other .daynum { opacity: .45; }
.cal-day.weekend { background: color-mix(in srgb, var(--surface-3) 45%, transparent); }
.cal-day.drop-active { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.daynum { font-size: .8rem; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .daynum { background: var(--accent); color: #fff; }
.ev {
  display: flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 7px; font-size: .74rem; font-weight: 650;
  background: var(--ev-soft); color: var(--ev); border-left: 3px solid var(--ev); cursor: grab; min-width: 0;
  transition: transform .12s, box-shadow .12s;
}
.ev:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.ev.done { opacity: .55; }
.ev.locked { cursor: pointer; }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-more { font-size: .72rem; font-weight: 700; color: var(--muted); padding: 0 6px; }
.t-medicao { --ev: var(--ok); --ev-soft: var(--ok-soft); }
.t-conta { --ev: var(--warn); --ev-soft: var(--warn-soft); }
.t-tarefa { --ev: var(--info); --ev-soft: var(--info-soft); }
.t-lembrete { --ev: var(--violet); --ev-soft: var(--violet-soft); }
.t-obra { --ev: var(--slate); --ev-soft: var(--slate-soft); }
.t-pagamento { --ev: var(--accent-strong); --ev-soft: var(--accent-soft); }
.dot.t-medicao, .dot.t-conta, .dot.t-tarefa, .dot.t-lembrete, .dot.t-obra, .dot.t-pagamento { background: var(--ev); }
.cal-mobile-list { display: none; }

/* ---------------------------------------------------------------- gantt */
.gantt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.gantt { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.gantt-scroll { overflow: auto; max-height: calc(100vh - 230px); position: relative; overscroll-behavior: contain; }
.gantt-inner { display: grid; grid-template-columns: var(--g-left, 260px) auto; min-width: 100%; }
.g-left-head, .g-head { position: sticky; top: 0; z-index: 6; background: var(--surface-2); border-bottom: 1px solid var(--line); height: 56px; }
.g-left-head { left: 0; z-index: 9; display: flex; align-items: flex-end; padding: 0 14px 8px; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-right: 1px solid var(--line); }
.g-months, .g-days { position: absolute; left: 0; right: 0; height: 28px; }
.g-months { top: 0; }
.g-days { top: 28px; }
.g-month { position: absolute; top: 0; height: 28px; padding: 6px 8px; font-size: .74rem; font-weight: 750; border-left: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-transform: capitalize; }
.g-day { position: absolute; top: 0; height: 28px; font-size: .68rem; color: var(--muted); display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: visible; }
.g-day.today { color: var(--accent-strong); font-weight: 800; }
.g-left-col { position: sticky; left: 0; z-index: 5; background: var(--surface); border-right: 1px solid var(--line); }
.g-label { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: var(--g-row, 46px); border-bottom: 1px solid var(--line); min-width: 0; }
.g-label .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; cursor: pointer; font-weight: 600; }
.g-label .name:hover { color: var(--accent-strong); }
.g-label.task { padding-left: 40px; font-size: .86rem; cursor: pointer; }
.g-label.task .name { font-weight: 500; color: var(--ink-2); }
.g-label.task:hover { background: var(--surface-2); }
.g-label.group { font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.g-label .g-add { display: none; }
@media (hover: hover) { .g-label:hover .g-add { display: inline-flex; } .g-label:hover .small.muted { display: none; } }
.g-spacer { width: 30px; flex: none; }
.g-body { position: relative; }
.g-row { position: absolute; left: 0; right: 0; height: var(--g-row, 46px); border-bottom: 1px solid var(--line); }
.g-row.task-row { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.g-row.group-row { background: var(--surface-2); }
.g-grid-line { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--line) 70%, transparent); pointer-events: none; }
.g-grid-line.strong { background: var(--line-2); }
.g-weekend { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--surface-3) 60%, transparent); pointer-events: none; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); z-index: 3; pointer-events: none; }
.g-bar {
  position: absolute; top: 9px; height: calc(var(--g-row, 46px) - 18px); border-radius: 8px; background: var(--st-soft); border: 1px solid color-mix(in srgb, var(--st) 55%, transparent);
  color: var(--ink); display: flex; align-items: center; cursor: grab; z-index: 2; box-shadow: var(--shadow-sm); transition: box-shadow .15s;
  -webkit-user-select: none; user-select: none; touch-action: pan-x pan-y; -webkit-touch-callout: none;
}
.g-bar.task { top: 12px; height: calc(var(--g-row, 46px) - 24px); }
.g-bar:hover { box-shadow: var(--shadow); }
.g-bar.locked { cursor: pointer; }
.g-bar.dragging { box-shadow: var(--shadow-lg); z-index: 4; }
.g-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px 0 0 7px; background: var(--st); opacity: .3; pointer-events: none; }
.g-bar .txt { position: sticky; left: calc(var(--g-left, 260px) + 4px); padding: 0 10px; font-size: .76rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.g-bar .handle { position: absolute; top: -2px; bottom: -2px; width: 12px; cursor: ew-resize; z-index: 3; }
.g-bar .handle.l { left: -5px; }
.g-bar .handle.r { right: -5px; }
.g-bar .handle::after { content: ""; position: absolute; top: 28%; bottom: 28%; left: 5px; width: 2px; border-radius: 2px; background: var(--st); opacity: 0; transition: opacity .15s; }
.g-bar:hover .handle::after, .g-bar.dragging .handle::after { opacity: .9; }
.g-bar .knob { position: absolute; bottom: -7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--st); cursor: ew-resize; z-index: 4; opacity: 0; transition: opacity .15s; }
.g-bar:hover .knob, .g-bar.dragging .knob { opacity: 1; }
.g-ms { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; z-index: 3; cursor: grab; -webkit-user-select: none; user-select: none; }
.g-ms::before { content: ""; position: absolute; inset: 2px; box-shadow: 0 0 0 2px var(--surface); }
.g-ms.medicao::before { transform: rotate(45deg); background: var(--series-in); border-radius: 2px; }
.g-ms.conta::before { inset: 3px; border-radius: 50%; background: var(--warn); }
.g-ms.done { cursor: pointer; }
.g-ms.done::before { opacity: .45; }
.g-ms.dragging { z-index: 6; transform: scale(1.25); }
.g-empty-hint { position: absolute; top: 50%; transform: translateY(-50%); font-size: .78rem; color: var(--muted); white-space: nowrap; pointer-events: none; font-style: italic; }
.g-tip { position: fixed; z-index: 150; pointer-events: none; background: #1f1d1a; color: #f6f3ee; padding: 8px 11px; border-radius: 10px; font-size: .78rem; box-shadow: var(--shadow-lg); max-width: 300px; line-height: 1.45; }
.g-tip .strong { font-weight: 750; }
.ms-key { display: inline-block; width: 10px; height: 10px; }
.ms-key.medicao { transform: rotate(45deg); background: var(--series-in); border-radius: 2px; }
.ms-key.conta { border-radius: 50%; background: var(--warn); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .78rem; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; flex: none; }
.key-rect { width: 10px; height: 10px; border-radius: 3px; }
.key-line { width: 14px; height: 2px; border-radius: 2px; background: var(--series-line); }

/* ---------------------------------------------------------------- gráfico */
.cashflow { position: relative; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .tick.strong { fill: var(--ink); font-weight: 700; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .bar-out { fill: var(--series-out); }
.chart .bar-in { fill: var(--series-in); }
.chart .bar-in.planned { fill: var(--series-in-planned); }
.chart .line { fill: none; stroke: var(--series-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--series-line); stroke: var(--surface); stroke-width: 2; transition: r .12s; }
.chart .pt.on { r: 5.5; }
.chart .hover-col { fill: var(--ink); opacity: 0; transition: opacity .12s; }
.chart .hover-col.on { opacity: .05; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart-tip { position: absolute; top: 8px; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 12px; min-width: 190px; display: grid; gap: 4px; font-size: .82rem; }
.tip-row { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: 8px; }
.tip-row span { color: var(--muted); }

/* serviço (cards) */
.svc-card { display: grid; gap: 12px; cursor: pointer; transition: transform .15s, box-shadow .15s; border-top: 3px solid var(--st); }
.svc-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(24, 20, 14, .1); }
.svc-card .meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; }
.svc-card .meta div { display: grid; }
.svc-card .meta small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 650; }
.svc-card .meta b { font-variant-numeric: tabular-nums; }
.ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--st, var(--accent)) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; flex: none; }
.ring::after { content: attr(data-label); width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .72rem; font-weight: 800; }

/* histórico */
.timeline { display: grid; gap: 2px; }
.timeline .day { font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; }
.tl-item { display: flex; gap: 12px; padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.tl-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); flex: none; }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background:
  radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
  radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--info) 12%, transparent), transparent), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; display: grid; gap: 14px; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand b { display: block; font-size: 1.15rem; }
.login-brand small { color: var(--muted); }
.alert { padding: 10px 12px; border-radius: 10px; font-weight: 550; }
.alert-bad { background: var(--bad-soft); color: var(--bad); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }

/* ---------------------------------------------------------------- celular */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 14px; padding-top: env(safe-area-inset-top); }
  .search-btn { min-width: 0; }
  .search-btn .label, .search-btn kbd { display: none; }
  .content { padding: 16px 14px 96px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; font-size: .66rem; font-weight: 650; color: var(--muted); padding: 4px 0; border-radius: 10px; }
  .bottom-nav a.active { color: var(--accent-strong); }
  .bottom-nav a:hover { text-decoration: none; }
  .fab { bottom: calc(76px + env(safe-area-inset-bottom)); right: 16px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi .value { font-size: 1.15rem; }
  .board { grid-auto-columns: 84vw; scroll-snap-type: x mandatory; }
  .column { scroll-snap-align: start; max-height: none; }
  .cal-grid { grid-auto-rows: 58px; }
  .cal-day { padding: 4px; align-items: center; }
  .cal-day .ev, .cal-day .ev-more { display: none; }
  .cal-day .dots { display: flex; }
  .cal-mobile-list { display: block; margin-top: 14px; }
  .gantt-inner { --g-left: 150px; }
  .modal { border-radius: 18px 18px 0 0; align-self: end; max-height: 92vh; }
  .overlay { padding: 0; place-items: end stretch; }
  .overlay.palette-overlay { place-items: start stretch; padding: 10px; }
  .palette { margin-top: 0; border-radius: 16px; }
  .drawer { width: 100vw; }
  .page-head h1 { font-size: 1.3rem; }
  .hide-sm { display: none !important; }
}
.dots { display: none; gap: 3px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 861px) { .hide-lg { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- componentes das telas */
.grid-home { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.search-inline { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--muted); min-width: 240px; }
.search-inline input { border: none; padding: 8px 0; background: transparent; box-shadow: none !important; }
.compact-select { width: auto; min-width: 180px; padding: 7px 10px; }
.refreshing { opacity: .6; transition: opacity .2s; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.back-link:hover { color: var(--ink); text-decoration: none; }
.code-chip.big { font-size: .95rem; padding: 6px 10px; border-radius: 10px; margin-top: 2px; }
.obra-head { border-top: 4px solid var(--st); display: grid; gap: 16px; }
.obra-head h1 { font-size: 1.4rem; }
.status-select { width: auto; font-weight: 650; padding: 8px 10px; }
.progress-edit { display: grid; gap: 6px; }
.progress-edit input[type=range] { width: 100%; height: 8px; -webkit-appearance: none; appearance: none; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(to right, var(--accent) 0 var(--fill, 0%), var(--surface-3) var(--fill, 0%) 100%); }
.progress-edit input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: var(--shadow); }
.progress-edit input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: var(--shadow); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 16px; }
.info-grid > div { display: grid; gap: 2px; }
.info-grid small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.callout { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); margin-bottom: 12px; }
.callout > svg { color: var(--accent-strong); flex: none; }
.inline-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.list-item.voided { opacity: .55; }
.list-item.voided b { text-decoration: line-through; }
table.sheet th, table.sheet td { padding: 9px 10px; }
table.sheet th:first-child, table.sheet td:first-child { padding-left: 16px; }
table.sheet .sticky-col { min-width: 210px; }
table.sheet tfoot td { background: var(--surface-2); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; }
.filters .field { min-width: 140px; }
.filters .field.grow { flex: 1; min-width: 180px; }
.cat-bar { height: 6px; border-radius: 999px; background: var(--surface-3); margin-top: 4px; overflow: hidden; }
.cat-bar span { display: block; height: 100%; border-radius: inherit; background: var(--series-in); }

/* menu suspenso */
.menu { position: relative; display: inline-block; }
.menu-pop { position: absolute; top: calc(100% + 6px); z-index: 60; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; display: grid; animation: pop .14s var(--ease); }
.menu-pop.right { right: 0; }
.menu-pop.left { left: 0; }
.menu-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: none; background: none; border-radius: 8px; text-align: left; font-weight: 550; cursor: pointer; color: var(--ink); white-space: nowrap; }
.menu-item:hover { background: var(--surface-3); }
.menu-item.danger { color: var(--bad); }

/* novo lançamento */
.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.type-btn { display: grid; justify-items: center; gap: 5px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-weight: 650; font-size: .82rem; cursor: pointer; transition: all .15s; }
.type-btn:hover { color: var(--ink); border-color: var(--line-2); }
.type-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.share-grid { display: grid; gap: 6px; }
.share-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.share-input { width: 96px; text-align: right; padding: 6px 9px; }
.split-preview { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: .85rem; }
.split-preview span { display: inline-flex; align-items: center; gap: 6px; }
.file-drop { position: relative; }
.file-drop input[type=file] { position: absolute; inset: 22px 0 0 0; opacity: 0; cursor: pointer; height: auto; }
.file-box { display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px dashed var(--line-2); border-radius: 12px; color: var(--muted); font-weight: 550; transition: all .15s; }
.file-drop:hover .file-box { border-color: var(--accent); color: var(--accent-strong); }
.file-drop.has .file-box { border-style: solid; border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.title-input { font-size: 1.2rem; font-weight: 700; border: none; border-bottom: 2px solid var(--line); border-radius: 0; padding: 6px 0; background: transparent; box-shadow: none !important; }
.title-input:focus { border-bottom-color: var(--accent); }

/* kanban: extras */
.kcard { -webkit-user-select: none; user-select: none; }
.kcard.done .k-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.k-check { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; margin-top: 1px; transition: all .15s; }
.k-check:hover { border-color: var(--ok); color: var(--ok); }
.k-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.is-dragged.hide-source { display: none; }
.column-empty { text-align: center; color: var(--muted); font-size: .82rem; padding: 16px 8px; border: 1.5px dashed var(--line-2); border-radius: 12px; margin: 0; }
.add-btn { display: flex; align-items: center; gap: 6px; margin: 0 10px 10px; padding: 8px 10px; border: none; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.add-btn:hover { background: var(--surface-3); color: var(--ink); }

/* calendário: extras */
.ev { -webkit-user-select: none; user-select: none; }
.day-add { opacity: 0; border: none; background: var(--surface-3); color: var(--muted); width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; padding: 0; transition: opacity .12s; }
.cal-day:hover .day-add, .day-add:focus-visible { opacity: 1; }
.ev-more { border: none; background: none; text-align: left; cursor: pointer; }
.ev-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--ev-soft); color: var(--ev); }
.agenda-day { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.agenda-day:last-child { border-bottom: none; }
.agenda-date { width: 46px; flex: none; text-align: center; padding-top: 8px; line-height: 1.1; }
.agenda-date b { display: block; font-size: 1.3rem; }
.agenda-date small { color: var(--muted); font-weight: 700; font-size: .7rem; text-transform: uppercase; }
.agenda-date.today b { color: var(--accent-strong); }
.agenda-day .list-item { border-bottom: none; padding: 7px 8px; }

/* sócios */
.partner-card { display: grid; gap: 14px; align-content: start; }
.partner-card.inactive { opacity: .6; }
.channel-list { display: grid; gap: 6px; }
.channel { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }

@media (max-width: 1100px) {
  .grid-home, .grid-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .inline-form { grid-template-columns: 1fr; }
  .search-inline { min-width: 0; flex: 1; }
  .compact-select { min-width: 0; flex: 1; }
  .day-add { display: none; }
  .gantt-scroll { max-height: calc(100vh - 250px); }
  .g-label { padding: 0 6px; gap: 5px; }
  .g-label.task { padding-left: 22px; }
  .g-label .code-chip { font-size: .68rem; }
  .filters .field { min-width: 0; flex: 1 1 140px; }
  .page-head .compact-select { flex: 1 1 100%; order: 3; }
  .kpi.highlight { grid-column: 1 / -1; order: -1; }
  .g-label:not(.task) .name { display: none; }
  .g-label .small.muted { margin-left: auto; }
}
.login-alt { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.login-alt summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.login-alt[open] summary { margin-bottom: 10px; }

/* preferências de aviso e integrações */
.pref-list { display: grid; gap: 8px; }
.pref { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.pref input { margin-top: 3px; }
.pref div { display: grid; gap: 2px; }
.pref span { color: var(--muted); font-size: .84rem; }
.pref.off { opacity: .6; cursor: not-allowed; }
.int-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.int-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.int-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

/* equipe e ponto */
.week-label { font-weight: 750; min-width: 130px; text-align: center; }
table.ponto th { text-align: center; }
table.ponto th small { display: block; font-size: .9rem; color: var(--ink); font-weight: 750; letter-spacing: 0; }
table.ponto th.today, table.ponto td.today { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
table.ponto th:first-child, table.ponto td:first-child { text-align: left; padding-left: 16px; min-width: 190px; }
.pcell-td { text-align: center; padding: 6px 4px; }
.pcell {
  width: 38px; height: 38px; border-radius: 11px; border: 1.5px dashed var(--line-2); background: var(--surface);
  font-weight: 800; font-size: 1rem; cursor: pointer; display: inline-grid; place-items: center; transition: transform .1s, background .15s;
}
.pcell:active { transform: scale(.92); }
.pcell.p-presente { border: none; background: var(--ok-soft); color: var(--ok); }
.pcell.p-meio { border: none; background: var(--warn-soft); color: var(--warn); }
.pcell.p-falta { border: none; background: var(--bad-soft); color: var(--bad); }
.pcell.p-atestado { border: none; background: var(--info-soft); color: var(--info); }
.pcell.p-folga { border: none; background: var(--surface-3); color: var(--muted); }
.pcell.paid { box-shadow: inset 0 0 0 2px var(--line-2); cursor: not-allowed; }
.pcell.paid::after { content: "🔒"; font-size: .55rem; position: absolute; transform: translate(14px, -14px); }
.ptime { font-size: .66rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.ptime a { text-decoration: none; margin-left: 2px; }
.supplier-card { display: grid; gap: 10px; align-content: start; }
@media (max-width: 860px) {
  .pcell { width: 32px; height: 32px; border-radius: 9px; }
  table.ponto th:first-child, table.ponto td:first-child { min-width: 104px; max-width: 120px; padding-left: 10px; }
  table.ponto td:first-child b { font-size: .84rem; }
  table.ponto td:first-child .sub { display: none; }
}

/* ponto por link */
.ptime { border: none; background: none; cursor: pointer; padding: 2px 0 0; font: inherit; }
.ptime:hover { color: var(--accent-strong); }
.ptime.far { color: var(--bad); font-weight: 700; }
.link-box { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; padding: 0; }
.punch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.punch-card { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.punch-card.far { border-color: var(--bad); }
.punch-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--surface-3); }
.site-row { display: grid; grid-template-columns: 1fr 1fr 80px auto; gap: 6px; align-items: center; }
@media (max-width: 860px) { .site-row { grid-template-columns: 1fr 1fr; } }
