@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #efefef;
  --sidebar: #f2f2f2;
  --ink: #18181b;
  --ink-strong: #0a0a0a;
  --muted: #71717a;
  --faint: #a1a1aa;
  --accent: #111111;
  --accent-contrast: #ffffff;
  --border: #e7e7e7;
  --line: #f0f0f0;
  --ok: #15803d;   --ok-bg: #f0fdf4;
  --warn: #c2410c; --warn-bg: #fff7ed;
  --crit: #dc2626; --crit-bg: #fef2f2;
  --info: #2563eb; --info-bg: #eff6ff;
  --purple: #7c3aed; --purple-bg: #f5f3ff;
  --pink: #be185d;  --pink-bg: #fdf2f8;
  --teal: #0f766e;  --teal-bg: #f0fdfa;
  --cyan: #0e7490;  --cyan-bg: #ecfeff;
  --amber: #a16207; --amber-bg: #fef9c3;
  --fuchsia: #a21caf; --fuchsia-bg: #fdf4ff;
  --shadow: 0 10px 30px rgba(0,0,0,0.04);
  --shadow-pop: 0 18px 40px rgba(0,0,0,0.1);
  --orb: linear-gradient(225deg, #7cf3e4 0%, #3f8cf0 60%, #4c5be0 100%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: #151517;
  --surface-2: #1e1e21;
  --surface-3: #26262a;
  --sidebar: #111113;
  --ink: #f4f4f5;
  --ink-strong: #ffffff;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #f4f4f5;
  --accent-contrast: #111111;
  --border: rgba(255,255,255,0.09);
  --line: rgba(255,255,255,0.06);
  --ok: #4ade80;   --ok-bg: rgba(74,222,128,0.12);
  --warn: #fb923c; --warn-bg: rgba(251,146,60,0.12);
  --crit: #f87171; --crit-bg: rgba(248,113,113,0.12);
  --info: #60a5fa; --info-bg: rgba(96,165,250,0.12);
  --purple: #a78bfa; --purple-bg: rgba(167,139,250,0.12);
  --pink: #f472b6;  --pink-bg: rgba(244,114,182,0.12);
  --teal: #2dd4bf;  --teal-bg: rgba(45,212,191,0.12);
  --cyan: #22d3ee;  --cyan-bg: rgba(34,211,238,0.12);
  --amber: #facc15; --amber-bg: rgba(250,204,21,0.12);
  --fuchsia: #e879f9; --fuchsia-bg: rgba(232,121,249,0.12);
  --shadow: none;
  --shadow-pop: 0 18px 40px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: inherit; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-strong); margin: 0; text-wrap: balance; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--info); }
[hidden] { display: none !important; }
svg.i { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px; border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-contrast); font-size: 12px; font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12); white-space: nowrap;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; }
.btn.danger { background: var(--surface); color: var(--crit); border: 1px solid rgba(220,38,38,0.3); box-shadow: none; }
.btn.small { height: 28px; padding: 0 10px; font-size: 11px; border-radius: 8px; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.round { border-radius: 50%; border: 1px solid var(--border); background: var(--surface); }

/* ---------- pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 500;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.4;
}
.pill.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill svg.i { width: 11px; height: 11px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.crit { background: var(--crit-bg); color: var(--crit); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.pill.purple { background: var(--purple-bg); color: var(--purple); }
.pill.pink { background: var(--pink-bg); color: var(--pink); }
.pill.teal { background: var(--teal-bg); color: var(--teal); }
.pill.cyan { background: var(--cyan-bg); color: var(--cyan); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.fuchsia { background: var(--fuchsia-bg); color: var(--fuchsia); }
.pill.dark { background: var(--accent); color: var(--accent-contrast); }
.pill.outline { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: #3a3a3a; color: #fff; font-size: 10px; font-weight: 600; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sq { border-radius: 8px; }
.acc-badge {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 9px; font-weight: 600; overflow: hidden;
}
.acc-badge img { width: 100%; height: 100%; object-fit: cover; }
.stack-avatars { display: inline-flex; }
.stack-avatars .avatar { border: 2px solid var(--surface); margin-left: -6px; width: 24px; height: 24px; font-size: 9px; }
.stack-avatars .avatar:first-child { margin-left: 0; }

/* ---------- auth ---------- */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(ellipse at top right, rgba(124,243,228,0.18), transparent 55%), var(--bg);
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px 26px 26px; text-align: center; box-shadow: var(--shadow-pop);
}
.orb { width: 44px; height: 44px; border-radius: 50%; background: var(--orb); box-shadow: 0 8px 18px rgba(63,140,240,0.25); flex: none; }
.auth-card .orb { margin: 0 auto 16px; }
.auth-card h1 { font-size: 20px; font-weight: 500; }
.auth-card p { color: var(--muted); font-size: 12px; margin: 8px 0 20px; }
.auth-card input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); margin-bottom: 10px; font-size: 13px;
}
.auth-card .btn { width: 100%; height: 40px; }
.auth-msg { font-size: 12px; margin-top: 12px; color: var(--muted); }
.auth-msg.err { color: var(--crit); }
.auth-msg.ok { color: var(--ok); }
.auth-card form { display: flex; flex-direction: column; }
.auth-card input[readonly] { opacity: .65; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.invite-link { display: flex; gap: 8px; }
.invite-link input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 11.5px; }
/* acesso de cliente: só leitura */
body.modo-cliente .side-search, body.modo-cliente .topbar-right { display: none; }
body.modo-cliente .ed-cal .cell { cursor: default; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--sidebar); border-right: 1px solid var(--border);
  padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: #111; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.brand-mark img { width: 26px; height: 26px; object-fit: contain; }
.brand strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink-strong); }
.brand span { display: block; font-size: 10px; color: var(--muted); }
.side-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 10px;
  background: var(--surface-3); color: var(--muted);
}
.side-search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-size: 12px; }
.kbd { font-size: 10px; padding: 2px 6px; border-radius: 5px; background: var(--surface); color: var(--muted); }
.side-label { font-size: 11px; color: var(--faint); margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px;
  border: none; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-size: 13px;
}
.side-nav button svg.i { width: 16px; height: 16px; color: var(--muted); }
.side-nav button:hover { background: var(--surface-2); }
.side-nav button.active { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 6px 14px rgba(0,0,0,0.2); }
.side-nav button.active svg.i { color: var(--accent-contrast); }
.side-nav .count { margin-left: auto; font-size: 10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--surface-3); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.side-nav button.active .count { background: rgba(255,255,255,0.16); color: #d4d4d4; }
.side-spacer { flex: 1; }
.user-card { background: var(--surface-3); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 2px 4px; min-width: 0; }
.user-row .avatar { width: 30px; height: 30px; border-radius: 8px; }
.user-row strong { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row span { display: block; font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row > div { min-width: 0; }
.seg-mini { display: flex; gap: 4px; }
.seg-mini button { flex: 1; height: 26px; border: none; border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 10px; cursor: pointer; }
.seg-mini button.active { background: var(--accent); color: var(--accent-contrast); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 28px 0; }
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.page { padding: 18px 28px 64px; max-width: 1440px; width: 100%; }
.page-section { display: none; }
.page-section.active { display: block; }

.status-banner {
  background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(194,65,12,0.2); border-radius: 10px;
  padding: 10px 14px; font-size: 12px; margin-bottom: 14px;
}
.status-banner:empty { display: none; }
.migration-banner {
  display: flex; gap: 10px; align-items: flex-start; background: var(--info-bg); color: var(--info);
  border: 1px solid rgba(37,99,235,0.2); border-radius: 10px; padding: 10px 14px; font-size: 12px; margin-bottom: 14px;
}

/* ---------- page header ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.page-head .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- segmented / tabs ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 9px; flex-wrap: wrap; }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: none; border-radius: 7px;
  background: transparent; color: var(--muted); font-size: 11.5px; cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--ink-strong); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.underline-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.underline-tabs button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 10px; border: none; background: transparent;
  color: var(--muted); font-size: 12px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.underline-tabs button.active { color: var(--ink-strong); font-weight: 500; border-bottom-color: var(--accent); }
.tab-badge { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { font-size: 13px; }
.card-head .link { font-size: 10.5px; color: var(--muted); background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row { display: flex; gap: 14px; min-width: 0; }
.empty { color: var(--muted); font-size: 12px; padding: 18px 6px; text-align: center; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.stat .ib { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.stat .v { font-size: 18px; font-weight: 500; color: var(--ink-strong); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .l { font-size: 10.5px; color: var(--muted); }
.stat .d { font-size: 9.5px; }
.stat.dark { background: #111; border-color: #111; }
.stat.dark .v { color: #fff; }
.stat.dark .l { color: #a1a1aa; }

.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.progress.thin { height: 4px; }
.progress.grad > span { background: linear-gradient(90deg, #7cf3e4, #3f8cf0); }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 10.5px; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; color: var(--ink);
}
.field textarea, textarea.input { height: auto; min-height: 80px; padding: 10px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.input[readonly], .field input[readonly] { background: var(--surface-2); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }

.switch { position: relative; width: 32px; height: 18px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 9px; background: var(--surface-3); cursor: pointer; transition: background 0.15s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
:root[data-theme="dark"] .switch input:checked + span::after { background: #111; }

.check { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid #cfcfcf; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; padding: 0; }
.check.on { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.check svg.i { width: 11px; height: 11px; stroke-width: 3; }

/* ---------- dashboard ---------- */
.welcome {
  display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: 16px; border: 1px solid var(--border);
  background: radial-gradient(ellipse at 100% 0%, rgba(124,243,228,0.18), rgba(63,140,240,0.06) 45%, transparent 70%), var(--surface);
  box-shadow: var(--shadow);
}
.welcome .orb { width: 52px; height: 52px; }
.welcome .date { font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.welcome h2 { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; margin: 4px 0; }
.welcome .sub { color: var(--muted); font-size: 12px; }
.welcome .mini-stats { display: flex; gap: 10px; margin-left: auto; }
.mini-stat { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; min-width: 92px; }
.mini-stat .v { font-size: 22px; font-weight: 500; }
.mini-stat .l { font-size: 10.5px; color: var(--muted); }

.task-list { display: flex; flex-direction: column; }
.task-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.task-item:hover { background: var(--surface-2); }
.task-item .t { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-item.done .t { color: var(--faint); text-decoration: line-through; }
.task-item .acc { display: inline-flex; align-items: center; gap: 6px; width: 140px; font-size: 11px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.task-item .acc .dotc { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.task-item .time { display: inline-flex; align-items: center; gap: 5px; width: 64px; justify-content: flex-end; font-size: 11px; color: var(--muted); }
.add-row { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border: 1px dashed var(--border); border-radius: 10px; color: var(--faint); cursor: pointer; margin-top: 10px; background: transparent; width: 100%; text-align: left; }
.add-row:hover { color: var(--ink); border-color: var(--faint); }

.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mcal .dow { font-size: 10.5px; color: var(--faint); text-align: center; padding: 4px 0; }
.mcal .d { height: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; border-radius: 8px; font-size: 12px; position: relative; }
.mcal .d:hover { background: var(--surface-2); }
.mcal .d.out { color: var(--faint); opacity: 0.6; }
.mcal .d.sel:not(.today) span.n { outline: 1.5px solid var(--accent); }
.mcal .d span.n { width: 28px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 7px; }
.mcal .d.today span.n { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.mcal .d i { width: 4px; height: 4px; border-radius: 50%; background: var(--info); position: absolute; bottom: 2px; }

.event-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
.event-item .bar { width: 3px; height: 30px; border-radius: 2px; flex: none; }
.event-item .t { font-size: 12px; font-weight: 500; }
.event-item .s { font-size: 10.5px; color: var(--muted); }
.event-item .h { margin-left: auto; font-size: 11px; color: var(--muted); }

.aviso-text { font-size: 12px; white-space: pre-wrap; line-height: 1.55; }

/* ---------- accounts row ---------- */
.accounts-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.acc-field {
  flex: 1 0 180px; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-align: left; min-width: 0;
}
.acc-field .acc-badge { width: 32px; height: 32px; border-radius: 9px; font-size: 10.5px; }
.acc-field strong { display: block; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-field span { display: block; font-size: 10px; color: var(--muted); }
.acc-field > div { min-width: 0; }
.acc-field.active { background: #111; border-color: #111; color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,0.15); }
.acc-field.active span { color: #a1a1aa; }
:root[data-theme="dark"] .acc-field.active { background: var(--accent); color: var(--accent-contrast); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; }
.k-col { background: var(--surface-3); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.k-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; }
.k-head .tg { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-strong); }
.k-head .dotc { width: 8px; height: 8px; border-radius: 50%; }
.k-head .cnt { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: var(--surface); color: var(--muted); font-weight: 400; }
.k-cards { display: flex; flex-direction: column; gap: 10px; min-height: 60px; border-radius: 12px; transition: background 0.1s; }
.k-cards.drag-over { background: var(--surface-2); outline: 2px dashed var(--faint); outline-offset: -2px; }
.k-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.04); transition: box-shadow 0.15s, transform 0.1s;
}
.k-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.k-card.dragging { opacity: 0.45; }
.k-card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: 6px; font-size: 10.5px; color: var(--ink); max-width: 70%; overflow: hidden; white-space: nowrap; }
.acc-chip .acc-badge { width: 16px; height: 16px; border-radius: 4px; font-size: 7px; }
.k-card .title { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-strong); }
.k-card.done .title { color: var(--muted); }
.k-card .foot { display: flex; justify-content: space-between; align-items: center; }
.k-card .meta { display: flex; gap: 12px; align-items: center; font-size: 10.5px; color: var(--muted); }
.k-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.k-card .meta svg.i { width: 12px; height: 12px; }
.k-card .meta .late { color: var(--crit); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,10,10,0.35); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 60; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 960px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.25); }
.modal.small { max-width: 520px; }
.modal-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 56px; padding: 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.crumb strong { color: var(--ink); font-weight: 400; }
.modal-body { display: grid; grid-template-columns: minmax(0,1fr) 320px; min-height: 0; flex: 1; overflow: hidden; }
.modal-main { padding: 22px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.modal-side { padding: 20px; background: var(--surface-2); border-left: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-pad { padding: 22px 24px; overflow-y: auto; }
.title-input { width: 100%; border: none; background: transparent; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink-strong); padding: 0; outline: none; resize: none; line-height: 1.3; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sec-head .l { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink); }
.sec-head .l svg.i { color: var(--muted); width: 14px; height: 14px; }
.sec-head .r { font-size: 11px; color: var(--muted); }
.idea-box { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.idea-box textarea { width: 100%; border: none; background: transparent; resize: vertical; min-height: 70px; outline: none; font-size: 12.5px; line-height: 1.6; }
.idea-box input { width: 100%; border: none; background: transparent; outline: none; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 12.5px; }
.cl-item.done span.tx { color: var(--faint); text-decoration: line-through; }
.cl-item .x { margin-left: auto; opacity: 0; }
.cl-item:hover .x { opacity: 1; }
.inline-add { display: flex; gap: 8px; margin-top: 6px; }
.inline-add input { flex: 1; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); padding: 0 10px; font-size: 12px; }
.ref-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.ref-item { width: 120px; height: 84px; border-radius: 10px; background: var(--surface-3) center/cover; position: relative; display: flex; align-items: flex-end; overflow: hidden; border: 1px solid var(--border); text-decoration: none; }
.ref-item span { font-size: 9.5px; background: rgba(0,0,0,0.6); color: #fff; padding: 2px 6px; margin: 4px; border-radius: 4px; max-width: 110px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ref-item .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,0.6); color: #fff; cursor: pointer; font-size: 11px; }
.comment { display: flex; gap: 10px; margin-bottom: 10px; }
.comment .b { flex: 1; background: var(--surface-2); border-radius: 10px; padding: 8px 11px; }
.comment .b strong { font-size: 11px; }
.comment .b .when { font-size: 10px; color: var(--faint); margin-left: 6px; }
.comment .b p { margin: 3px 0 0; font-size: 12px; white-space: pre-wrap; }
.comment-box { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 12px; border: 1px solid var(--border); border-radius: 12px; }
.comment-box input { flex: 1; border: none; outline: none; background: transparent; font-size: 12px; }
.prop-title { font-size: 10.5px; letter-spacing: 0.08em; color: var(--faint); text-transform: uppercase; }
.status-block { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.steps { display: flex; gap: 4px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); cursor: pointer; }
.steps i.past { background: var(--accent); }
.steps i.cur { background: var(--info); }
.prop { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.prop > .k { width: 96px; flex: none; display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.prop > .k svg.i { width: 13px; height: 13px; color: var(--faint); }
.prop > .v { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prop select, .prop input { height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 0 8px; font-size: 11.5px; max-width: 100%; min-width: 0; }
.mini-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--surface-3); }
.mini-seg button { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: none; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10.5px; cursor: pointer; }
.mini-seg button.active { background: var(--surface); color: var(--ink-strong); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.toggle-chip { cursor: pointer; border: 1px solid transparent; }
.toggle-chip.off { background: transparent; border-color: var(--border); color: var(--faint); }
.modal-foot { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding-top: 4px; }

/* ---------- planejamento ---------- */
.plan-layout { display: grid; grid-template-columns: minmax(0,1fr) 372px; gap: 16px; align-items: start; }
.ed-cal { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ed-cal .wk { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.ed-cal .wh { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ed-cal .wh div { font-size: 9.5px; color: var(--faint); letter-spacing: 0.06em; padding: 7px 8px; }
.ed-cal .cell { min-height: 108px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; }
.ed-cal .cell:nth-child(7n) { border-right: none; }
.ed-cal .cell.out { background: var(--surface-2); color: var(--faint); }
.ed-cal .cell .n { font-size: 10.5px; color: var(--muted); }
.ed-cal .cell.today .n { color: #fff; background: var(--accent); border-radius: 5px; padding: 0 5px; align-self: flex-start; }
:root[data-theme="dark"] .ed-cal .cell.today .n { color: #111; }
.post-pill { border-radius: 6px; padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.post-pill .m { display: flex; align-items: center; gap: 4px; font-size: 8.5px; }
.post-pill .m svg.i { width: 10px; height: 10px; }
.post-pill .m i { width: 6px; height: 6px; border-radius: 50%; margin-left: auto; flex: none; }
.post-pill .t { font-size: 9.5px; color: var(--ink); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.legend { display: flex; gap: 12px; align-items: center; font-size: 10.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; }

.ig { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-family: Inter, -apple-system, system-ui, sans-serif; }
.ig-head { display: flex; align-items: center; gap: 14px; padding: 12px 12px 8px; }
.ig-ring { width: 58px; height: 58px; border-radius: 50%; padding: 2.5px; background: linear-gradient(225deg, #fbbf24, #ec4899 55%, #8b5cf6); flex: none; }
.ig-ring > div { width: 100%; height: 100%; border-radius: 50%; padding: 2px; background: var(--surface); }
.ig-ring .acc-badge { width: 100%; height: 100%; border-radius: 50%; font-size: 15px; font-weight: 700; }
.ig-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
.ig-stats b { display: block; font-size: 13px; }
.ig-stats span { font-size: 11px; color: var(--muted); }
.ig-bio { padding: 0 12px 10px; font-size: 11.5px; line-height: 1.35; }
.ig-bio b { display: block; font-size: 12px; }
.ig-tabs { display: flex; border-top: 1px solid var(--line); }
.ig-tabs div { flex: 1; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.ig-tabs div.active { color: var(--ink-strong); border-bottom: 1.5px solid var(--ink-strong); }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-cell { aspect-ratio: 1; position: relative; background: var(--surface-3) center/cover; overflow: hidden; cursor: grab; display: flex; align-items: center; justify-content: center; }
.ig-cell.dragging { opacity: 0.4; }
.ig-cell.drop { outline: 2px solid var(--accent); outline-offset: -2px; }
.ig-cell .ph { padding: 8px; text-align: center; font-size: 10px; line-height: 1.3; color: #fff; font-family: 'Geist Mono', monospace; }
.ig-cell .date { position: absolute; top: 6px; left: 6px; display: flex; align-items: center; gap: 4px; padding: 2px 5px; border-radius: 5px; background: rgba(0,0,0,0.65); color: #fff; font-size: 8.5px; font-family: 'Geist Mono', monospace; }
.ig-cell .date i { width: 5px; height: 5px; border-radius: 50%; }
.ig-cell .fmt { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.ig-cell .fmt svg.i { width: 13px; height: 13px; }

/* ---------- agenda ---------- */
.agenda-layout { display: grid; grid-template-columns: 268px minmax(0,1fr); gap: 16px; align-items: start; }
.week { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.week-head { display: grid; grid-template-columns: 52px repeat(7, minmax(0,1fr)); border-bottom: 1px solid var(--line); }
.week-head div { height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-left: 1px solid var(--line); font-size: 9.5px; color: var(--faint); letter-spacing: 0.06em; }
.week-head div:first-child { border-left: none; align-items: flex-end; padding-right: 8px; justify-content: flex-end; padding-bottom: 8px; font-size: 9px; }
.week-head b { font-size: 14px; font-weight: 400; color: var(--ink); letter-spacing: 0; width: 30px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.week-head .today { color: var(--ink); }
.week-head .today b { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.week-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0,1fr)); position: relative; max-height: 700px; overflow-y: auto; }
.week-hours { position: relative; }
.week-hours span { position: absolute; right: 8px; font-size: 9.5px; color: var(--faint); transform: translateY(-50%); }
.week-col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.week-col.today { background: rgba(127,127,127,0.03); }
.week-col .hl { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.ev { position: absolute; left: 4px; right: 4px; border-radius: 7px; padding: 4px 7px; overflow: hidden; border-left: 3px solid; cursor: pointer; font-size: 10px; line-height: 1.3; }
.ev b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { display: block; opacity: 0.85; font-size: 9px; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 2; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.cal-filter { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 12px; cursor: pointer; }
.cal-filter .check { width: 16px; height: 16px; }
.next-card { background: #111; color: #fff; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.next-card .k { font-size: 10px; letter-spacing: 0.08em; color: #a1a1aa; display: flex; justify-content: space-between; }
.next-card .k em { color: #7cf3e4; font-style: normal; letter-spacing: 0; }
.next-card b { font-size: 14px; font-weight: 500; }
.next-card span { font-size: 10.5px; color: #a1a1aa; }

/* ---------- contas ---------- */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.acc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow 0.15s; }
.acc-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.08); }
.acc-card .top { display: flex; align-items: center; gap: 12px; }
.acc-card .top .acc-badge { width: 46px; height: 46px; border-radius: 12px; font-size: 14px; }
.acc-card .top strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink-strong); }
.acc-card .top span { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); }
.acc-card .metrics { display: flex; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acc-card .metrics div { flex: 1; }
.acc-card .metrics b { display: block; font-size: 15px; font-weight: 500; }
.acc-card .metrics span { font-size: 10px; color: var(--muted); }
.next-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); font-size: 10.5px; color: var(--ink); }
.add-card { border: 1.5px dashed var(--border); background: transparent; box-shadow: none; align-items: center; justify-content: center; text-align: center; min-height: 260px; color: var(--muted); }

.profile-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px; flex-wrap: wrap; }
.profile-head .acc-badge { width: 60px; height: 60px; border-radius: 16px; font-size: 18px; }
.profile-head h2 { font-size: 22px; font-weight: 500; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 12px; }
.access-banner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; background: var(--warn-bg); border: 1px solid rgba(194,65,12,0.2); color: var(--warn); font-size: 11.5px; margin-bottom: 14px; }
.lock-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px; background: #fffbeb; border: 1px solid #fde68a; color: #b45309; font-size: 9.5px; }
:root[data-theme="dark"] .lock-chip { background: rgba(250,204,21,0.08); border-color: rgba(250,204,21,0.25); color: #facc15; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { flex: 1 1 90px; height: 78px; border-radius: 10px; border: 1px solid var(--border); padding: 9px; display: flex; flex-direction: column; justify-content: flex-end; font-size: 10.5px; position: relative; }
.swatch small { font-size: 9.5px; opacity: 0.75; }
.swatch .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(0,0,0,0.35); color: #fff; cursor: pointer; font-size: 10px; }
.rule { display: flex; align-items: center; gap: 8px; font-size: 11.5px; padding: 3px 0; }
.rule .b { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rule .b svg.i { width: 11px; height: 11px; }
.rule .x { margin-left: auto; opacity: 0; }
.rule:hover .x { opacity: 1; }
.scale { display: flex; flex-direction: column; gap: 6px; }
.scale .ends { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.scale input[type=range] { width: 100%; accent-color: #8b5cf6; }
.timeline-item { display: flex; gap: 12px; }
.timeline-item .rail { display: flex; flex-direction: column; align-items: center; width: 26px; flex: none; }
.timeline-item .rail .ic { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.timeline-item .rail .ic svg.i { width: 13px; height: 13px; }
.timeline-item .rail .ln { width: 1px; flex: 1; background: var(--border); }
.timeline-item .bd { flex: 1; min-width: 0; padding: 4px 0 16px; }
.timeline-item .bd .line { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.timeline-item .bd .line .tm { margin-left: auto; font-size: 10px; color: var(--faint); }
.timeline-item .quote { margin-top: 7px; padding: 8px 12px; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 8px; font-size: 11.5px; color: var(--ink); }
.day-sep { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--faint); letter-spacing: 0.06em; padding: 8px 0 6px; }
.day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.stacked { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 3px; }
.stacked span { display: block; height: 100%; }

/* ---------- portal ---------- */
.portal-head {
  display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap;
  background: radial-gradient(ellipse at 100% 0%, rgba(124,243,228,0.22), rgba(63,140,240,0.08) 45%, transparent 70%), var(--surface);
}
.portal-head .avatar { width: 72px; height: 72px; border-radius: 20px; font-size: 22px; }
.portal-head h2 { font-size: 24px; font-weight: 500; }
.week-bars { display: flex; align-items: flex-end; gap: 18px; height: 170px; padding: 0 6px; }
.week-bars .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week-bars .stk { width: 100%; border-radius: 6px; background: var(--surface-3); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; min-height: 4px; }
.week-bars .stk span { display: block; background: var(--accent); }
.week-bars .stk.today span { background: linear-gradient(0deg, #3f8cf0, #7cf3e4); }
.week-bars .v { font-size: 9.5px; color: var(--muted); }
.week-bars .d { font-size: 9.5px; color: var(--muted); padding: 2px 6px; border-radius: 5px; }
.week-bars .d.today { background: var(--accent); color: var(--accent-contrast); }
.dropzone { border: 1.5px dashed #d4d4d8; background: var(--surface-2); border-radius: 12px; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-align: center; padding: 14px; }
.dropzone.over { border-color: var(--accent); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 9.5px; color: var(--faint); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 11.5px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.radio-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); cursor: pointer; }
.radio-card.active { border: 1.5px solid var(--accent); }
.radio-card .r { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #cfcfcf; flex: none; }
.radio-card.active .r { border: 4px solid var(--accent); }
.radio-card b { display: block; font-size: 11px; font-weight: 500; }
.radio-card span { display: block; font-size: 9.5px; color: var(--muted); }
.theme-card { flex: 1; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.theme-card .pv { height: 90px; border-radius: 12px; border: 1px solid var(--border); padding: 8px; display: flex; gap: 6px; overflow: hidden; }
.theme-card.active .pv { border: 2px solid var(--accent); }
.theme-card .pv .s { width: 32px; border-radius: 6px; }
.theme-card .pv .m { flex: 1; display: flex; flex-direction: column; gap: 5px; padding-top: 4px; }
.theme-card .pv .m i { display: block; height: 20px; border-radius: 5px; }
.theme-card .pv .m i:first-child { height: 6px; width: 60px; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 12px; z-index: 80; box-shadow: var(--shadow-pop); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .plan-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1050px) {
  .grid-2 { grid-template-columns: 1fr; }
  .agenda-layout { grid-template-columns: 1fr; }
  .welcome { flex-wrap: wrap; }
  .welcome .mini-stats { margin-left: 0; }
  .modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .modal-main, .modal-side { overflow: visible; }
  .modal-side { border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: static; height: auto; flex-direction: column; gap: 12px; padding: 14px 16px; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar > * { min-width: 0; }
  .side-label, .side-spacer, .side-search { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .side-nav button { width: auto; flex: none; height: 34px; }
  .user-card { flex-direction: row; align-items: center; }
  .user-row { flex: 1; }
  .topbar { padding: 14px 16px 0; flex-wrap: wrap; }
  .topbar-left .pill:first-child { display: none; }
  .page { padding: 14px 16px 48px; }
  .grid-3 { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(3, 280px); }
  .form-grid { grid-template-columns: 1fr; }
  .task-item .acc { display: none; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .welcome .mini-stats { width: 100%; }
  .mini-stat { flex: 1; min-width: 0; }
  .user-card { flex-direction: column; align-items: stretch; }
  .modal-backdrop { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; max-height: 100vh; }
}

/* ---------- portal da conta: links, reuniões, ideias ---------- */
.sec-title { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 6px 0 10px; }
.qlinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.qlink { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); text-decoration: none; min-width: 0; transition: border-color 0.15s, transform 0.1s; }
.qlink:hover { border-color: var(--faint); transform: translateY(-1px); }
.qlink .ib { width: 32px; height: 32px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex: none; }
.qlink b { display: block; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qlink span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qlink > div { min-width: 0; flex: 1; }
.qlink .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px; border: none; background: transparent; color: var(--faint); cursor: pointer; display: none; align-items: center; justify-content: center; }
.qlink:hover .x { display: flex; }
.qlink .x svg.i { width: 11px; height: 11px; }
.qlink.add { background: transparent; border-style: dashed; gap: 6px; padding: 6px; grid-column: span 2; }
.qlink.add:hover { transform: none; }
.qlink.add input { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 0 9px; font-size: 11.5px; }
.qlink.add input:first-child { max-width: 160px; }

.pending-meet { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--purple-bg); color: var(--purple); margin-bottom: 14px; font-size: 12px; }
.pending-meet .pill { cursor: pointer; color: var(--ink); background: var(--surface); }
.meet-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.meet-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.15s; }
.meet-item:hover { border-color: var(--faint); }
.meet-item.active { border: 1.5px solid var(--accent); box-shadow: var(--shadow); }
.meet-item .dt { width: 44px; height: 46px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.meet-item .dt b { font-size: 16px; font-weight: 600; line-height: 1; }
.meet-item .dt span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.meet-item .tt { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; cursor: pointer; }
.attach:hover { background: var(--surface-3); }
.attach .ib { width: 30px; height: 30px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex: none; }
.attach b { display: block; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach span { display: block; font-size: 10px; color: var(--muted); }
.dropzone.small { min-height: 92px; margin: 8px 0; gap: 4px; }
.dropzone.over, .idea-grid.over { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 14px; }
.ref-item.add { align-items: center; justify-content: center; border-style: dashed; background: transparent; color: var(--muted); cursor: pointer; }

.idea-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); color: var(--muted); }
.idea-bar input[name=texto] { flex: 1; min-width: 0; height: 36px; border: none; background: transparent; outline: none; font-size: 12.5px; color: var(--ink); }
.idea-grid { columns: 4 240px; column-gap: 14px; min-height: 160px; }
.idea-card { break-inside: avoid; margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: box-shadow 0.15s, transform 0.1s; display: inline-block; width: 100%; }
.idea-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.1); transform: translateY(-1px); }
.idea-card .cover img { display: block; width: 100%; max-height: 340px; object-fit: cover; }
.idea-card .cover.ph { height: 120px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; background: var(--surface-2); color: var(--faint); }
.idea-card .cover.ph svg.i { width: 24px; height: 24px; }
.idea-card .cover.link { background: linear-gradient(135deg, var(--purple-bg), var(--info-bg)); color: var(--purple); }
.idea-card .cover.link span { font-size: 10.5px; }
.idea-card .bd { padding: 12px 13px; display: flex; flex-direction: column; gap: 8px; }
.idea-card .tt { font-size: 13px; font-weight: 500; color: var(--ink-strong); line-height: 1.35; }
.idea-card .tx { font-size: 11.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.idea-card .ft { display: flex; align-items: center; gap: 8px; }
.idea-card .ft .avatar { width: 20px; height: 20px; font-size: 8px; }

@media (max-width: 1050px) { .meet-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .qlink.add { grid-column: auto; flex-wrap: wrap; } .qlink.add input:first-child { max-width: none; } .idea-bar { flex-wrap: wrap; } }

/* gestão embutida (outro sistema, outro banco) */
.gestao-frame { display: block; width: 100%; height: calc(100vh - 110px); min-height: 560px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }

/* ---- portal do cliente ---- */
.cli-link { background: none; border: 0; padding: 0; font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; }
.cli-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cli-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cli-hero { background: #111; color: #fff; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.cli-hero.ok { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.cli-hero h3 { font-size: 20px; font-weight: 500; margin: 10px 0 6px; }
.cli-hero p { font-size: 12px; color: #a3a3a3; }
.cli-hero.ok p { color: var(--muted); }
.cli-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cli-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cli-thumb { background: #1c1c1c; border: 0; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; text-align: left; color: #fff; font: inherit; cursor: pointer; }
.cli-thumb b { font-weight: 400; font-size: 12px; }
.cli-thumb span { font-size: 10.5px; color: #8a8a8a; }
.cli-capa { border-radius: 9px; position: relative; flex: none; }
.cli-capa-pill { position: absolute; top: 7px; left: 7px; background: rgba(255,255,255,.92) !important; color: #18181b !important; }
.cli-progress { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-3); margin-bottom: 14px; }
.cli-progress i { display: block; height: 100%; }
.cli-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cli-stats div { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.cli-stats b { font-size: 20px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.cli-stats b i, .cli-st i, .cli-fila-done i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.cli-stats span { font-size: 11px; color: var(--muted); }
.cli-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cli-dia { font-size: 11px; width: 120px; flex: none; color: var(--muted); }
.cli-ped { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 8px; cursor: pointer; }
.cli-ped b { font-weight: 400; font-size: 12px; }
.cli-upd { display: flex; gap: 10px; font-size: 11.5px; line-height: 1.4; margin-bottom: 12px; cursor: pointer; }
.cli-upd .ib { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.cli-upd b { font-weight: 500; }
.cli-upd span { display: block; font-size: 10px; color: var(--faint); margin-top: 2px; }
.cli-aprov { display: grid; grid-template-columns: 260px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cli-aprov.modal-v { grid-template-columns: minmax(0, 1fr) 340px; }
.cli-fila { display: flex; flex-direction: column; gap: 8px; }
.cli-fila-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.cli-fila-item .cli-capa { width: 44px; }
.cli-fila-item.on { border-color: var(--ink-strong); box-shadow: 0 0 0 1px var(--ink-strong); }
.cli-fila-item b { font-weight: 400; font-size: 11.5px; display: block; }
.cli-fila-item span { font-size: 10px; color: var(--faint); }
.cli-fila-done { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: none; border: 0; font: inherit; font-size: 11px; color: var(--muted); text-align: left; cursor: pointer; }
.cli-fila-done.on { background: var(--surface-2); }
.cli-fila-done span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-fila-done em { font-style: normal; font-size: 10px; }
.cli-previa { display: flex; flex-direction: column; gap: 14px; }
.cli-previa img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.cli-legenda p { font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; margin-top: 6px; }
.cli-decisao { display: flex; flex-direction: column; gap: 12px; }
.cli-prop { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; margin-top: 6px; }
.cli-prop span { color: var(--muted); }
.cli-prop b { font-weight: 400; text-align: right; }
.cli-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cli-botoes .btn { height: 44px; justify-content: center; }
.btn.cli-aprovar { background: #16a34a; border-color: #16a34a; color: #fff; }
.cli-conversa h3 { font-size: 13px; margin-bottom: 10px; }
.cli-msgs { max-height: 320px; overflow-y: auto; }
.cli-input { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.cli-input textarea { flex: 1; resize: vertical; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 12px; padding: 9px 11px; }
.cli-pedidos { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 16px; align-items: start; }
.cli-form h3 { font-size: 16px; }
.cli-form .field { margin-top: 12px; }
.cli-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.cli-tipo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.cli-tipo b { font-weight: 400; font-size: 12px; }
.cli-tipo span { font-size: 10px; color: var(--faint); }
.cli-tipo.on { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.cli-tipo.on span { color: inherit; opacity: .65; }
.cli-board .kanban { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
@media (max-width: 1100px) {
  .cli-grid, .cli-aprov, .cli-aprov.modal-v, .cli-pedidos { grid-template-columns: minmax(0, 1fr); }
  .cli-thumbs, .cli-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
