/* Invoice MRKA: réplica do Canva "Invoice Leticia to Alec #8" (794 x 1123 px, coordenadas do próprio Canva) */
@font-face { font-family: 'Alta'; src: url('fonts/Alta_light.woff2') format('woff2'); font-weight: 300; }
@font-face { font-family: 'Alta'; src: url('fonts/Alta_regular.woff2') format('woff2'); font-weight: 400; }
@font-face { font-family: 'Brittany Signature'; src: url('fonts/BrittanySignature.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; src: url('fonts/AileronRegular.woff2') format('woff2'); font-weight: 400; }
@font-face { font-family: 'Aileron'; src: url('fonts/AileronBold.woff2') format('woff2'); font-weight: 700; }
.inv-sheet { position: relative; width: 794px; height: 1123px; overflow: hidden; background: #f2f1ee; color: #1d1d1d;
  font-family: 'Aileron', sans-serif; font-size: 18.6667px; letter-spacing: 0.085em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.inv-sheet > * { position: absolute; margin: 0; }
.inv-taupe { top: 0; left: -41.77px; width: 877.25px; height: 406.26px; background: #cfb8a6; }
.inv-card { top: 271.42px; left: 43.83px; width: 707.44px; height: 348.59px; background: #fff; }
.inv-rule { top: 384.08px; left: 43.83px; width: 707.28px; height: 2px; background: #e6ddd6; }
.inv-sig { top: 69.15px; left: 188.84px; width: 351.86px; height: 118.93px; font: 71.248px/0.5 'Brittany Signature', cursive; letter-spacing: 0.085em; color: #e6ddd6; text-shadow: 0 0 5px rgba(255, 255, 255, 0.45), 0 1px 3px rgba(120, 96, 78, 0.18); }
.inv-sig span { display: block; }
.inv-sig .l1 { text-align: center; }
.inv-sig .l2 { text-align: right; }
.inv-title { top: 180.86px; left: 237.68px; width: 318.35px; font: 400 54.1426px/1.4 'Alta', serif; letter-spacing: 0; color: #fff; text-align: center; }
.inv-head { font-family: 'Alta', serif; font-weight: 300; font-size: 26.6667px; line-height: 1.5; }
.inv-meta { top: 304.25px; left: 474.21px; width: 242.12px; font-size: 16px; line-height: 2.06; text-align: right; white-space: pre-line; }
.inv-bill { top: 302.25px; left: 79.37px; width: 351.73px; line-height: 2.06; }
.inv-desc-h { top: 405.95px; left: 69.53px; letter-spacing: calc(0.085em + 0.9px); width: 195.21px; text-align: center; }
.inv-total-h { top: 405.95px; left: 530.96px; letter-spacing: calc(0.085em + 0.25px); width: 195.21px; }
.inv-service { top: 457.34px; left: 95.66px; width: 315.8px; line-height: 2.06; }
.inv-hours { top: 497.38px; left: 95.66px; width: 315.8px; line-height: 1.18; white-space: pre-line; }
.inv-rate { top: 458.34px; left: 525.96px; width: 212.72px; }
.inv-rate .r1 { display: block; line-height: 2.06; }
.inv-rate .r2 { display: block; line-height: 1.26; white-space: pre-line; }
.inv-amount { top: 558.28px; left: 526.96px; letter-spacing: calc(0.085em + 0.56px); width: 188.37px; font-size: 26.6665px; font-weight: 700; line-height: 2.06; white-space: nowrap; }
.inv-pay-h { top: 684.95px; left: 80.37px; letter-spacing: calc(0.085em + 1.6px); width: 281.4px; line-height: 1.75; }
.inv-pay { top: 744.28px; left: 80.37px; width: 634.96px; line-height: 1.45; white-space: pre-line; }
.inv-thanks { top: 1023.01px; left: 283.78px; letter-spacing: calc(0.085em + 0.75px); width: 227.54px; font-size: 29.3333px; text-align: center; }
.inv-sheet b { font-weight: 700; }
/* ==========================================================================
   MRKA Operations · interface
   Mesa editorial quente: fundo marfim, palco branco, teal como sinal.
   Títulos na Alta (a mesma da invoice), texto em Plus Jakarta Sans.
   ========================================================================== */
:root {
  --canvas: oklch(0.948 0.012 82);
  --stage: oklch(0.993 0.004 85);
  --panel: oklch(0.998 0.002 85);
  --sunk: oklch(0.968 0.008 82);
  --line: oklch(0.905 0.012 82);
  --line-soft: oklch(0.935 0.009 82);
  --ink: oklch(0.255 0.02 190);
  --ink-2: oklch(0.42 0.02 190);
  --muted: oklch(0.56 0.016 190);
  --teal: oklch(0.5 0.085 185);
  --teal-deep: oklch(0.4 0.07 188);
  --teal-soft: oklch(0.945 0.03 182);
  --teal-line: oklch(0.86 0.05 182);
  --ai: oklch(0.52 0.15 295);
  --ai-soft: oklch(0.955 0.03 295);
  --amber: oklch(0.52 0.12 65);
  --amber-soft: oklch(0.955 0.045 80);
  --red: oklch(0.54 0.17 27);
  --red-soft: oklch(0.955 0.03 27);
  --green: oklch(0.6 0.13 155);
  --shadow-stage: 0 1px 2px oklch(0.3 0.02 80 / 0.05), 0 24px 60px -32px oklch(0.3 0.03 80 / 0.28);
  --shadow-panel: 0 1px 2px oklch(0.3 0.02 80 / 0.04), 0 8px 24px -18px oklch(0.3 0.03 80 / 0.22);
  --r-stage: 28px;
  --r-panel: 18px;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: 'Alta', 'Didot', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--canvas); color: var(--ink);
  font: 14.5px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ol, dl { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- tipografia */
.wordmark { font-family: var(--display); font-size: 30px; letter-spacing: 0.24em; line-height: 1; color: var(--ink); }
h1 { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: 0.06em; color: var(--ink); }
h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }

/* ---------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn.small { height: 34px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--teal); color: oklch(0.99 0.004 185); box-shadow: 0 6px 16px -10px var(--teal); }
.btn.primary:hover { background: var(--teal-deep); }
.btn.ghost { background: var(--panel); border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--teal-line); color: var(--teal-deep); background: var(--teal-soft); }
.btn.danger { background: transparent; color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { color: var(--teal-deep); border-color: var(--teal-line); }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--teal-deep); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
:is(.btn, .link, .icon-btn, .nav-item, input, select, textarea, summary, .segmented button):focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); display: grid; gap: 10px; padding: 40px 36px; background: var(--stage); border-radius: var(--r-stage); box-shadow: var(--shadow-stage); }
.login-card .wordmark { text-align: center; font-size: 38px; }
.login-sub { text-align: center; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.login-error { color: var(--red); font-size: 13px; min-height: 1.4em; text-align: center; }

/* ---------- estrutura */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; padding: 14px; gap: 14px; }
.sidebar { position: sticky; top: 14px; height: calc(100vh - 28px); display: flex; flex-direction: column; gap: 26px; padding: 26px 16px 16px; }
.brand { padding: 0 10px; }
.brand-sub { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.nav { display: grid; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
  font-weight: 600; cursor: pointer; text-align: left;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.nav-item:hover { background: oklch(0.92 0.014 82); color: var(--ink); }
.nav-item.active { background: var(--stage); color: var(--teal-deep); box-shadow: var(--shadow-panel); }
.nav-item span { flex: 1; }
.nav-count:empty { display: none; }
.nav-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--teal); color: var(--stage); font-size: 11.5px; line-height: 22px; text-align: center; }
.live { margin-top: auto; display: grid; gap: 8px; padding: 16px; border-radius: var(--r-panel); background: oklch(0.925 0.013 82); }
.live-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 2px; }
.live-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: default; }
.live-row::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.live-row b { font-weight: 600; color: var(--ink); }
.live-row span { margin-left: auto; color: var(--muted); }
.live-row.ok::before { background: var(--green); box-shadow: 0 0 0 3px oklch(0.6 0.13 155 / 0.18); }
.live-row.stale::before { background: oklch(0.75 0.14 75); }
.live-row.error::before { background: var(--red); }
.live-row.error span { color: var(--red); }
.live .btn { margin-top: 6px; }
.logout { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; border-radius: 10px; }
.logout:hover { color: var(--ink); background: oklch(0.92 0.014 82); }

.stage { min-width: 0; background: var(--stage); border-radius: var(--r-stage); box-shadow: var(--shadow-stage); padding: 40px 44px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px 24px; margin-bottom: 30px; }
.head-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------- painéis */
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-panel); box-shadow: var(--shadow-panel); padding: 22px 24px; }
.panel.flush { padding: 6px 24px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-note { font-size: 12.5px; color: var(--muted); }

/* ---------- hoje */

.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.side-col { display: grid; gap: 22px; position: sticky; top: 28px; }
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.tasks:first-child .task:first-child { border-top: 0; padding-top: 4px; }
.check-wrap { padding-top: 1px; }
.check-wrap input {
  appearance: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; border-radius: 50%;
  border: 1.6px solid var(--line); background: var(--panel); cursor: pointer; display: grid; place-items: center;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.check-wrap input:hover { border-color: var(--teal); }
.check-wrap input:checked { background: var(--teal); border-color: var(--teal); }
.check-wrap input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--stage); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.task-title { font-weight: 650; font-size: 15px; line-height: 1.4; }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.task-detail { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; max-width: 74ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; max-width: 100%; padding: 3px 9px; border-radius: 8px; background: var(--sunk); color: var(--ink-2); font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.chip svg { width: 13px; height: 13px; }
.chip.high { background: var(--amber-soft); color: var(--amber); }
.chip.late { background: var(--red-soft); color: var(--red); }
.chip.progress { background: var(--teal-soft); color: var(--teal-deep); }
.chip.ai { background: var(--ai-soft); color: var(--ai); cursor: help; }
.ai-note { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--ai-soft); color: oklch(0.38 0.1 295); font-size: 12.5px; }
.task-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-left: auto; padding-left: 12px; opacity: 0; transition: opacity 160ms var(--ease); }
.task:hover .task-actions, .task:focus-within .task-actions { opacity: 1; }
.group { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.group > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform 160ms var(--ease); }
.group[open] > summary::before { transform: rotate(45deg); }
.empty { padding: 26px 4px; color: var(--ink-2); display: grid; gap: 6px; }

.week-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; height: 150px; }
.bar-day { display: grid; grid-template-rows: 1fr auto auto; justify-items: center; gap: 4px; }
.bar { position: relative; width: 100%; max-width: 38px; border-radius: 10px; background: var(--sunk); overflow: hidden; }
.bar-act { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 10px; background: linear-gradient(to top, var(--teal-deep), var(--teal)); }
.bar-auto { background: linear-gradient(to top, oklch(0.6 0.07 185), oklch(0.7 0.06 182)); }
.bar-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: capitalize; }
.bar-day.is-today .bar-label { color: var(--teal-deep); }
.bar-value { font-size: 11.5px; color: var(--ink-2); min-height: 1.2em; font-weight: 600; }
.latest { list-style: none; padding: 0; display: grid; gap: 14px; }
.latest li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.latest-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-deep); }
.latest-icon.call { background: var(--ai-soft); color: var(--ai); }
.latest-icon svg { width: 15px; height: 15px; }
.latest-meta { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.latest-text { color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- formulários */
.inline-form { display: grid; gap: 12px; margin-top: 12px; padding: 16px; background: var(--sunk); border-radius: 14px; }
label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); font-size: 14px; font-weight: 500; color: var(--ink);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); outline: none; }
textarea { resize: vertical; line-height: 1.5; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px; }
label.check input { width: 17px; height: 17px; min-height: 0; accent-color: var(--teal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-origin { font-size: 12px; color: var(--muted); }

/* ---------- fontes */
.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--sunk); }
.segmented button { height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-panel); }
.search { width: 240px; }
.source-list { display: grid; gap: 12px; max-width: 980px; }
.day { border: 1px solid var(--line-soft); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow-panel); }
.day > summary { cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 16px 20px; list-style: none; }
.day > summary::-webkit-details-marker { display: none; }
.day > summary::before { content: ""; align-self: center; width: 7px; height: 7px; border-right: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted); transform: rotate(-45deg); transition: transform 160ms var(--ease); }
.day[open] > summary::before { transform: rotate(45deg); }
.day-name { font-weight: 700; text-transform: capitalize; }
.day[open] > summary { border-bottom: 1px solid var(--line-soft); }
.day-body { display: grid; padding: 6px 8px 10px; }
.msg { display: grid; grid-template-columns: 48px 76px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 12px; border-radius: 10px; }
.msg:hover { background: var(--sunk); }
.msg-time { font-size: 12px; color: var(--muted); font-weight: 600; }
.msg-who { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.msg.mine .msg-who { color: var(--teal-deep); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-act { opacity: 0; transition: opacity 160ms var(--ease); }
.msg:hover .msg-act, .msg:focus-within .msg-act { opacity: 1; }
.msg-form { grid-column: 1 / -1; }
.day-body .call { margin: 6px 4px 10px; box-shadow: none; }
.call { background: var(--ai-soft); color: var(--ai); }
.latest-icon svg { width: 15px; height: 15px; }
.latest-meta { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.latest-text { color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- formulários */
.inline-form { display: grid; gap: 12px; margin-top: 12px; padding: 16px; background: var(--sunk); border-radius: 14px; }
label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); font-size: 14px; font-weight: 500; color: var(--ink);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); outline: none; }
textarea { resize: vertical; line-height: 1.5; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px; }
label.check input { width: 17px; height: 17px; min-height: 0; accent-color: var(--teal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-origin { font-size: 12px; color: var(--muted); }

/* ---------- fontes */
.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--sunk); }
.segmented button { height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-panel); }
.search { width: 240px; }
.source-list { display: grid; gap: 30px; max-width: 900px; }
.day { display: grid; gap: 10px; }
.day-head { position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--stage); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.call { border: 1px solid var(--line-soft); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow-panel); }
.call > summary { cursor: pointer; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; list-style: none; }
.call > summary::-webkit-details-marker { display: none; }
.call-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ai-soft); color: var(--ai); }
.call-title { font-weight: 700; }
.call[open] > summary { border-bottom: 1px solid var(--line-soft); }
.call-part { padding: 14px 18px; font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.call-part + .call-part { border-top: 1px solid var(--line-soft); }
.call-part .link { display: inline-block; margin-top: 8px; }

/* ---------- horas */
.week-nav { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; margin-right: 6px; }
.day-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-top: 1px solid var(--line-soft); }
.day-row:first-child { border-top: 0; }
.day-label { display: grid; align-content: start; gap: 2px; font-size: 13px; color: var(--muted); font-weight: 600; }
.day-label b { color: var(--ink); text-transform: capitalize; font-size: 14px; }
.day-row.is-today .day-label b { color: var(--teal-deep); }
.day-total { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; margin-top: 4px; }
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.entry { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--sunk); }
.entry-time { font-weight: 700; }
.entry-desc { font-weight: 500; }
.entry.planned { background: transparent; border: 1px dashed var(--line); color: var(--ink-2); }
.entry-actions { display: flex; align-items: center; gap: 12px; }
.week-total { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.week-total b { color: var(--ink); font-size: 16px; }

/* ---------- invoice */
.invoice-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; align-items: start; }
.invoice-form { display: grid; gap: 14px; position: sticky; top: 28px; }
.hours-source { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--teal-soft); font-size: 13px; color: var(--ink-2); }
.math { display: grid; gap: 6px; }
.math div { display: flex; justify-content: space-between; font-size: 13.5px; }
.math dt { color: var(--ink-2); }
.math dd { margin: 0; font-weight: 700; }
.math .total { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 16px; }
.more > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.more[open] { display: grid; gap: 10px; }
.invoice-preview { display: grid; justify-items: center; padding: 28px; border-radius: var(--r-panel); background: var(--sunk); }
.sheet-frame { position: relative; width: 100%; max-width: 620px; aspect-ratio: 794 / 1123; box-shadow: 0 2px 4px oklch(0.3 0.02 80 / 0.08), 0 30px 60px -30px oklch(0.3 0.03 80 / 0.35); }
.sheet-frame > div { position: absolute; top: 0; left: 0; transform-origin: 0 0; }

/* ---------- toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--stage); font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-stage); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#print-root { display: none; }

/* ---------- responsivo */
@media (max-width: 1180px) {
  .today-grid, .invoice-layout { grid-template-columns: 1fr; }
  .side-col, .invoice-form { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .shell > * { min-width: 0; }
  .panel-note { display: none; }
  .panel { padding: 18px 16px; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; background: var(--canvas); }
  .brand { padding: 0; }
  .brand-sub, .logout { display: none; }
  .wordmark { font-size: 24px; }
  .nav { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; order: 3; }
  .nav-item { justify-content: center; height: 40px; gap: 6px; padding: 0 6px; font-size: 13px; min-width: 0; }
  .nav-item span { flex: none; }
  .nav-item svg { display: none; }
  .live { margin: 0 0 0 auto; padding: 0; background: none; grid-auto-flow: column; align-items: center; gap: 10px; }
  .live-title, .live-row span { display: none; }
  .live-row { font-size: 0; gap: 0; }
  .live .btn { margin: 0; width: auto; }
  .live .btn span { display: none; }
  .stage { border-radius: 0; box-shadow: none; padding: 26px 16px 72px; }
  h1 { font-size: 36px; }
  .search { width: 100%; }
  .head-tools { width: 100%; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .day-row { grid-template-columns: 1fr; gap: 8px; }
  .entry { grid-template-columns: 50px minmax(0, 1fr); }
  .entry-actions { grid-column: 2; }
  .task-actions, .msg-act { opacity: 1; }
  .msg { grid-template-columns: 44px minmax(0, 1fr); gap: 2px 10px; }
  .msg-text { grid-column: 1 / -1; }
  .msg-act { grid-column: 1 / -1; justify-self: start; }
  .task-actions { margin-left: 0; padding-left: 0; width: 100%; margin-top: 4px; }
  .invoice-preview { padding: 14px; }
}
@media (max-width: 520px) { .nav-count { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- impressão: só a invoice, A4 */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #f2f1ee !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; width: 210mm; height: 297mm; overflow: hidden; }
}

/* ---------- hoje: combinado e próxima call */
.main-col { display: grid; gap: 22px; min-width: 0; }
.brief { background: linear-gradient(180deg, var(--teal-soft), var(--panel) 70%); border-color: var(--teal-line); }
.brief-summary { color: var(--ink-2); margin: -4px 0 16px; max-width: 72ch; }
.brief-sub { margin: 18px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.actions { list-style: none; padding: 0; display: grid; gap: 8px; }
.action { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-soft); }
.action-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--stage); font-size: 12.5px; font-weight: 700; }
.action-text { font-weight: 600; }
.actions.alec .action-n { background: var(--sunk); color: var(--ink-2); }
.action.is-done .action-text { color: var(--muted); text-decoration: line-through; }
.meet-card { display: grid; gap: 14px; }
.meet-card.wide { margin-bottom: 26px; grid-template-columns: minmax(0, 1fr) 240px; align-items: center; }
.meet-row { display: flex; gap: 14px; align-items: center; }
.meet-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--sunk); color: var(--teal-deep); }
.meet-icon svg { width: 22px; height: 22px; }
.meet-icon.live { background: var(--teal); color: var(--stage); box-shadow: 0 0 0 5px var(--teal-soft); }
.meet-title { font-weight: 700; font-size: 15px; }
.eyebrow-sm { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---------- horas: calendário */
.month-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-bottom: 18px; }
.month-summary div { display: grid; }
.month-summary span { font-size: 12px; font-weight: 600; color: var(--muted); }
.month-summary b { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.legend { margin-left: auto; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -8px; }
.lg.auto { background: var(--ai-soft); border: 1px solid oklch(0.85 0.06 295); }
.lg.manual { background: var(--teal-soft); border: 1px solid var(--teal-line); }
.lg.plan { border: 1px dashed var(--muted); }
.calendar { display: grid; gap: 8px; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 96px; gap: 8px; }
.cal-head span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.cal-day { display: grid; align-content: start; gap: 6px; min-height: 118px; padding: 10px; text-align: left; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--panel); cursor: pointer; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.cal-day:hover { border-color: var(--teal-line); box-shadow: var(--shadow-panel); }
.cal-day.other { opacity: 0.35; }
.cal-day.is-today { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.cal-day.selected { border-color: var(--teal-deep); box-shadow: 0 0 0 2px var(--teal-deep); }
.cal-day.empty-past { background: repeating-linear-gradient(135deg, var(--panel) 0 6px, var(--sunk) 6px 12px); }
.cal-num { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.cal-entry { display: block; padding: 6px 8px; border-radius: 8px; font-size: 11.5px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-entry b { margin-right: 6px; font-weight: 700; }
.cal-entry.auto { background: var(--ai-soft); }
.cal-entry.manual { background: var(--teal-soft); }
.cal-entry.plan { border: 1px dashed var(--line); color: var(--ink-2); }
.cal-more { font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-total { display: grid; align-content: center; justify-items: center; gap: 4px; border-radius: 14px; background: var(--sunk); }
.cal-total b { font-size: 16px; }
.day-detail { margin-top: 18px; }
.entry-desc small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- links */
.links { display: grid; gap: 28px; }
.link-group h2 { margin-bottom: 12px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.link-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-soft); background: var(--panel); box-shadow: var(--shadow-panel); color: var(--ink); text-decoration: none; transition: border-color 160ms var(--ease), transform 160ms var(--ease); }
.link-card:hover { border-color: var(--teal-line); transform: translateY(-1px); }
.link-card b { display: block; font-weight: 650; line-height: 1.35; }
.link-card small { color: var(--muted); font-size: 12px; }
.link-initial { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-deep); }
.link-initial svg { width: 20px; height: 20px; }
.links-form { display: grid; gap: 10px; }

@media (max-width: 860px) {
  .meet-card.wide { grid-template-columns: 1fr; }
  .cal-head { display: none; }
  .cal-week { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cal-total { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; padding: 8px 12px; }
  .cal-day { min-height: 64px; padding: 6px; }
  .cal-entry { -webkit-line-clamp: 2; font-size: 10.5px; padding: 4px 5px; }
  .cal-entry b { display: none; }
  .legend { margin-left: 0; }
}
