:root {
  --bg: #0f1412;
  --panel: #18211d;
  --card: #1f2b26;
  --line: #2d3d36;
  --text: #e8f3ed;
  --muted: #9bb3a8;
  --accent: #3dd68c;
  --accent-2: #7ee0ff;
  --danger: #ff7a7a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
a { color: var(--accent-2); }
button, input, textarea, select {
  font: inherit;
  color: inherit;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 400px at 10% 10%, #16352b, transparent),
    radial-gradient(700px 400px at 90% 90%, #123047, transparent),
    var(--bg);
}
.login-card {
  width: min(420px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.login-card p { color: var(--muted); }
label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 13px; }
input, textarea, select {
  width: 100%;
  background: #101714;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--accent);
  color: #062315;
  font-weight: 700;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 8px 10px; font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; }
.shell { display: grid; grid-template-columns: 240px 1fr; height: 100%; min-height: 0; overflow: hidden; }
nav {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  overflow: auto;
}
nav h2 { margin: 0 16px 18px; font-size: 18px; }
nav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
}
nav a.active, nav a:hover { background: #24332d; }
main { padding: 28px; overflow: auto; min-height: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.card .n { font-size: 32px; font-weight: 800; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(160px, 1fr)); gap: 12px; overflow: auto; align-items: start; }
.col { background: var(--panel); border-radius: 14px; padding: 10px; min-height: 320px; }
.col.drop { outline: 2px dashed var(--accent); }
.col-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--muted); align-items: center; }
.stage-name {
  width: auto;
  flex: 1;
  padding: 6px 8px;
  font-weight: 700;
  background: transparent;
}
.lead-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  margin-top: 8px;
  cursor: grab;
}
.lead-card.dragging { opacity: 0.5; }
.lead-card small { color: var(--muted); font-size: 11px; }
.chip { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #2a443a; font-size: 12px; color: inherit; text-decoration: none; }
.chip.active { background: #3d7a5c; }
.inbox { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: 70vh; }
.muted { color: var(--muted); font-size: 13px; }
.shell.is-chat { height: 100%; }
.shell.is-chat main { padding: 12px 16px 0; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.chat-top, .chat-filters { margin: 0 0 8px; flex-shrink: 0; }
.chat-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 280px;
  flex: 1;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  margin-bottom: 0;
}
.chat-list { overflow: auto; border-right: 1px solid var(--line); }
.chat-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.chat-row.active, .chat-row:hover { background: #24332d; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #2a443a; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.chat-row-body strong { display: block; font-size: 13px; }
.preview { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row-meta { text-align: right; color: var(--muted); font-size: 11px; }
.chat-row-meta b { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 99px; background: var(--accent); color: #062315; }
.chat-main { display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; background: #152019; }
.chat-head {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--card);
  flex-shrink: 0;
}
.chat-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.chat-head small { color: var(--muted); }
.ia-toggle { border: 1px solid var(--line); }
.ia-toggle strong { font-weight: 800; }
.ia-toggle.on {
  background: #143528;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.thread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.files-tray {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #121c18;
}
.file-mini {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  font-size: 12px;
  max-width: 180px;
}
.file-mini img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.composer-dock { flex-shrink: 0; background: var(--card); border-top: 1px solid var(--line); max-height: 65vh; }
.composer-dock #qr { width: calc(100% - 20px); margin: 8px 10px 0; }
.composer { display: flex; gap: 6px; padding: 8px 10px; align-items: flex-end; }
.composer textarea {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  min-height: 130px;
  max-height: 58vh;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #101714;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
}
.icon-btn.rec { background: var(--danger); color: #2b0b0b; }
.composer-tools { display: flex; gap: 6px; padding: 0 10px; align-items: center; }
.bubble-img { max-width: min(260px, 100%); border-radius: 10px; display: block; margin-bottom: 6px; }
.bubble-vid { max-width: min(260px, 100%); border-radius: 10px; display: block; margin-bottom: 6px; }
.bubble-aud { width: min(260px, 100%); margin: 4px 0; }
.file-chip { display: inline-block; margin: 4px 0; padding: 8px 10px; border-radius: 10px; background: #101714; color: var(--accent-2); text-decoration: none; }
.chat-side { overflow: auto; border-left: 1px solid var(--line); padding: 14px; background: var(--card); }
.chat-side h3 { margin: 0 0 8px; }
.chat-side label { margin-top: 10px; }
.tool-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  margin-top: 10px;
  background: #152019;
}
.tool-block.note { border-color: #9b7dff; }
.tool-block.ia { border-color: #5aa7ff; }
.tool-block.sched { border-color: #ff8ac7; }
.tool-block.star { border-color: #f5c451; }
.tool-block.files { border-color: #3dd68c; }
.plus-wrap { position: relative; }
.tool-menu {
  position: absolute;
  bottom: 48px;
  left: 0;
  z-index: 8;
  min-width: 220px;
  background: #1a2420;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.tool-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.tool-menu button:hover { background: #24332d; }
.tm-note { color: #cbb6ff; }
.tm-event { color: #7ee0ff; }
.tm-file { color: #3dd68c; }
.tm-loc { color: #ffb36b; }
.tm-qr { color: #f5c451; }
.tm-sched { color: #ff8ac7; }
.tm-quote { color: #9ad0ff; font-weight: 700; }
.tm-call { color: #5dff9a; font-weight: 700; }
.icon-btn.plus { font-size: 22px; font-weight: 700; }
.icon-btn.call-icon, .call-btn { background: #1d6b3c; color: #c8ffd9; }
.call-banner {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #1d6b3c;
  color: #eafff2;
}
.call-banner span { color: #c8ffd9; font-size: 12px; }
.sheet {
  border-top: 3px solid #9b7dff;
  background: #1b1528;
  padding: 8px 10px;
}
.sheet-note { border-color: #9b7dff; background: #24183a; }
.sheet-event { border-color: #7ee0ff; background: #10232c; }
.sheet-sched { border-color: #ff8ac7; background: #2a1522; }
.sheet-qr { border-color: #f5c451; background: #2a2414; }
.sheet-loc { border-color: #ffb36b; background: #2a1c10; }
.sheet-bar { display: flex; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 6px; }
.sheet-bar .x { margin-left: auto; background: transparent; border: 0; color: inherit; cursor: pointer; font-size: 20px; }
.sheet textarea, .sheet input { margin-top: 6px; }
.hidden { display: none !important; }
.bubble.team { max-width: 85%; }
.bubble.note { background: #4a2d7a; border: 1px solid #9b7dff; }
.bubble.call { background: #1d4a35; border: 1px solid #5dff9a; }
.bubble.event { background: #163544; border: 1px solid #7ee0ff; }
.bubble.loc { border: 1px solid #ffb36b; }
.bubble-kicker { display: block; font-size: 12px; margin: 4px 0; }
.qr-pick { display: block; width: 100%; text-align: left; margin: 4px 0; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #101714; cursor: pointer; color: inherit; }
#unattended-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: #6b1d1d;
  color: #ffe8e8;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
#unattended-bar button {
  margin-left: auto;
  background: #2b0b0b;
  color: #ffe8e8;
  border: 1px solid #ff7a7a;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.shop-pick-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  margin: 10px 0 16px;
  padding: 4px;
  background: #101714;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.shop-pick {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.shop-pick img, .shop-pick .miniatura { width: 48px; height: 48px; object-fit: contain; background: #eee; border-radius: 4px; }
.shop-pick strong { display: block; font-size: 12px; line-height: 1.3; }
.shop-pick small { color: var(--muted); font-size: 11px; }
.shell.is-quote main { padding: 10px 16px 28px; background: #eef1f6; }
.quote-page { padding-bottom: 28px; position: relative; max-width: 1100px; margin: 0 auto; font-size: 13px; color: #16233a; }
.quote-tools {
  background: #fff;
  color: #16233a;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,.05);
}
.quote-tools .muted { color: #5a6b85; }
.quote-tools .btn.ghost { color: #0b2a6b; border-color: #cfd8e8; }
.quote-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; }
.quote-bar strong { color: #0b2a6b; letter-spacing: .02em; }
.quote-tools input, .quote-tools select {
  width: auto;
  background: #fff;
  color: #16233a;
  border: 1px solid #cfd8e8;
  border-radius: 5px;
  padding: 6px 8px;
}
.quote-bar #qfolio { width: 88px; }
.quote-bar #qcli { width: min(340px, 42vw); }
.quote-bar #qant { width: 64px; }
.quote-tools details { margin-top: 6px; }
.quote-tools summary { cursor: pointer; font-weight: 700; color: #0b2a6b; }
.quote-tools .shop-pick-list { max-height: 140px; background: #f7f9fc; border-color: #cfd8e8; }
.apu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; align-items: center; justify-content: center; }
.apu-overlay.open { display: flex; }
.apu-card { background: #fff; color: #16233a; width: min(560px, 94vw); border-radius: 8px; padding: 16px; max-height: 90vh; overflow: auto; }
.apu-card h3 { margin: 0 0 8px; color: #0b2a6b; }
.apu-card input { width: 72px; background: #fff; color: #16233a; border: 1px solid #cfd8e8; border-radius: 5px; padding: 6px; }
.quote-cli-hits {
  position: absolute;
  top: 48px;
  left: 130px;
  z-index: 40;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  min-width: 320px;
  max-height: 240px;
  overflow: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.quote-cli-hits button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 6px 8px;
  cursor: pointer;
}
.quote-cli-hits button:hover { background: rgba(18,161,80,.15); }
.quote-chat-win {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 360px;
  height: 420px;
  background: #0f1c1a;
  border: 1px solid #1f3d36;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  z-index: 6;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  pointer-events: auto;
}
.quote-chat-win.is-min {
  height: auto;
  width: 260px;
}
.quote-chat-win.is-min #qchatlog,
.quote-chat-win.is-min #qchatform { display: none; }
.quote-chat-win.is-hidden { display: none; }
.quote-chat-win header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-weight: 700;
  background: #12a150;
  color: #062;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  user-select: none;
}
.quote-chat-win.is-min header { border-radius: 12px; }
.qchat-btns { display: flex; gap: 4px; }
.qchat-btns button {
  background: rgba(0,0,0,.12);
  border: 0;
  color: #062;
  width: 26px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}
.qchat-btns button:hover { background: rgba(0,0,0,.22); }
#qchatlog { flex: 1; overflow: auto; padding: 10px; font-size: 13px; }
.qchat-you { color: #cfe; }
.qchat-ia { color: #fff; }
#qchatform { padding: 8px; border-top: 1px solid #1f3d36; display: flex; flex-direction: column; gap: 6px; }
#qchatform input[type="file"] { font-size: 11px; padding: 4px; color: #cfe; }
.quote-hoja .muted { color: #5a6b85; }
.quote-hoja .btn.ghost { color: #0b2a6b; border-color: #cfd8e8; background: #fff; }
.quote-hoja .btn.small { padding: 4px 8px; }
.quote-hoja {
  background: #fff;
  color: #16233a;
  padding: 22px 26px 18px;
  border-radius: 10px;
  margin-top: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  font-size: 13px;
}
.quote-head { display: flex; justify-content: space-between; border-bottom: 3px solid #0b2a6b; padding-bottom: 14px; margin-bottom: 16px; }
.quote-head img { max-height: 70px; }
.quote-brand { margin: 0; color: #0b2a6b; }
.quote-brand span { color: #12a150; }
.quote-tag { font-size: 11px; color: #5a6b85; }
.quote-meta { text-align: right; font-size: 12px; color: #5a6b85; }
.quote-meta strong { font-size: 18px; color: #0b2a6b; }
.quote-who { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 13px; gap: 8px; }
.partida { background: #eef2fa; color: #0b2a6b; font-weight: 700; padding: 6px 8px; border-left: 4px solid #0b2a6b; margin: 12px 0 6px; font-size: 12px; }
.quote-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.quote-table th { background: #0b2a6b; color: #fff; text-align: left; padding: 6px 8px; font-size: 11px; text-transform: uppercase; }
.quote-table td { padding: 6px 8px; border-bottom: 1px solid #cfd8e8; vertical-align: middle; }
.quote-table .num { text-align: right; }
.miniatura { width: 50px; height: 50px; object-fit: contain; border: 1px solid #cfd8e8; border-radius: 4px; background: #eee; }
.quote-totales { width: 50%; margin-left: auto; }
.quote-totales td { padding: 6px; }
.quote-totales .big { font-size: 16px; font-weight: 700; color: #0b2a6b; border-top: 2px solid #0b2a6b; border-bottom: 2px solid #0b2a6b; }
.input-largo { width: 100%; border: 1px solid #cfd8e8; background: #fff; color: #16233a; }
.quote-hoja input { color: #16233a; background: #fff; }
@media print {
  html, body, #app { height: auto !important; overflow: visible !important; background: #fff !important; }
  .shell { display: block; height: auto; overflow: visible; }
  nav, .quote-tools, .no-print, #unattended-bar { display: none !important; }
  main { padding: 0; overflow: visible; }
  .quote-hoja { box-shadow: none; margin: 0; }
}
.tool-block summary { cursor: pointer; font-weight: 700; }
.note-card {
  background: #101714;
  border-radius: 10px;
  padding: 8px;
  margin: 8px 0;
  font-size: 13px;
}
.note-card p { margin: 6px 0; white-space: pre-wrap; }
.note-card a { font-size: 12px; }
.bubble { position: relative; }
.star-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
}
.star-btn.on { color: #f5c451; }
.bubble { max-width: 70%; padding: 10px 26px 10px 12px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.bubble.in { background: #2a3c35; }
.bubble.out { background: #1d4a35; margin-left: auto; }
.ticks {
  float: right;
  margin: 4px 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.28em;
  color: #d7ebe1;
  line-height: 1;
}
.ticks.sent { letter-spacing: 0; color: #d7ebe1; }
.ticks.ok { color: #d7ebe1; }
.ticks.read { color: #53bdeb; }
.ticks.wait { letter-spacing: 0; color: #8ea89b; font-weight: 600; }
.sync-bar {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #1d3a2e;
  color: #d5ffe8;
  font-size: 13px;
}
.sync-bar.hidden { display: none; }
.bubble.ai { background: #1d3a4a; }
.bubble small { color: var(--muted); }
.qr { background: white; padding: 10px; border-radius: 12px; width: fit-content; }
@media (max-width: 1100px) {
  .chat-layout { grid-template-columns: 260px 1fr; }
  .chat-side { display: none; }
}
@media (max-width: 860px) {
  .shell, .inbox, .chat-layout { grid-template-columns: 1fr; }
  nav { display: flex; gap: 8px; overflow: auto; }
}

/* leadsales-theme */
html, body {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --card: #ffffff;
  --line: #e7e9ef;
  --text: #1d1f27;
  --muted: #8b909e;
  --accent: #6d4aff;
  --accent-2: #5b43e6;
  --danger: #e5484d;
  --shadow: 0 8px 24px rgba(28, 30, 38, 0.08);
}
body .login {
  background: #f5f6f8;
}
body input,
body textarea,
body select {
  background: #fff;
  color: #1d1f27;
  border: 1px solid #e1e4ec;
  border-radius: 10px;
}
body .btn { background: #6d4aff; color: #fff; }
body .btn.ghost { background: #fff; color: #3c4150; border: 1px solid #e1e4ec; }
body nav { background: #fff; border-right: 1px solid #eceef3; }
body nav h2 { color: #1d1f27; font-size: 15px; letter-spacing: 0.04em; }
body nav a { color: #3c4150; border-radius: 12px; }
body nav a.active,
body nav a:hover { background: #efeaff; color: #5b43e6; }
body .card,
body .chat-side,
body .chat-head,
body .composer-dock { background: #fff; }
body .chat-layout { border: 1px solid #eceef3; border-radius: 16px; background: #fff; }
body .chat-list { background: #fff; }
body .chat-row.active,
body .chat-row:hover { background: #f6f3ff; }
body .chat-main {
  background-color: #efe7dc;
  background-image: radial-gradient(circle at 20px 20px, rgba(120, 96, 70, 0.08) 1.2px, transparent 1.4px);
  background-size: 28px 28px;
}
body .bubble.in { background: #fff; color: #1d1f27; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06); }
body .bubble.out { background: #d9fdd3; color: #1d1f27; }
body .bubble.ai { background: #e7f3ff; color: #1d1f27; }
body .ticks,
body .ticks.sent,
body .ticks.ok { color: #7d8b84; }
body .icon-btn { background: #fff; color: #3c4150; border-color: #e1e4ec; }
body .chip { background: #f1f2f6; color: #3c4150; }
body .chip.active { background: #efeaff; color: #5b43e6; }
body .tool-menu,
body .tool-block,
body .files-tray,
body .file-chip,
body .qr-pick { background: #fff; color: #1d1f27; }
body .sync-bar { background: #efeaff; color: #3c4150; }
body .col,
body .lead-card { background: #fff; }
body .avatar { position: relative; overflow: hidden; background: #7c5cfc; color: #fff; }
body .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

body main { padding: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: #f4f5f8; }
.page { flex: 1; min-height: 0; overflow: auto; padding: 4px 28px 32px; }
.shell.is-chat .topbar { display: none; }
.shell.is-chat .page { display: flex; flex-direction: column; overflow: hidden; padding: 0 12px 8px; }
nav.side { display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 18px 12px 12px; background: #fff; border-right: 1px solid #eceef3; }
.side-scroll { flex: 1; overflow: auto; }
.side-foot { flex-shrink: 0; border-top: 1px solid #eee; padding-top: 8px; }
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 10px 16px; }
.brand strong { font-size: 13px; letter-spacing: 0.04em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: #6d4aff; color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand-logo { width: 100%; max-width: 168px; height: auto; border-radius: 10px; display: block; }
.brand-logo-ipd { width: auto; max-width: 112px; max-height: 146px; margin-inline: auto; }
.brand-logo-mca { max-width: 158px; background: #fff; }
.login-card .brand-logo { margin: 0 auto 12px; }
.nav-label { margin: 14px 12px 4px; font-size: 11px; color: #9aa0ad; letter-spacing: 0.06em; }
.nav-item { display: block; color: #3c4150; text-decoration: none; padding: 8px 12px; border-radius: 10px; margin-bottom: 2px; font-size: 14px; }
.nav-item.active, .nav-item:hover { background: #efeaff; color: #5b43e6; }
.side-foot .btn { width: 100%; margin-top: 8px; }
.me { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.me .avatar { width: 32px; height: 32px; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: flex-end; padding: 0 20px; background: #fff; border-bottom: 1px solid #eceef3; }
.top-search { width: 220px; background: #f4f5f8; border: 0; border-radius: 999px; padding: 8px 14px; }
.hello { margin: 0; font-size: 28px; }
.sub { color: #8b909e; margin: 4px 0 16px; }
.sec { font-size: 16px; margin: 18px 0 8px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); color: inherit; text-decoration: none; }
.stat span { display: block; color: #8b909e; font-size: 13px; }
.stat strong { display: block; font-size: 28px; margin-top: 8px; }
.stat small { color: #6d4aff; }
.stat.alert { background: #fff1f1; }
.integ p, .who { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #d0d5dd; display: inline-block; }
.dot.ok { background: #22c55e; }
.pill { margin-left: auto; background: #f1f2f6; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.pill.on { background: #e8fff1; color: #12824d; }
.team-card .btn { margin-top: 8px; }
.dir-head, .pager, .dir-search { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.dir-search input { max-width: 280px; }
.table-wrap { background: #fff; border-radius: 14px; overflow: auto; border: 1px solid #eceef3; }
.ls-table { width: 100%; border-collapse: collapse; }
.ls-table th { text-align: left; font-size: 12px; color: #8b909e; padding: 12px; background: #fafafc; }
.ls-table.purple th { background: #6d4aff; color: #fff; }
.ls-table td { padding: 12px; border-top: 1px solid #f0f1f5; font-size: 13px; vertical-align: middle; }
.who-cell { display: flex; align-items: center; gap: 8px; }
.who-cell small, .empty { display: block; color: #8b909e; }
.agenda-date { font-weight: 700; }
.auto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.auto-card, .notice { background: #fff; border: 1px solid #eceef3; border-radius: 16px; padding: 16px; }
.auto-card h3 { margin-top: 0; }
.notice .btn { display: inline-block; margin-top: 8px; text-decoration: none; }
@media (max-width: 1100px) {
  .stat-row, .auto-grid { grid-template-columns: 1fr; }
}
