/* CRM Global CNC — visual no estilo do Core-Cut ERP / ClickUp: barra lateral clara por seções,
   topo com busca (Ctrl K), cartões brancos sobre fundo neutro, quadro/lista/tabela e painel lateral. */

:root {
  --brand: #1fa35a;
  --brand-dark: #178a4a;
  --brand-light: #5cc58a;
  --brand-tint: #e8f6ee;
  --brand-tint-2: #cdeedd;
  --accent: #e85c0d;
  --accent-tint: #fff1e8;
  --bg: #f8f7f5;
  --paper: #ffffff;
  --subtle: #fbfaf9;
  --border: #e8e4df;
  --border-strong: #d6d0c9;
  --text: #1e1a19;
  --text-2: #6a625d;
  --text-3: #968e88;
  --ok: #2e7d4f;
  --ok-tint: #e9f5ee;
  --warn: #b7791f;
  --warn-tint: #fdf4e3;
  --bad: #c23b3b;
  --bad-tint: #fcecec;
  --info: #2f6f9f;
  --info-tint: #e8f1f8;
  --violet: #6b5fa8;
  --violet-tint: #efedf8;
  --teal: #1d8a84;
  --teal-tint: #e4f4f3;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(30, 26, 25, 0.04), 0 4px 14px rgba(30, 26, 25, 0.05);
  --shadow-lg: 0 24px 64px rgba(30, 26, 25, 0.18);
  --sidebar: 252px;
  --sidebar-collapsed: 68px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.has-modal { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(31, 163, 90, 0.18); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }

.ico { flex: none; vertical-align: middle; }
.muted { color: var(--text-3); }
.block { display: block; }
.center { text-align: center; }
.danger-text { color: var(--bad) !important; }
.eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.hint { color: var(--text-2); font-size: 12.5px; }
.hide-sm { display: inline-flex; flex-direction: column; }

/* ── Carregamento ─────────────────────────────────────── */
.boot, .loading { display: grid; place-items: center; gap: 12px; padding: 80px 20px; color: var(--text-2); }
.boot { min-height: 100vh; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Layout ───────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; position: sticky; top: 0; height: 100vh;
  background: var(--paper); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; transition: width 0.18s ease; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 18px; border-bottom: 1px solid var(--border); color: var(--text); }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; overflow: hidden; white-space: nowrap; }
.brand-text strong { font-size: 15px; letter-spacing: -0.01em; }
.brand-text small { color: var(--text-3); font-size: 11.5px; }
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-section { display: block; padding: 0 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; margin-bottom: 2px;
  border-radius: 8px; color: var(--text-2); font-weight: 550; font-size: 13.5px; transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: rgba(30, 26, 25, 0.045); color: var(--text); }
.nav-item.active { background: var(--brand-tint); color: var(--brand); font-weight: 650; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--brand); }
.nav-item:focus-visible { outline: 2px solid rgba(31, 163, 90, 0.4); outline-offset: 1px; }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 8px; display: flex; justify-content: flex-end; }
.app.is-collapsed .sidebar { width: var(--sidebar-collapsed); }
.app.is-collapsed .brand { justify-content: center; padding: 0; }
.app.is-collapsed .brand-text, .app.is-collapsed .nav-label, .app.is-collapsed .nav-section, .app.is-collapsed .nav-item > .ico:last-child:not(:first-child) { display: none; }
.app.is-collapsed .nav-item { justify-content: center; padding: 0; }
.app.is-collapsed .nav-item.active::before { left: 2px; }
.app.is-collapsed .nav-count { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; }
.app.is-collapsed .sidebar-foot { justify-content: center; }
.app.is-collapsed .sidebar-foot .ico { transform: rotate(180deg); }
.scrim { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 24px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.btn.menu-btn { display: none; }
.topbar-spacer { flex: 1; }
.search-trigger {
  min-width: 0; display: flex; align-items: center; gap: 9px; height: 38px; width: min(380px, 40vw); padding: 0 12px;
  border: 1px solid var(--border); background: var(--subtle); border-radius: 9px; color: var(--text-3); text-align: left;
}
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.search-trigger kbd { font: 600 11px var(--font); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--paper); }
.menu-wrap { position: relative; }
.menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--paper);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(30, 26, 25, 0.14); padding: 6px; z-index: 40;
}
.menu.open { display: block; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-head small { color: var(--text-3); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13px; }
.menu-item:hover { background: var(--brand-tint); }
.menu-empty { padding: 18px; text-align: center; color: var(--text-3); font-size: 13px; }
.notif { width: 360px; max-width: 92vw; padding: 0; }
.notif .menu-head { padding: 12px 14px; margin: 0; }
.notif-item { display: flex; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; }
.notif-item:hover { background: var(--subtle); }
.notif-item span:last-child { display: flex; flex-direction: column; min-width: 0; }
.notif-item small { color: var(--text-2); }
.notif-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.bell { position: relative; }
.bell-dot { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.user-btn { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 6px; border-radius: 10px; text-align: left; }
.user-btn:hover { background: rgba(30, 26, 25, 0.045); }
.user-btn strong { font-size: 13px; line-height: 1.2; }
.user-btn small { color: var(--text-3); font-size: 11.5px; }
.view { flex: 1; padding: 24px; max-width: 1560px; width: 100%; margin: 0 auto; outline: none; }

/* ── Cabeçalho de página, barra de ferramentas ────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.page-head p { color: var(--text-2); margin-top: 2px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-note { margin-left: auto; }
.seg { display: inline-flex; padding: 3px; background: rgba(30, 26, 25, 0.06); border-radius: 9px; gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font-weight: 600; font-size: 12.5px; }
.seg-btn.active { background: var(--paper); color: var(--brand); box-shadow: 0 1px 2px rgba(30, 26, 25, 0.1); }
.search-box { display: flex; align-items: center; gap: 8px; height: 36px; min-width: 240px; padding: 0 11px; background: var(--paper); border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text-3); }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 79, 163, 0.12); }
.search-box input { border: 0; outline: 0; background: none; width: 100%; padding: 0; height: 100%; }
.search-box.big { height: 46px; font-size: 15px; }
.filter-select, .inline-select { height: 36px; padding: 0 30px 0 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--paper); outline: none; width: auto; max-width: 100%; }
.inline-select { height: 30px; font-weight: 600; }

/* ── Botões ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 8px; background: var(--paper); font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn.ghost:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-tint); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.icon { width: 34px; height: 34px; padding: 0; border-color: var(--border); }
.btn.icon.sm { width: 28px; height: 28px; }
.btn.icon:hover { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.btn.icon.ghost { border-color: transparent; }
.btn.wa { background: #eefaf3; border-color: #c4ebd5; width: auto; min-width: 34px; padding: 0 8px; }
.btn.wa img, .wa-ico { width: 17px; height: 17px; }
.btn:focus-visible { outline: 2px solid rgba(31, 79, 163, 0.45); outline-offset: 2px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; font-size: 13px; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }

/* ── Superfícies ──────────────────────────────────────── */
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel.flush .panel-head { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--border); }
.panel-head h3 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; }
.card-grid.products { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack { display: grid; gap: 12px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 > .panel, .grid-3 > .panel { margin-bottom: 0; }
.grid-2, .grid-3 { margin-bottom: 16px; }
.card-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.empty { display: grid; justify-items: center; gap: 6px; padding: 36px 20px; color: var(--text-3); text-align: center; }
.empty strong { color: var(--text); font-size: 14px; }
.empty span { font-size: 13px; max-width: 46ch; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(30, 26, 25, 0.07); color: var(--text-2); font-size: 11.5px; font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 10px; background: var(--info-tint); color: #1f4f73; font-size: 13px; }
.notice.ok { background: var(--ok-tint); color: #1d5a37; }
.notice.warn { background: var(--warn-tint); color: #7a5213; }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi-grid.small { grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); }
.kpi { display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color 0.12s, box-shadow 0.12s; }
button.kpi:hover { border-color: var(--brand-light); box-shadow: var(--shadow); }
.kpi.static { cursor: default; }
.kpi-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-body small { color: var(--text-2); font-size: 12.5px; }
.kpi-body strong { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; white-space: nowrap; }
.kpi-body em { font-style: normal; color: var(--text-3); font-size: 12px; }

/* tons */
.tone-blue { background: var(--info-tint); color: var(--info); }
.tone-green { background: var(--ok-tint); color: var(--ok); }
.tone-amber { background: var(--warn-tint); color: var(--warn); }
.tone-red { background: var(--bad-tint); color: var(--bad); }
.tone-violet { background: var(--violet-tint); color: var(--violet); }
.tone-teal { background: var(--teal-tint); color: var(--teal); }
.tone-gray { background: rgba(30, 26, 25, 0.07); color: var(--text-2); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: rgba(30, 26, 25, 0.06); color: var(--text-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.bad { background: var(--bad-tint); color: var(--bad); }
.chip.accent { background: var(--accent-tint); color: var(--accent); }
.chip.muted { color: var(--text-3); background: transparent; border: 1px dashed var(--border-strong); }
.doc-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 650; }
.doc-chip.is-ok { background: var(--ok-tint); color: var(--ok); }
.doc-chip.is-warn { background: var(--warn-tint); color: var(--warn); }
.doc-chip.is-missing { background: rgba(30, 26, 25, 0.06); color: var(--text-3); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-tint-2); color: var(--brand); font-size: 12px; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 46px; height: 46px; font-size: 15px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }
.stars { color: #e0a100; letter-spacing: 1px; font-size: 12px; white-space: nowrap; }
.stars i { color: var(--border-strong); font-style: normal; }

/* ── Tabelas ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 10px 14px; background: var(--subtle); color: var(--text-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: rgba(31, 79, 163, 0.03); }
.table tr:last-child td { border-bottom: 0; }
.table small { color: var(--text-3); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; white-space: nowrap; }
.link-cell { border: 0; background: none; padding: 0; text-align: left; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.link-cell:hover strong { color: var(--brand); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user span { display: flex; flex-direction: column; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--text-2); font-size: 13px; margin: 6px 0 24px; }

/* ── Dashboard ────────────────────────────────────────── */
.funnel { display: grid; gap: 11px; }
.funnel-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 12px; font-size: 13px; }
.funnel-label { color: var(--text-2); }
.funnel-bar { height: 10px; border-radius: 6px; background: rgba(30, 26, 25, 0.06); overflow: hidden; }
.funnel-bar i { display: block; height: 100%; border-radius: 6px; }
.funnel-row strong { text-align: right; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
.bar-col i { display: block; width: 100%; max-width: 38px; background: var(--brand-light); border-radius: 6px 6px 3px 3px; min-height: 4px; }
.bar-col small { color: var(--text-3); font-size: 11px; text-transform: capitalize; }
.bar-val { font-size: 12px; font-weight: 700; min-height: 16px; }
.mini-list { display: grid; }
.mini-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mini-row:last-child { border-bottom: 0; }
.mini-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-row strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row span { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attention-list { display: grid; gap: 8px; }
.attention { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--subtle); text-align: left; }
.attention:hover { border-color: var(--brand-light); background: var(--brand-tint); }
.attention > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.attention small { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Pipeline ─────────────────────────────────────────── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board-col { background: rgba(30, 26, 25, 0.04); border-radius: var(--radius-lg); padding: 10px; min-height: 160px; border: 2px solid transparent; }
.board-col.drop { border-color: var(--brand-light); background: var(--brand-tint); }
.board-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.board-col-head strong { flex: 1; font-size: 13px; }
.board-col-body { display: grid; gap: 9px; }
.board-empty { padding: 20px 10px; text-align: center; color: var(--text-3); font-size: 12.5px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.lead-card { cursor: grab; padding: 12px; display: grid; gap: 7px; transition: box-shadow 0.12s, border-color 0.12s; }
.lead-card:hover { border-color: var(--brand-light); box-shadow: var(--shadow); }
.lead-card.dragging { opacity: 0.5; }
.lead-card-top { display: flex; justify-content: space-between; align-items: center; }
.lead-code { font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: 0.04em; }
.lead-name { font-size: 14px; line-height: 1.25; }
.lead-interest { color: var(--text-2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.lead-owner { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lead-owner small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.lead-card-actions { display: flex; gap: 4px; }
.lead-card-actions .btn.icon { width: 30px; height: 30px; }
.list-groups { display: grid; gap: 14px; }
.list-group { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.list-group-head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 11px 16px; border: 0; background: var(--subtle); border-bottom: 1px solid var(--border); text-align: left; }
.caret { display: inline-flex; transition: transform 0.12s; color: var(--text-3); }
.caret.open { transform: rotate(90deg); }

/* ── Drawer ───────────────────────────────────────────── */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(30, 26, 25, 0.28); display: flex; justify-content: flex-end; }
.drawer { width: min(520px, 100vw); height: 100%; background: var(--paper); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateX(24px); opacity: 0; transition: transform 0.18s ease, opacity 0.18s ease; }
.drawer-backdrop.open .drawer { transform: none; opacity: 1; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 18px; letter-spacing: -0.01em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; background: var(--subtle); }
.drawer-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.drawer-hero > div { flex: 1; display: flex; flex-direction: column; }
.drawer-hero span { color: var(--text-2); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.drawer-section { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); margin: 20px 0 10px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0; }
.kv > div { min-width: 0; }
.kv dt { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.kv dd { margin: 2px 0 0; font-weight: 550; overflow-wrap: anywhere; }
.kv.compact { gap: 8px 14px; margin: 10px 0; }
.kv.compact dd { font-size: 13px; }
.kv.specs { grid-template-columns: 1fr; gap: 0; }
.kv.specs > div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.note-box { margin-top: 16px; padding: 12px 14px; background: var(--subtle); border: 1px solid var(--border); border-radius: 10px; }
.note-box p { color: var(--text-2); margin-top: 4px; white-space: pre-line; }
.timeline { display: grid; gap: 4px; position: relative; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 8px 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 6px; box-shadow: 0 0 0 4px var(--brand-tint); }
.tl-item p { color: var(--text-2); margin-top: 2px; }
.tl-item small { color: var(--text-3); }
.timeline.big { max-width: 880px; }
.timeline.big .tl-item { grid-template-columns: 22px 1fr; padding: 6px 0; }
.timeline.big .card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.timeline.big .card header div { display: flex; flex-direction: column; }
.timeline.big .card p { margin: 8px 0 6px; }

/* ── Modal / formulários ──────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(30, 26, 25, 0.42); display: grid; place-items: start center; overflow-y: auto; padding: 5vh 16px; }
.modal-backdrop.top { z-index: 90; place-items: center; }
.modal { width: min(700px, 100%); background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: pop 0.14s ease; }
.modal.small { width: min(440px, 100%); }
.modal.medium { width: min(660px, 100%); }
.modal.large { width: min(860px, 100%); }
.modal.xlarge { width: min(1040px, 100%); }
.modal.search { width: min(620px, 100%); margin-top: 6vh; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; }
.modal-head h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.modal-body { padding: 4px 22px 22px; }
.confirm-text { color: var(--text-2); margin-bottom: 18px; }

.form { display: grid; gap: 14px; }
.form label, label.doc-field { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--text);
  padding: 8px 11px; min-height: 38px; outline: none; font-weight: 400; font-size: 13.5px;
}
.form label.btn { display: inline-flex; gap: 7px; font-size: 12.5px; color: var(--text); font-weight: 600; }
.form textarea { resize: vertical; line-height: 1.45; }
.form input:focus, .form select:focus, .form textarea:focus, .filter-select:focus, .inline-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 79, 163, 0.12); }
.form input[readonly] { background: var(--subtle); color: var(--text-2); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.align-end { align-self: end; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.form-actions.center { justify-content: center; }
.form-actions .left { margin-right: auto; }
.form-section { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 12px; background: var(--subtle); }
.form-section > h3, .form-section > summary { font-size: 13.5px; font-weight: 700; color: var(--text); cursor: default; }
.form-section > h3 small { font-weight: 500; color: var(--text-3); }
details.form-section > summary { cursor: pointer; }
.form-error { min-height: 18px; color: var(--bad); font-weight: 600; font-size: 13px; }
.checkline { display: flex !important; align-items: center; gap: 8px; align-self: end; min-height: 38px; }
.checkline input { width: 16px; min-height: 16px; }
.inline-field { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }

/* documento (CPF/CNPJ) */
.doc-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.doc-status { font-size: 12px; font-weight: 500; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.doc-status.is-ok { color: var(--ok); }
.doc-status.is-warn { color: var(--warn); }
.doc-status.is-bad { color: var(--bad); }

/* foto do cliente */
.photo-field { display: flex; align-items: center; gap: 14px; }
.photo-preview { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-tint-2); color: var(--brand); display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-controls { display: flex; gap: 8px; flex-wrap: wrap; }

/* orçamento */
.catalog-picker { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.qi-list { display: grid; gap: 10px; }
.qi { display: grid; grid-template-columns: 64px minmax(0, 1fr) 70px 120px 120px 34px; gap: 10px; align-items: center; padding: 10px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; }
.qi-media { width: 64px; height: 52px; border-radius: 8px; background: rgba(30, 26, 25, 0.05); display: grid; place-items: center; overflow: hidden; color: var(--text-3); }
.qi-media img { width: 100%; height: 100%; object-fit: cover; }
.qi-main { display: grid; gap: 4px; min-width: 0; }
.qi-specs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-2); }
.qi-num { font-size: 11px !important; }
.qi-num input { text-align: right; }
.quote-totals { display: flex; justify-content: flex-end; gap: 22px; padding: 10px 4px; flex-wrap: wrap; }
.quote-totals .grand strong { font-size: 18px; color: var(--brand); }
.quote-totals .neg { color: var(--bad); }
.map-preview { display: grid; grid-template-columns: 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--paper); }
.map-preview iframe { width: 100%; height: 200px; border: 0; }
.map-preview > div { padding: 10px 12px; display: flex; flex-direction: column; font-size: 12.5px; color: var(--text-2); }
.map-preview.empty { padding: 14px; color: var(--text-2); }

/* venda / contrato */
.sale-items { display: grid; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); }
.sale-item { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.sale-item:last-child { border-bottom: 0; }
.sale-item small { display: block; color: var(--text-3); }
.sale-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--brand-tint); border-radius: 10px; }
.sale-total strong { font-size: 20px; color: var(--brand); }
.plan-preview { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 14px; background: var(--paper); border: 1px dashed var(--border-strong); border-radius: 10px; font-size: 13px; }
.sale-done { display: grid; justify-items: center; gap: 10px; padding: 24px 10px 8px; text-align: center; color: var(--ok); }
.sale-done h3 { font-size: 22px; color: var(--text); }
.sale-done p { color: var(--text-2); max-width: 46ch; }
.sale-done-sum { display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--border); color: var(--text); }
.sale-done-sum strong { font-size: 20px; }

/* ── Cartões específicos ──────────────────────────────── */
.client-card header { display: flex; align-items: center; gap: 12px; }
.client-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.client-card-title strong, .client-card-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-card-title span { color: var(--text-2); font-size: 12.5px; }
.client-doc { margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.client-card .card-actions { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.seller-card header { display: flex; align-items: center; gap: 12px; }
.seller-card header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.seller-card header span { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.seller-card.is-pending { border-color: #ecd9a8; background: #fffdf6; }
.seller-card .card-actions { padding-top: 12px; border-top: 1px solid var(--border); }
.pending-panel { border-color: #ecd9a8; background: #fffaf0; }

.quote-row { display: grid; grid-template-columns: minmax(0, 1.6fr) auto; gap: 12px 18px; align-items: center; }
.quote-row-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.quote-row-main > div { display: flex; flex-direction: column; min-width: 0; }
.quote-row-main span, .quote-row-main small { color: var(--text-2); font-size: 12.5px; }
.quote-number { padding: 7px 10px; border-radius: 8px; background: var(--brand-tint); color: var(--brand); font-weight: 700; font-size: 12px; white-space: nowrap; }
.quote-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.quote-total { font-size: 17px; letter-spacing: -0.01em; }
.quote-row-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--border); }

.order-card { display: grid; gap: 12px; border-left: 4px solid var(--border-strong); }
.order-card.status-novo { border-left-color: var(--accent); }
.order-card.status-encaminhado, .order-card.status-em-análise { border-left-color: var(--brand); }
.order-card.status-convertido { border-left-color: var(--ok); }
.order-card.status-cancelado { border-left-color: var(--bad); opacity: 0.8; }
.order-head { display: flex; justify-content: space-between; align-items: center; }
.order-head > div { display: flex; flex-direction: column; }
.order-number { font-weight: 700; font-size: 15px; }
.order-head small { color: var(--text-3); }
.order-customer { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.order-customer span { color: var(--text-2); font-size: 12.5px; }
.order-items { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 10px; }
.order-items li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 9px 12px; border-bottom: 1px solid var(--border); align-items: center; }
.order-items li:last-child { border-bottom: 0; }
.order-items em { font-style: normal; color: var(--text-2); }
.order-total { display: flex; justify-content: space-between; align-items: center; }
.order-total strong { font-size: 18px; }
.order-notes { padding: 9px 12px; background: var(--subtle); border-radius: 8px; color: var(--text-2); font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
.order-notes.admin { background: var(--brand-tint); color: var(--brand-dark); }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.order-owner { color: var(--text-2); font-size: 13px; }

/* catálogo */
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow 0.12s, border-color 0.12s; }
.product-card:hover { border-color: var(--brand-light); box-shadow: var(--shadow); }
.product-card.is-off { opacity: 0.72; }
.product-media { position: relative; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.no-photo { display: grid; justify-items: center; gap: 4px; color: var(--text-3); }
.ribbon { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.product-info { padding: 14px; display: grid; gap: 6px; flex: 1; align-content: start; }
.product-info strong { font-size: 15px; line-height: 1.25; }
.product-info p { color: var(--text-2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--subtle); }
.product-foot strong { font-size: 16px; }
.gallery-main { aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { width: 66px; height: 54px; flex: none; border: 2px solid transparent; border-radius: 8px; padding: 0; background: #fff; overflow: hidden; }
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-price { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 8px; }
.detail-price strong { font-size: 24px; letter-spacing: -0.02em; }
.detail-price span { color: var(--text-2); }
.detail-text { color: var(--text-2); margin-bottom: 10px; white-space: pre-line; }
.file-list { display: grid; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); text-align: left; color: #b3261e; }
button.file-row:hover { border-color: var(--brand-light); background: var(--brand-tint); }
.file-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); }
.file-row strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.file-row small { color: var(--text-3); }
.file-row.pending { border-style: dashed; background: var(--subtle); }
.files-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.files-col header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.files-col h3 { font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.files-col h3 small { color: var(--text-3); font-weight: 500; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 12px; background: var(--paper); min-height: 150px; transition: border-color 0.12s, background 0.12s; }
.dropzone.over { border-color: var(--brand); background: var(--brand-tint); }
.drop-hint { display: grid; justify-items: center; gap: 4px; padding: 24px 12px; color: var(--text-3); text-align: center; }
.drop-hint strong { color: var(--text); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 10px; }
.photo-grid figure { margin: 0; position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.photo-grid figure.pending { border-style: dashed; }
.photo-grid img { width: 100%; height: 150px; object-fit: contain; display: block; background: #f5f7fa; }
.photo-grid figcaption.photo-meta { display: grid; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.photo-options { display: grid; gap: 7px; }
.photo-options > label:not(.photo-caption) { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.photo-options input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.photo-caption { display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
.photo-caption textarea { width: 100%; resize: vertical; min-height: 62px; padding: 7px; border: 1px solid var(--border-strong); border-radius: 7px; font: inherit; font-size: 12px; }
.photo-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.photo-actions small { color: var(--text-3); font-size: 11px; }
.cover-tag { position: absolute; top: 6px; left: 6px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.cover-tag.wait { background: var(--warn); }

/* agenda */
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.appointment { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; }
.appt-date { text-align: center; background: var(--brand-tint); color: var(--brand); border-radius: 10px; padding: 8px 4px; display: flex; flex-direction: column; line-height: 1.1; }
.appt-date strong { font-size: 22px; }
.appt-date span { text-transform: uppercase; font-size: 11px; font-weight: 700; }
.appt-main { display: flex; flex-direction: column; min-width: 0; }
.appt-main span, .appt-main small { color: var(--text-2); font-size: 12.5px; }
.appt-main p { margin-top: 6px; color: var(--text-2); font-size: 13px; }
.appt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.calendar { position: sticky; top: 88px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; text-transform: capitalize; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-week { color: var(--text-3); font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.cal-day { position: relative; aspect-ratio: 1; border: 0; border-radius: 8px; background: none; font-size: 12.5px; }
.cal-day:hover { background: var(--brand-tint); }
.cal-day.today { font-weight: 800; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-tint-2); }
.cal-day.marked { background: var(--accent-tint); }
.cal-day.selected { background: var(--brand); color: #fff; }
.cal-day i { position: absolute; right: 3px; top: 2px; font-size: 9.5px; font-style: normal; font-weight: 700; color: var(--accent); }
.cal-day.selected i { color: #fff; }

/* meu trabalho */
.task-group { margin-bottom: 16px; }
.task-group.is-late { border-color: #efc7c7; }
.task-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.task-row:last-child { border-bottom: 0; }
.task-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.task-main { display: flex; flex-direction: column; min-width: 0; }
.task-main span { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-due { font-size: 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.task-due.late { color: var(--bad); }
.task-actions { display: flex; gap: 6px; }

/* empresa */
.company-card { display: flex; gap: 20px; align-items: center; }
.company-card img { width: 120px; flex: none; }
.company-card h3 { font-size: 18px; margin-bottom: 6px; }
.company-card p { color: var(--text-2); font-size: 13px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.kv-block strong { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 4px; }
.kv-block p { color: var(--text-2); white-space: pre-line; }

/* busca global */
.search-results { margin-top: 12px; max-height: 52vh; overflow-y: auto; }
.search-group { display: grid; gap: 2px; margin-bottom: 12px; }
.search-group .eyebrow { padding: 4px 8px; }
.search-hit { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; text-align: left; width: 100%; }
.search-hit:hover { background: var(--brand-tint); }
.search-hit span { display: flex; flex-direction: column; min-width: 0; }
.search-hit small { color: var(--text-2); }

/* toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(420px, 90vw); padding: 12px 14px; border-radius: 10px; background: #2a2523; color: #fff; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; font-size: 13px; }
.toast.show { opacity: 1; transform: none; }
.toast.is-ok .ico { color: #6ee7a0; }
.toast.is-danger { background: #7a1f1f; }

/* ── Login / bloqueio ─────────────────────────────────── */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--paper); }
.auth-screen.single { grid-template-columns: 1fr; place-items: center; background: var(--bg); padding: 24px; }
.auth-hero { background: linear-gradient(150deg, #0d2b5e 0%, #163b7a 55%, #1f4fa3 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; overflow: hidden; }
.auth-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%; background: rgba(232, 92, 13, 0.22); filter: blur(10px); }
.auth-logo { width: 190px; max-width: 70%; filter: brightness(0) invert(1); }
.auth-logo.dark { filter: none; }
.auth-hero h1 { font-size: 38px; letter-spacing: -0.03em; }
.auth-hero p { color: rgba(255, 255, 255, 0.82); max-width: 44ch; font-size: 16px; }
.auth-hero ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-hero li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.92); }
.auth-card-wrap { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-card { width: min(420px, 100%); display: grid; gap: 14px; background: var(--paper); border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.auth-card.lock { justify-items: center; text-align: center; }
.auth-card-head { display: grid; gap: 4px; }
.auth-card-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.auth-card label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.auth-card input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; outline: none; }
.auth-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 79, 163, 0.12); }
.auth-links { display: grid; justify-items: center; gap: 8px; }
.auth-note { color: var(--text-3); font-size: 12px; display: flex; gap: 6px; align-items: center; justify-content: center; text-align: center; }
.lock-contacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ── Responsivo ───────────────────────────────────────── */
@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: 1fr; }
  .files-grid { grid-template-columns: 1fr; }
  .qi { grid-template-columns: 56px minmax(0, 1fr) 70px 110px 34px; }
  .qi .qi-num:nth-of-type(3) { display: none; }
}
@media (max-width: 920px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform 0.2s ease; width: min(290px, 86vw); box-shadow: var(--shadow-lg); }
  .app.is-collapsed .sidebar { width: min(290px, 86vw); }
  .app.is-collapsed .brand-text, .app.is-collapsed .nav-label, .app.is-collapsed .nav-section { display: initial; }
  .app.is-collapsed .brand { justify-content: flex-start; padding: 0 18px; }
  .app.is-collapsed .nav-item { justify-content: flex-start; padding: 0 10px; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(30, 26, 25, 0.38); z-index: 25; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar-spacer { display: none; }
  .topbar .btn.primary span { display: none; }
  .view { padding: 16px 14px 28px; }
  .search-trigger { width: auto; flex: 1; }
  .search-trigger kbd, .hide-sm { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .agenda-layout { grid-template-columns: 1fr; }
  .calendar { position: static; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; }
  .auth-hero h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .cols, .cols.three { grid-template-columns: 1fr; }
  .quote-row { grid-template-columns: 1fr; }
  .quote-row-side { align-items: flex-start; }
  .quote-row-actions { justify-content: flex-start; }
  .qi { grid-template-columns: 48px 1fr 34px; }
  .qi-num { grid-column: 2 / 3; }
  .qi .btn { grid-row: 1; grid-column: 3; }
  .appointment { grid-template-columns: 54px 1fr; }
  .appt-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .task-row { grid-template-columns: 34px 1fr; }
  .task-due, .task-actions { grid-column: 2; }
  .modal-body { padding: 4px 16px 18px; }
  .modal-head { padding: 16px 16px 10px; }
  .funnel-row { grid-template-columns: 96px 1fr 28px; }
  .kv { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
