/* ============================================================
   Negretti Gestão — estilos
   Cores da marca: ajuste as variáveis abaixo.
   ============================================================ */
:root {
  --brand: #e8572a;          /* laranja foguete */
  --brand-dark: #c9461f;
  --brand-soft: #fff1ec;
  --ink: #0b1220;            /* azul-noite da sidebar */
  --ink-2: #16213a;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #2563eb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .15);
  --sidebar-w: 240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.hidden, [hidden] { display: none !important; }
.mt { margin-top: 1rem; } .mb { margin-bottom: 1rem; } .mt-sm { margin-top: .5rem; } .mb-sm { margin-bottom: .5rem; }
.flex { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.grow { flex: 1; }
.gap { gap: 1rem; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-info { color: var(--info); }
.bold { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.w-100 { width: 100%; }

.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.icon.sm { width: 15px; height: 15px; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--ink); color: #cbd5e1; display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; z-index: 40; transition: transform .2s ease;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: .2px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand:hover { text-decoration: none; }
.brand .icon { width: 22px; height: 22px; color: var(--brand); }
.nav { flex: 1; overflow-y: auto; padding: .6rem .7rem; }
.nav-sec { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #64748b; padding: .9rem .55rem .35rem; font-weight: 700; }
.nav-item { display: flex; align-items: center; gap: .65rem; padding: .55rem .6rem; border-radius: 8px; color: #cbd5e1; font-weight: 500; margin-bottom: 2px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--brand); color: #fff; }
.nav-item .icon { opacity: .9; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.07); padding: .8rem .9rem; display: flex; align-items: center; gap: .5rem; }
.sidebar-foot .me { display: flex; align-items: center; gap: .6rem; color: #e2e8f0; flex: 1; min-width: 0; }
.sidebar-foot .me:hover { text-decoration: none; }
.sidebar-foot .me span { display: flex; flex-direction: column; min-width: 0; }
.sidebar-foot .me b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .me small { color: #94a3b8; font-size: .72rem; }
.sidebar-foot .icon-btn { color: #94a3b8; }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; min-height: 58px; }
.page-title { font-size: 1.15rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: .5rem; }
.hamburger { display: none; }
.content { padding: 1.25rem; max-width: 1400px; width: 100%; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--line); color: var(--text); text-decoration: none; }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: #fee2e2; }
.bell-count { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.timer-chip { display: inline-flex; align-items: center; gap: .5rem; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: .3rem .7rem; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.timer-chip:hover { text-decoration: none; background: #d1fae5; }
.timer-chip .timer-clock { font-variant-numeric: tabular-nums; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--success); animation: pulse 1.3s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: .92rem; cursor: pointer; line-height: 1.2; white-space: nowrap; font-family: inherit; }
.btn:hover { background: #f8fafc; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--line); }
.btn-sm { padding: .38rem .7rem; font-size: .85rem; }
.btn-xs { padding: .22rem .5rem; font-size: .78rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Formulários ---------- */
.form label, .field { display: block; margin-bottom: .9rem; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.form label > input, .form label > select, .form label > textarea, .field > input, .field > select, .field > textarea { margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], input[type=month], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: #fff; font-weight: 400;
}
textarea { min-height: 110px; resize: vertical; }
textarea[rows="1"] { min-height: 42px; }
textarea[rows="2"] { min-height: 64px; }
textarea[rows="3"] { min-height: 84px; }
input[type=file] { display: block; margin-top: .3rem; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(232,87,42,.25); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); vertical-align: -2px; }
input[type=color] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; }
input[type=file] { font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid-3 .span-3 { grid-column: span 3; }
.form-actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; flex-wrap: wrap; }
.check { display: flex !important; align-items: center; gap: .5rem; font-weight: 500 !important; cursor: pointer; }
.help { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: .25rem; display: block; }
.input-group { display: flex; }
.input-group > * + * { margin-left: -1px; }
.input-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Filtros em linha */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters label { display: flex; flex-direction: column; font-size: .75rem; font-weight: 600; color: var(--muted); gap: .2rem; }
.filters input, .filters select { padding: .4rem .55rem; font-size: .88rem; min-width: 120px; }
.filters .btn { padding: .42rem .8rem; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .8rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: .9rem 1.2rem 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card { margin-bottom: 0; }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .task-layout > * { min-width: 0; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); display: block; color: inherit; }
.stat:hover { text-decoration: none; border-color: var(--line-2); }
.stat .label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; margin: .2rem 0; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.stat.danger .value { color: var(--danger); }
.stat.success .value { color: var(--success); }
.stat.warning .value { color: var(--warning); }
.stat.info .value { color: var(--info); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .6rem .75rem; border-bottom: 1px solid var(--line); background: #f8fafc; white-space: nowrap; }
.table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #f8fafc; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: #f8fafc; }
.table a.row-link { color: var(--text); font-weight: 600; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .icon-btn { width: 30px; height: 30px; }
.table.compact td, .table.compact th { padding: .4rem .5rem; }
.table tr.done td { opacity: .55; }
.table tr.late td { background: #fff7f7; }

/* ---------- Badges / avatar ---------- */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--line); color: var(--text-2); white-space: nowrap; line-height: 1.4; }
.badge-muted { background: #f1f5f9; color: var(--muted); }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.chip-cliente { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--text-2); }
.chip-cliente .dot { width: 8px; height: 8px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 44px; height: 44px; font-size: .95rem; }
.avatar.sm { width: 24px; height: 24px; font-size: .62rem; }
.avatars { display: inline-flex; }
.avatars .avatar { margin-left: -6px; border: 2px solid #fff; }
.mention { color: var(--brand-dark); font-weight: 600; background: var(--brand-soft); padding: 0 .25rem; border-radius: 4px; }

/* ---------- Alertas ---------- */
.alert { padding: .7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .92rem; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .55rem .9rem; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--brand-dark); border-color: var(--brand); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.seg a, .seg button { padding: .35rem .75rem; font-size: .85rem; font-weight: 600; color: var(--text-2); background: #fff; border: 0; cursor: pointer; font-family: inherit; }
.seg a:hover { text-decoration: none; background: #f8fafc; }
.seg .active { background: var(--ink); color: #fff; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: pop .15s ease; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 1.25rem; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 190px; z-index: 50; padding: .3rem; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .7rem; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; font-size: .9rem; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: #f1f5f9; text-decoration: none; }
.dropdown-menu .danger { color: var(--danger); }

/* ---------- Lista de tarefas (cards) ---------- */
.task-row { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #f8fafc; }
.task-row .title { font-weight: 600; color: var(--text); display: block; }
.task-row .meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.task-row .side { display: flex; gap: .5rem; align-items: center; }
.task-row.done .title { text-decoration: line-through; color: var(--muted); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: .9rem; align-items: start; overflow-x: auto; padding-bottom: 1rem; }
.kcol { background: #eef2f7; border-radius: var(--radius); padding: .6rem; min-height: 200px; }
.kcol-head { display: flex; justify-content: space-between; align-items: center; padding: .3rem .4rem .6rem; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.kcol-head .count { background: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .75rem; color: var(--muted); }
.klist { min-height: 60px; display: flex; flex-direction: column; gap: .5rem; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; box-shadow: var(--shadow); cursor: grab; display: block; color: inherit; }
.kcard:hover { text-decoration: none; border-color: var(--line-2); }
.kcard.sortable-ghost { opacity: .4; }
.kcard.sortable-chosen { box-shadow: var(--shadow-lg); }
.kcard .kt { font-weight: 600; font-size: .9rem; display: block; margin: .25rem 0 .4rem; }
.kcard .kfoot { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.kcard .kmeta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.kcard.late { border-left: 3px solid var(--danger); }

/* ---------- Calendário ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal-head { background: #f8fafc; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .5rem; text-align: center; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 110px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .35rem; font-size: .8rem; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day .d { font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; }
.cal-day.other { background: #fafafa; color: #cbd5e1; }
.cal-day.today { background: var(--brand-soft); }
.cal-day.today .d { color: var(--brand-dark); }
.cal-ev { display: block; margin-top: 3px; padding: .15rem .4rem; border-radius: 5px; background: #e0e7ff; color: #3730a3; font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid currentColor; }
.cal-ev:hover { text-decoration: none; filter: brightness(.95); }
.cal-ev.done { opacity: .5; text-decoration: line-through; }
.cal-ev.late { background: #fee2e2; color: #991b1b; }

/* ---------- Timeline / comentários ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline .body { flex: 1; min-width: 0; }
.timeline .who { font-weight: 700; }
.timeline .when { color: var(--muted); font-size: .78rem; margin-left: .4rem; }
.timeline .txt { margin-top: .2rem; white-space: normal; word-wrap: break-word; }
.hist { font-size: .82rem; color: var(--text-2); padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.hist:last-child { border: 0; }
.hist b { color: var(--text); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border: 0; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.checklist li span { flex: 1; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--success); }

.attach { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.attach:last-child { border: 0; }
.attach .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .size { color: var(--muted); font-size: .78rem; }

/* ---------- Detalhe de tarefa ---------- */
.task-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; align-items: start; }
.task-side .kv { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.task-side .kv:last-child { border: 0; }
.task-side .kv b { color: var(--muted); font-weight: 600; }
.briefing { white-space: pre-wrap; word-wrap: break-word; font-size: .95rem; line-height: 1.55; }

/* ---------- Diversos ---------- */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.empty h2 { color: var(--text); }
.pagination { display: flex; gap: .25rem; margin-top: 1rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .3rem .65rem; border: 1px solid var(--line-2); border-radius: 6px; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.pagination a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination a:hover { text-decoration: none; background: #f8fafc; }
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 220px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.kpi-delta { font-size: .8rem; font-weight: 700; }
.kpi-delta.up { color: var(--success); } .kpi-delta.down { color: var(--danger); }
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; font-size: .9rem; z-index: 200; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.mention-box { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 60; min-width: 200px; max-height: 200px; overflow-y: auto; }
.mention-box div { padding: .45rem .7rem; cursor: pointer; font-size: .9rem; }
.mention-box div:hover, .mention-box div.active { background: #f1f5f9; }
.notif { display: flex; gap: .7rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); color: inherit; }
.notif:hover { background: #f8fafc; text-decoration: none; }
.notif.unread { background: #fffaf7; }
.notif .t { flex: 1; font-size: .92rem; }
.notif .w { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; }
.week-day { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; min-height: 120px; font-size: .8rem; }
.week-day .wd { font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: .3rem; }
.week-day.today { border-color: var(--brand); background: var(--brand-soft); }
.week-day .ts { padding: .25rem .35rem; background: #f1f5f9; border-radius: 5px; margin-top: 3px; display: flex; justify-content: space-between; gap: .3rem; }
.week-day .ts span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-day .tot { margin-top: .4rem; font-weight: 700; text-align: right; }
.color-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }
.tag-list { display: flex; gap: .35rem; flex-wrap: wrap; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--muted); }
kbd { background: #f1f5f9; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 .3rem; font-size: .8em; font-family: inherit; }
.comp-table td.var { font-weight: 700; }
.comp-table th, .comp-table td { padding-left: .4rem; padding-right: .4rem; font-size: .84rem; }
.installer { max-width: 760px; margin: 2rem auto; }
.installer ol { padding-left: 1.2rem; }

/* ---------- Auth ---------- */
.auth-body { background: radial-gradient(1200px 600px at 20% -10%, #1e293b, var(--ink) 60%); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.auth-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; margin-bottom: 1.5rem; }
.auth-brand .icon { width: 26px; height: 26px; color: var(--brand); }
.auth-foot { color: #94a3b8; font-size: .85rem; margin-top: 1.25rem; }

/* ---------- Impressão ---------- */
@media print {
  .sidebar, .topbar, .filters, .btn, .pagination { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .task-layout { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(4, 260px); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .hide-sm { display: none !important; }
  .content { padding: .9rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid-3 .span-3 { grid-column: auto; }
  .week-grid { grid-template-columns: 1fr; }
  .cal-day { min-height: 70px; }
  .cal-ev { font-size: .65rem; }
  .task-row { grid-template-columns: auto 1fr; }
  .task-row .side { grid-column: 2; justify-content: flex-start; }
  .timer-chip .timer-title { display: none; }
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 16px 16px 0 0; max-width: none; }
  .page-title { font-size: 1rem; }
  html { font-size: 14.5px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat .value { font-size: 1.2rem; }
}
