/* CRM Das Nações · estilos (modo día / noche) */
:root {
  --brand: #12312b; --brand-2: #1f4a41; --gold: #d9b56a; --gold-2: #b48a2c;
  --bg: #f4f1ea; --panel: #ffffff; --panel-2: #faf8f4; --line: #ebe7de; --line-2: #f3f1ec;
  --text: #1d2421; --muted: #6c736e; --muted-2: #8c918d;
  --chat-bg: #efeae2; --dots: rgba(0,0,0,.035);
  --in: #ffffff; --out: #d9fdd3; --note: #fff7d6; --note-line: #f0dc8c; --note-text: #6b5a14;
  --green: #25a35a; --blue: #2f6fd6; --red: #c92a2a; --orange: #e08a00; --purple: #6741d9;
  --chip: #f2f0eb; --hover: #f6f4ef; --sel: #eef5f1; --shadow: 0 8px 28px rgba(40,35,20,.12);
  --input: #ffffff; --rail: #12312b; --rail-icon: #9fb7b0;
  --wa: #25a35a; --ig: #d6336c; --mail: #2f6fd6;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1513; --panel: #111b18; --panel-2: #0f1816; --line: #22302c; --line-2: #1a2522;
  --text: #e7ece9; --muted: #9aa8a2; --muted-2: #7c8a84;
  --chat-bg: #0b1210; --dots: rgba(255,255,255,.035);
  --in: #1c2724; --out: #144d37; --note: #3a3216; --note-line: #5c4f1c; --note-text: #f0dfa0;
  --chip: #1d2926; --hover: #17221f; --sel: #183029; --shadow: 0 8px 28px rgba(0,0,0,.45);
  --input: #18231f; --rail: #0a1210; --rail-icon: #7f9a93;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0d1513; --panel: #111b18; --panel-2: #0f1816; --line: #22302c; --line-2: #1a2522;
    --text: #e7ece9; --muted: #9aa8a2; --muted-2: #7c8a84;
    --chat-bg: #0b1210; --dots: rgba(255,255,255,.035);
    --in: #1c2724; --out: #144d37; --note: #3a3216; --note-line: #5c4f1c; --note-text: #f0dfa0;
    --chip: #1d2926; --hover: #17221f; --sel: #183029; --shadow: 0 8px 28px rgba(0,0,0,.45);
    --input: #18231f; --rail: #0a1210; --rail-icon: #7f9a93;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Botones / inputs ---------- */
a.btn { text-decoration: none; color: inherit; }
a.btn.pr { color: #fff; } a.btn.gd { color: #12312b; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 7px 12px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.pr { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn.pr { background: #2f6f61; border-color: #2f6f61; }
.btn.gd { background: var(--gold); border-color: var(--gold); color: #12312b; }
.btn.gr { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--input); border-radius: 9px; padding: 8px 11px; outline: none; }
.input:focus { border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(217,181,106,.25); }
label.fl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 16px; background: var(--chip); color: var(--muted); border: 0; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .chip.on { background: #2f6f61; }
.chip .c { background: var(--green); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; }
.chip.on .c { background: var(--gold); color: #12312b; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 10px; margin: 3px 3px 0 0; }
.tag button { border: 0; background: none; cursor: pointer; padding: 0; color: inherit; opacity: .6; }
.flag { display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; letter-spacing: .02em; min-width: 22px; height: 14px; padding: 0 3px; border-radius: 3px; color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.5); vertical-align: middle; }
.chb { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; flex: none; }
.chb.wa { background: var(--wa); } .chb.ig { background: var(--ig); } .chb.mail { background: var(--mail); }
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.ub { background: var(--green); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-2); font-weight: 700; margin-bottom: 8px; }
:root[data-theme="dark"] .lbl { color: var(--gold); }

/* ---------- Login ---------- */
.login { min-height: 100%; display: flex; align-items: center; justify-content: center; background: var(--brand); padding: 20px; }
.login .box { background: var(--panel); border-radius: 16px; padding: 30px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.login img { height: 64px; display: block; margin: 0 auto 6px; }
.login h1 { font-size: 18px; text-align: center; margin: 6px 0 18px; }
.login .err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ---------- Shell ---------- */
.shell { display: flex; height: 100vh; height: 100dvh; }
.rail { width: 64px; background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 6px; flex: none; }
.rail .logo { width: 44px; margin-bottom: 10px; }
.rail a, .rail button { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: var(--rail-icon); position: relative; border: 0; background: transparent; cursor: pointer; text-decoration: none; }
.rail a.on, .rail a:hover, .rail button:hover { background: #1f4a41; color: #fff; }
.rail .bd { position: absolute; top: 2px; right: 1px; background: var(--green); color: #fff; font-size: 9.5px; font-weight: 700; border-radius: 8px; padding: 1px 5px; }
.rail .sp { flex: 1; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.page { flex: 1; overflow: auto; padding: 20px 24px; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-h h2 { margin: 0; font-size: 21px; }
.bottom-nav { display: none; }

/* ---------- Chats ---------- */
.chats { display: flex; flex: 1; height: 100%; min-height: 0; }
.clist { width: 360px; flex: none; border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.clist .top { padding: 14px 14px 8px; }
.clist .top h3 { margin: 0; font-size: 19px; display: flex; align-items: center; justify-content: space-between; }
.search { display: flex; align-items: center; gap: 8px; background: var(--chip); border-radius: 9px; padding: 7px 10px; margin-top: 10px; color: var(--muted); }
.search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; }
.tabs { display: flex; gap: 5px; padding: 2px 14px 8px; flex-wrap: wrap; }
.chfilter { display: flex; gap: 6px; padding: 0 14px 8px; }
.chfilter .chip { padding: 3px 8px; }
.items { flex: 1; overflow-y: auto; }
.item { display: flex; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; position: relative; }
.item:hover { background: var(--hover); }
.item.sel { background: var(--sel); }
.item .avw { position: relative; align-self: flex-start; width: 34px; height: 34px; flex: none; }
.item .avw .chb { position: absolute; right: -4px; bottom: -4px; border: 2px solid var(--panel); }
.item .nm { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.item .ms { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.item .rt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; color: var(--muted-2); flex: none; }
.item .rt.un { color: var(--green); font-weight: 600; }
.item.unread .nm { font-weight: 700; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.conv { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--chat-bg); }
.ch { background: var(--panel); padding: 9px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); min-height: 60px; }
.ch .nm { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ch .sub { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.ch .act { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ch select.input { width: auto; padding: 6px 8px; font-size: 12.5px; font-weight: 600; }
.timer { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 10px; display: inline-flex; gap: 4px; align-items: center; }
.timer.sm { font-size: 10px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.timer.big { font-size: 12.5px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.timer.big .tl { font-weight: 500; opacity: .85; }
.timer.ok { background: rgba(37,163,90,.14); color: var(--green); }
.timer.warn { background: rgba(224,138,0,.15); color: var(--orange); }
.timer.off { background: rgba(201,42,42,.12); color: var(--red); }
.msgs { flex: 1; overflow-y: auto; padding: 14px 6%; display: flex; flex-direction: column; gap: 4px; background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 14px 14px; }
.day { align-self: center; background: var(--panel); font-size: 11.5px; color: var(--muted); padding: 4px 10px; border-radius: 7px; box-shadow: 0 1px 1px rgba(0,0,0,.06); margin: 8px 0; }
.b { max-width: 65%; padding: 6px 9px 5px; border-radius: 9px; font-size: 14px; line-height: 1.38; box-shadow: 0 1px 1px rgba(0,0,0,.08); position: relative; word-wrap: break-word; overflow-wrap: anywhere; }
.b .txt { white-space: pre-wrap; }
.b.in { background: var(--in); align-self: flex-start; border-top-left-radius: 2px; }
.b.out { background: var(--out); align-self: flex-end; border-top-right-radius: 2px; }
.b.note { background: var(--note); color: var(--note-text); border: 1px dashed var(--note-line); align-self: flex-end; }
.b .who { font-size: 11px; font-weight: 700; margin-bottom: 2px; color: var(--green); }
.b.note.summ { align-self: center; max-width: min(460px, 92%); border-style: solid; border-left: 4px solid var(--gold, #c9a227); }
.b.note .who { color: var(--note-text); }
.b .meta { font-size: 10.5px; color: var(--muted-2); float: right; margin: 6px 0 -2px 10px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.b img.media { max-width: 280px; max-height: 320px; border-radius: 6px; display: block; cursor: zoom-in; }
.b audio, .b video { max-width: 280px; display: block; }
.b .doc { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 6px; background: rgba(0,0,0,.05); text-decoration: none; color: inherit; }
.b.failed { outline: 1px solid var(--red); }
.react { position: absolute; bottom: -12px; left: 10px; background: var(--panel); border-radius: 10px; padding: 0 5px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.b.has-react { margin-bottom: 12px; }
.sys { align-self: center; font-size: 11.5px; color: var(--muted); background: var(--panel); padding: 3px 10px; border-radius: 7px; margin: 4px 0; opacity: .9; }
.comp { background: var(--panel-2); padding: 8px 12px; display: flex; align-items: flex-end; gap: 6px; border-top: 1px solid var(--line); position: relative; }
.comp textarea { flex: 1; border: 0; background: var(--input); border-radius: 10px; padding: 10px 12px; resize: none; max-height: 140px; min-height: 42px; outline: none; line-height: 1.35; }
.comp.note-mode textarea { background: var(--note); color: var(--note-text); }
.comp .send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.banner { background: var(--note); color: var(--note-text); border-top: 1px solid var(--note-line); padding: 10px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.popup { position: absolute; bottom: 58px; left: 12px; right: 12px; max-width: 520px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; z-index: 20; }
.popup .opt { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.popup .opt:hover, .popup .opt.act { background: var(--hover); }
.popup .opt b { font-size: 12.5px; }
.popup .opt div { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side { width: 340px; flex: none; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border: 0; }
.side section { margin-bottom: 16px; }
.side .media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.side .media-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.inline-edit { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 3px 6px; text-align: right; font-weight: 600; }
.inline-edit:hover { border-color: var(--line); }
.inline-edit:focus { border-color: var(--gold-2); background: var(--input); outline: none; text-align: left; }

/* ---------- Tablas ---------- */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); position: sticky; top: 0; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--hover); }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters .input { width: auto; min-width: 140px; }

/* ---------- Bases ---------- */
.grid { display: grid; gap: 14px; }
.g3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.base-card .big { font-size: 28px; font-weight: 700; margin-top: 8px; }
.bar { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
:root[data-theme="dark"] .bar i { background: #3f8f7d; }
.steps { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.steps span { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 16px; background: var(--chip); color: var(--muted); }
.steps span.on { background: var(--brand); color: #fff; }
label.drop { display: block; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 40px; text-align: center; color: var(--muted); cursor: pointer; background: var(--panel); }
.drop.over { border-color: var(--gold-2); background: var(--hover); }
.map-table select { min-width: 150px; }
.stat .v { font-size: 26px; font-weight: 700; }
.stat .d { font-size: 12px; color: var(--muted); }
.issue { font-size: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line); }

/* ---------- Reportes ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.vbars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 10px; }
.vbars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.vbars .col i { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
:root[data-theme="dark"] .vbars .col i { background: #3f8f7d; }
.vbars .col span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- Modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(10,20,17,.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 20px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 6px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #12312b; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 200; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--red); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 150; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; }
.perm-ok { color: var(--green); font-weight: 700; }
.perm-no { color: var(--muted-2); }
code.k { background: var(--chip); padding: 2px 6px; border-radius: 5px; font-size: 12px; word-break: break-all; }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  .rail { display: none; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--panel); border-top: 1px solid var(--line); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0; color: var(--muted); text-decoration: none; font-size: 10.5px; position: relative; }
  .bottom-nav a.on { color: var(--green); }
  .bottom-nav .bd { position: absolute; top: 3px; left: 55%; background: var(--green); color: #fff; font-size: 9.5px; font-weight: 700; border-radius: 8px; padding: 0 5px; }
  .main { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .page { padding: 14px; }
  .clist { width: 100%; border-right: 0; }
  .chats.open .clist { display: none; }
  .chats:not(.open) .conv { display: none; }
  .side { position: fixed; inset: 0; width: auto; z-index: 60; }
  .msgs { padding: 10px 10px; }
  .b { max-width: 85%; }
  .ch .act .hide-m { display: none; }
  .main.in-chat { padding-bottom: 0; }
  .main.in-chat + .bottom-nav { display: none; }
}
@media (min-width: 861px) { .only-m { display: none !important; } }
@media (max-width: 1200px) and (min-width: 861px) { .side { position: fixed; right: 0; top: 0; bottom: 0; z-index: 60; box-shadow: var(--shadow); } }
:root[data-theme="dark"] .login img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .login img { filter: brightness(0) invert(1); } }
#app { height: 100%; }

/* ---------- Embudo ---------- */
.kanban { flex: 1; display: flex; gap: 10px; overflow-x: auto; min-height: 0; padding-bottom: 6px; }
.kcol { width: 250px; flex: none; background: var(--chip); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; min-height: 0; }
.kcol.over { outline: 2px dashed var(--gold-2); }
.khead { border-top: 3px solid; padding: 6px 4px 8px; }
.kcards { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: grab; font-size: 13px; }
.kcard.drag { opacity: .5; }
@media (max-width: 860px) { .kanban { flex-direction: column; overflow: visible; } .kcol { width: auto; } }

.clist { position: relative; }
.resizer { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 5; }
.resizer:hover, .resizer.on { background: linear-gradient(90deg, transparent 3px, var(--gold-2) 3px, var(--gold-2) 5px, transparent 5px); }
@media (max-width: 860px) { .resizer { display: none; } .clist { width: 100% !important; } }

/* ---------- Campañas ---------- */
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calh { font-size: 11px; font-weight: 700; color: var(--muted-2); text-align: center; text-transform: uppercase; }
.calc { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-height: 86px; padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.calc.out { background: transparent; border-color: transparent; }
.calev { display: block; color: #fff; font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 5px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmock { width: 260px; max-width: 100%; border-radius: 30px; background: #111; padding: 9px; }
.pmock-in { background: var(--chat-bg); border-radius: 22px; overflow: hidden; min-height: 380px; display: flex; flex-direction: column; }
.pmock-h { background: #12312b; color: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.pmock-b { padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.pmock-btn { background: var(--panel); border-radius: 8px; text-align: center; color: #0a84ff; font-size: 12.5px; padding: 7px; }

/* ---------- Ficha del huésped ---------- */
.cside { padding: 14px 16px 28px; }
.cside-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cside-head { text-align: center; padding: 6px 0 16px; }
.cside-name { font-weight: 700; font-size: 17px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cside-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.sec { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 6px; margin-bottom: 12px; }
.sec-t { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-2); font-weight: 700; margin-bottom: 8px; }
:root[data-theme="dark"] .sec-t { color: var(--gold); }
.f { display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 8px; min-height: 36px; border-bottom: 1px solid var(--line-2); }
.sec .f:last-child { border-bottom: 0; }
.f > label, .f > span:first-child { font-size: 12px; color: var(--muted); line-height: 1.25; }
.fi { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 6px 8px; font-size: 13px; font-weight: 500; color: var(--text); min-width: 0; }
.fi:hover { border-color: var(--line); background: var(--input); }
.fi:focus { border-color: var(--gold-2); background: var(--input); outline: none; box-shadow: 0 0 0 3px rgba(217,181,106,.2); }
.fi.ok, .input.ok { border-color: var(--green) !important; box-shadow: 0 0 0 3px rgba(37,163,90,.18); }
.fi::placeholder { color: var(--muted-2); }
select.fi { cursor: pointer; }
.money { display: flex; align-items: center; gap: 4px; }
.money span { font-size: 12px; color: var(--muted); padding-left: 8px; }
.f.sw { cursor: pointer; grid-template-columns: 1fr auto; }
.switch { appearance: none; width: 36px; height: 20px; border-radius: 12px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch:checked { background: var(--green); }
.switch:checked::after { left: 18px; }
.tagbox { display: flex; flex-wrap: wrap; gap: 2px; }
.drawer-bg { position: fixed; inset: 0; background: rgba(10,20,17,.35); z-index: 90; display: flex; justify-content: flex-end; }
.drawer { width: 400px; max-width: 100%; height: 100%; background: var(--panel); overflow-y: auto; box-shadow: var(--shadow); animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------- Ajustes ---------- */
.settings { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.snav { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; position: sticky; top: 0; }
.snav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.snav a:hover { background: var(--hover); }
.snav a.on { background: var(--sel); color: var(--green); font-weight: 600; }
.sbody { min-width: 0; max-width: 980px; }
.strow { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: var(--panel); }
.strow.drag { opacity: .5; }
.strow .grip { cursor: grab; color: var(--muted-2); padding: 0 4px; user-select: none; }
.strow .input { min-width: 0; }
@media (max-width: 860px) { .settings { grid-template-columns: 1fr; } .snav { position: static; flex-direction: row; overflow-x: auto; } .snav a { white-space: nowrap; } .strow { flex-wrap: wrap; } }

.rail button.on { background: #1f4a41; color: #fff; }
.gearmenu { position: fixed; left: 72px; bottom: 16px; width: 260px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 120; padding: 6px; animation: slidein .15s ease-out; }
.gearmenu .gm-h { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.gearmenu a, .gearmenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; border: 0; background: none; cursor: pointer; text-align: left; }
.gearmenu a:hover, .gearmenu button:hover { background: var(--hover); }
.gearmenu .gm-sep { height: 1px; background: var(--line); margin: 4px 0; }

/* Aro de 24 h */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .rbg { stroke: var(--line); }
.ring .rfg { stroke: var(--green); transition: stroke-dashoffset 1s linear, stroke .3s; }
.ring.warn .rfg { stroke: var(--orange); }
.ring.off .rfg { stroke: var(--red); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.ring.big b { font-size: 11.5px; }
.ring.sm b { font-size: 9px; color: var(--muted); }
.ring.off b { color: var(--red); }
.ring.big { margin-left: 4px; cursor: help; }
.ring.big.off .rbg { stroke: var(--red); opacity: .35; }
.ring.sm.off .rbg { stroke: var(--red); opacity: .35; }

.botpill { border: 0; cursor: pointer; background: var(--chip); color: var(--muted); padding: 5px 10px; font-size: 12px; margin-left: 8px; }
.botpill.on { background: rgba(47,111,214,.12); color: var(--blue); }

/* Barra superior con ilustración de Canasvieiras */
.tbx { height: 64px; flex: none; position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 0 18px; color: #fff; background: linear-gradient(100deg, #0f3a2e 0%, #17493c 45%, #21624f 100%); }
.tbx .art { position: absolute; left: 300px; top: 0; height: 100%; width: calc(100% - 820px); min-width: 260px; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 85%, transparent); }
.tbx > *:not(.art) { position: relative; }
.tbx .brand b { font-size: 15.5px; display: block; letter-spacing: -.01em; }
.tbx .brand small { opacity: .75; font-size: 11.5px; }
.tbx .sp { flex: 1; }
.tbx .chip { display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 11px; font-weight: 700; font-size: 13px; background: #fff; color: #0f3a2e; box-shadow: 0 2px 8px rgba(0,0,0,.18); text-decoration: none; white-space: nowrap; }
.tbx a.chip:hover { background: #f1f7f4; }
.tbx .chip .n { background: #25a35a; color: #fff; border-radius: 9px; padding: 1px 7px; font-size: 11.5px; }
.tbx .me { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 24px; background: #0c2f25; border: 1px solid rgba(255,255,255,.22); color: #fff; text-decoration: none; }
.tbx .me b { font-size: 13px; display: block; line-height: 1.1; }
.tbx .me small { opacity: .75; font-size: 10.5px; }
.tbx .av { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
@media (max-width: 1100px) { .tbx .art, .tbx #tbWx { display: none; } }
@media (max-width: 860px) { .tbx { height: 52px; padding: 0 12px; } .tbx .brand b { font-size: 14px; white-space: nowrap; } .tbx .me div, .tbx .brand small { display: none; } .tbx .me { padding: 3px; } .col:has(.main.in-chat) .tbx { display: none; } }

/* Lista: tarjetas con franja de color por etapa */
#items { background: var(--bg); padding: 4px 0 8px; }
.item { margin: 6px 10px; border: 1px solid var(--line) !important; border-radius: 14px; background: var(--panel); padding: 10px 12px 10px 14px; overflow: hidden; }
.item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acc, var(--line)); }
.item:hover { border-color: var(--acc, var(--line)) !important; }
.item.sel { background: var(--sel); border-color: var(--green) !important; box-shadow: 0 0 0 2px rgba(37,163,90,.18); }

/* Inicio sin chat abierto */
.home { margin: auto; width: min(640px, 92%); text-align: center; padding: 20px 0; }
.home .ill { height: 120px; margin: 0 auto 6px; display: block; }
.home h2 { margin: 4px 0 2px; font-size: 22px; }
.home > p { color: var(--muted); margin: 0 0 18px; }
.home .kp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.home .k { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; text-decoration: none; color: var(--text); transition: transform .12s, box-shadow .12s; }
.home .k:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.home .k b { font-size: 26px; display: block; }
.home .k span { font-size: 12px; color: var(--muted); }
.home .k.g b { color: var(--green); } .home .k.o b { color: var(--orange); } .home .k.y b { color: #b8892b; }
.home .arr { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 6px; text-align: left; }
.home .arr h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.home .arr a { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text); text-decoration: none; }
.home .arr a:hover b:first-child { text-decoration: underline; }
.home .arr .ag { color: var(--orange); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 1000px) { .home .kp { grid-template-columns: repeat(2, 1fr); } }

/* Reserva tipo ticket */
.rsv .sec-t { display: flex; align-items: center; justify-content: space-between; }
.rsv .lnk { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11.5px; display: inline-flex; gap: 4px; align-items: center; text-transform: none; letter-spacing: 0; }
.rsv .lnk:hover { color: var(--text); }
.tix { background: linear-gradient(135deg, #0f3a2e, #21624f); color: #fff; border-radius: 14px; padding: 12px 14px; margin: 4px 0 10px; }
.tix small { opacity: .7; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.tix .row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 8px; gap: 6px; }
.tix .d b { font-size: 26px; display: block; line-height: 1; }
.tix .d span { font-size: 11.5px; opacity: .8; text-transform: capitalize; }
.tix .d.r { text-align: right; }
.tix .mid { flex: 1; text-align: center; font-size: 12px; opacity: .92; }
.tix .mid i { display: block; border-top: 2px dashed rgba(255,255,255,.4); margin: 4px 8px; }
.tix .ft { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px dashed rgba(255,255,255,.3); padding-top: 9px; }
.tix .ft span { background: rgba(255,255,255,.14); border-radius: 9px; padding: 4px 9px; font-size: 12px; font-weight: 600; }
.tix .ft span.v { margin-left: auto; background: #c49a3a; }

/* Dashboard */
.dash { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }
.dash .dh { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash .dh h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.dash .dh p { margin: 2px 0 0; color: var(--muted); font-size: 13px; text-transform: none; }
.dash .dh p::first-letter { text-transform: uppercase; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 2px; transition: box-shadow .12s, transform .12s; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tile .tl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tile b { font-size: 30px; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .ts { font-size: 12px; color: var(--muted); }
.tile.warn { border-color: rgba(224,138,0,.45); }
.tile.good b { color: var(--green); }
.st.warn { color: var(--orange); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.dash .grid { display: grid; gap: 14px; margin-bottom: 14px; }
.dash .g2 { grid-template-columns: 1fr 1fr; }
.dash .g3 { grid-template-columns: 1.2fr 1fr 1fr; }
.dash .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.dash .ct { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dash .ct h3 { margin: 0; font-size: 14.5px; }
.dash .ct a { color: var(--muted); text-decoration: none; } .dash .ct a:hover { color: var(--text); }
.wl { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line-2); color: var(--text); text-decoration: none; border-radius: 8px; }
.wl:hover { background: var(--hover); }
.wa-ago { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wa-ago.late { color: var(--orange); }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10.5px; text-transform: capitalize; }
.chart .vl { fill: var(--text); font-size: 11px; font-weight: 700; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: var(--text); fill-opacity: .04; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hb { display: flex; flex-direction: column; gap: 9px; }
.hbr { display: grid; grid-template-columns: minmax(100px, 1fr) 1.3fr 78px; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 13px; }
.hl { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hbar { height: 8px; background: var(--chip); border-radius: 4px; overflow: hidden; display: block; }
.hbar > span { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.hv { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hv small { display: block; color: var(--muted); font-size: 11px; }
.team { display: flex; flex-direction: column; gap: 12px; }
.tm { display: flex; gap: 10px; align-items: center; }
.tmh { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.cr { display: block; padding: 10px 2px; border-top: 1px solid var(--line-2); color: var(--text); text-decoration: none; }
.cr:first-of-type { border-top: 0; }
.crh { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13.5px; }
.crs { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.crs b { color: var(--text); }
.card.soon { border-style: dashed; background: var(--panel-2); }
.soon-b { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; padding: 10px 0; }
.soon-b p { margin: 0; }
.dtip { position: fixed; z-index: 200; display: none; pointer-events: none; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px; font-size: 12px; min-width: 150px; }
.dtip b { display: block; margin-bottom: 4px; text-transform: capitalize; }
.dtip div { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.dtip div span { margin-left: auto; font-weight: 700; padding-left: 12px; font-variant-numeric: tabular-nums; }
.dtip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dtip .tt-t { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; font-weight: 600; }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(3, 1fr); } .dash .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .dash { padding: 14px 14px 90px; } .tiles { grid-template-columns: 1fr 1fr; } .dash .g2, .dash .g3 { grid-template-columns: 1fr; } .dash .dh .btn { display: none; } }

/* Mis pendientes (aro naranja como en Pacheco) */
.pring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #ff8a00; box-sizing: border-box; flex: none; display: inline-block; transition: background .15s, box-shadow .15s; }
.pring.sm { width: 9px; height: 9px; border-width: 2px; background: #ff8a00; margin-left: 4px; vertical-align: 1px; }
.chip.mp { display: inline-flex; align-items: center; gap: 6px; }
.chip.mp.on .pring { background: #ff7a00; border-color: #ff7a00; box-shadow: 0 0 0 3px rgba(255,122,0,.28); }
.mpbtn { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); }
.mpbtn:hover .pring { background: rgba(255,138,0,.25); }
.mpbtn.on { border-color: #ff8a00; color: #c25e00; background: rgba(255,138,0,.08); }
.mpbtn.on .pring { width: 14px; height: 14px; background: #ff7a00; border-color: #ff7a00; box-shadow: 0 0 0 3px rgba(255,122,0,.28); }

/* Botón del chat interno en la barra */
.tbx .tbi { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.22); background: #0c2f25; color: #fff; display: grid; place-items: center; cursor: pointer; }
.tbx .tbi:hover { background: #134236; }
.tbx .tbi .bd { position: absolute; top: -5px; right: -5px; background: #e03131; color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 9px; padding: 1px 5px; border: 2px solid #17493c; }

/* Ventana del chat interno (estilo app nativa) */
.twin { position: fixed; right: 22px; bottom: 22px; width: 360px; height: min(540px, calc(100vh - 110px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.28); z-index: 150; display: flex; flex-direction: column; overflow: hidden; animation: slidein .15s ease-out; }
.tw-bar { height: 38px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); cursor: grab; user-select: none; }
.tw-bar b { font-size: 13px; }
.tw-bar .sp { flex: 1; }
.tw-bar .dots { display: flex; gap: 7px; }
.tw-bar .dots i { width: 12px; height: 12px; border-radius: 50%; display: block; cursor: pointer; }
.tw-bar .dots .r { background: #ff5f57; } .tw-bar .dots .y { background: #febc2e; } .tw-bar .dots .g { background: #28c840; cursor: default; }
.tw-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tw-list { overflow-y: auto; flex: 1; padding: 4px 0; }
.tw-th { width: 100%; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--text); }
.tw-th:hover { background: var(--hover); }
.tw-n { display: flex; justify-content: space-between; gap: 6px; font-size: 13.5px; }
.tw-n small { color: var(--muted); font-size: 11px; }
.tw-p { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.tw-th.un .tw-p { color: var(--text); font-weight: 600; }
.tw-p .c { background: var(--green); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; font-weight: 700; }
.tw-th .grow { min-width: 0; }
.tw-av { position: relative; display: inline-block; flex: none; }
.tw-av i { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); border: 2px solid var(--panel); }
.tw-av i.on { background: #2fb344; }
.tw-eq { width: 36px; height: 36px; border-radius: 50%; background: #17493c; color: #fff; display: grid; place-items: center; flex: none; }
.tw-eq.sm { width: 28px; height: 28px; }
.tw-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tw-msgs { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.tw-day { align-self: center; font-size: 11px; color: var(--muted); background: var(--panel); border-radius: 8px; padding: 2px 8px; margin: 6px 0; text-transform: capitalize; }
.tw-b { align-self: flex-start; max-width: 82%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; border-top-left-radius: 4px; padding: 6px 9px 4px; font-size: 13.5px; line-height: 1.35; }
.tw-b.me { align-self: flex-end; background: var(--out); border-color: transparent; border-radius: 12px; border-top-right-radius: 4px; }
.tw-b .who { font-size: 11.5px; font-weight: 700; margin-bottom: 2px; }
.tw-b .tx { white-space: pre-wrap; word-break: break-word; }
.tw-b .tm { display: block; text-align: right; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.tw-conv { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; background: rgba(0,0,0,.04); border: 1px solid var(--line); margin: 2px 0 4px; color: var(--text); text-decoration: none; }
.tw-conv span { display: flex; flex-direction: column; } .tw-conv small { color: var(--green); font-size: 11.5px; font-weight: 600; }
.tw-share { display: flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 12.5px; background: rgba(255,138,0,.1); color: var(--text); border-top: 1px solid var(--line); }
.tw-share .lnk { margin-left: auto; border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--muted); }
.tw-comp { display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--panel); }
.tw-comp textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 18px; padding: 8px 12px; font: inherit; font-size: 13.5px; background: var(--panel-2); color: var(--text); outline: none; max-height: 110px; }
.tw-comp .send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.tw-toast { cursor: pointer; bottom: 76px; }
@media (max-width: 860px) { .twin { inset: 0 !important; width: auto; height: auto; border-radius: 0; } .tw-bar { cursor: default; } }

.ch .chn { min-width: 150px; }
.ch .chn .sub { white-space: nowrap; }
.ch .act select.input { max-width: 108px; }
.ch { gap: 8px; }
.ch .act { gap: 5px; }
/* el encabezado del chat se acomoda al ancho real de la conversación (con o sin panel de detalles) */
#conv { container-type: inline-size; }
@container (max-width: 1200px) { #quoteBtn .ql { display: none; } }
@container (max-width: 960px) { .mpbtn .hide-m { display: none; } .mpbtn { padding: 0 11px; } }
@container (max-width: 900px) { #resolveBtn .ql { display: none; } }
@container (max-width: 760px) { #statusSel, #shareBtn { display: none; } }

/* Dashboard sin scroll: todo entra en la pantalla */
.dash .row { display: grid; gap: 12px; min-height: 0; grid-auto-rows: minmax(0, 1fr); align-items: stretch; }
.dash .r1 { grid-template-columns: 5fr 4fr 3fr; }
.dash .r2 { grid-template-columns: 4fr 3fr 2.4fr 2.6fr; }
.dash .r2.noteam { grid-template-columns: 4fr 3fr 3fr; }
.dash .card { display: flex; flex-direction: column; min-height: 0; }
.dash .cb { flex: 1; min-height: 0; overflow-y: auto; }
.dash .chart-box { display: flex; align-items: stretch; overflow: hidden; }
.dash .chart-box .chart { width: 100%; height: 100%; }
.dash .ct { margin-bottom: 8px; }
@media (min-width: 1100px) and (min-height: 640px) {
  .dash { display: grid; grid-template-rows: auto auto minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; padding: 16px 22px 18px; overflow: hidden; height: 100%; }
  .dash .dh, .dash .tiles { margin: 0; }
  .dash .dh h1 { font-size: 21px; }
  .tiles { gap: 12px; }
  .tile { padding: 10px 14px; }
  .tile b { font-size: 26px; }
  .dash .card { padding: 12px 14px; }
  .wl { padding: 6px 4px; }
  .hb { gap: 7px; }
  .team { gap: 9px; }
  .soon-b { padding: 4px 0; align-items: flex-start; }
}
@media (max-width: 1099px) { .dash .r1, .dash .r2, .dash .r2.noteam { grid-template-columns: 1fr 1fr; } .dash .row { margin-bottom: 12px; } .dash .chart-box { height: 220px; } }
@media (max-width: 860px) { .dash .r1, .dash .r2, .dash .r2.noteam { grid-template-columns: 1fr; } }

.hb.cty .hbr { grid-template-columns: 64px 1fr 34px; }
.dash .ct h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dash .legend { flex-wrap: nowrap; white-space: nowrap; gap: 9px; flex: none; }
/* nunca cortar el botón de Detalles: si falta lugar, se achican primero los selects */
.ch .act { min-width: 0; flex-shrink: 1; }
.ch .act select.input { min-width: 84px; flex-shrink: 1; }
.ch .act > button { flex-shrink: 0; }

/* Menú desplegable de cada chat: la flecha aparece al lado de la burbuja (la corre, no la tapa) */
.item .imenu { width: 0; height: 22px; padding: 0; margin-left: -5px; border: 0; border-radius: 6px; background: none; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; overflow: hidden; opacity: 0; transition: width .12s, opacity .12s, margin .12s; }
.item:hover .imenu, .item .imenu:focus-visible { width: 22px; margin-left: 0; opacity: 1; }
.item .imenu:hover { color: var(--text); background: var(--chip); }
@media (hover: none) { .item .imenu { width: 22px; margin-left: 0; opacity: 1; } }
.ub.dot { min-width: 18px; width: 18px; height: 18px; padding: 0; }
.item .ic2 { display: flex; align-items: center; gap: 5px; color: var(--muted-2); }
.cmenu { position: fixed; z-index: 160; min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 6px; animation: slidein .12s ease-out; }
.cmenu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; background: none; border-radius: 8px; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.cmenu button:hover { background: var(--hover); }
.cmenu button svg { color: var(--muted); flex: none; }
.cmenu button.on svg { color: #ff8a00; }
.cmenu .sep { height: 1px; background: var(--line); margin: 5px 8px; }
.cmenu .sp { flex: 1; }
.cmenu .subm { display: none; padding: 2px 0 4px 34px; }
.cmenu .sub.open .subm { display: block; }
.cmenu .sub.open [data-a="assign-open"] svg:last-child { transform: rotate(180deg); }
.cmenu .subm button { padding: 7px 10px; font-size: 13.5px; }
.cmenu .subm button.on { font-weight: 700; color: var(--green); }
/* pestañas de la bandeja en una sola línea */
#tabs { flex-wrap: nowrap !important; gap: 5px !important; overflow-x: auto; scrollbar-width: none; }
#tabs::-webkit-scrollbar { display: none; }
#tabs .chip { padding: 4px 8px !important; font-size: 12px !important; white-space: nowrap; flex: none; gap: 5px; }
#tabs .chip .pring { width: 10px; height: 10px; }
#tabs .chip .c { margin-left: 5px; }
/* contadores flotando arriba de cada pestaña, como en Pacheco */
#tabs { padding-top: 8px; padding-right: 6px; }
#tabs .chip { position: relative; }
#tabs .chip .c { position: absolute; top: -8px; right: -5px; margin: 0; min-width: 18px; height: 17px; font-size: 10px; line-height: 17px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #fff; text-align: center; box-shadow: 0 0 0 2px var(--panel); }

/* Composer estilo Pacheco: pestañas Responder / Nota interna + herramientas + aire abajo */
.comp { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 16px 14px; }
.comp .ctabs { display: flex; gap: 4px; padding-left: 0; margin-left: -4px; }
.comp .ctabs button { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 12px 7px; cursor: pointer; border-bottom: 2.5px solid transparent; }
.comp .ctabs button.on { color: var(--green); border-bottom-color: var(--green); }
.comp.note-mode .ctabs button.on { color: #c97a00; border-bottom-color: #e0a300; }
.comp .crow, .comp .crec { display: flex; align-items: flex-end; gap: 8px; }
.comp .crec { align-items: center; padding: 2px 0; }
.comp .ctools { display: flex; align-items: center; gap: 2px; padding-bottom: 1px; }
.comp .ctools .icon-btn { width: 38px; height: 40px; color: var(--muted); }
.comp .ctools .icon-btn:hover { color: var(--text); }
.comp .csep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.comp textarea { border-radius: 22px; padding: 11px 16px; min-height: 44px; border: 1px solid var(--line); }
.comp .send { width: 44px; height: 44px; }
.crec .rdot { width: 10px; height: 10px; border-radius: 50%; background: #e03131; animation: rblink 1s infinite; }
.crec b { font-variant-numeric: tabular-nums; }
@keyframes rblink { 50% { opacity: .25; } }
.emopop { position: absolute; bottom: 72px; left: 150px; width: 320px; max-height: 230px; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 40; }
.emopop button { border: 0; background: none; font-size: 21px; padding: 4px; border-radius: 8px; cursor: pointer; }
.emopop button:hover { background: var(--hover); }
@media (max-width: 860px) { .comp { padding: 4px 8px calc(10px + env(safe-area-inset-bottom)); } .comp .ctabs { padding-left: 0; } .comp .ctools .icon-btn { width: 34px; } }

/* Bandejas (números de WhatsApp) */
.ibdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ibchip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 1px 7px 1px 6px; border-radius: 8px; margin-right: 4px; color: var(--ib); background: color-mix(in srgb, var(--ib) 13%, transparent); border: 1px solid color-mix(in srgb, var(--ib) 35%, transparent); }
.ibchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ib); }
.ibchip.big { font-size: 11.5px; padding: 2px 8px; margin-left: 4px; }
.ibl { display: flex; flex-direction: column; gap: 8px; }
.ibrow { display: grid; grid-template-columns: 34px 1.2fr 1fr 1.3fr auto auto auto; gap: 8px; align-items: center; }
.ibrow input[type=color] { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--panel); cursor: pointer; }
@media (max-width: 1000px) { .ibrow { grid-template-columns: 34px 1fr 1fr; } }
/* filtro de canales/bandejas en una sola línea con scroll suave */
#chf { flex-wrap: nowrap !important; gap: 5px !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#chf::-webkit-scrollbar { display: none; }
#chf .chip { padding: 4px 9px !important; font-size: 12px !important; white-space: nowrap; flex: none; }

/* Entrenamiento del bot */
.tadd { position: relative; }
.tadd textarea { padding-right: 56px; resize: vertical; }
.tadd .tbtns { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; }
.tadd .tmic { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; background: var(--chip); }
.tmic.rec { background: #e03131 !important; color: #fff; animation: rblink 1.2s infinite; }
.trule { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.trule.off { opacity: .45; }
.trule .trt { font-size: 13.5px; line-height: 1.4; margin-bottom: 3px; }
.trule .pill { background: var(--chip); font-size: 10.5px; padding: 1px 7px; }
.trule .pill.tcor { background: #fff3bf; color: #8a5a00; }
.b.out .bfix { position: absolute; left: -30px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); display: none; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.b.out:hover .bfix { display: flex; }
.b.out .bfix:hover { color: var(--text); border-color: var(--muted); }
@media (hover: none) { .b.out .bfix { display: flex; opacity: .7; } }
.fixq { background: var(--chip); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 8px 0 12px; color: var(--muted); }

/* Estado del chat en la lista: esperando agente / bot atendiendo */
.wagent { display: inline-flex; align-items: center; gap: 5px; background: #ffe3e3; color: #c92a2a; font-size: 10.5px; font-weight: 700; padding: 1px 7px 1px 6px; border-radius: 999px; margin-right: 4px; vertical-align: middle; }
.wagent::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #e03131; animation: rblink 1.2s infinite; }
.wbot { display: inline-flex; align-items: center; gap: 3px; background: var(--chip); color: var(--muted); font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-right: 4px; vertical-align: middle; }
[data-theme="dark"] .wagent { background: rgba(224,49,49,.2); color: #ff8787; }

/* Charla con el entrenador del bot */
.coach .cmsgs { height: 380px; overflow-y: auto; background: var(--chat-bg); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); }
.coach .cm { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.coach .cm.me { align-self: flex-end; align-items: flex-end; }
.coach .cb { background: var(--in); padding: 8px 11px; border-radius: 12px; border-top-left-radius: 3px; font-size: 13.5px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.coach .cm.me .cb { background: var(--out); border-radius: 12px; border-top-right-radius: 3px; }
.coach .ct { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.coach .cact { margin-top: 8px; padding: 7px 9px; border-radius: 8px; background: #ebfbee; font-size: 12.5px; border-left: 3px solid #2f9e44; }
.coach .cact.edit { background: #fff9db; border-color: #f08c00; }
.coach .cact.delete { background: #fff5f5; border-color: #e03131; }
.coach .cact.test { background: #e7f5ff; border-color: #1c7ed6; }
.coach .cact .cbot { margin-top: 4px; background: var(--out); padding: 6px 8px; border-radius: 8px; }
.coach .ccomp { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.coach .ccomp textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; border-radius: 21px; padding: 10px 14px; }
.coach .ccomp .tmic { width: 42px; height: 42px; border-radius: 50%; background: var(--chip); flex: none; }
.coach .ccomp .send { width: 42px; height: 42px; border-radius: 50%; background: var(--green, #1f8f4e); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.coach .ccomp .send:disabled { opacity: .5; }
[data-theme="dark"] .coach .cact { background: rgba(47,158,68,.15); }
[data-theme="dark"] .coach .cact.edit { background: rgba(240,140,0,.15); }
[data-theme="dark"] .coach .cact.test { background: rgba(28,126,214,.15); }
.tscr { font-size: 12.5px; line-height: 1.4; margin-top: 4px; padding: 5px 8px; background: rgba(0,0,0,.04); border-radius: 7px; max-width: 320px; }
[data-theme="dark"] .tscr { background: rgba(255,255,255,.06); }

/* ---------- Entrenar IA (charla) ---------- */
.train { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; height: 100%; padding: 16px; box-sizing: border-box; }
.tchat { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tchat .th { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tchat .th h2 { margin: 0; font-size: 18px; }
.tchat .th p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.tav { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,#1f6f54,#2fa37a); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.tmsgs { flex: 1; overflow-y: auto; padding: 20px max(18px, calc((100% - 760px)/2)); display: flex; flex-direction: column; gap: 14px; background: var(--chat-bg); }
.tm { display: flex; max-width: 86%; }
.tm.me { align-self: flex-end; }
.tm .tb { padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; background: var(--in); box-shadow: 0 1px 1px rgba(0,0,0,.06); border-top-left-radius: 4px; }
.tm.me .tb { background: var(--out); border-radius: 16px; border-top-right-radius: 4px; }
.tm .tb.err { color: var(--red); }
.tm .tb a { word-break: break-all; }
.tm .tq { display: block; border-left: 3px solid var(--line); padding-left: 8px; color: var(--muted); }
.tm .tli { display: block; padding-left: 4px; }
.tact { margin-top: 8px; padding: 7px 10px; border-radius: 9px; font-size: 13px; background: #ebfbee; border-left: 3px solid #2f9e44; }
.tact.edit { background: #fff9db; border-color: #f08c00; }
.tact.del { background: #fff5f5; border-color: #e03131; }
.tact.test { background: #e7f5ff; border-color: #1c7ed6; }
.tact .tbot { margin-top: 5px; background: var(--out); padding: 7px 9px; border-radius: 8px; }
[data-theme="dark"] .tact { background: rgba(47,158,68,.15); } [data-theme="dark"] .tact.edit { background: rgba(240,140,0,.15); } [data-theme="dark"] .tact.test { background: rgba(28,126,214,.15); } [data-theme="dark"] .tact.del { background: rgba(224,49,49,.15); }
.tsugg { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 18px 0; background: var(--chat-bg); }
.tsugg .chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--text); }
.tsugg .chip:hover { border-color: var(--green); }
.tcomp { display: flex; gap: 10px; align-items: flex-end; padding: 12px 18px 16px; background: var(--chat-bg); }
.tcomp textarea { flex: 1; resize: none; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 24px; padding: 12px 16px; font: inherit; font-size: 15px; min-height: 48px; max-height: 160px; outline: none; }
.tcomp textarea:focus { border-color: var(--green); }
.tmicbig, .tsend { width: 48px; height: 48px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.tmicbig { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.tmicbig.rec { background: #e03131; color: #fff; border-color: #e03131; animation: tpulse 1.4s infinite; }
@keyframes tpulse { 0% { box-shadow: 0 0 0 0 rgba(224,49,49,.5); } 70% { box-shadow: 0 0 0 12px rgba(224,49,49,0); } 100% { box-shadow: 0 0 0 0 rgba(224,49,49,0); } }
.tsend { background: var(--green); color: #fff; }
.tsend:disabled { opacity: .5; }
.dots { display: inline-flex; gap: 4px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tdot 1.2s infinite; } .dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes tdot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.trules { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; overflow-y: auto; min-height: 0; }
.trules .tr { display: flex; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; line-height: 1.4; }
.trules .tr.off { opacity: .45; }
.trules .tra { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trainlink { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
.trainlink:hover { border-color: var(--green); }
@media (max-width: 860px) {
  .train { grid-template-columns: 1fr; padding: 0; }
  .tchat { border-radius: 0; border: 0; }
  .trules { position: fixed; inset: auto 0 0 0; max-height: 70vh; border-radius: 16px 16px 0 0; z-index: 50; transform: translateY(100%); transition: transform .25s; box-shadow: var(--shadow); }
  .trules.open { transform: none; }
  .tm { max-width: 92%; }
  .tchat .th p { display: none; }
}
.qocc { margin: 10px 0 4px; padding: 8px 10px; border-radius: 9px; background: var(--chip); font-size: 13px; }
.qocc .ok { color: #2b8a3e; font-weight: 600; } .qocc .bad { color: var(--red); font-weight: 700; }
.qroom { display: grid; grid-template-columns: 1fr 150px 32px; gap: 8px; align-items: center; margin-top: 6px; }
.wxpop { position: fixed; z-index: 300; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; min-width: 250px; }
.wxpop .wxh { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.wxpop .wxd { display: grid; grid-template-columns: 70px 30px 1fr auto; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.wxpop .wxd:first-of-type { border-top: 0; }
.wxpop .wxl { text-transform: capitalize; }
.wxpop .wxi { font-size: 18px; }
.wxpop .wxr { font-size: 11.5px; color: var(--blue); }
.wxpop .wxt span { color: var(--muted); }
.qcombo { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qcombo .chip { border: 1px solid var(--green); color: var(--green); background: var(--panel); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.qcombo .chip:hover { background: var(--green); color: #fff; }
/* Si la conversación queda angosta, el panel de Detalles flota encima en vez de achicar el chat */
#conv { position: relative; }
@container (max-width: 860px) {
  .side:not(.hidden) { position: absolute; right: 0; top: 68px; bottom: 0; z-index: 40; width: 340px; box-shadow: -10px 0 30px rgba(0,0,0,.14); }
}

.qplus { font-size: 22px; font-weight: 700; color: var(--muted); padding-bottom: 8px; }
/* Huéspedes del cotizador: todo en una línea, mismo alto y misma base */
.qguests { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.qguests .qg { display: flex; flex-direction: column; }
.qguests .qg .fl { margin: 0 0 5px; white-space: nowrap; }
.qguests .qplus { padding-bottom: 9px; font-size: 20px; }
.qstep { display: flex; align-items: center; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.qstep button { width: 34px; height: 100%; border: 0; background: var(--chip); color: var(--text); font-size: 18px; cursor: pointer; }
.qstep button:hover { background: var(--line); }
.qstep input { width: 40px; height: 100%; border: 0; text-align: center; font: inherit; font-size: 15px; font-weight: 600; background: transparent; color: var(--text); -moz-appearance: textfield; }
.qstep input::-webkit-inner-spin-button, .qstep input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qages { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; align-items: center; }
.qages .qage { width: 104px; height: 40px; padding: 0 8px; flex: none; }

/* ---------- Cotizador paso a paso ---------- */
.wiz { width: min(520px, 92vw); }
.wsteps { display: flex; gap: 6px; margin-bottom: 14px; }
.wsteps span { background: var(--chip); color: var(--muted); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; }
.wsteps span.on { background: #e6f6ec; color: #2b8a3e; }
.wsteps span.done { color: var(--text); }
.wiz h3 { margin: 0 0 12px; }
.wcal { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.wcal .hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.wcal .hd button { border: 0; background: var(--chip); width: 32px; height: 32px; border-radius: 9px; font-size: 18px; cursor: pointer; color: var(--text); }
.wcal .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; text-align: center; }
.wcal .g .w { font-size: 11px; color: var(--muted-2); padding: 4px 0; }
.wcal .g button { height: 38px; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; border-radius: 9px; }
.wcal .g button:hover:not(:disabled) { background: var(--chip); }
.wcal .g button.x { color: var(--line); cursor: default; }
.wcal .g button.in { background: #e3f3ea; border-radius: 0; }
.wcal .g button.s { background: var(--brand-2); color: #fff; border-radius: 9px 0 0 9px; }
.wcal .g button.e { background: var(--brand-2); color: #fff; border-radius: 0 9px 9px 0; }
.wcal .rng { display: flex; gap: 8px; margin-top: 10px; }
.wcal .rng div { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.wcal .rng div.act { border-color: var(--green); box-shadow: 0 0 0 3px rgba(37,163,90,.12); }
.wcal .rng small { display: block; font-size: 11px; color: var(--muted); }
.wcal .rng b { font-size: 15px; text-transform: capitalize; }
.wcal .nts { text-align: center; margin-top: 8px; font-size: 12.5px; }
.wcal .nts span { background: var(--brand); color: #fff; border-radius: 999px; padding: 3px 11px; font-weight: 700; }
.wcal .nts em { color: var(--muted); }
.wopts { display: grid; gap: 12px; }
.wopt { position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.wopt.on { border-color: var(--green); box-shadow: 0 0 0 3px rgba(37,163,90,.10); }
.wopt .tag { position: absolute; top: -9px; left: 12px; background: var(--gold); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.wopt .ck { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--panel); color: #fff; font-size: 14px; cursor: pointer; }
.wopt.on .ck { background: var(--green); border-color: var(--green); }
.wopt h4 { margin: 0 34px 2px 0; font-size: 15px; }
.wprices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wprices label { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); gap: 3px; }
.wprices input { width: 130px; height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; font: inherit; background: var(--panel); color: var(--text); }
.wtot { font-size: 19px; font-weight: 800; margin-top: 8px; }
.wprev textarea { width: 100%; min-height: 360px; border: 0; border-radius: 12px; padding: 12px; background: #d9fdd3; font: inherit; font-size: 13.5px; line-height: 1.45; resize: vertical; color: #1d2421; box-shadow: inset 0 0 0 10px var(--chat-bg); padding: 22px; }

/* Cotizador: campo de fechas + calendario de rango (2 meses) */
.qdates { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 7px 14px; cursor: pointer; background: var(--panel); }
.qdates:hover, .qdates:focus { border-color: var(--green); outline: none; }
.qdates small { display: block; font-size: 11px; color: var(--muted); }
.qdates b { font-size: 15.5px; text-transform: capitalize; }
.qdates .qarr { color: var(--muted); font-size: 18px; }
.qdates .qn { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; }
.qdates .qn:empty { display: none; }
.qcalpop { position: relative; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 10px; background: var(--panel); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.qcalpop.hidden { display: none; }
.qcalpop .qmt { text-align: center; font-weight: 700; margin-bottom: 6px; }
.qcalpop .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; text-align: center; }
.qcalpop .g .w { font-size: 11px; color: var(--muted-2); padding: 3px 0; }
.qcalpop .g button { height: 34px; border: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; border-radius: 9px; }
.qcalpop .g button:hover:not(:disabled) { background: var(--chip); }
.qcalpop .g button.x { color: var(--line); cursor: default; }
.qcalpop .g button.in { background: #e3f3ea; border-radius: 0; }
.qcalpop .g button.s { background: var(--brand-2); color: #fff; border-radius: 9px 0 0 9px; }
.qcalpop .g button.s.solo { border-radius: 9px; }
.qcalpop .g button.e { background: var(--brand-2); color: #fff; border-radius: 0 9px 9px 0; }
.qcalpop .qnav { position: absolute; top: 10px; width: 30px; height: 30px; border: 0; border-radius: 9px; background: var(--chip); cursor: pointer; font-size: 17px; color: var(--text); }
.qcalpop .qnav.l { left: 12px; } .qcalpop .qnav.r { right: 12px; }
.qcalpop .qhint { grid-column: 1 / -1; text-align: center; font-size: 12.5px; color: var(--muted); }
[data-theme="dark"] .qcalpop .g button.in { background: rgba(37,163,90,.18); }
@media (max-width: 700px) { .qcalpop { grid-template-columns: 1fr; } .qcalpop .qm:nth-of-type(2) { display: none; } }
/* Cotizador por habitación */
.qhelp { margin: 12px 0 8px; font-size: 12.5px; color: var(--muted); background: var(--panel-2); border-left: 3px solid var(--gold); padding: 7px 10px; border-radius: 6px; }
.qrc { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; margin-bottom: 10px; background: var(--panel); }
.qrc .qrh { display: flex; align-items: center; gap: 10px; }
.qrc .qrh b { font-size: 14px; }
.qrc .qrh .icon-btn { margin-left: auto; }
.qrc .okc { color: #2b8a3e; font-weight: 600; }
.qrc .qguests { margin-top: 6px; }
.qroom2 { display: grid; grid-template-columns: 1fr 160px; gap: 8px; margin-top: 10px; }
.qtot { font-size: 18px; }

.qtopg { display: flex; gap: 14px; align-items: flex-end; margin: 12px 0 10px; }
.qtopg .qhelp { flex: 1; }
.qwarn { margin-top: 8px; font-size: 12.5px; background: #fff9db; color: #8a5a00; border-radius: 8px; padding: 6px 10px; }
[data-theme="dark"] .qwarn { background: rgba(240,140,0,.15); color: #ffd28a; }
.qprev { display: grid; grid-template-columns: 1fr; gap: 10px; background: var(--chat-bg); border-radius: 14px; padding: 14px; max-height: 70vh; overflow-y: auto; }
.qprev img { width: 100%; max-width: 480px; margin: 0 auto; display: block; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.qprev textarea { max-width: 480px; width: 100%; margin: 0 auto; border: 0; border-radius: 10px; padding: 10px 12px; background: #d9fdd3; font: inherit; font-size: 14px; resize: vertical; color: #1d2421; }

/* ---------- Celular: encabezado del chat en dos filas, sin desbordar ---------- */
@media (max-width: 860px) {
  html, body { overflow-x: hidden; }
  .conv, #conv { min-width: 0; max-width: 100vw; }
  .ch { flex-wrap: wrap; row-gap: 8px; column-gap: 8px; padding: 8px 10px; min-height: 0; }
  .ch .act { display: contents; }
  .ch #backBtn { order: 1; width: 32px; margin-left: -4px; }
  .ch > .av, .ch > .avatar, .ch > span.av { order: 2; }
  .ch .chn { order: 3; flex: 1 1 0 !important; min-width: 0 !important; }
  .ch .chn .nm { font-size: 15.5px; }
  .ch .chn .nm .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .ch .chn .sub { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .ch > .ring { order: 4; transform: scale(.85); margin: -4px -2px; }
  .ch #infoBtn { order: 5; }
  .ch .chsp { order: 6; flex: 0 0 100% !important; height: 0; }
  .ch #botBtn { order: 7; }
  .ch #mpBtn { order: 8; }
  .ch #quoteBtn { order: 9; }
  .ch #resolveBtn { order: 10; }
  .ch #shareBtn { order: 11; }
  .ch #botBtn, .ch #mpBtn, .ch #quoteBtn, .ch #resolveBtn { height: 34px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
  .comp .csep { display: none; }
  .comp .ctools { gap: 0; }
  .comp .ctools .icon-btn { width: 32px; }
  .comp #txt { min-width: 0; flex: 1 1 auto; }
  .ch #quoteBtn .ql, .ch #resolveBtn .ql { display: inline !important; }
  .ch #mpBtn .hide-m { display: none; }
}
@container (max-width: 380px) { .ch #quoteBtn .ql { display: none !important; } }
@media (max-width: 860px) {
  .tbx { gap: 8px; }
  .tbx .brand { min-width: 0; overflow: hidden; }
  .tbx .brand b { overflow: hidden; text-overflow: ellipsis; }
  .tbx .chip { padding: 6px 9px; }
  .tbx .chip .tl { display: none; }
  #emoBtn { display: none !important; }
  .comp #txt::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 600px) {
  .qtopg .qhelp { display: none; }
  .qroom2 { grid-template-columns: 1fr; }
}
