/* SKF CRM — réplica del layout del CRM actual (sidebar oscuro + Kanban claro) */
:root {
  --sidebar: #2f3a46; --sidebar-active: #1f2833; --sidebar-text: #e6e9ee; --sidebar-muted: #aab4c0;
  --bg: #f2f4f7; --surface: #fff; --border: #e4e7ec; --border-strong: #d0d5dd;
  --text: #101828; --text-2: #344054; --muted: #667085; --muted-2: #98a2b3;
  --primary: #155eef; --primary-hover: #004eeb; --primary-soft: #eff4ff; --primary-border: #b2ccff;
  --green: #12b76a; --green-soft: #ecfdf3; --orange: #f79009; --red: #f04438; --red-soft: #fef3f2; --wa: #25d366; --wa-bubble: #dcf8c6;
  --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06); --shadow-lg: 0 12px 24px -4px rgba(16,24,40,.12), 0 4px 8px -2px rgba(16,24,40,.06);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 260px 1fr; height: 100vh; }
.layout.collapsed { grid-template-columns: 68px 1fr; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; padding: 18px 10px 14px; overflow-y: auto; position: relative; }
.brand { text-align: center; padding: 6px 0 18px; line-height: 1; }
.brand .b1 { font-size: 30px; font-weight: 800; letter-spacing: 1px; }
.brand .b2 { font-size: 15px; color: var(--sidebar-muted); letter-spacing: 3px; margin-top: 4px; text-transform: uppercase; }
.account { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.08); border-radius: 8px; padding: 9px 10px; margin-bottom: 12px; }
.account .av { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--sidebar-muted); display: grid; place-items: center; }
.account .t1 { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account .t2 { font-size: 12.5px; color: var(--sidebar-muted); }
.sb-search { display: flex; gap: 6px; margin-bottom: 18px; }
.sb-search .box { flex: 1; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border-radius: 6px; padding: 7px 9px; color: var(--sidebar-muted); }
.sb-search input { background: transparent; border: 0; outline: 0; width: 100%; color: #fff; }
.sb-search .kbd { white-space: nowrap; font-size: 11px; background: rgba(255,255,255,.18); border-radius: 4px; padding: 1px 5px; color: #fff; }
.sb-search .bolt { width: 34px; border-radius: 6px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #4ade80; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0; border-radius: 6px; color: var(--sidebar-text); font-weight: 500; font-size: 15px; position: relative; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.active { background: var(--sidebar-active); font-weight: 700; color: #fff; margin-left: -10px; margin-right: -10px; padding-left: 22px; border-radius: 0; }
.nav .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.nav hr { border: 0; border-top: 1px solid rgba(255,255,255,.25); margin: 14px 8px; }
.sb-foot { margin-top: auto; }
.collapse-btn { position: absolute; right: -11px; bottom: 28px; width: 24px; height: 24px; border-radius: 50%; background: var(--green); border: 0; color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.layout.collapsed .brand .b2, .layout.collapsed .account div:not(.av), .layout.collapsed .sb-search, .layout.collapsed .nav span, .layout.collapsed .nav .count { display: none; }
.layout.collapsed .brand .b1 { font-size: 15px; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { background: var(--surface); display: flex; align-items: flex-end; gap: 28px; padding: 0 22px; border-bottom: 1px solid var(--border); min-height: 84px; position: relative; }
.topbar h1 { font-size: 22px; font-weight: 600; margin: 0 8px 18px 0; }
.tabs { display: flex; gap: 6px; }
.tabs a { padding: 12px 10px 14px; color: var(--text-2); font-weight: 500; font-size: 16px; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.top-actions { position: absolute; right: 18px; top: 12px; display: flex; gap: 10px; }
.circle { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 0; cursor: pointer; font-weight: 700; position: relative; }
.circle.green { background: #16a34a; } .circle.orange { background: #f97316; } .circle.user { background: #d16b7c; }
.circle .dot { position: absolute; top: 4px; right: 6px; width: 9px; height: 9px; background: #fde047; border-radius: 50%; }
.content { flex: 1; overflow: auto; padding: 22px 26px; }
.content.board-content { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 6px; }

/* ---------- Controles ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #f9fafb; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.outline-blue { color: var(--primary); }
.btn.danger { color: var(--red); border-color: #fda29b; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { background: transparent; border: 0; cursor: pointer; padding: 4px; border-radius: 6px; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: #f2f4f7; color: var(--text); }
.input, select.input, textarea.input { width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); outline: 0; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
label.f > .input, label.f > select, label.f > textarea { margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; font-weight: 600; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--primary-border); color: var(--primary); background: var(--primary-soft); border-radius: 999px; font-weight: 600; cursor: pointer; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f2f4f7; color: var(--text-2); }
.tag.green { background: var(--green-soft); color: #027a48; } .tag.red { background: var(--red-soft); color: #b42318; } .tag.blue { background: var(--primary-soft); color: var(--primary); } .tag.orange { background: #fffaeb; color: #b54708; } .tag.wa { background: #e7f8ee; color: #067647; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; }

/* ---------- Barra del tablero ---------- */
.board-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.board-bar .pipeline-select { width: auto; min-width: 320px; font-size: 18px; padding: 10px 14px; }
.board-bar .spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 12px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--primary-soft); color: var(--primary); }
.subtabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.subtabs a { padding: 8px 14px 12px; color: var(--text-2); font-size: 17px; display: flex; gap: 8px; align-items: center; border-bottom: 2px solid transparent; }
.subtabs a.active { border-color: var(--primary); }
.filter-row { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 8px 14px; min-width: 340px; color: var(--muted); }
.search-box input { border: 0; outline: 0; width: 100%; font-size: 15px; background: transparent; }
.popover { position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 16px; width: 320px; }

/* ---------- Kanban ---------- */
.kanban { flex: 1; display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px; align-items: stretch; }
.col { width: 372px; flex: none; display: flex; flex-direction: column; min-height: 0; }
.col.collapsed { width: 52px; }
.col-head { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 12px 12px 10px; margin-bottom: 18px; box-shadow: var(--shadow); }
.col-head .row { display: flex; align-items: center; gap: 8px; }
.col-head .name { font-weight: 700; font-size: 16px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-head .meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.col-head .meta b { color: var(--text); margin-left: 10px; font-weight: 600; }
.col-head.won { border-top: 3px solid var(--green); } .col-head.lost { border-top: 3px solid var(--red); }
.col.collapsed .col-head { writing-mode: vertical-rl; height: 100%; padding: 12px 8px; }
.col.collapsed .col-head .meta, .col.collapsed .col-body { display: none; }
.col-body { flex: 1; overflow-y: auto; padding: 2px 6px 10px 2px; min-height: 120px; border-radius: 6px; }
.col-body.drop { background: rgba(21,94,239,.06); outline: 2px dashed var(--primary-border); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 14px 12px 12px; margin-bottom: 12px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .12s, transform .12s; }
.card:hover { box-shadow: var(--shadow-lg); }
.card.dragging { opacity: .45; }
.card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.card .name { font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .assign { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--muted); font-size: 11.5px; font-weight: 700; flex: none; background: #fff; }
.card .assign.set { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-border); }
.kv { display: grid; grid-template-columns: 136px 1fr; font-size: 14px; margin-bottom: 15px; }
.kv span:first-child { font-weight: 600; color: var(--text-2); }
.kv span:last-child { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .icons { display: flex; gap: 14px; color: var(--text-2); padding-top: 2px; }
.card .icons .ic { position: relative; display: inline-grid; place-items: center; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.card .icons .ic:hover { color: var(--primary); }
.badge { position: absolute; top: -9px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--primary); color: #fff; border-radius: 9px; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 1.5px solid #fff; }
.badge.wa { background: var(--green); }
.more-btn { width: 100%; margin-bottom: 12px; }

/* ---------- Lista ---------- */
table.t { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
table.t th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; background: #f9fafb; padding: 10px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; }
table.t td select.input { min-width: 130px; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr.click:hover td { background: #f9fafb; cursor: pointer; }
.list-wrap { flex: 1; overflow: auto; }

/* ---------- Drawer (ficha) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16,24,40,.35); z-index: 40; display: flex; justify-content: flex-end; }
.drawer { width: min(820px, 100vw); background: var(--surface); height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .16s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .5; } }
.drawer-head { padding: 18px 22px 0; border-bottom: 1px solid var(--border); }
.drawer-head .row1 { display: flex; align-items: center; gap: 12px; }
.drawer-head h2 { margin: 0; font-size: 21px; flex: 1; }
.drawer-head .sub { color: var(--muted); margin: 6px 0 12px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.drawer-tabs { display: flex; gap: 4px; overflow-x: auto; }
.drawer-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.drawer-tabs button.on { color: var(--primary); border-color: var(--primary); }
.drawer-tabs .n { background: #f2f4f7; color: var(--text-2); border-radius: 9px; padding: 0 7px; font-size: 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.section { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.section h3 { margin: 0 0 14px; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.stage-steps { display: flex; gap: 3px; margin: 4px 0 14px; }
.stage-steps button { flex: 1; height: 8px; border: 0; border-radius: 3px; background: #e4e7ec; cursor: pointer; padding: 0; }
.stage-steps button.done { background: var(--primary-border); } .stage-steps button.cur { background: var(--primary); }
.stage-steps button.won.cur { background: var(--green); } .stage-steps button.lost.cur { background: var(--red); }

/* ---------- WhatsApp ---------- */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 420px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; background: #efeae2; border-radius: 8px 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 75%; padding: 7px 10px 5px; border-radius: 8px; background: #fff; box-shadow: 0 1px .5px rgba(0,0,0,.13); word-wrap: break-word; font-size: 14px; }
.msg .txt { white-space: pre-wrap; }
.msg.out { align-self: flex-end; background: var(--wa-bubble); }
.msg.tpl { border-left: 3px solid var(--wa); }
.msg .meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 3px; display: flex; gap: 6px; justify-content: flex-end; }
.msg.failed { background: var(--red-soft); }
.msg .att { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.04); border-radius: 6px; padding: 6px 8px; margin-bottom: 4px; }
.day-sep { align-self: center; background: #e1f3fb; color: #54656f; font-size: 12px; padding: 3px 10px; border-radius: 6px; margin: 6px 0; }
.composer { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 8px 8px; padding: 10px; display: flex; gap: 8px; align-items: flex-end; background: #f0f2f5; flex-wrap: wrap; }
.composer textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; }
.window-banner { font-size: 12.5px; padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.window-banner.open { background: var(--green-soft); color: #027a48; } .window-banner.closed { background: #fffaeb; color: #b54708; }
.conv-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; height: calc(100vh - 84px - 44px); }
.conv-list { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow-y: auto; }
.conv-item { padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; gap: 10px; }
.conv-item:hover, .conv-item.on { background: var(--primary-soft); }
.conv-item .av { width: 38px; height: 38px; border-radius: 50%; background: #e7f8ee; color: #067647; display: grid; place-items: center; font-weight: 700; flex: none; }
.conv-item .l1 { display: flex; justify-content: space-between; gap: 6px; font-weight: 600; }
.conv-item .l2 { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.conv-pane { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; min-height: 0; }

/* ---------- Documentos ---------- */
.dropzone { border: 2px dashed var(--border-strong); border-radius: 10px; padding: 22px; text-align: center; color: var(--muted); margin-bottom: 16px; transition: .12s; }
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.dropzone .row { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.checklist { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.checklist .item { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); }
.checklist .item.ok { background: var(--green-soft); border-color: #a6f4c5; color: #027a48; }
.doc-row { display: grid; grid-template-columns: 34px 1fr 200px auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.doc-ico { width: 34px; height: 40px; border-radius: 4px; background: #fef3f2; color: #b42318; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.doc-ico.img { background: #eff8ff; color: #175cd3; } .doc-ico.doc { background: #eff4ff; color: #155eef; }
.doc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview { position: fixed; inset: 0; z-index: 60; background: rgba(16,24,40,.75); display: flex; flex-direction: column; }
.preview .bar { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 10px 18px; }
.preview .stage { flex: 1; display: grid; place-items: center; padding: 0 20px 20px; min-height: 0; }
.preview iframe { width: min(1000px, 100%); height: 100%; border: 0; background: #fff; border-radius: 6px; }
.preview img { max-width: 100%; max-height: 100%; border-radius: 6px; background: #fff; }

/* ---------- Notas / tareas / actividad ---------- */
.note { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: #fffef5; }
.note .h { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.note .b { white-space: pre-wrap; }
.task { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.task.done .title { text-decoration: line-through; color: var(--muted); }
.task .due { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.task .due.late { color: var(--red); font-weight: 600; }
.timeline .ev { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.timeline .ev .w { color: var(--muted); width: 140px; flex: none; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 12px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal .mh { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal .mh h3 { margin: 0; font-size: 17px; }
.modal .mb { padding: 20px 22px; }
.modal .mf { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Ajustes / panel ---------- */
.settings { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.settings nav { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; position: sticky; top: 0; }
.settings nav a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--text-2); font-weight: 500; }
.settings nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px 22px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 6px; font-size: 18px; } .panel > p.muted { margin: 0 0 16px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f2f4f7; border-radius: 4px; padding: 2px 6px; font-size: 12.5px; word-break: break-all; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; }
.kpi .l { color: var(--muted); font-size: 13px; font-weight: 600; } .kpi .v { font-size: 30px; font-weight: 700; margin-top: 6px; }
.bars .b { display: grid; grid-template-columns: 260px 1fr 50px; gap: 12px; align-items: center; margin-bottom: 9px; font-size: 13.5px; }
.bars .track { background: #f2f4f7; border-radius: 4px; height: 14px; overflow: hidden; }
.bars .fill { background: var(--primary); height: 100%; border-radius: 4px; }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 160px; border-bottom: 1px solid var(--border); padding-top: 10px; }
.vbars .day { flex: 1; display: flex; flex-direction: column-reverse; gap: 1px; height: 100%; justify-content: flex-start; }
.vbars .s1 { background: var(--primary); border-radius: 2px 2px 0 0; } .vbars .s2 { background: #f79009; border-radius: 2px 2px 0 0; } .vbars .s3 { background: #98a2b3; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #2f3a46 0%, #1f2833 100%); padding: 20px; }
.login { background: var(--surface); width: min(400px, 100%); border-radius: 14px; padding: 34px 32px; box-shadow: var(--shadow-lg); }
.login .logo { text-align: center; margin-bottom: 22px; }
.login .logo .b1 { font-size: 30px; font-weight: 800; color: var(--sidebar); letter-spacing: 1px; }
.login .logo .b2 { color: var(--muted); letter-spacing: 3px; font-size: 13px; text-transform: uppercase; }
.login .err { color: #b42318; background: var(--red-soft); padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.login .legal { font-size: 11.5px; color: var(--muted); margin-top: 18px; line-height: 1.5; }

#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #101828; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 520px; }
.toast.err { background: #b42318; } .toast.ok { background: #027a48; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; } .sidebar { display: none; }
  .conv-layout { grid-template-columns: 1fr; } .kpis { grid-template-columns: 1fr 1fr; } .settings { grid-template-columns: 1fr; }
  .doc-row { grid-template-columns: 34px 1fr; } .grid2 { grid-template-columns: 1fr; }
}
