/* =====================================================================
   WAVEPANEL — visual inspirado na Apple: branco, preto e laranja.
   Tema claro por padrão; escuro automático (sistema) ou manual.
   ===================================================================== */

:root {
  color-scheme: light;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebef;
  --col-bg: #ebebef;
  --field: #f2f2f5;
  --field-focus: #ffffff;
  --fill: rgba(118, 118, 128, 0.10);
  --fill-2: rgba(118, 118, 128, 0.17);
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.13);
  --separator: rgba(0, 0, 0, 0.08);

  --text: #1d1d1f;
  --text-2: #424245;
  --muted: #6e6e73;
  --faint: #86868b;

  --accent: #ff6b00;
  --accent-hover: #f25f00;
  --accent-press: #e05600;
  --accent-text: #c94a00;
  --accent-soft: rgba(255, 107, 0, 0.10);
  --accent-soft-2: rgba(255, 107, 0, 0.18);
  --accent-grad: linear-gradient(180deg, #ff8a2a 0%, #ff6b00 100%);
  --on-accent: #ffffff;

  --ink: #1d1d1f;
  --on-ink: #ffffff;
  --ink-soft: rgba(29, 29, 31, 0.07);
  --hero-bg: #1d1d1f;
  --hero-text: #ffffff;
  --hero-muted: rgba(255, 255, 255, 0.62);
  --hero-border: transparent;

  --danger: #e0352b;
  --danger-soft: rgba(224, 53, 43, 0.10);

  --sidebar-bg: rgba(250, 250, 252, 0.78);
  --tabbar-bg: rgba(250, 250, 252, 0.82);
  --paper-bg: #e8e8ed;
  --backdrop: rgba(0, 0, 0, 0.28);

  --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.06), 0 28px 70px rgba(0, 0, 0, 0.20);

  --radius: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --spring: cubic-bezier(0.2, 0.9, 0.3, 1.15);

  /* Paleta de etiquetas (as chaves antigas continuam valendo) */
  --c-blue: #1d1d1f;   /* Grafite */
  --c-green: #ffae1f;  /* Âmbar */
  --c-orange: #ff6b00; /* Laranja */
  --c-pink: #f0503c;   /* Coral */
  --c-purple: #a8551e; /* Bronze */
  --c-gray: #8e8e93;   /* Cinza */

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

/* ---------- Tema escuro ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --surface: #161617;
    --surface-2: #1f1f21;
    --surface-3: #2a2a2d;
    --col-bg: #0f0f10;
    --field: #232326;
    --field-focus: #1c1c1e;
    --fill: rgba(118, 118, 128, 0.20);
    --fill-2: rgba(118, 118, 128, 0.30);
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.14);
    --separator: rgba(255, 255, 255, 0.08);
    --text: #f5f5f7;
    --text-2: #d2d2d7;
    --muted: #a1a1a6;
    --faint: #86868b;
    --accent: #ff7a1a;
    --accent-hover: #ff8833;
    --accent-press: #ff6b00;
    --accent-text: #ff9a4d;
    --accent-soft: rgba(255, 122, 26, 0.14);
    --accent-soft-2: rgba(255, 122, 26, 0.24);
    --accent-grad: linear-gradient(180deg, #ff8f3d 0%, #ff7a1a 100%);
    --ink: #f5f5f7;
    --on-ink: #000000;
    --ink-soft: rgba(245, 245, 247, 0.10);
    --hero-bg: linear-gradient(155deg, rgba(255, 122, 26, 0.26) 0%, rgba(255, 122, 26, 0.07) 60%), #161617;
    --hero-text: #f5f5f7;
    --hero-muted: #c7c7cc;
    --hero-border: rgba(255, 122, 26, 0.28);
    --danger: #ff5a4f;
    --danger-soft: rgba(255, 90, 79, 0.14);
    --sidebar-bg: rgba(18, 18, 19, 0.78);
    --tabbar-bg: rgba(18, 18, 19, 0.82);
    --paper-bg: #0b0b0c;
    --backdrop: rgba(0, 0, 0, 0.55);
    --shadow-xs: none;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 28px 70px rgba(0, 0, 0, 0.6);
    --c-blue: #d1d1d6;
    --c-purple: #d08a52;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #161617;
  --surface-2: #1f1f21;
  --surface-3: #2a2a2d;
  --col-bg: #0f0f10;
  --field: #232326;
  --field-focus: #1c1c1e;
  --fill: rgba(118, 118, 128, 0.20);
  --fill-2: rgba(118, 118, 128, 0.30);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --separator: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --text-2: #d2d2d7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --accent: #ff7a1a;
  --accent-hover: #ff8833;
  --accent-press: #ff6b00;
  --accent-text: #ff9a4d;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --accent-soft-2: rgba(255, 122, 26, 0.24);
  --accent-grad: linear-gradient(180deg, #ff8f3d 0%, #ff7a1a 100%);
  --ink: #f5f5f7;
  --on-ink: #000000;
  --ink-soft: rgba(245, 245, 247, 0.10);
  --hero-bg: linear-gradient(155deg, rgba(255, 122, 26, 0.26) 0%, rgba(255, 122, 26, 0.07) 60%), #161617;
  --hero-text: #f5f5f7;
  --hero-muted: #c7c7cc;
  --hero-border: rgba(255, 122, 26, 0.28);
  --danger: #ff5a4f;
  --danger-soft: rgba(255, 90, 79, 0.14);
  --sidebar-bg: rgba(18, 18, 19, 0.78);
  --tabbar-bg: rgba(18, 18, 19, 0.82);
  --paper-bg: #0b0b0c;
  --backdrop: rgba(0, 0, 0, 0.55);
  --shadow-xs: none;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 28px 70px rgba(0, 0, 0, 0.6);
  --c-blue: #d1d1d6;
  --c-purple: #d08a52;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.47;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss03";
}
[hidden] { display: none !important; }
::selection { background: var(--accent-soft-2); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1 {
  font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.12;
  margin: 0; display: flex; align-items: center; gap: 12px;
}
h2 { font-family: var(--font-display); font-size: 17px; font-weight: 650; letter-spacing: -0.018em; margin: 0; line-height: 1.3; }
h3 { font-size: 13px; font-weight: 600; margin: 22px 0 10px; color: var(--muted); letter-spacing: -0.003em; }
b, strong { font-weight: 600; }
code { background: var(--fill); padding: 1px 6px; border-radius: 6px; font-size: 12px; font-family: var(--mono); }

svg.i { width: 1em; height: 1em; flex-shrink: 0; display: inline-block; vertical-align: -0.125em; }

.muted { color: var(--muted); margin: 4px 0 0; }
.meta { color: var(--muted); font-size: 12.5px; }
.meta svg.i { margin-right: 3px; }
.hint { color: var(--faint); font-size: 12.5px; margin: 8px 0 0; display: block; line-height: 1.5; }
.spacer { flex: 1; }
.ml-auto { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.txt-success { color: var(--accent-text); }
.txt-danger { color: var(--danger); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.c-blue { --ev: var(--c-blue); }
.c-green { --ev: var(--c-green); }
.c-orange { --ev: var(--c-orange); }
.c-pink { --ev: var(--c-pink); }
.c-purple { --ev: var(--c-purple); }
.c-gray { --ev: var(--c-gray); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ev, var(--accent)); display: inline-block; flex-shrink: 0; }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent-grad); display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.brand.big { flex-direction: column; gap: 14px; padding: 0; }
.brand.big .brand-mark { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.brand.big .brand-mark svg { width: 46px; height: 46px; stroke-width: 2.6; }
.brand.big .brand-name { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }

/* ---------- Login ---------- */
.auth-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 520px at 50% -10%, var(--accent-soft-2), transparent 70%),
    var(--bg);
}
.auth-card {
  width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 26px;
  padding: 40px 36px 36px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-lg);
  animation: rise 0.5s var(--spring) both;
}
.auth-card h1 { justify-content: center; font-size: 26px; margin-top: 4px; }
.auth-card #auth-sub { text-align: center; margin: -8px 0 6px; }
.auth-card .btn { height: 44px; font-size: 15px; margin-top: 4px; }
.form-error { color: var(--danger); font-size: 13px; margin: 0; }
.form-error:empty { display: none; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--sidebar-bg); border-right: 1px solid var(--separator);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  padding: 22px 12px 16px; display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh; z-index: 10;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; background: none; border: 0; padding: 7px 10px; border-radius: 9px;
  color: var(--text-2); cursor: pointer; text-align: left; font-weight: 500; font-size: 14px; text-decoration: none; width: 100%;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-item:hover { background: var(--fill); text-decoration: none; }
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; transition: stroke 0.15s; }
.nav-item.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.nav-item.active svg { stroke: var(--accent); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--separator); }

.main { padding: 40px 48px 64px; min-width: 0; max-width: 1600px; width: 100%; }
.main > * { animation: fade 0.28s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.loading { color: var(--muted); display: flex; gap: 10px; align-items: center; padding: 48px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--fill-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.view-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 20px; margin-bottom: 28px; flex-wrap: wrap; }
.view-header .muted { font-size: 15px; margin-top: 6px; letter-spacing: -0.01em; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }

/* ---------- Botões ---------- */
.btn {
  border: 0; border-radius: 999px; height: 36px; padding: 0 16px; cursor: pointer; font-weight: 500; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.12s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s;
  color: var(--text); background: var(--fill); -webkit-user-select: none; user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn svg, .btn .i { width: 16px; height: 16px; flex-shrink: 0; }
.btn.small { height: 30px; padding: 0 12px; font-size: 13px; gap: 5px; }
.btn.small svg { width: 14px; height: 14px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.primary:active:not(:disabled) { background: var(--accent-press); }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-xs); }
.btn.secondary:hover:not(:disabled) { background: var(--surface-2); }
.modal .btn.secondary, .panel .btn.secondary { background: var(--fill); box-shadow: none; }
.modal .btn.secondary:hover:not(:disabled), .panel .btn.secondary:hover:not(:disabled) { background: var(--fill-2); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--fill); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.btn.danger-solid { background: var(--danger); color: #fff; font-weight: 600; }
.btn.danger-solid:hover { filter: brightness(1.06); }
.btn.success { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.btn.success:hover:not(:disabled) { background: var(--accent-soft-2); }
.btn.wa { background: var(--ink); color: var(--on-ink); }
.btn.wa:hover:not(:disabled) { opacity: 0.85; }
label.btn { position: relative; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text-2);
  cursor: pointer; line-height: 1; display: inline-grid; place-items: center; text-decoration: none; flex-shrink: 0;
  transition: background 0.15s var(--ease), color 0.15s, transform 0.12s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover:not(:disabled) { background: var(--fill-2); color: var(--text); text-decoration: none; }
.icon-btn:active:not(:disabled) { transform: scale(0.94); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn.tiny { width: 26px; height: 26px; background: transparent; color: var(--faint); }
.icon-btn.tiny svg { width: 14px; height: 14px; }
.icon-btn.tiny:hover:not(:disabled) { color: var(--text); background: var(--fill); }
.icon-btn.tiny[data-del]:hover, .icon-btn.tiny[data-rm]:hover, .icon-btn.tiny[data-del-note]:hover { color: var(--danger); background: var(--danger-soft); }

.link {
  background: none; border: 0; color: var(--accent-text); cursor: pointer; font-weight: 500; padding: 0; text-decoration: none; text-align: left;
  display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px;
}
.link svg { width: 14px; height: 14px; transition: transform 0.18s var(--ease); }
.link:hover { text-decoration: none; }
.link:hover svg { transform: translateX(2px); }
td .link { font-size: 14px; font-weight: 600; color: var(--text); }
td .link:hover { color: var(--accent-text); }

/* Filtros: pílulas estilo apple.com */
.filters { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.chip {
  border: 0; background: var(--surface); color: var(--text-2); padding: 0 16px; height: 34px; border-radius: 999px; cursor: pointer; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--border-strong); transition: all 0.18s var(--ease);
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--ink); color: var(--on-ink); box-shadow: none; }

/* Controle segmentado (iOS) */
.segmented { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px; }
.segmented button {
  background: none; border: 0; height: 30px; padding: 0 14px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-weight: 500; font-size: 13px;
  transition: background 0.18s var(--ease), box-shadow 0.18s, color 0.18s;
}
.segmented button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
:root[data-theme="dark"] .segmented button.active { background: var(--surface-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented button.active { background: var(--surface-3); } }

.search {
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center / 15px;
  border: 0; box-shadow: inset 0 0 0 1px var(--border-strong); border-radius: 999px; height: 36px; padding: 0 14px 0 34px;
  width: 230px; outline: none; transition: box-shadow 0.18s var(--ease);
}
.search:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); background-color: var(--surface); }
.search::-webkit-search-cancel-button { cursor: pointer; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--separator); margin-bottom: 24px; overflow-x: auto; }
.tabs a {
  padding: 10px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-weight: 500; white-space: nowrap; transition: color 0.15s, border-color 0.15s;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

/* ---------- Badges / etiquetas ---------- */
.badge {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px; font-weight: 600; background: var(--fill); color: var(--text-2);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0;
}
.badge svg { width: 12px; height: 12px; stroke-width: 2.4; }
.badge.t-faturamento { background: var(--accent-soft); color: var(--accent-text); }
.badge.t-clientes { background: var(--ink-soft); color: var(--text); }
.badge.t-outro { background: var(--fill); color: var(--muted); }
.badge.done { background: var(--accent); color: var(--on-accent); }
.badge.late { background: var(--danger-soft); color: var(--danger); }
.stage-badge { background: color-mix(in srgb, var(--ev) 14%, transparent); color: var(--text); }
.stage-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ev); }
.badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.label { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--fill); color: var(--text-2); font-weight: 500; margin: 1px 0; }
.labels { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Painéis / números ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.stat-sub { color: var(--faint); font-size: 12.5px; }
.stat-card:first-child { background: var(--hero-bg); color: var(--hero-text); border-color: var(--hero-border); }
.stat-card:first-child .stat-label { color: var(--hero-muted); }
.stat-card:first-child .stat-sub { color: var(--accent); font-weight: 500; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; min-width: 0; box-shadow: var(--shadow-sm); }
.panel > h2 + .muted { margin-bottom: 18px; }
.panel > h2 + .form-grid { margin-top: 18px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; grid-auto-flow: row dense; }
.dash-grid .span-2 { grid-column: span 2; }
.group-label { color: var(--faint); font-size: 12px; font-weight: 600; margin: 6px 2px 0; }
.empty {
  color: var(--muted); text-align: center; padding: 30px 16px; border-radius: 14px; background: var(--surface-2); line-height: 1.6;
}
.panel .empty { background: var(--surface-2); }
.empty .btn { margin-top: 14px; }
.empty.error { color: var(--danger); background: var(--danger-soft); }
.alert { background: var(--accent-soft); color: var(--accent-text); padding: 12px 14px; border-radius: 12px; font-size: 13px; margin: 12px 0; font-weight: 500; }
.alert a { font-weight: 600; }

/* ---------- Metas ---------- */
.goal-list { display: flex; flex-direction: column; gap: 10px; }
.goal-item { padding: 16px 18px; border-radius: 14px; background: var(--surface-2); }
.goal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.goal-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -0.012em; }
.progress { height: 6px; background: var(--fill-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: var(--accent-grad); transition: width 0.8s var(--ease); }
.progress-bar.done { background: var(--accent); }
.goal-values { display: flex; justify-content: space-between; margin-top: 9px; font-size: 13px; gap: 8px; font-variant-numeric: tabular-nums; }
.goal-values .muted { margin: 0; }
.goal-values .pct { font-weight: 700; }
.goal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.goal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.25s var(--ease);
}
.goal-card:hover { box-shadow: var(--shadow); }
.goal-card .goal-top { margin: 0; }
.goal-card .big { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 4px; }
.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.history li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.history .val { font-weight: 600; font-variant-numeric: tabular-nums; }
.history .val.neg { color: var(--danger); }

/* ---------- Compromissos / calendário ---------- */
.event-list { display: flex; flex-direction: column; gap: 6px; }
.event-item {
  position: relative; display: flex; gap: 14px; padding: 11px 14px 11px 18px; border-radius: 12px; background: var(--surface-2);
  cursor: pointer; transition: background 0.15s var(--ease); align-items: center;
}
.event-item::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--ev, var(--accent)); }
.event-item:hover, .event-item:focus-visible { background: var(--fill-2); outline: none; }
.event-date { min-width: 36px; text-align: center; }
.event-date .d { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.event-date .m { font-size: 10.5px; color: var(--accent-text); text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }
.event-info { min-width: 0; }
.event-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h1 { min-width: 260px; justify-content: center; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); color: var(--faint); font-size: 12px; font-weight: 600; text-align: center; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  min-height: 100px; background: transparent; border: 0; border-radius: 12px; padding: 6px;
  cursor: pointer; display: flex; flex-direction: column; gap: 3px; text-align: left; overflow: hidden; min-width: 0;
  transition: background 0.15s var(--ease); border-top: 1px solid var(--separator); border-top-left-radius: 0; border-top-right-radius: 0;
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.other .num { color: var(--faint); opacity: 0.6; }
.cal-day.other .cal-ev { opacity: 0.5; }
.cal-day .num {
  font-weight: 500; font-size: 13px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.cal-day.today .num { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.cal-day.selected { background: var(--accent-soft); border-radius: 12px; }
.cal-day.selected:not(.today) .num { color: var(--accent-text); font-weight: 700; }
.cal-ev {
  font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--ev) 13%, transparent); color: var(--text); border-left: 2px solid var(--ev); display: block;
}
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; font-weight: 500; }
.day-panel { position: sticky; top: 24px; }
.day-panel h2 { font-size: 16px; }

/* ---------- Kanban ---------- */
.board-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.board-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 22px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--text); cursor: pointer; text-align: left;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.board-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.board-card p { margin: 0; }
.board-card-top { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.board-card-top b { display: flex; align-items: center; gap: 9px; font-size: 16px; letter-spacing: -0.015em; }
.board-card.new {
  border: 1.5px dashed var(--border-strong); box-shadow: none; align-items: center; justify-content: center; color: var(--muted);
  font-weight: 600; min-height: 140px; background: transparent; gap: 8px;
}
.board-card.new span { width: 40px; height: 40px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; transition: background 0.2s, color 0.2s; }
.board-card.new span svg { width: 20px; height: 20px; }
.board-card.new:hover { color: var(--accent-text); border-color: var(--accent); transform: none; box-shadow: none; }
.board-card.new:hover span { background: var(--accent); color: var(--on-accent); }
.board-title { display: flex; align-items: center; gap: 14px; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tpl-tile { cursor: pointer; position: relative; }
.tpl-tile input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-body {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface-2); height: 100%;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.18s var(--ease), background 0.18s;
}
.tpl-tile:hover .tpl-body { background: var(--fill-2); }
.tpl-tile input:checked + .tpl-body { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.tpl-tile input:focus-visible + .tpl-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--surface); display: grid; place-items: center; color: var(--accent); margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.tpl-icon svg { width: 18px; height: 18px; }
.tpl-tile input:checked + .tpl-body .tpl-icon { background: var(--accent); color: var(--on-accent); }
.tpl-body small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.tpl-cols { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.tpl-cols i { font-style: normal; font-size: 10.5px; background: var(--surface); padding: 1px 7px; border-radius: 5px; color: var(--muted); font-weight: 500; }

.kb-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; min-height: 60vh; scroll-snap-type: x proximity; }
.kb-col {
  background: var(--col-bg); border-radius: var(--radius); width: 296px; flex-shrink: 0; scroll-snap-align: start;
  display: flex; flex-direction: column; max-height: calc(100vh - 200px);
}
.kb-col.done-col, .kb-col.stage-won { background: color-mix(in srgb, var(--accent) 7%, var(--col-bg)); }
.kb-col.add-col {
  align-items: center; justify-content: center; min-height: 64px; color: var(--muted); background: transparent;
  border: 1.5px dashed var(--border-strong); cursor: pointer; font-weight: 600; gap: 6px; flex-direction: row;
  transition: color 0.18s, border-color 0.18s;
}
.kb-col.add-col:hover { color: var(--accent-text); border-color: var(--accent); }
.kb-col-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 12px 8px 14px; }
.kb-col-name {
  background: none; border: 0; font-weight: 650; font-size: 14px; cursor: pointer; padding: 3px 6px; margin-left: -6px; border-radius: 7px;
  text-align: left; display: flex; gap: 7px; align-items: center; letter-spacing: -0.012em;
}
.kb-col-name:hover:not(.static) { background: var(--fill); }
.kb-col-name.static { cursor: default; }
.kb-col-name .count { font-size: 12px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.kb-col-name .done-ic { color: var(--accent); width: 15px; height: 15px; stroke-width: 2.4; }
.kb-col-tools { display: flex; opacity: 0; transition: opacity 0.15s; }
.kb-col:hover .kb-col-tools, .kb-col-tools:focus-within { opacity: 1; }
.kb-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 10px 10px; overflow-y: auto; min-height: 56px; flex: 1; border-radius: 12px; transition: background 0.15s; }
.kb-list.drop-target { background: var(--accent-soft); }
.kb-card, .crm-card {
  background: var(--surface); border-radius: 12px; padding: 12px 14px; cursor: grab;
  display: flex; flex-direction: column; gap: 7px; -webkit-user-select: none; user-select: none;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.kb-card:hover, .crm-card:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); }
.kb-card:focus-visible, .crm-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.kb-card:active, .crm-card:active { cursor: grabbing; }
.kb-card.dragging, .crm-card.dragging { opacity: 0.4; transform: scale(0.98); }
.kb-card.is-done .kb-title { text-decoration: line-through; color: var(--faint); }
.kb-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kb-type { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.kb-type svg { width: 13px; height: 13px; }
.kb-title { font-weight: 600; word-break: break-word; letter-spacing: -0.01em; line-height: 1.35; }
.kb-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.kb-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.kb-meta svg { width: 13px; height: 13px; }
.kb-meta:empty { display: none; }
.prio { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.p-low { background: var(--fill); color: var(--muted); }
.p-med { background: var(--ink-soft); color: var(--text-2); }
.p-high { background: var(--accent-soft); color: var(--accent-text); }
.p-urgent { background: var(--danger-soft); color: var(--danger); }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.prio-dot.p-low { background: var(--faint); } .prio-dot.p-med { background: var(--text-2); } .prio-dot.p-high { background: var(--accent); } .prio-dot.p-urgent { background: var(--danger); }
.due { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.due svg { width: 13px; height: 13px; }
.due.late { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--accent-text); font-weight: 600; }
.kb-quick { padding: 0 10px 10px; }
.kb-quick input, .kb-add {
  width: 100%; background: transparent; border: 0; border-radius: 10px; height: 36px; padding: 0 12px; color: var(--muted); outline: none;
  text-align: left; cursor: pointer; font-weight: 500; transition: background 0.15s, color 0.15s;
}
.kb-quick input {
  padding-left: 32px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat 11px center / 14px;
}
.kb-quick input::placeholder { color: var(--muted); }
.kb-quick input:hover, .kb-add:hover { background-color: var(--fill); color: var(--text); }
.kb-quick input:focus { background-color: var(--surface); color: var(--text); cursor: text; box-shadow: 0 0 0 2px var(--accent); }
.kb-add { margin: 0 10px 10px; width: auto; display: flex; align-items: center; gap: 6px; }
.kb-add svg { width: 14px; height: 14px; }

/* checklist */
.checklist-editor { display: flex; flex-direction: column; gap: 6px; }
.ck-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ck-progress .progress { flex: 1; height: 5px; }
.ck-progress small { color: var(--muted); font-variant-numeric: tabular-nums; }
.ck-item { display: flex; align-items: center; gap: 8px; }
.ck-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.modal .ck-text { flex: 1; height: 34px; }
.ck-text.done { text-decoration: line-through; color: var(--faint); }

/* ---------- CRM ---------- */
.stage-head .kb-col-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ev); flex-shrink: 0; }
.stage-total { font-size: 12.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.stage-won .stage-total { color: var(--accent-text); }
.stage-lost { opacity: 0.7; }
.crm-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.crm-card .value { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stage-won .crm-card .value { color: var(--accent-text); }
.crm-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.contact-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.contact-btns .btn.small { width: 30px; padding: 0; }
.contact-btns .btn.small svg { width: 15px; height: 15px; }
.contact-btns .btn.ghost.small { background: var(--fill); }
.contact-btns .btn.ghost.small:hover { background: var(--fill-2); }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 20px;
  background: var(--accent-grad); color: #fff; flex-shrink: 0; letter-spacing: 0;
}
.avatar.small { width: 36px; height: 36px; font-size: 14px; }
.client-detail .cd-head, .cd-head { display: flex; align-items: center; gap: 14px; }
.cd-head h2 { font-size: 22px; margin-bottom: 6px; letter-spacing: -0.022em; }
.cd-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; margin: 4px 0 0; padding: 16px 18px; background: var(--surface-2); border-radius: 14px; }
.info-grid dt { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.info-grid dd { margin: 0; font-weight: 500; word-break: break-word; }
.note-box { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; }
.note-form { display: flex; gap: 8px; align-items: flex-start; }
.note-form textarea { flex: 1; }
.note-form .btn { height: 38px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.timeline li {
  display: flex; justify-content: space-between; gap: 8px; padding: 12px 14px 12px 18px; background: var(--surface-2); border-radius: 12px;
  white-space: pre-wrap; position: relative;
}
.timeline li::before { content: ""; position: absolute; left: 8px; top: 20px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.timeline li.muted::before { display: none; }
.mini-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mini-list li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.mini-list li > svg { color: var(--accent); width: 15px; height: 15px; }
.stage-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; }
.stage-row input { flex: 1; min-width: 0; }
.stage-row select { width: auto; }
.row-form { display: flex; gap: 8px; margin-top: 10px; }
.row-form input { flex: 1; }
.row-form .btn { height: 38px; }

.table-wrap { padding: 4px 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--separator); vertical-align: middle; }
.table th { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; background: transparent; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inline-select { background-color: var(--fill); border: 0; border-radius: 999px; height: 30px; padding: 0 30px 0 12px; font-size: 13px; font-weight: 500; width: auto; background-position: right 10px center; }
.status-assinado { color: var(--accent-text); }
.status-enviado { color: var(--text); }
.status-cancelado { color: var(--danger); }

/* dashboard */
.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel-row { display: grid; grid-template-columns: 128px 1fr 22px; gap: 10px; align-items: center; font-size: 13px; }
.funnel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.funnel-bar { height: 6px; background: var(--fill); border-radius: 999px; overflow: hidden; }
.funnel-bar .fill { height: 100%; background: var(--ev); border-radius: 999px; min-width: 6px; transition: width 0.8s var(--ease); }
.funnel-num { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.funnel-val { color: var(--faint); font-size: 11.5px; grid-column: 2 / -1; margin-top: -8px; font-variant-numeric: tabular-nums; }
.funnel-val:empty { display: none; }
.task-list, .client-mini-list { display: flex; flex-direction: column; gap: 4px; }
.task-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; color: var(--text); transition: background 0.15s; }
.task-item:hover { background: var(--fill-2); text-decoration: none; }
.task-title { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; font-weight: 500; }
.task-title small { font-size: 11.5px; margin: 0; }
.client-mini { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer; transition: background 0.15s; }
.client-mini:hover { background: var(--surface-2); }

/* ---------- Contratos ---------- */
.gen-layout { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 18px; align-items: start; }
.gen-layout h3:first-of-type { margin-top: 18px; }
.gen-actions { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.paper-wrap { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; border-radius: var(--radius); background: var(--paper-bg); padding: 28px; }
.paper-wrap.in-modal { position: static; max-height: 60vh; padding: 20px; }
.paper {
  background: #fff; color: #1d1d1f; max-width: 760px; margin: 0 auto; padding: 64px 72px; border-radius: 6px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif; font-size: 14px; line-height: 1.75;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 12px 40px rgba(0, 0, 0, 0.12); font-variant-numeric: lining-nums; letter-spacing: 0;
}
.paper h1 { font-family: inherit; font-size: 17px; text-align: center; display: block; margin: 0 0 28px; letter-spacing: 0.02em; line-height: 1.4; font-weight: 700; }
.paper h2 { font-family: inherit; font-size: 14px; margin: 22px 0 6px; letter-spacing: 0; font-weight: 700; }
.paper p { margin: 0 0 12px; text-align: justify; }
.paper p.sign { text-align: center; margin-top: 44px; }
.paper mark.missing { background: #ffe8d6; color: #b34200; padding: 0 5px; border-radius: 4px; font-family: var(--font); font-size: 12px; font-weight: 500; }
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tpl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.25s var(--ease);
}
.tpl-card:hover { box-shadow: var(--shadow); }
.tpl-card-head { display: flex; gap: 14px; align-items: flex-start; }
.tpl-card-head b { font-size: 15px; letter-spacing: -0.012em; }
.tpl-doc { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.tpl-doc svg { width: 21px; height: 21px; }
.tpl-editor { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
.var-panel { background: var(--surface-2); border-radius: 14px; padding: 16px; max-height: 70vh; overflow: auto; font-size: 13px; }
.var-group { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.var-group small { width: 100%; color: var(--muted); font-weight: 600; font-size: 11.5px; margin-bottom: 2px; }
.var-chip {
  background: var(--surface); border: 0; box-shadow: inset 0 0 0 1px var(--border-strong); border-radius: 6px; padding: 2px 7px; font-size: 11px;
  cursor: pointer; font-family: var(--mono); color: var(--text-2); transition: all 0.15s;
}
.var-chip:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); }
textarea.mono { font-family: var(--mono); font-size: 13px; line-height: 1.55; }

/* ---------- Configurações ---------- */
.settings-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack .panel h2 + .muted { margin-bottom: 18px; }
.theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.theme-opt { cursor: pointer; position: relative; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt span {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 12px; border-radius: 14px; background: var(--surface-2);
  font-weight: 500; font-size: 13px; color: var(--text-2); transition: all 0.18s var(--ease); box-shadow: inset 0 0 0 1px transparent;
}
.theme-opt span svg { width: 22px; height: 22px; color: var(--muted); }
.theme-opt:hover span { background: var(--fill-2); }
.theme-opt input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); font-weight: 600; }
.theme-opt input:checked + span svg { color: var(--accent); }
.theme-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Formulários / modais ---------- */
.modal {
  border: 0; border-radius: 24px; background: var(--surface); color: var(--text); padding: 0;
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg);
  outline: 1px solid var(--border);
}
.modal[open] { animation: modal-in 0.32s var(--spring); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal.small { width: min(400px, calc(100vw - 32px)); }
.modal.wide { width: min(820px, calc(100vw - 32px)); }
.modal.xwide { width: min(1120px, calc(100vw - 32px)); }
.modal::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade-bd 0.25s var(--ease); }
@keyframes fade-bd { from { opacity: 0; } to { opacity: 1; } }
.modal-form, .modal-body { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.modal-form > h2, .modal-body > h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.024em; }
.modal-form > h2 + .muted, .modal-body > h2 + .muted { margin-top: -10px; }
.modal.small .modal-body { padding: 26px 24px 20px; }
.confirm-msg { margin: 0; font-size: 15px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; min-width: 0; }
.field .req { color: var(--accent); font-style: normal; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }

input:where(:not([type=checkbox]):not([type=radio]):not([type=file])), select, textarea {
  background-color: var(--field); border: 0; box-shadow: inset 0 0 0 1px transparent; border-radius: 10px; height: 40px; padding: 0 12px;
  color: var(--text); outline: none; width: 100%; font-size: 14px;
  transition: box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:where(:not([type=checkbox]):not([type=radio])):hover, select:hover, textarea:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
input:focus, select:focus, textarea:focus { background-color: var(--field-focus); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft) !important; }
input:user-invalid { box-shadow: inset 0 0 0 1px var(--danger); }
select {
  -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 15px;
}
.input-prefix { display: flex; align-items: center; background: var(--field); border-radius: 10px; transition: box-shadow 0.18s, background 0.18s; }
.input-prefix:focus-within { background: var(--field-focus); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.input-prefix b { padding-left: 12px; color: var(--muted); font-weight: 600; }
.input-prefix input { background: transparent !important; box-shadow: none !important; }
.modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.modal-actions .btn { min-width: 92px; }
.colors { border: 0; padding: 0; margin: 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.colors legend { color: var(--text-2); font-size: 13px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.colors label { cursor: pointer; position: relative; }
.colors input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--ev); transition: transform 0.18s var(--spring), box-shadow 0.18s; }
.colors label:hover .swatch { transform: scale(1.08); }
.colors input:checked + .swatch { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ev); }
.colors input:focus-visible + .swatch { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(16px) scale(0.96);
  background: var(--ink); color: var(--on-ink); padding: 12px 14px 12px 18px; border-radius: 16px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity 0.28s var(--ease), transform 0.4s var(--spring); z-index: 1000;
  display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
}
.toast:not(:has(.toast-action)) { padding-right: 18px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
.toast-action {
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.toast-action:hover { text-decoration: none; background: var(--accent-hover); }

/* ---------- Impressão ---------- */
#print-root { display: none; }
@media print {
  @page { margin: 18mm; }
  body.printing { background: #fff; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
  .paper.print { box-shadow: none; padding: 0; max-width: none; font-size: 12pt; }
}

/* ---------- Busca na barra lateral ---------- */
.nav-search {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; margin: -10px 0 -8px;
  border: 0; border-radius: 9px; background: var(--fill); color: var(--muted); cursor: pointer; font-size: 13.5px;
  transition: background 0.15s var(--ease), color 0.15s;
}
.nav-search:hover { background: var(--fill-2); color: var(--text); }
.nav-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.nav-search span { flex: 1; text-align: left; }
kbd {
  font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--muted); background: var(--surface);
  border-radius: 5px; padding: 1px 6px; box-shadow: inset 0 0 0 1px var(--border-strong); white-space: nowrap;
}

/* ---------- Paleta de busca (Ctrl+K) ---------- */
.modal.palette-modal { width: min(640px, calc(100vw - 32px)); margin-top: 12vh; border-radius: 18px; }
.palette { display: flex; flex-direction: column; max-height: min(560px, 72vh); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--separator); }
.palette-input > svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.palette-input input {
  height: 58px; border: 0; background: transparent !important; box-shadow: none !important; outline: none; font-size: 17px; padding: 0; letter-spacing: -0.01em;
}
.palette-input input::-webkit-search-cancel-button { display: none; }
.palette-results { overflow-y: auto; padding: 8px; }
.palette-group { font-size: 12px; font-weight: 600; color: var(--faint); padding: 10px 12px 4px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette-item.active { background: var(--accent); color: var(--on-accent); }
.pi-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--fill); display: grid; place-items: center; flex-shrink: 0; color: var(--text-2); }
.pi-icon svg { width: 16px; height: 16px; }
.palette-item.active .pi-icon { background: rgba(255, 255, 255, 0.22); color: #fff; }
.pi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pi-text b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item.active .pi-text small { color: rgba(255, 255, 255, 0.82); }
.pi-enter svg { width: 16px; height: 16px; }
.palette-empty { padding: 32px 16px; text-align: center; color: var(--muted); }

/* ---------- Painéis com ícone no título ---------- */
.panel-title { display: flex; align-items: center; gap: 10px; }
.panel-title > svg { width: 20px; height: 20px; color: var(--accent); }
.panel-title + .muted { margin: 6px 0 18px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.perm-row .hint { margin: 0; flex: 1; min-width: 200px; }
.reminder-daily { align-self: end; padding-bottom: 10px; }
.perm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.url-list { display: flex; flex-direction: column; gap: 6px; }
.url-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: var(--surface-2); border-radius: 12px; }
.url-row code { flex: 1; background: none; font-size: 14px; font-weight: 600; color: var(--text); padding: 0; }
.hint code, .muted code { word-break: break-all; }
.steps { margin: 14px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.backup-list { display: flex; flex-direction: column; gap: 4px; }
.backup-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); }
.backup-row b { font-weight: 500; font-size: 13px; font-family: var(--mono); }
.b-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.b-icon svg { width: 15px; height: 15px; }
.choice-actions { flex-wrap: wrap; }

/* ---------- Financeiro ---------- */
.month-nav { display: flex; align-items: center; gap: 6px; margin-right: 6px; }
.month-label { font-weight: 600; min-width: 150px; text-align: center; letter-spacing: -0.01em; }
.fin-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.tx-list { display: flex; flex-direction: column; gap: 4px; }
.tx-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background 0.15s var(--ease);
}
.tx-row:hover, .tx-row:focus-visible { background: var(--surface-2); outline: none; }
.tx-check {
  width: 26px; height: 26px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1.5px var(--border-strong); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: transparent; transition: all 0.18s var(--ease);
}
.tx-check svg { width: 14px; height: 14px; stroke-width: 2.8; }
.tx-check:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.tx-check.on { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.k-despesa .tx-check.on { background: var(--ink); color: var(--on-ink); }
.tx-main { min-width: 0; }
.tx-desc { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.tx-row.paid .tx-desc { color: var(--text-2); }
.tx-date { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 104px; text-align: right; letter-spacing: -0.01em; }
.k-despesa .tx-amount { color: var(--text-2); }
.tx-row.paid.k-receita .tx-amount { color: var(--accent-text); }
.tx-wa { grid-column: auto; }
.tx-row:not(:has(.tx-wa)) { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.badge.s-paid { background: var(--accent-soft); color: var(--accent-text); }
.badge.s-pending { background: var(--fill); color: var(--text-2); }
.badge.s-overdue { background: var(--danger-soft); color: var(--danger); }
.badge.auto { background: var(--ink); color: var(--on-ink); }
.overdue-panel { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent), var(--shadow-sm); }
.cat-list { display: flex; flex-direction: column; gap: 12px; }
.cat-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 13px; }
.cat-name { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.cat-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-bar { grid-column: 1 / -1; height: 6px; background: var(--fill); border-radius: 999px; overflow: hidden; }
.cat-bar > div { height: 100%; border-radius: 999px; }
.cat-bar .rec { background: var(--accent); }
.cat-bar .des { background: var(--ink); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-stats span { font-size: 12px; color: var(--muted); }
.mini-stats b { font-variant-numeric: tabular-nums; }
.mini-stats .danger b { color: var(--danger); }
.stat-value.txt-danger { color: var(--danger); }

/* ---------- Gráfico ---------- */
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sw.rec { background: var(--accent); }
.sw.des { background: var(--ink); }
.chart { position: relative; }
.chart-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-plot { position: relative; height: 220px; margin-left: 58px; }
.chart-grid { position: absolute; inset: 0 0 26px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid .gl { border-top: 1px solid var(--separator); position: relative; height: 0; }
.chart-grid .gl:last-child { border-top-color: var(--border-strong); }
.chart-grid .gl span { position: absolute; right: calc(100% + 10px); top: -8px; font-size: 11px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-cols { position: absolute; inset: 0; display: flex; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; cursor: default; border-radius: 10px; outline: none; }
.chart-col .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 18%; margin-bottom: 0; height: calc(100% - 26px); border-radius: 8px; transition: background 0.15s; }
.chart-col.hover .bars, .chart-col:focus-visible .bars { background: var(--fill); }
.bar { flex: 1; max-width: 26px; border-radius: 4px 4px 0 0; position: relative; min-height: 0; transition: height 0.8s var(--ease); }
.bar.rec { background: var(--accent); }
.bar.des { background: var(--ink); }
.chart-col:not(.current) .bar.rec { background: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.bar-val { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-x { height: 26px; display: flex; align-items: flex-end; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.chart-col.current .chart-x { color: var(--text); font-weight: 600; }
.chart-empty { position: absolute; inset: 0 0 26px; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 0 20px; }
.chart-tip {
  position: absolute; transform: translateY(-100%); background: var(--surface); color: var(--text); border-radius: 12px; padding: 10px 12px;
  box-shadow: var(--shadow-lg); font-size: 12.5px; min-width: 180px; pointer-events: none; z-index: 5; display: flex; flex-direction: column; gap: 4px;
  outline: 1px solid var(--border);
}
.chart-tip > b { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: capitalize; margin-bottom: 2px; }
.chart-tip div { display: flex; align-items: center; gap: 8px; }
.chart-tip div span { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip .tip-total { border-top: 1px solid var(--separator); padding-top: 5px; margin-top: 2px; color: var(--muted); }
.chart-tip .tip-total span { color: var(--text); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Calendário: repetição, lembrete, semana e dia ---------- */
.event-title { display: flex; align-items: center; gap: 6px; }
.event-title .rep { color: var(--faint); display: inline-flex; }
.event-title .rep svg { width: 13px; height: 13px; }
.event-info { flex: 1; }
.btn.ev-remind { flex-shrink: 0; width: 30px; padding: 0; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.dash-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.tg-panel { padding: 0; overflow: hidden; }
.tg { --gut: 64px; }
.tg-head, .tg-allday { display: grid; grid-template-columns: var(--gut) repeat(var(--days), minmax(0, 1fr)); }
.tg-head { border-bottom: 1px solid var(--separator); padding: 10px 0 8px; }
.tg-dayhead { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; padding: 4px 0; border-radius: 10px; }
.tg-dayhead:hover { background: var(--fill); }
.tg-dayhead span { font-size: 11.5px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.tg-dayhead b { font-size: 20px; font-weight: 600; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; letter-spacing: -0.02em; }
.tg-dayhead.today span { color: var(--accent-text); }
.tg-dayhead.today b { background: var(--accent); color: var(--on-accent); }
.tg-allday { border-bottom: 1px solid var(--separator); min-height: 34px; }
.tg-gutter { font-size: 11px; color: var(--faint); padding: 8px 8px 0 0; text-align: right; }
.tg-allcell { padding: 4px 3px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--separator); min-width: 0; }
.tg-allcell .cal-ev { cursor: pointer; }
.tg-body { display: grid; grid-template-columns: var(--gut) repeat(var(--days), minmax(0, 1fr)); max-height: calc(100vh - 290px); min-height: 360px; overflow-y: auto; position: relative; }
.tg-times { position: relative; }
.tg-times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tg-times span:first-child { transform: none; }
.tg-col {
  position: relative; border-left: 1px solid var(--separator);
  background-image: linear-gradient(to bottom, var(--separator) 1px, transparent 1px);
  background-size: 100% var(--hh);
}
.tg-col.today { background-color: color-mix(in srgb, var(--accent) 3%, transparent); }
.tg-ev {
  position: absolute; border-radius: 8px; padding: 4px 8px; overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.3;
  background: color-mix(in srgb, var(--ev) 16%, var(--surface)); border-left: 3px solid var(--ev); color: var(--text);
  display: flex; flex-direction: column; gap: 1px; transition: box-shadow 0.15s, transform 0.15s; z-index: 1;
}
.tg-ev:hover, .tg-ev:focus-visible { box-shadow: var(--shadow); z-index: 2; outline: none; }
.tg-ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ev span { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ev.short { flex-direction: row; align-items: center; gap: 6px; padding-top: 2px; padding-bottom: 2px; }
.tg-now { position: absolute; left: -4px; right: 0; height: 2px; background: var(--accent); z-index: 3; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -1px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tg.single { --gut: 72px; }

/* ---------- Cartões de destaque (gráfico de pico) ---------- */
.peak-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; isolation: isolate; }
.peak { position: relative; border-radius: var(--pk-r, 28px); color: #fff; -webkit-user-select: none; user-select: none; font-family: var(--font-display); min-width: 0; }
.pk-halo { position: absolute; z-index: 0; pointer-events: none; }
.pk-body { position: absolute; left: 0; top: 0; z-index: 1; border-radius: var(--pk-r, 28px); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 18px 40px -18px rgba(0, 0, 0, 0.45); }
.peak > p { position: absolute; margin: 0; z-index: 2; line-height: 1.2; }
.pk-updated { color: #a1a1a6; font-weight: 400; white-space: nowrap; letter-spacing: 0; }
.pk-title { left: 0; right: 0; text-align: center; color: #aeaeb2; font-weight: 500; letter-spacing: -0.005em; }
.pk-caption { left: 0; right: 0; text-align: center; color: #8e8e93; font-weight: 400; letter-spacing: 0; }
.pk-num { position: absolute; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; color: #fff; text-decoration: none; opacity: 0; }
.pk-num:hover { text-decoration: none; }
a.pk-num:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.pk-value { position: relative; font-weight: 600; line-height: 1; letter-spacing: -0.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pk-prefix { font-size: 0.38em; font-weight: 500; vertical-align: 1.05em; margin-right: 0.18em; color: #d1d1d6; letter-spacing: 0; }
.pk-prefix:empty, .pk-suffix:empty { display: none; }
.pk-suffix { font-size: 0.5em; font-weight: 500; margin-left: 0.06em; color: #d1d1d6; }
.pk-digits { position: relative; display: inline-block; }
.pk-ghost { visibility: hidden; }
.pk-live { position: absolute; right: 0; top: 0; }
.pk-arrow { position: absolute; left: 100%; display: block; transform-origin: 0% 100%; opacity: 0; }
.pk-arrow[hidden] { display: none; }
.pk-arrow svg { width: 100%; height: 100%; overflow: visible; display: block; }
.pk-arrow path { stroke: currentColor; }
.pk-hover { position: absolute; left: 0; width: 100%; z-index: 2; touch-action: pan-y; cursor: crosshair; }
.pk-pill {
  position: absolute; z-index: 3; display: flex; align-items: center; border: 0; background: rgba(255, 255, 255, 0.13);
  color: var(--pk-pill-text); cursor: pointer; font-family: inherit; font-weight: 500; transition: background 0.15s;
}
.pk-pill:hover { background: rgba(255, 255, 255, 0.2); }
.pk-pill:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pk-pill svg { width: 0.7em; height: 0.42em; overflow: visible; transition: transform 0.2s ease; }
.pk-pill svg path { stroke: var(--pk-chevron); }
.pk-open .pk-pill svg { transform: rotate(180deg); }
.pk-menu {
  position: absolute; z-index: 4; background: var(--pk-menu-bg); border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  transform-origin: top right; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2), visibility 0.22s;
}
.pk-open .pk-menu { opacity: 1; visibility: visible; transform: none; }
.pk-menu button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent;
  color: #c7c7cc; cursor: pointer; font-family: inherit; text-align: left;
}
.pk-menu button:hover { background: rgba(255, 255, 255, 0.06); }
.pk-menu button[aria-selected="true"] { background: rgba(255, 255, 255, 0.1); color: #fff; }
.pk-menu svg { width: 12px; height: 9px; }
.pk-menu svg path { stroke: var(--pk-check); }
.pk-read {
  position: absolute; left: 0; top: 0; z-index: 3; opacity: 0; pointer-events: none; display: flex; align-items: baseline;
  background: var(--pk-read-bg); border: 1px solid var(--pk-read-border); color: #fff; white-space: nowrap;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pk-read-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.pk-read-lab { color: var(--pk-read-label); }

.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi-strip a {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); color: var(--text); text-decoration: none; transition: box-shadow 0.2s var(--ease);
}
.kpi-strip a:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); text-decoration: none; }
.kpi-strip span { font-size: 12.5px; color: var(--muted); }
.kpi-strip b { font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-strip a.danger b { color: var(--danger); }

/* ---------- Alertas de lembrete ---------- */
.alerts {
  position: fixed; right: 24px; bottom: 24px; z-index: 1100; display: flex; flex-direction: column-reverse; gap: 12px;
  width: min(360px, calc(100vw - 32px)); pointer-events: none;
}
.alert-card {
  position: relative; overflow: hidden; border-radius: 24px; padding: 24px; pointer-events: auto;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 30px 60px -12px color-mix(in srgb, var(--accent) 45%, transparent), 0 18px 36px -18px rgba(0, 0, 0, 0.35);
  animation: alert-in 0.55s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
.alert-card.leaving { animation: alert-out 0.2s ease forwards; }
@keyframes alert-in { from { opacity: 0; transform: translateY(50px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes alert-out { to { opacity: 0; transform: translateY(20px) scale(0.98); } }
.alert-card > * { animation: alert-item 0.4s cubic-bezier(0.25, 0.8, 0.3, 1) both; animation-delay: calc(0.08s + var(--i, 0) * 0.08s); }
@keyframes alert-item { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.alert-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent;
  color: #fff; display: grid; place-items: center; cursor: pointer; transition: background 0.15s;
}
.alert-x:hover { background: rgba(255, 255, 255, 0.2); }
.alert-x svg { width: 16px; height: 16px; }
.alert-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); display: grid; place-items: center; margin-bottom: 16px; }
.alert-icon svg { width: 24px; height: 24px; animation: alert-pulse 1.5s ease-in-out infinite; }
@keyframes alert-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.alert-card h3 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.025em; color: #fff; line-height: 1.15; padding-right: 28px; }
.alert-card p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.86); max-width: 88%; }
.alert-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin-top: 22px; border: 0; border-radius: 999px;
  background: #fff; color: var(--accent-press); font-size: 16px; font-weight: 600; cursor: pointer; letter-spacing: -0.01em;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35); transition: transform 0.2s var(--ease), background 0.15s;
}
.alert-btn:hover { background: rgba(255, 255, 255, 0.92); }
.alert-btn:active { transform: scale(0.95); }
.alert-btn:focus-visible, .alert-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.alert-sub { display: block; width: 100%; margin-top: 10px; background: none; border: 0; color: rgba(255, 255, 255, 0.9); font-size: 14px; font-weight: 500; cursor: pointer; padding: 6px; border-radius: 999px; }
.alert-sub:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Dashboard: cabeçalho, títulos de painel, anéis ---------- */
.dash-hero { align-items: flex-end; margin-bottom: 26px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--accent-text); letter-spacing: 0.01em; }
.dash-hero h1 { font-size: 38px; letter-spacing: -0.035em; }
.dash-hero .muted { font-size: 16px; margin-top: 8px; color: var(--text-2); }
.new-menu { position: relative; }
.new-menu .chev { width: 14px; height: 14px; margin-left: -2px; color: var(--muted); }
.pop-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 200px; padding: 6px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-lg); outline: 1px solid var(--border); display: flex; flex-direction: column;
  animation: pop-in 0.18s var(--spring);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.97); } to { opacity: 1; transform: none; } }
.pop-menu button {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: none;
  cursor: pointer; text-align: left; font-weight: 500; color: var(--text);
}
.pop-menu button svg { width: 16px; height: 16px; color: var(--muted); }
.pop-menu button:hover, .pop-menu button:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
.pop-menu button:hover svg, .pop-menu button:focus-visible svg { color: var(--on-accent); }

.ph-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ph-icon {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
}
.ph-icon svg { width: 15px; height: 15px; stroke-width: 2; }

.ring-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ring-tile { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.ring { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--accent-soft-2); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.ring-pct { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-pct small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.ring-pct { display: flex; align-items: center; justify-content: center; }
.ring-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ring-info b { font-size: 14.5px; letter-spacing: -0.012em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ring-info .btn, .ring-info .badge { margin-top: 4px; }

.task-item { position: relative; overflow: hidden; padding-left: 16px; }
.prio-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--faint); }
.task-item.pr-p-med .prio-bar { background: var(--text-2); }
.task-item.pr-p-high .prio-bar { background: var(--accent); }
.task-item.pr-p-urgent .prio-bar { background: var(--danger); }
.funnel-name { display: flex; align-items: center; gap: 8px; }
.funnel-name .dot { width: 8px; height: 8px; }

/* ---------- Kanban: cartões de quadro ---------- */
.board-card { gap: 14px; padding: 20px; }
.bc-head { display: flex; align-items: center; gap: 12px; }
.bc-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--ev, var(--accent)) 14%, transparent); color: var(--ev, var(--accent));
}
.bc-icon svg { width: 21px; height: 21px; }
.bc-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bc-title b { font-size: 16px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-title span { font-size: 12.5px; color: var(--muted); }
.bc-pct { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bc-pct small { font-size: 12px; color: var(--muted); font-weight: 600; }
.bc-desc { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-dist { display: flex; gap: 3px; height: 8px; }
.bc-dist i { border-radius: 999px; background: color-mix(in srgb, var(--ink) calc(var(--o) * 100%), transparent); min-width: 8px; }
.bc-dist i.done { background: var(--accent); }
.bc-dist i.nil { flex: 1; background: var(--fill); }
.bc-foot { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.bc-foot b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-open { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; transition: background 0.2s, color 0.2s; }
.bc-open svg { width: 14px; height: 14px; }
.board-card:hover .bc-open { background: var(--accent); color: var(--on-accent); }

/* ---------- Kanban: cartões de tarefa ---------- */
.kb-card { position: relative; overflow: hidden; gap: 8px; padding: 13px 14px; }
.kb-card.pr-p-high::before, .kb-card.pr-p-urgent::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.kb-card.pr-p-urgent::before { background: var(--danger); }
.kb-card .prio.p-med, .kb-card .prio.p-low { display: none; }
.kb-title { font-size: 14px; }
.kb-ck { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kb-ck svg { width: 13px; height: 13px; }
.kb-ck-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--fill-2); overflow: hidden; }
.kb-ck-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ink); transition: width 0.4s var(--ease); }
.kb-ck.complete { color: var(--accent-text); }
.kb-ck.complete .kb-ck-bar i { background: var(--accent); }
.kb-meta { align-items: center; }
.kb-client { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text-2); }
.kb-client i {
  font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 700;
  background: var(--accent-grad); color: #fff; letter-spacing: 0;
}
.kb-col-name .count { background: var(--fill); padding: 1px 8px; border-radius: 999px; font-size: 11.5px; }

/* ---------- Relógio na barra lateral ---------- */
.clock { margin: -12px 0 -10px; padding: 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); display: flex; flex-direction: column; gap: 10px; }
.clock-now { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.clock-now b { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.clock-now span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.clock-start {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 34px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 13px; transition: background 0.15s;
}
.clock-start:hover { background: var(--accent-soft-2); }
.clock-start svg, .clock-btn svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.clock-run { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 11px; background: var(--ink); color: var(--on-ink); }
.clock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 50% { opacity: 0.55; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent); } }
.clock-run-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.clock-run-text b { font-variant-numeric: tabular-nums; font-size: 15px; letter-spacing: -0.01em; }
.clock-run-text span { font-size: 11.5px; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock-btn { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: transform 0.12s; }
.clock-btn:active { transform: scale(0.92); }

/* ---------- Tela Tempo ---------- */
.tempo-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.timer-hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px 28px 28px; color: #fff;
  background: radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%), #0d0d0e;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 24px 50px -20px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; align-items: center; text-align: center;
}
.timer-hero.on { background: radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--accent) 85%, transparent), transparent 62%), #0d0d0e; }
.th-now { align-self: stretch; display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #a1a1a6; }
.th-now span { font-variant-numeric: tabular-nums; font-weight: 600; color: #d1d1d6; }
.th-now small { font-size: 12px; }
.th-label { margin-top: 18px; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--accent) 55%, #fff); letter-spacing: 0.02em; }
.timer-hero:not(.on) .th-label { color: #8e8e93; }
.th-time { font-family: var(--font-display); font-size: clamp(48px, 7vw, 84px); font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.05; margin: 4px 0 10px; }
.timer-hero:not(.on) .th-time { color: #636366; }
.th-task { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; max-width: 100%; }
.th-task svg { width: 16px; height: 16px; color: color-mix(in srgb, var(--accent) 55%, #fff); flex-shrink: 0; }
.th-task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-task a { color: color-mix(in srgb, var(--accent) 55%, #fff); font-weight: 500; font-size: 13px; }
.th-sub { font-size: 12.5px; color: #a1a1a6; margin-top: 4px; }
.th-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 26px; margin-top: 18px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform 0.15s var(--ease), background 0.15s; flex-shrink: 0;
}
.th-btn:hover { background: var(--accent-hover); }
.th-btn:active { transform: scale(0.96); }
.th-btn.stop { background: #fff; color: var(--accent-press); }
.th-btn svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.th-form { display: flex; gap: 10px; width: 100%; max-width: 520px; margin-top: 8px; }
.th-form input { flex: 1; height: 48px !important; border-radius: 999px !important; padding: 0 20px !important; background: rgba(255, 255, 255, 0.1) !important; color: #fff !important; font-size: 15px; }
.th-form input::placeholder { color: #8e8e93; }
.th-form .th-btn { margin-top: 0; }
.tempo-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ts { background: var(--surface); border-radius: 20px; padding: 18px 20px; box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ts span { font-size: 13px; color: var(--muted); font-weight: 500; }
.ts b { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ts:first-child b { color: var(--accent-text); }
.tempo-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.day-bars { display: flex; gap: 10px; height: 210px; align-items: stretch; }
.db-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.db-val { font-size: 11.5px; font-weight: 600; color: var(--text-2); height: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-track { flex: 1; width: 100%; max-width: 44px; display: flex; align-items: flex-end; background: var(--fill); border-radius: 10px; overflow: hidden; }
.db-bar { width: 100%; background: color-mix(in srgb, var(--accent) 70%, var(--surface)); border-radius: 10px; min-height: 0; transition: height 0.8s var(--ease); }
.db-col.today .db-bar { background: var(--accent); }
.db-x { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.db-col.today .db-x { color: var(--text); font-weight: 700; }
.te-day + .te-day { margin-top: 16px; }
.te-day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 6px; border-bottom: 1px solid var(--separator); margin-bottom: 4px; }
.te-day-head b { font-size: 13.5px; }
.te-day-head span { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.te-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; transition: background 0.15s; }
.te-row:hover, .te-row:focus-visible { background: var(--surface-2); outline: none; }
.te-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-2); }
.te-row.live .te-dot { background: var(--accent); animation: blink 1.6s ease-in-out infinite; }
.te-main { display: flex; flex-direction: column; min-width: 0; }
.te-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.te-range { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.te-dur { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.te-row.live .te-dur { color: var(--accent-text); }

/* ---------- Kanban: cronômetro no cartão ---------- */
.kb-top-right { display: inline-flex; align-items: center; gap: 6px; }
.kb-play {
  width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  background: var(--fill); color: var(--text-2); opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s, transform 0.12s;
}
.kb-card:hover .kb-play, .kb-card:focus-within .kb-play, .kb-play.on { opacity: 1; }
.kb-play:hover { background: var(--accent); color: #fff; }
.kb-play:active { transform: scale(0.9); }
.kb-play svg { width: 11px; height: 11px; fill: currentColor; stroke: none; margin-left: 1px; }
.kb-play.on { background: var(--accent); color: #fff; }
.kb-play.on svg { margin-left: 0; }
.kb-card.timing { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.kb-live { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; }
.kb-live svg { width: 13px; height: 13px; }
.kb-live b { font-variant-numeric: tabular-nums; font-size: 13px; }
.kb-live span { opacity: 0.8; }
.kb-time { font-variant-numeric: tabular-nums; }
@media (hover: none) { .kb-play { opacity: 1; } }

/* ---------- Metas ---------- */
.goal-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.goal-summary > div { background: var(--surface); border-radius: 18px; padding: 16px 18px; box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.goal-summary span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.goal-summary b { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.goal-summary b small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.goal-summary b.sm { font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.goal-card2 {
  background: var(--surface); border-radius: 24px; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.goal-card2:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); transform: translateY(-2px); }
.goal-card2.done { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 60%); }
.gc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badges.left { justify-content: flex-start; }
.gc-main { display: flex; align-items: center; gap: 20px; }
.ring.big { width: 118px; height: 118px; }
.ring.big circle { stroke-width: 11; }
.ring.big .ring-pct { font-size: 26px; }
.ring.big .ring-pct small { font-size: 13px; }
.ring.big .ring-pct svg { width: 34px; height: 34px; color: var(--accent); stroke-width: 2.6; }
.gc-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gc-info h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.gc-value { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.05; overflow-wrap: anywhere; }
.gc-target { font-size: 13px; color: var(--muted); }
.gc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gc-stats > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gc-stats span { font-size: 11.5px; color: var(--muted); }
.gc-stats b { font-size: 13.5px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.gc-stats .danger b { color: var(--danger); }
.gc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gc-actions .btn.primary { flex: 1; }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .main { padding: 32px 32px 56px; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .gen-layout { grid-template-columns: 1fr; }
  .paper-wrap { position: static; max-height: none; }
  .tpl-editor { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cal-layout, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .day-panel { position: static; }
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 20px 10px 14px; align-items: center; }
  .brand { padding: 0; }
  .brand-name { display: none; }
  .nav-item { justify-content: center; padding: 9px; width: 44px; }
  .nav-item span { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 50; flex-direction: row; align-items: center;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 0; border-right: 0; border-top: 1px solid var(--separator);
    background: var(--tabbar-bg);
  }
  .sidebar .brand { display: none; }
  .nav, .sidebar-footer { flex-direction: row; margin: 0; padding: 0; border: 0; gap: 0; }
  .nav { flex: 1; justify-content: space-around; }
  .nav-item { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 12px; }
  .nav-item.active { background: transparent; }
  .nav-item svg { width: 22px; height: 22px; }
  .main { padding: 24px 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 28px; }
  .view-header { align-items: flex-start; margin-bottom: 20px; }
  .header-actions { width: 100%; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .span-2 { grid-column: auto; }
  .stats { gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 24px; }
  .form-grid, .info-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .cal-day { min-height: 52px; align-items: center; padding: 4px 2px; }
  .cal-ev, .cal-more { display: none; }
  .cal-day.has-ev::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-top: 2px; }
  .cal-nav { width: 100%; }
  .cal-nav h1 { min-width: 0; font-size: 22px; flex: 1; }
  .search { width: 100%; }
  .kb-col { width: 84vw; }
  .kb-col-tools { opacity: 1; }
  .paper { padding: 32px 24px; }
  .paper-wrap { padding: 12px; }
  .modal { border-radius: 20px; }
  .modal-form, .modal-body { padding: 22px 18px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .goal-cards, .board-cards, .tpl-cards { grid-template-columns: 1fr; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
}

/* ---------- Responsivo (módulos novos) ---------- */
@media (max-width: 1280px) {
  .fin-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1040px) {
  .nav-search { width: 44px; padding: 0; justify-content: center; margin: -10px 0 -8px; }
  .nav-search span, .nav-search kbd { display: none; }
}
@media (max-width: 760px) {
  .sidebar-footer #btn-logout { display: none; }
  .nav-search { order: 2; width: 38px; height: 38px; margin: 0; background: transparent; border-radius: 12px; }
  .nav-search svg { width: 22px; height: 22px; stroke-width: 1.7; }
  .nav, .sidebar-footer { order: 1; }
  .sidebar-footer { order: 3; }
  .nav-item { width: 38px; height: 40px; }
  .nav-item svg { width: 21px; height: 21px; }
  .month-nav { width: 100%; justify-content: space-between; margin: 0; }
  .tx-row, .tx-row:not(:has(.tx-wa)) { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; }
  .tx-date { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
  .tx-amount { grid-column: 3; grid-row: 1; min-width: 0; }
  .tx-wa { grid-column: 3; grid-row: 2; justify-self: end; }
  .tx-check { grid-row: 1 / span 2; }
  .chart-plot { margin-left: 48px; height: 190px; }
  .chart-col .bars { padding: 0 10%; }
  .mini-stats { grid-template-columns: 1fr; }
  .tg { --gut: 44px; }
  .tg-dayhead b { font-size: 15px; width: 28px; height: 28px; }
  .tg-ev { padding: 3px 4px; font-size: 11px; }
  .tg-ev span { display: none; }
  .modal.palette-modal { margin-top: 8vh; }
  .event-item { flex-wrap: wrap; }
}
@media (max-width: 1040px) { .dash-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .dash-pair { grid-template-columns: minmax(0, 1fr); }
  .event-item { flex-wrap: nowrap; }
  .panel-header { flex-wrap: wrap; }
  .panel-header .segmented { max-width: 100%; overflow-x: auto; }
  .stack, .stack > .panel { min-width: 0; }
}

/* ---------- Responsivo (cartões de destaque e alertas) ---------- */
@media (max-width: 1040px) {
  .peak-row { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .peak-row {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px 16px; padding: 4px 16px 8px; scrollbar-width: none;
  }
  .peak-row::-webkit-scrollbar { display: none; }
  .peak-row > .peak { scroll-snap-align: center; }
  .alerts { right: 16px; left: 16px; width: auto; bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) { .dash-hero h1 { font-size: 30px; } .ring-grid { grid-template-columns: 1fr; } }
@media (max-width: 1280px) { .tempo-top, .tempo-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1040px) {
  .clock { padding: 8px 4px; margin: -8px 0; background: none; box-shadow: none; align-items: center; }
  .clock-now span, .clock-run-text, .clock-start span { display: none; }
  .clock-now b { font-size: 15px; }
  .clock-run { padding: 6px; background: none; }
  .clock-start { width: 40px; }
  .goal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .clock { display: none; }
  .nav-item { width: 34px; }
  .tempo-stats { grid-template-columns: 1fr 1fr; }
  .te-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .te-range { display: none; }
  .goal-cards { grid-template-columns: minmax(0, 1fr); }
  .gc-main { gap: 14px; }
  .ring.big { width: 96px; height: 96px; }
  .th-form { flex-direction: column; }
}

/* ---------- Financeiro: entradas x saídas ---------- */
.fin-balance { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; background: var(--surface); border-radius: 18px; padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.fin-balance > div { display: flex; flex-direction: column; gap: 2px; }
.fin-balance span { font-size: 12px; color: var(--muted); }
.fin-balance b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fin-balance b.in { color: var(--accent-text); }
.fin-balance .op { font-size: 20px; color: var(--faint); }
.fin-balance.neg > div:nth-of-type(3) b { color: var(--danger); }
.fin-balance-proj { margin-left: auto; text-align: right; }
.fin-balance-proj b { font-size: 16px; color: var(--text-2); }
.fin-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.fin-side { border-top: 3px solid var(--accent); }
.fin-side.side-out { border-top-color: var(--ink); }
.fin-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fin-side-title { display: flex; align-items: center; gap: 10px; }
.fin-side-title h2 { margin: 0; }
.fin-side-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.side-out .fin-side-ic { background: var(--fill); color: var(--text); }
.fin-side-ic svg { width: 18px; height: 18px; }
.fin-side-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.fin-side-totals > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fin-side-totals span { font-size: 12px; color: var(--muted); }
.fin-side-totals b { font-size: 17px; font-variant-numeric: tabular-nums; }
.side-in .fin-side-totals > div:first-child b { color: var(--accent-text); }
.cat-h { font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.cat-h:first-of-type { margin-top: 0; }
.empty.small { padding: 18px 8px; font-size: 13px; }
.goal-summary .danger b { color: var(--danger); }
@media (max-width: 900px) {
  .fin-split { grid-template-columns: 1fr; }
  .fin-balance-proj { margin-left: 0; text-align: left; width: 100%; }
}

/* ---------- Base de clientes: cartões ---------- */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cl-card { background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; cursor: pointer;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.cl-card:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); transform: translateY(-1px); }
.cl-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.cl-top { display: flex; align-items: center; gap: 12px; }
.cl-avatar, .cf-avatar { display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: var(--accent-grad); color: var(--on-accent); font-weight: 700; letter-spacing: -0.02em; }
.cl-avatar { width: 44px; height: 44px; font-size: 15px; }
.cl-id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cl-id b { font-size: 15.5px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-id .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cl-stats > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cl-stats span { font-size: 11px; color: var(--muted); }
.cl-stats b { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.badge.cst-ativo { background: var(--accent-soft); color: var(--accent-text); }
.badge.cst-pausado { background: var(--fill); color: var(--text-2); }
.badge.cst-encerrado { background: var(--ink-soft); color: var(--muted); }
.badge.soft { background: var(--fill); color: var(--text-2); }

/* ---------- Ficha do cliente ---------- */
.modal.cf-modal { width: min(980px, calc(100vw - 32px)); }
.cf { display: flex; flex-direction: column; }
.cf-hero { position: relative; padding: 30px 30px 22px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px;
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 60%), var(--surface); border-bottom: 1px solid var(--separator); }
.cf-close { position: absolute; top: 14px; right: 14px; }
.cf-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.cf-avatar { width: 76px; height: 76px; font-size: 26px; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.cf-id-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cf-id-text h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.cf-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.cf-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cf-hero-actions .contact-btns { display: flex; gap: 8px; }
.cf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 18px 30px 6px; }
.cf-kpis > div { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cf-kpis span { font-size: 12px; color: var(--muted); font-weight: 500; }
.cf-kpis b { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-kpis b.accent { color: var(--accent-text); }
.cf-kpis small { font-size: 11.5px; color: var(--faint); }
.cf-kpis .danger b { color: var(--danger); }
.cf-tabs { display: flex; gap: 4px; padding: 14px 30px 0; border-bottom: 1px solid var(--separator); overflow-x: auto; scrollbar-width: none; }
.cf-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.cf-tabs button svg { width: 15px; height: 15px; }
.cf-tabs button:hover { color: var(--text); }
.cf-tabs button.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.cf-body { padding: 20px 30px 30px; min-height: 280px; }
.cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cf-card { background: var(--surface-2); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.cf-card.full { grid-column: 1 / -1; }
.cf-card h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.cf-card h4 svg { width: 15px; height: 15px; color: var(--accent); }
.cf-fields { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.cf-field dt { font-size: 11.5px; color: var(--muted); margin-bottom: 1px; }
.cf-field dd { margin: 0; font-weight: 500; display: flex; align-items: center; gap: 6px; word-break: break-word; }
.cf-field dd a { color: var(--accent-text); text-decoration: none; }
.cf-field dd a:hover { text-decoration: underline; }
.cf-copy { opacity: 0; transition: opacity .15s; }
.cf-field:hover .cf-copy, .cf-copy:focus-visible { opacity: 1; }
.cf-pre { white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
p.small { font-size: 13px; }
.cf-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cf-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.cf-list li.clickable { cursor: pointer; }
.cf-list li.clickable:hover { background: var(--fill); }
.cf-li-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.cf-li-ic.out { background: var(--fill); color: var(--text); }
.cf-li-ic svg { width: 16px; height: 16px; }
.cf-li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cf-li-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-amount { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 96px; text-align: right; }
.cf-date { display: flex; flex-direction: column; align-items: center; width: 44px; padding: 4px 0; border-radius: 10px; background: var(--surface); flex-shrink: 0; }
.cf-date b { font-size: 17px; line-height: 1.1; }
.cf-date small { font-size: 10.5px; text-transform: uppercase; color: var(--accent-text); font-weight: 700; }
.cf-note { margin-bottom: 12px; }
.badge.cs-assinado { background: var(--accent); color: var(--on-accent); }
.badge.cs-enviado { background: var(--accent-soft); color: var(--accent-text); }
.badge.cs-rascunho { background: var(--fill); color: var(--text-2); }
.badge.cs-cancelado { background: var(--danger-soft); color: var(--danger); }
.cf-import { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }

/* ---------- Dashboard: barra de faturamento ---------- */
.rev-bar { background: var(--hero-bg); color: var(--hero-text); border-radius: 22px; padding: 20px 24px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.rev-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rev-top span { font-size: 12.5px; color: var(--hero-muted); font-weight: 500; }
.rev-main b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rev-main small { font-size: 15px; color: var(--hero-muted); font-weight: 600; margin-left: 6px; letter-spacing: 0; }
.rev-side { display: flex; gap: 22px; flex-wrap: wrap; }
.rev-side > div { display: flex; flex-direction: column; gap: 2px; }
.rev-side b { font-size: 16px; font-variant-numeric: tabular-nums; }
.rev-track { position: relative; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; display: flex; }
.rev-fill { height: 100%; background: var(--accent-grad); border-radius: 999px 0 0 999px; transition: width .8s var(--ease); }
.rev-pend { height: 100%; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 55%, transparent) 0 6px, color-mix(in srgb, var(--accent) 25%, transparent) 6px 12px); transition: width .8s var(--ease); }
.rev-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--hero-muted); }
.rev-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--accent); }
.rev-legend i.p { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.rev-legend a { color: var(--hero-text); margin-left: auto; text-decoration: none; font-weight: 600; }
.rev-legend a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .cf-hero { padding: 24px 18px 18px; }
  .cf-avatar { width: 58px; height: 58px; font-size: 20px; }
  .cf-id-text h2 { font-size: 22px; }
  .cf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 18px 4px; }
  .cf-tabs { padding: 10px 18px 0; }
  .cf-body { padding: 16px 18px 22px; }
  .cf-grid { grid-template-columns: 1fr; }
  .rev-main b { font-size: 28px; }
}


/* ---------- Kanban: cartão completo ---------- */
.kb-card { gap: 10px; padding: 14px 14px 12px 16px; border-radius: 16px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.04); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.kb-card:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--border-strong), 0 2px 4px rgba(0,0,0,.05), 0 12px 28px rgba(0,0,0,.08); }
.kb-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; border-radius: 0; }
.kb-card.pr-p-med::before { background: var(--fill-2); }
.kb-card.pr-p-high::before { background: var(--accent); top: 0; bottom: 0; border-radius: 0; }
.kb-card.pr-p-urgent::before { background: var(--danger); top: 0; bottom: 0; border-radius: 0; }
.kb-card .prio.p-med, .kb-card .prio.p-low { display: inline-flex; }
.kb-type { gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.kb-type i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--fill); color: var(--text); font-style: normal; }
.kb-type i svg { width: 12px; height: 12px; }
.kb-type.ty-conteudo i, .kb-type.ty-ideia i, .kb-type.ty-entrega i { background: var(--accent-soft); color: var(--accent-text); }
.kb-type.ty-reuniao i { background: var(--ink); color: var(--on-ink); }
.kb-type.ty-bug i { background: var(--danger-soft); color: var(--danger); }
.prio { display: inline-flex; align-items: center; gap: 5px; }
.prio .pd { width: 6px; height: 6px; border-radius: 50%; background: currentColor; font-style: normal; }
.kb-body { display: flex; flex-direction: column; gap: 4px; }
.kb-title { font-size: 14.5px; font-weight: 650; line-height: 1.35; display: flex; gap: 6px; align-items: flex-start; }
.kb-done-ic { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: var(--on-accent); flex-shrink: 0; margin-top: 1px; }
.kb-done-ic svg { width: 10px; height: 10px; stroke-width: 3; }
.kb-card.is-done { opacity: .78; }
.kb-desc { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-card .labels, .kd .labels { display: flex; flex-wrap: wrap; gap: 5px; }
.label { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.label.t1 { background: var(--accent-soft); color: var(--accent-text); }
.label.t2 { background: var(--ink); color: var(--on-ink); }
.label.t3 { background: var(--fill-2); color: var(--text); }
.label.t4 { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-text); }
.label.t5 { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.label.more { background: transparent; color: var(--muted); }
.kb-ck { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.kb-ck-head { display: flex; align-items: center; gap: 6px; }
.kb-ck-head b { color: var(--text); font-weight: 600; }
.kb-ck-head span { margin-left: auto; }
.kb-ck-bar { flex: none; height: 5px; }
.kb-live { position: relative; }
.kb-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: kbpulse 1.4s ease-in-out infinite; }
@keyframes kbpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.kb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--separator); }
.kb-foot .kb-meta { gap: 5px; }
.kb-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: var(--fill); color: var(--text-2); font-size: 11.5px; font-weight: 500; }
.kb-chip.ic-only { padding: 3px 6px; }
.kb-chip svg { width: 12px; height: 12px; }
.due.kb-chip.late { background: var(--danger-soft); color: var(--danger); }
.due.kb-chip.soon { background: var(--accent-soft); color: var(--accent-text); }
.kb-foot .kb-client { margin-left: 0; font-size: 12px; }
.kb-foot:has(.kb-meta:empty):not(:has(.kb-client)) { display: none; }

/* ---------- Ficha do cartão ---------- */
.modal.kd-modal { width: min(920px, calc(100vw - 32px)); }
.kd-hero { position: relative; padding: 28px 30px 22px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--separator);
  background: radial-gradient(120% 160% at 0% 0%, var(--fill) 0%, transparent 55%), var(--surface); }
.kd-hero.pr-p-high { background: radial-gradient(120% 160% at 0% 0%, var(--accent-soft) 0%, transparent 60%), var(--surface); }
.kd-hero.pr-p-urgent { background: radial-gradient(120% 160% at 0% 0%, var(--danger-soft) 0%, transparent 60%), var(--surface); }
.kd-close { position: absolute; top: 14px; right: 14px; }
.kd-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-right: 40px; }
.kd-hero h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; word-break: break-word; }
.kd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.kd-main { padding: 22px 30px 28px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.kd-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.kd-sec h4 svg, .kd-props dt svg { width: 15px; height: 15px; color: var(--accent); }
.kd-desc { white-space: pre-wrap; word-break: break-word; line-height: 1.6; background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.kd-ck-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.kd-ck-head b { color: var(--text); }
.kd-ck-bar { height: 6px; border-radius: 999px; background: var(--fill-2); overflow: hidden; margin-bottom: 10px; }
.kd-ck-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s var(--ease); }
.kd-ck { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.kd-ck li label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.kd-ck li label:hover { background: var(--fill); }
.kd-ck input { width: 17px; height: 17px; accent-color: var(--accent); }
.kd-ck li.done span { text-decoration: line-through; color: var(--faint); }
.kd-ck-add { display: flex; gap: 6px; margin-top: 8px; }
.kd-ck-add input { flex: 1; }
.kd-side { padding: 22px 22px 28px; border-left: 1px solid var(--separator); background: var(--surface-2); display: flex; flex-direction: column; gap: 18px; }
.kd-props { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.kd-props dt { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.kd-props dd { margin: 0; font-weight: 500; }
.kd-props dd.danger { color: var(--danger); font-weight: 600; }
.kd-props dd a { color: var(--accent-text); text-decoration: none; }
.kd-props .inline-select { width: 100%; }
.kd-actions { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.btn.danger-text { color: var(--danger); }
@media (max-width: 760px) {
  .kd-layout { grid-template-columns: 1fr; }
  .kd-side { border-left: 0; border-top: 1px solid var(--separator); }
  .kd-hero, .kd-main { padding-left: 18px; padding-right: 18px; }
  .kd-hero h2 { font-size: 21px; }
}


/* ---------- Dashboard: dias trabalhados ---------- */
.hm-panel .panel-header h2 { display: flex; align-items: center; gap: 8px; }
.hm-panel .panel-header h2 svg { width: 17px; height: 17px; color: var(--accent); }
.hm-panel .link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-text); font-weight: 600; font-size: 13px; text-decoration: none; }
.hm-panel .link svg { width: 14px; height: 14px; }
.hm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.hm-stats > div { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.hm-stats b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hm-stats span { font-size: 12px; color: var(--muted); }
.hm-scroll { overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.hm { --cell: 12px; --gap: 3px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; row-gap: 4px; width: max-content; margin: 0 auto; }
.hm-months { grid-column: 2; display: grid; grid-template-columns: repeat(var(--weeks), var(--cell)); gap: var(--gap); font-size: 11px; color: var(--muted); height: 14px; }
.hm-months span { white-space: nowrap; overflow: visible; }
.hm-days { grid-column: 1; grid-row: 2; display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--gap); font-size: 10.5px; color: var(--muted); line-height: var(--cell); }
.hm-grid { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: repeat(var(--weeks), var(--cell)); gap: var(--gap); }
.hm-col { display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--gap); }
.hm i, .hm-scale i { display: block; width: var(--cell, 12px); height: var(--cell, 12px); border-radius: 3px; background: var(--fill); }
.hm i.empty { background: transparent; }
.hm i:not(.empty):hover { outline: 1.5px solid var(--text); outline-offset: 1px; }
i.l1 { background: color-mix(in srgb, var(--accent) 28%, transparent); }
i.l2 { background: color-mix(in srgb, var(--accent) 52%, transparent); }
i.l3 { background: color-mix(in srgb, var(--accent) 78%, transparent); }
i.l4 { background: var(--accent); }
.hm-legend { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.hm-scale { display: inline-flex; align-items: center; gap: 3px; }
.hm-scale i { width: 11px; height: 11px; }
@media (min-width: 1300px) { .hm { --cell: 14px; } }
@media (max-width: 760px) { .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm-panel { margin-bottom: 16px; }


/* ---------- Kanban: cartão detalhado ---------- */
.kb-client-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.kb-client-row > i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; background: var(--accent-grad); color: #fff; flex-shrink: 0; }
.kb-client-row span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.kb-client-row b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-client-row small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-stage { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.kb-stage-bar { flex: 1; display: flex; gap: 3px; }
.kb-stage-bar i { flex: 1; height: 4px; border-radius: 999px; background: var(--fill-2); }
.kb-stage-bar i.past { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.kb-stage-bar i.now { background: var(--accent); }
.kb-card.is-done .kb-stage-bar i { background: var(--accent); }
.kb-props { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kp { background: var(--surface-2); border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kp > span { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.kp > span svg { width: 11px; height: 11px; }
.kp b { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kp b small { font-weight: 500; color: var(--muted); font-size: 11px; }
.kp.late { background: var(--danger-soft); }
.kp.late b, .kp.late b small, .kp.late > span { color: var(--danger); }
.kp.soon { background: var(--accent-soft); }
.kp.soon b, .kp.soon b small, .kp.soon > span { color: var(--accent-text); }
.kp-bar { display: block; height: 3px; border-radius: 999px; background: var(--fill-2); overflow: hidden; margin-top: 3px; }
.kp-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.kp-bar.over > i { background: var(--danger); }
.kb-foot { padding-top: 9px; }
.kb-age { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-age svg { width: 12px; height: 12px; flex-shrink: 0; }
.kb-icons { display: inline-flex; gap: 4px; }
.kb-icons a.kb-chip { color: var(--accent-text); text-decoration: none; }
.kb-icons a.kb-chip:hover { background: var(--accent-soft); }
.kb-foot:has(.kb-meta:empty):not(:has(.kb-client)) { display: flex; }

/* ---------- Ideias: captura + mapas mentais ---------- */
.idea-capture { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 18px; padding: 10px 10px 10px 14px; margin-bottom: 16px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.idea-capture:focus-within { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.ic-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-grad); color: var(--on-accent); flex-shrink: 0; }
.ic-ic svg { width: 18px; height: 18px; }
.idea-capture input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); outline: none; padding: 8px 4px; box-shadow: none; }
.idea-capture select { max-width: 200px; }
.ideas-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
.ideas-maps { display: flex; flex-direction: column; gap: 4px; }
.im-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; }
.im-item:hover { background: var(--fill); }
.im-item.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); }
.im-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-2); flex-shrink: 0; }
.im-item.active .im-dot { background: var(--accent); }
.im-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-count { font-size: 11.5px; color: var(--muted); background: var(--fill); padding: 1px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.mind-wrap { background: var(--surface); border-radius: 20px; box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.mind-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--separator); flex-wrap: wrap; }
.mt-title { display: flex; flex-direction: column; min-width: 0; }
.mt-title b { font-size: 15px; letter-spacing: -0.01em; }
.mt-title .muted { font-size: 12.5px; }
.mt-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mt-zoom { font-size: 12px; color: var(--muted); min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.mind { position: relative; height: calc(100vh - 330px); min-height: 460px; overflow: hidden; cursor: grab; outline: none; touch-action: none; user-select: none;
  background-color: var(--surface-2); background-image: radial-gradient(circle, var(--fill-2) 1px, transparent 1.2px); background-size: 22px 22px; }
.mind.panning { cursor: grabbing; }
.mind-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mind-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mind-links path { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-linecap: round; }
.mind-links path.main { stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 2.5; }
.mn { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 9px 14px; border-radius: 14px;
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; cursor: pointer;
  box-shadow: 0 0 0 1px var(--border-strong), 0 2px 8px rgba(0,0,0,.06); transition: box-shadow .15s var(--ease); white-space: normal; }
.mn:hover { box-shadow: 0 0 0 1px var(--text-2), 0 4px 14px rgba(0,0,0,.10); }
.mn.sel { box-shadow: 0 0 0 2.5px var(--accent), 0 6px 18px color-mix(in srgb, var(--accent) 20%, transparent); }
.mn.dragging { cursor: grabbing; box-shadow: 0 0 0 2.5px var(--accent), 0 14px 30px rgba(0,0,0,.22); z-index: 5; }
.mn-text { outline: none; word-break: break-word; min-width: 1ch; }
.mn-text[contenteditable=true] { cursor: text; user-select: text; }
.mn-note { display: inline-flex; color: var(--muted); }
.mn-note svg { width: 13px; height: 13px; }
.mn-kids { font-size: 10.5px; font-weight: 700; background: var(--fill); color: var(--muted); border-radius: 999px; padding: 1px 6px; }
.mn-raiz { padding: 14px 22px; font-size: 17px; font-weight: 700; border-radius: 18px; background: var(--accent-grad); color: var(--on-accent); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 35%, transparent); }
.mn-raiz:hover { box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 45%, transparent); }
.mn-raiz.sel { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5.5px var(--accent), 0 12px 32px color-mix(in srgb, var(--accent) 40%, transparent); }
.mn-raiz .mn-kids { background: rgba(255,255,255,.22); color: #fff; }
.mn-laranja { background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.mn-escuro { background: var(--ink); color: var(--on-ink); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.mn-escuro .mn-note, .mn-escuro .mn-kids { color: var(--on-ink); background: rgba(255,255,255,.15); }
.mn-suave { background: var(--fill); box-shadow: none; color: var(--text-2); font-weight: 500; }
.mn-alerta { background: var(--danger-soft); color: var(--danger); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--danger) 40%, transparent); }
.mind-hint { position: absolute; left: 14px; bottom: 12px; font-size: 11.5px; color: var(--muted); background: color-mix(in srgb, var(--surface) 85%, transparent);
  padding: 6px 10px; border-radius: 10px; backdrop-filter: blur(8px); pointer-events: none; }
.mind-hint kbd { font: inherit; font-weight: 600; background: var(--fill); padding: 0 5px; border-radius: 5px; }
.node-bar { position: absolute; z-index: 10; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border-strong), 0 10px 30px rgba(0,0,0,.18); white-space: nowrap; }
.node-bar > button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 9px; border-radius: 10px; cursor: pointer; }
.node-bar > button:hover { background: var(--fill); }
.node-bar > button.danger { color: var(--danger); }
.node-bar > button svg { width: 14px; height: 14px; }
.nb-colors { display: inline-flex; gap: 4px; padding: 0 6px; border-left: 1px solid var(--separator); border-right: 1px solid var(--separator); margin: 0 2px; }
.nb-color { width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px var(--border-strong); }
.nb-color.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.nb-color.c-padrao { background: var(--surface); }
.nb-color.c-laranja { background: var(--accent); }
.nb-color.c-escuro { background: var(--ink); }
.nb-color.c-suave { background: var(--fill-2); }
.nb-color.c-alerta { background: var(--danger); }
@media (max-width: 900px) {
  .ideas-layout { grid-template-columns: 1fr; }
  .ideas-maps { flex-direction: row; overflow-x: auto; }
  .im-item { flex-shrink: 0; }
  .idea-capture { flex-wrap: wrap; }
  .idea-capture input { flex-basis: calc(100% - 50px); }
  .idea-capture select { flex: 1; max-width: none; }
  .mind { height: 62vh; min-height: 380px; }
  .mind-hint { display: none; }
}
.mn { width: max-content; }
.mind-hint { white-space: nowrap; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; }


/* ---------- Prospectar (gerador de leads) ---------- */
.leads-usage { font-size: 12.5px; color: var(--muted); background: var(--fill); padding: 6px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.leads-search { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; background: var(--surface); border-radius: 20px; padding: 18px 20px; margin-bottom: 16px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.leads-search .btn { height: 44px; }
.leads-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; text-align: center; }
.leads-empty svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 4px; }
.leads-empty span { color: var(--muted); max-width: 460px; }
.leads-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.leads-bar .filters { margin: 0; }
.leads-bar-right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.lead-card { background: var(--surface); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); transition: box-shadow .2s var(--ease); }
.lead-card:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); }
.lead-card.saved { opacity: .72; }
.lead-card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.lead-card > .meta { margin-top: -6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-kind { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.lc-kind.k-none { background: var(--accent); color: var(--on-accent); }
.lc-kind.k-bio { background: var(--accent-soft); color: var(--accent-text); }
.lc-kind.k-old { background: var(--ink); color: var(--on-ink); }
.lc-kind.k-ok { background: var(--fill); color: var(--muted); }
.lc-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.lc-rating svg { width: 13px; height: 13px; fill: var(--accent); stroke: var(--accent); }
.lc-rating small { color: var(--muted); font-weight: 500; }
.lc-info { margin: 0; display: flex; flex-direction: column; gap: 5px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.lc-info > div { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.lc-info dt svg { width: 14px; height: 14px; color: var(--muted); display: block; }
.lc-info dd { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-info a { color: var(--accent-text); text-decoration: none; }
.lc-signals { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.lc-signals li { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); }
.lc-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.lc-actions .spacer { flex: 1; }
.leads-more { display: flex; justify-content: center; margin: 18px 0 6px; }
p.hint.center { text-align: center; margin-top: 16px; }
@media (max-width: 760px) {
  .leads-search { grid-template-columns: 1fr; }
  .lead-grid { grid-template-columns: 1fr; }
}


/* ---------- Prospectar: filtros ---------- */
.lead-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; background: var(--surface); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 0 0 1px var(--border); }
.lf-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--field); border-radius: 10px; padding: 0 12px; height: 38px; }
.lf-search svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.lf-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); outline: none; box-shadow: none; padding: 0; height: 100%; }
.lf { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.lf select { height: 38px; min-width: 130px; font-size: 13px; }
.lf-check { font-size: 13px; height: 38px; }
@media (max-width: 760px) { .lf { flex: 1 1 45%; } .lf select { min-width: 0; width: 100%; } }


/* ---------- Configurações: cor de destaque ---------- */
.ap-title { font-size: 15px; font-weight: 700; margin-top: 18px; }
.accent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.accent-sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 14px; border: 0; background: var(--surface-2);
  color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.accent-sw:hover { background: var(--fill); }
.accent-sw i { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 3px 10px color-mix(in srgb, var(--sw) 40%, transparent); }
.accent-sw.on { box-shadow: 0 0 0 2px var(--accent); background: var(--surface); color: var(--text); }
.accent-sw.on i::after { content: ""; position: absolute; top: 18px; left: 50%; width: 10px; height: 6px; margin-left: -5px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); }
.accent-sw.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.accent-sw.custom i { background: conic-gradient(from 0deg, #ff3b30, #ff9500, #ffcc00, #34c759, #00c7be, #0a84ff, #5e5ce6, #bf5af2, #ff3b30); }
.accent-sw.custom.on i { background: var(--sw); }
.accent-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.accent-preview .progress { flex: 1 1 120px; }

/* ---------- Prospectar: abordagens ---------- */
.ab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 10px 0; }
.ab-item { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.ab-item small { color: var(--accent-text); font-size: 11px; font-weight: 600; }
.ab-item span { color: var(--muted); font-size: 12px; }
.ab-item:hover { background: var(--fill); }
.ab-item.on { box-shadow: 0 0 0 2px var(--accent); }
.ab-tips { font-size: 12px; }

/* ---------- Prospectar: análise do lead ---------- */
.lc-intel { display: flex; align-items: center; gap: 8px; width: 100%; margin: 8px 0 2px; padding: 8px 10px; border: 0; border-radius: 10px; font: inherit; font-size: 12px; text-align: left; cursor: pointer;
  background: var(--surface-2); color: var(--text-2); }
.lc-intel svg { width: 14px; height: 14px; margin-left: auto; color: var(--muted); }
.lc-intel:hover { background: var(--fill); }
.lc-intel.static { width: auto; margin: 0; cursor: default; }
.li-temp { font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.li-seg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-intel.quente .li-temp { background: color-mix(in srgb, #e5383b 16%, transparent); color: #d1242f; }
.lc-intel.morno .li-temp { background: color-mix(in srgb, #f5a300 18%, transparent); color: #b07400; }
.lc-intel.frio .li-temp { background: color-mix(in srgb, #0a84ff 14%, transparent); color: #0a6ad6; }
.in-head { display: flex; align-items: center; gap: 10px; }
.in-why { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.intel p { font-size: 14px; margin: 6px 0; }
.in-angles { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* cards não encolhem quando a coluna enche (rola em vez de sobrepor) */
.kb-card, .crm-card { flex-shrink: 0; }

/* =====================================================================
   v4 — Hierarquia tipográfica, navegação por seções e módulos novos
   (Hoje, Projetos, Insights, Briefings, Financeiro em abas, Saúde, Follow-up)
   ===================================================================== */
:root {
  --fs-display: 34px;   /* título da tela */
  --fs-title: 21px;     /* título de seção */
  --fs-h2: 17px;        /* título de painel */
  --fs-small: 13px;
  --fs-caption: 12px;
  --fs-micro: 11px;
  --num-xl: 30px;       /* números de destaque */
  --num-lg: 22px;
  --ok: var(--text);
  --good: var(--accent);
  --warn: #e8960c;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --warn: #ffb340; } }
:root[data-theme="dark"] { --warn: #ffb340; }

/* --- Tipografia: um passo claro entre cada nível --- */
h1 { font-size: var(--fs-display); letter-spacing: -0.032em; line-height: 1.08; }
.view-header { margin-bottom: 24px; }
.view-header .muted { font-size: 15px; color: var(--muted); max-width: 720px; line-height: 1.45; margin-top: 8px; }
.eyebrow { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-bottom: 8px; }
.panel-header h2, .panel > h2 { font-size: var(--fs-h2); font-weight: 650; letter-spacing: -0.02em; }
.panel-header { margin-bottom: 18px; }
.meta { font-size: var(--fs-caption); line-height: 1.45; }
.section-head { display: flex; align-items: baseline; gap: 10px 14px; flex-wrap: wrap; margin: 4px 2px 12px; }
.section-head h2 { font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.025em; display: flex; align-items: center; gap: 10px; }
.count-pill {
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 700; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--fill); color: var(--text-2); display: inline-grid; place-items: center; letter-spacing: 0;
}
.goal-summary b { font-size: var(--num-lg); }
.goal-summary small { font-size: var(--fs-caption); color: var(--faint); }
.goal-summary .warn b { color: var(--warn); }

/* --- Navegação por seções --- */
.sidebar { gap: 18px; }
.nav { overflow-y: auto; min-height: 0; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-section { margin: 14px 10px 4px; font-size: var(--fs-micro); font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-item { padding: 6px 10px; font-size: 13.5px; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item[data-route="hoje"].active { background: var(--accent); color: var(--on-accent); }
.nav-item[data-route="hoje"].active svg { stroke: var(--on-accent); }
@media (max-width: 760px) {
  .nav { overflow-x: auto; overflow-y: hidden; justify-content: flex-start; gap: 2px; margin: 0; padding: 0; }
  .nav-section { display: none; }
  .nav-item { flex-shrink: 0; }
  .nav-item[data-route="hoje"].active { background: var(--accent-soft); }
  .nav-item[data-route="hoje"].active svg { stroke: var(--accent); }
}

/* --- Faixa de números (resumo no topo das telas) --- */
.summary-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.summary-row > div {
  background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 0 0 1px var(--border), var(--shadow-xs);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.summary-row span { font-size: var(--fs-caption); color: var(--muted); font-weight: 600; }
.summary-row b { font-family: var(--font-display); font-size: var(--num-lg); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.summary-row small { font-size: var(--fs-caption); color: var(--faint); }
.summary-row .hero { background: var(--hero-bg); color: var(--hero-text); box-shadow: 0 0 0 1px var(--hero-border); }
.summary-row .hero span, .summary-row .hero small { color: var(--hero-muted); }
.summary-row .hero b { font-size: var(--num-xl); }
.summary-row .danger b { color: var(--danger); }
.summary-row .warn b { color: var(--warn); }
@media (max-width: 1040px) { .summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Abas segmentadas (Financeiro) --- */
.seg-tabs { display: flex; gap: 4px; padding: 4px; background: var(--fill); border-radius: 14px; margin: -4px 0 22px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-tabs a {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 10px; color: var(--text-2);
  font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; transition: background 0.18s, color 0.18s;
}
.seg-tabs a svg { width: 16px; height: 16px; color: var(--muted); }
.seg-tabs a:hover { color: var(--text); text-decoration: none; }
.seg-tabs a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.seg-tabs a.active svg { color: var(--accent); }
.seg-badge { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 10.5px; padding: 1px 6px; margin-left: 4px; font-weight: 700; }

/* --- Lançamento rápido --- */
.quick-add {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 6px 6px 6px 14px; margin-bottom: 16px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-xs);
}
.quick-add:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.quick-add .qa-ic { color: var(--accent); display: grid; }
.quick-add .qa-ic svg { width: 18px; height: 18px; }
.quick-add input[name="q"] { background: transparent; box-shadow: none !important; padding: 0 4px; height: 38px; }
.qa-paid { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--muted); white-space: nowrap; }
.qa-paid input { accent-color: var(--accent); }

/* --- Avisos destacados --- */
.callout {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 18px;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.callout > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.callout b { font-size: 14.5px; letter-spacing: -0.01em; }
.callout span { font-size: var(--fs-small); color: var(--text-2); }
.callout-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex-shrink: 0; }
.callout-ic svg { width: 18px; height: 18px; }
.callout.warn { background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 22%, transparent); }
.callout.warn .callout-ic { background: var(--danger); }
@media (max-width: 760px) { .callout { flex-wrap: wrap; } .callout .btn { width: 100%; } }

/* --- Hoje (dia inteligente) --- */
.focus-goal { background: var(--hero-bg); color: var(--hero-text); border-radius: 22px; padding: 22px 24px; margin-bottom: 26px; box-shadow: 0 0 0 1px var(--hero-border), var(--shadow); }
.focus-goal.muted-goal { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); padding: 18px 22px; }
.fg-text { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.fg-label { display: flex; align-items: center; gap: 7px; width: 100%; font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.fg-text b { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.035em; }
.fg-text > span:not(.fg-label) { color: var(--hero-muted); font-size: 14.5px; }
.muted-goal .fg-text > span:not(.fg-label) { color: var(--muted); }
.fg-text strong { color: var(--hero-text); }
.fg-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; margin-top: 16px; }
.fg-bar div { height: 100%; background: var(--accent-grad); border-radius: 999px; transition: width 0.8s var(--ease); }
.fg-hint { margin: 10px 0 0; font-size: var(--fs-caption); color: var(--hero-muted); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .today-grid { grid-template-columns: minmax(0, 1fr); } }
.pri-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.pri-item {
  display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 16px; padding: 16px 16px 16px 18px; position: relative;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); transition: box-shadow 0.2s var(--ease);
}
.pri-item:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); }
.pri-item.t-agora::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.pri-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--fill); color: var(--text-2); display: grid; place-items: center; flex-shrink: 0; }
.pri-ic svg { width: 17px; height: 17px; }
.t-agora .pri-ic { background: var(--accent-soft); color: var(--accent-text); }
.pri-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pri-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pri-kind { font-size: var(--fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.pri-val { font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--fs-small); }
.pri-title { font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.pri-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.pri-reasons span { font-size: var(--fs-micro); font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.t-agora .pri-reasons span:first-child { background: var(--danger-soft); color: var(--danger); }
.pri-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pri-actions:empty { display: none; }
.pri-score { font-size: var(--fs-micro); font-weight: 700; color: var(--faint); min-width: 30px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.day-agenda, .mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.day-agenda li { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.day-agenda li > div { display: flex; flex-direction: column; min-width: 0; }
.da-time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-text); min-width: 44px; font-size: var(--fs-small); padding-top: 1px; }
.mini-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background 0.15s; justify-content: space-between; flex-wrap: wrap; }
.mini-list li:hover { background: var(--surface-2); }
.mini-list li > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }

/* --- Saúde do cliente --- */
.hl-otima { --hl: var(--ok); }
.hl-boa { --hl: var(--good); }
.hl-atencao { --hl: var(--warn); }
.hl-risco { --hl: var(--danger); }
.health-dot { min-width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--hl); background: color-mix(in srgb, var(--hl) 12%, transparent); box-shadow: inset 0 0 0 2px var(--hl); flex-shrink: 0; }
.health-ring { position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; flex-shrink: 0; }
.health-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.health-ring circle { fill: none; stroke-width: 5; }
.health-ring .hr-bg { stroke: var(--fill-2); }
.health-ring .hr-fg { stroke: var(--hl); stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.health-ring b { font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; position: relative; }
.health-ring.sm { width: 40px; height: 40px; }
.health-ring.sm b { font-size: 12px; }
.health-ring.big { width: 96px; height: 96px; }
.health-ring.big circle { stroke-width: 4.5; }
.health-ring.big b { font-size: 28px; letter-spacing: -0.03em; }
.cl-alert { display: flex; gap: 7px; align-items: center; margin-top: 12px; font-size: var(--fs-caption); font-weight: 600; color: var(--hl); background: color-mix(in srgb, var(--hl) 9%, transparent); padding: 7px 10px; border-radius: 10px; }
.cl-alert svg { width: 14px; height: 14px; flex-shrink: 0; }
.cf-avatar { position: relative; }
.cf-health { position: absolute; right: -10px; bottom: -8px; border: 0; padding: 0; background: var(--surface); border-radius: 50%; cursor: pointer; box-shadow: var(--shadow); color: inherit; }
.health-pane { display: flex; flex-direction: column; gap: 18px; }
.health-big { display: flex; align-items: center; gap: 18px; }
.health-big > div { display: flex; flex-direction: column; gap: 4px; }
.health-big > div b { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.025em; }
.health-factors { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.health-factors li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.health-factors li b { font-variant-numeric: tabular-nums; color: var(--muted); }
.health-factors li.neg b { color: var(--danger); }
.health-factors li.pos b { color: var(--accent-text); }
.cf-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- Follow-up (CRM) --- */
.fu-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: var(--fs-micro); font-weight: 700; padding: 4px 8px; border-radius: 8px; background: var(--fill); color: var(--text-2); width: fit-content; }
.fu-chip svg { width: 12px; height: 12px; }
.fu-chip.today { background: var(--accent-soft); color: var(--accent-text); }
.fu-chip.late { background: var(--danger-soft); color: var(--danger); }
.fu-settings { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.fu-settings select { width: auto; height: 32px; font-size: var(--fs-small); }
.fu-group { margin-bottom: 22px; }
.fu-panel { padding: 6px; }
.fu-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; cursor: pointer; transition: background 0.15s; }
.fu-row + .fu-row { box-shadow: 0 -1px 0 var(--separator); }
.fu-row:hover { background: var(--surface-2); }
.fu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fu-main b { font-size: 15px; letter-spacing: -0.012em; }
.fu-reason { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-caption); font-weight: 600; color: var(--accent-text); margin-top: 2px; }
.fu-reason svg { width: 13px; height: 13px; }
.fu-late .fu-reason { color: var(--danger); }
.fu-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
@media (max-width: 760px) { .fu-row { flex-wrap: wrap; } .fu-actions { width: 100%; padding-left: 50px; } }

/* --- Assistente de projeto e escolha de tipo --- */
.pw-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 16px 0 20px; }
.pw-tpl { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; cursor: pointer; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow 0.15s, background 0.15s; }
.pw-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.pw-tpl:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.pw-tpl:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.pw-tpl:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pw-tpl b { font-size: 14px; letter-spacing: -0.01em; }
.pw-tpl small { font-size: var(--fs-caption); color: var(--muted); line-height: 1.35; }
.pw-tpl-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--accent); margin-bottom: 6px; box-shadow: var(--shadow-xs); }
.pw-tpl-ic svg { width: 18px; height: 18px; }
.pw-preview { margin-top: 18px; background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.pw-prev-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; }
.pw-steps li { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.pw-when { font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; min-width: 40px; }
.pw-t { flex: 1; min-width: 0; }
.pw-steps small { color: var(--faint); font-size: var(--fs-micro); }
.pw-extras { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; }

/* --- Projetos --- */
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pj-card { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; color: var(--text); box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.pj-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); }
.pj-card.finished { opacity: 0.66; }
.pj-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pj-top > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pj-top b { font-size: 16px; letter-spacing: -0.015em; }
.pj-pct { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pj-pct small { font-size: 14px; color: var(--muted); }
.pj-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-caption); color: var(--muted); align-items: center; }
.pj-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.pj-meta svg { width: 13px; height: 13px; }
.pj-meta em { font-style: normal; font-weight: 700; }
.pj-next { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pj-next span { font-size: var(--fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.pj-next b { font-size: 13.5px; }
.pj-next small { color: var(--muted); font-size: var(--fs-caption); }
.gantt { --lbl: 244px; position: relative; display: flex; flex-direction: column; gap: 4px; }
.gantt-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 34px; }
.gantt-label { display: flex; flex-direction: column; min-width: 0; }
.gantt-label b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-label small { font-size: var(--fs-micro); color: var(--faint); }
.gantt-track { position: relative; height: 22px; border-radius: 6px; background: var(--surface-2); }
.gantt-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; min-width: 6px; }
.gantt-today { position: absolute; top: -6px; bottom: -6px; width: 2px; left: calc(var(--lbl) + (100% - var(--lbl)) * var(--p) / 100); background: var(--accent); z-index: 1; border-radius: 2px; pointer-events: none; }
.g-done { background: var(--text); opacity: 0.85; }
.g-active { background: var(--accent); }
.g-late { background: var(--danger); }
.g-next { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.g-in { background: var(--accent); }
.g-out { background: var(--text); }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: var(--fs-caption); color: var(--muted); }
.gantt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gantt-legend i { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }
@media (max-width: 760px) { .gantt { --lbl: 128px; } .gantt-row { grid-template-columns: 120px minmax(0, 1fr); gap: 8px; } }
.scope-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.scope-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 9px 0; border-bottom: 1px solid var(--separator); }
.scope-list li:last-child { border-bottom: 0; }
.scope-list svg { width: 15px; height: 15px; color: var(--accent); margin-top: 2px; }
.req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); cursor: pointer; border-left: 3px solid var(--fill-2); }
.req-list li.out { border-left-color: var(--warn); }
.req-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.req-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rq-aprovado { background: var(--accent-soft); color: var(--accent-text); }
.rq-recusado { background: var(--danger-soft); color: var(--danger); }

/* --- Insights (ativos) --- */
.cov-table td, .cov-table th { padding-top: 10px; padding-bottom: 10px; }
.cov-table td:not(:first-child), .cov-table th:not(:first-child) { text-align: center; }
.cov { width: 40px; height: 30px; border-radius: 9px; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: var(--fs-micro); font-weight: 700; color: var(--text); background: var(--surface-2); transition: transform 0.12s; }
.cov:hover { transform: scale(1.06); }
.cov i { width: 10px; height: 10px; border-radius: 50%; background: var(--cv); }
.cov svg { width: 13px; height: 13px; color: var(--faint); }
.cov-ok { --cv: var(--ok); }
.cov-soon { --cv: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.cov-critical { --cv: var(--accent); background: var(--accent-soft); }
.cov-expired { --cv: var(--danger); background: var(--danger-soft); color: var(--danger); }
.cov-unknown, .cov-off { --cv: var(--faint); }
.cov-missing { background: transparent; outline: 1.5px dashed var(--border-strong); outline-offset: -1.5px; }
.cov-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: var(--fs-caption); color: var(--muted); }
.cov-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cov-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--cv); display: inline-block; }
.asset-list, .bf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.asset-list li, .bf-list li { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--separator); }
.asset-list li:last-child, .bf-list li:last-child { border-bottom: 0; }
.asset-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.asset-ic svg { width: 18px; height: 18px; }
.lv-expired .asset-ic { background: var(--danger-soft); color: var(--danger); }
.lv-critical .asset-ic { background: var(--accent-soft); color: var(--accent-text); }
.asset-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.asset-main b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-when { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.asset-when small { font-size: var(--fs-micro); color: var(--faint); font-variant-numeric: tabular-nums; }
.asset-actions { display: flex; gap: 6px; align-items: center; }
.lvb-expired { background: var(--danger-soft); color: var(--danger); }
.lvb-critical { background: var(--accent-soft); color: var(--accent-text); }
.lvb-soon { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.lvb-ok { background: var(--ink-soft); color: var(--text); }
@media (max-width: 760px) {
  .asset-list li, .bf-list li { flex-wrap: wrap; }
  .asset-main { flex-basis: calc(100% - 60px); }
  .asset-when { align-items: flex-start; padding-left: 52px; }
  .asset-actions { padding-left: 52px; width: 100%; }
}

/* --- Briefings --- */
.bt-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.bt-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; border: 0; border-radius: var(--radius); cursor: pointer; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); text-align: left; transition: box-shadow 0.2s, transform 0.2s var(--ease); }
.bt-type:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); }
.bt-type b { font-size: 15px; }
.bt-type small { color: var(--muted); font-size: var(--fs-caption); }
@media (max-width: 900px) { .bt-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bs-respondido { background: var(--accent); color: var(--on-accent); }
.bs-enviado { background: var(--accent-soft); color: var(--accent-text); }
.bq-head { display: flex; justify-content: space-between; margin: 18px 0 8px; }
.bq-list { max-height: 34vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 14px; padding: 6px; }
.bq-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.bq-item:hover { background: var(--fill); }
.bq-item input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.bq-item span { display: flex; flex-direction: column; font-size: 13.5px; }
.bq-item small { color: var(--muted); font-size: var(--fs-micro); }
.bq-item .req { color: var(--accent); font-style: normal; }
.share-link { display: flex; gap: 8px; margin: 14px 0 6px; }
.share-link input { font-family: var(--mono); font-size: 12.5px; }
.ba-list { margin: 16px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow: auto; }
.ba-row { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.ba-row dt { font-size: var(--fs-caption); color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.ba-row dd { margin: 0; white-space: pre-wrap; font-size: 14px; }

/* Página pública do briefing */
.bf-page { background: radial-gradient(900px 480px at 50% -10%, var(--accent-soft-2), transparent 70%), var(--bg); min-height: 100vh; }
.bf-wrap { max-width: 680px; margin: 0 auto; padding: 48px 16px 80px; }
.bf-head { margin-bottom: 22px; }
.bf-head h1 { font-size: 32px; }
.bf-progress { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.bf-progress .progress { flex: 1; }
.bf-progress small { color: var(--muted); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bf-card { background: var(--surface); border-radius: 24px; padding: 28px; box-shadow: 0 0 0 1px var(--border), var(--shadow); display: flex; flex-direction: column; gap: 22px; }
.bf-q { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.bf-q legend { padding: 0; margin-bottom: 8px; display: flex; flex-direction: column; gap: 2px; }
.bf-label { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.bf-q .hint { margin: 0; }
.bf-q .req { color: var(--accent); font-style: normal; }
.bf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.bf-opt { position: relative; cursor: pointer; }
.bf-opt input { position: absolute; opacity: 0; }
.bf-opt span { display: inline-block; padding: 9px 14px; border-radius: 999px; background: var(--field); font-size: 14px; transition: background 0.15s, box-shadow 0.15s; }
.bf-opt:hover span { box-shadow: inset 0 0 0 1px var(--border-strong); }
.bf-opt input:checked + span { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.bf-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.bf-send { height: 48px; font-size: 16px; }
.bf-done { align-items: center; text-align: center; padding: 48px 28px; }
.bf-check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.bf-check svg { width: 30px; height: 30px; }
@media (max-width: 760px) { .bf-wrap { padding-top: 28px; } .bf-card { padding: 20px; border-radius: 20px; } }

/* --- Recorrência --- */
.rec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rec-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--separator); cursor: pointer; }
.rec-row:last-child { border-bottom: 0; }
.rec-row.inactive { opacity: 0.5; }
.rec-day { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }
.rec-day b { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.rec-day small { font-size: 9.5px; color: var(--faint); text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; margin-top: 2px; }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rec-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-paid { background: var(--accent); color: var(--on-accent); }
.rs-pending { background: var(--ink-soft); color: var(--text); }
.rs-overdue { background: var(--danger-soft); color: var(--danger); }
.rs-todo { background: var(--accent-soft); color: var(--accent-text); }
.rs-off { background: var(--fill); color: var(--muted); }

/* --- Fluxo de caixa --- */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.flow-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.flow-bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; width: 100%; justify-content: center; padding: 0 12%; }
.fb { flex: 1; max-width: 46px; border-radius: 8px 8px 4px 4px; position: relative; min-height: 3px; display: flex; flex-direction: column-reverse; overflow: hidden; transition: height 0.6s var(--ease); }
.fb.in { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.fb.out { background: color-mix(in srgb, var(--text) 22%, transparent); }
.fb i { display: block; width: 100%; }
.fb.in i { background: var(--accent); }
.fb.out i { background: var(--text); }
.flow-m { text-transform: capitalize; font-size: 13px; }
.flow-net { font-size: var(--fs-caption); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.flow-net.neg { color: var(--danger); }
.flow-table td, .flow-table th { font-size: 13px; }
.three-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 1100px) { .three-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow-bars { height: 120px; } }

/* --- Lucratividade --- */
.profit-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.profit-settings { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.profit-settings label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-caption); color: var(--muted); font-weight: 600; }
.profit-settings .input-prefix { width: 130px; }
.profit-settings .input-prefix.suffix b { padding: 0 12px 0 0; }
.profit-settings input { height: 34px; }
.insight-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.insight { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); font-size: 13.5px; }
.insight svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.insight.good svg { color: var(--accent); }
.insight.bad { background: var(--danger-soft); box-shadow: none; }
.insight.bad svg { color: var(--danger); }
.profit-table tr.neg td { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.profit-table tfoot td { font-weight: 700; border-top: 2px solid var(--separator); border-bottom: 0; }
.pt-bar { height: 3px; background: var(--fill); border-radius: 3px; margin-top: 6px; max-width: 160px; overflow: hidden; }
.pt-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.margin { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.margin-bar { flex: 1; height: 6px; background: var(--fill); border-radius: 999px; overflow: hidden; }
.margin-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.margin-bar i.neg { background: var(--danger); }
.margin span { font-size: var(--fs-caption); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }

/* --- Telas pequenas --- */
@media (max-width: 760px) {
  :root { --fs-display: 28px; --fs-title: 19px; --num-lg: 20px; --num-xl: 24px; }
  h1 { font-size: var(--fs-display); }
  .summary-row > div { padding: 14px 16px; }
  .seg-tabs { width: 100%; }
  .quick-add { flex-wrap: wrap; padding: 8px 10px; }
  .quick-add input[name="q"] { flex: 1 1 100%; order: 3; }
  .today-grid { gap: 16px; }
  .focus-goal { padding: 18px; }
  .fg-text b { font-size: 24px; }
}

.panel + .filters { margin-top: 22px; }
.filters + .panel, .summary-row + .panel { margin-top: 0; }

/* =====================================================================
   v5 — Projeto como central, Kanban completo
   ===================================================================== */
/* Status do projeto */
.pstatus { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 11.5px; font-weight: 700; letter-spacing: 0; padding: 4px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.pstatus::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
h1 .pstatus { margin-left: 4px; }
.pj-top .pstatus { align-self: flex-start; margin-bottom: 6px; }
.ps-no_prazo { background: var(--ink-soft); color: var(--text); }
.ps-em_risco { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.ps-atrasado { background: var(--danger-soft); color: var(--danger); }
.ps-concluido { background: var(--accent); color: var(--on-accent); }
.ps-sem_tarefas { background: var(--fill); color: var(--muted); }
.ps-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 20px 32px; align-items: center; background: var(--surface); border-radius: 22px; padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); }
.ps-hero.ps-atrasado { box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent); }
.ps-hero.ps-em_risco { box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.ps-hero.ps-atrasado, .ps-hero.ps-em_risco, .ps-hero.ps-no_prazo, .ps-hero.ps-concluido, .ps-hero.ps-sem_tarefas { background: var(--surface); color: var(--text); }
.ps-main { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ps-main b { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.03em; }
.ps-bars { display: flex; flex-direction: column; gap: 12px; }
.ps-bars > div { display: grid; grid-template-columns: 100px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: var(--fs-caption); color: var(--muted); }
.ps-bars b { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.progress-bar.ghost { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
@media (max-width: 900px) { .ps-hero { grid-template-columns: minmax(0, 1fr); } }

/* Marcos de pagamento */
.ms-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ms-list li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--separator); }
.ms-list li:last-child { border-bottom: 0; }
.ms-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--border-strong); flex-shrink: 0; }
.ms-pago .ms-dot { background: var(--accent); box-shadow: none; }
.ms-cobrado .ms-dot { box-shadow: inset 0 0 0 3px var(--accent); }

/* Toolbar do Kanban */
.kb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.kb-views button { display: inline-flex; align-items: center; gap: 6px; }
.kb-views svg { width: 15px; height: 15px; }
.kb-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
select.kb-filter { width: auto; height: 32px; font-size: 13px; border-radius: 999px; padding-left: 14px; background-color: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); }
select.kb-filter.on { background-color: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.kb-embed-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.kb-embed-actions .search { flex: 1; min-width: 180px; max-width: 320px; }
.board-view.embedded .kb-scroll { margin-top: 0; }
@media (max-width: 760px) { .kb-views span { display: none; } .kb-views button { padding: 0 12px; } }

/* WIP e bloqueios */
.kb-col.wip-over .kb-col-head .count { background: var(--danger); color: #fff; }
.kb-col.wip-over { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 45%, transparent); }
.wip-warn { display: flex; align-items: center; gap: 6px; font-size: var(--fs-micro); font-weight: 700; color: var(--danger); padding: 0 12px 8px; }
.wip-warn svg { width: 13px; height: 13px; }
.kb-blocked { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: var(--fs-micro); font-weight: 700; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); padding: 3px 8px; border-radius: 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-blocked svg { width: 12px; height: 12px; flex-shrink: 0; }
.kb-blocked.inline { margin-top: 4px; }

/* Lista */
.kb-table td { vertical-align: middle; }
.kb-table tr.is-done td b { text-decoration: line-through; color: var(--muted); }
.kb-table .inline-select { max-width: 170px; }

/* Calendário do quadro */
.kb-cal .cal-nav h2 { min-width: 170px; text-align: center; }
.kbc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.kbc-dow { font-size: var(--fs-micro); font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 6px 4px; }
.kbc-day { min-height: 104px; background: var(--surface-2); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kbc-day.out { opacity: 0.45; }
.kbc-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.kbc-n { font-size: 12px; font-weight: 700; color: var(--muted); }
.kbc-day.today .kbc-n { color: var(--accent-text); }
.kbc-item { border: 0; text-align: left; font-size: 11.5px; font-weight: 600; padding: 4px 6px; border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--fill-2); }
.kbc-item.p-high, .kbc-item.p-urgent { border-left-color: var(--accent); }
.kbc-item.late { border-left-color: var(--danger); color: var(--danger); }
.kbc-item.done { opacity: 0.55; text-decoration: line-through; }
.kbc-more { font-size: var(--fs-micro); color: var(--muted); padding-left: 4px; }
@media (max-width: 760px) { .kbc-day { min-height: 64px; } .kbc-item { font-size: 10px; padding: 2px 4px; } }

/* Linha do tempo: marcas de semana */
.gantt-head { min-height: 20px; }
.gantt-ticks { position: relative; height: 18px; }
.gantt-ticks span { position: absolute; font-size: var(--fs-micro); color: var(--faint); transform: translateX(-2px); white-space: nowrap; }
.gantt-row[data-gantt-id] { cursor: pointer; border-radius: 8px; }
.gantt-row[data-gantt-id]:hover .gantt-track { background: var(--fill); }

/* Comentários e atividade */
.kd-comment { display: flex; gap: 8px; margin-bottom: 12px; }
.kd-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; }
.kd-activity.big { max-height: none; }
.kd-activity li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 6px; border-radius: 10px; }
.kd-activity li + li { border-top: 1px solid var(--separator); }
.kd-activity li > div { flex: 1; min-width: 0; }
.kd-activity p { margin: 0; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.kd-activity small { color: var(--faint); font-size: var(--fs-micro); }
.act-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--fill); color: var(--text-2); flex-shrink: 0; }
.act-ic svg { width: 14px; height: 14px; }
.act-concluiu .act-ic, .act-pagamento .act-ic { background: var(--accent-soft); color: var(--accent-text); }
.act-cobranca .act-ic, .act-projeto .act-ic { background: var(--ink-soft); color: var(--text); }
.act-comentario .act-ic, .act-nota .act-ic { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.kd-deps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kd-deps li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--warn); }
.kd-deps li.ok { color: var(--muted); text-decoration: line-through; }
.kd-deps svg { width: 14px; height: 14px; }

/* Todas as tarefas */
.at-panel { padding: 6px; margin-bottom: 22px; }
.at-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.at-row + .at-row { box-shadow: 0 -1px 0 var(--separator); }
.at-row:hover { background: var(--surface-2); }
.at-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.at-main b { font-size: 14px; }
@media (max-width: 760px) { .at-row { flex-wrap: wrap; } .at-row .prio { margin-left: 40px; } }

select.multi { height: auto; padding: 6px; background-image: none; }
select.multi option { padding: 5px 8px; border-radius: 6px; }
select.multi option:checked { background: var(--accent-soft) linear-gradient(0deg, var(--accent-soft), var(--accent-soft)); color: var(--text); }
.kb-table .kb-blocked { display: flex; width: fit-content; }
.kb-table td:nth-child(5) { white-space: nowrap; }
.at-main .kb-blocked, .fu-main .kb-blocked { align-self: flex-start; }
