/* ProChat — capa visual "Dotly" (solo estilo; sin cambios de logica ni textos). */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/Montserrat-Variable-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --surface-3: #f1f4f3;
  --hover: #f1f4f3;
  --active: #e3f1eb;
  --line: #e4e9e7;
  --line-strong: #d3dad7;
  --text: #0f1a17;
  --text-2: #5f6e69;
  --text-3: #8a9793;
  --muted: #5f6e69;
  --faint: #8a9793;
  --accent: #0a9d73;
  --accent-strong: #08865f;
  --accent-text: #ffffff;
  --accent-soft: rgba(10, 157, 115, .1);
  --field: #f3f6f5;
  --warn: #9a6200;
  --warn-soft: rgba(230, 150, 20, .12);
  --danger: #c4322f;
  --danger-soft: rgba(196, 50, 47, .09);
  --info: #2f6fb3;
  --info-soft: rgba(47, 111, 179, .1);
  --pink: #c2255c;
  --pink-soft: rgba(214, 51, 108, .1);
  --chat-bg: #eef2ef;
  --bubble-in: #ffffff;
  --bubble-out: #d8f6e9;
  --shadow-sm: 0 1px 2px rgba(16, 40, 32, .06);
  --shadow: 0 12px 36px rgba(16, 40, 32, .12), 0 2px 6px rgba(16, 40, 32, .06);
  --shadow-lg: 0 12px 36px rgba(16, 40, 32, .12), 0 2px 6px rgba(16, 40, 32, .06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font: 'Montserrat', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --series-team: #2a78d6;
  --series-automation: #eb6834;
  --series-ai: #1baf7a;
  --viz-grid: #eef1f0;
  --ag-accent: #087f6b;
  --ag-soft: color-mix(in srgb, var(--ag-accent) 8%, var(--surface));
  --ag-line: var(--line);
  --event-visit: #bc7133;
  --event-meeting: #8070cf;
  --event-call: #387ebd;
  --event-default: #087f6b;
  --event-cancel: #b85050;
  --purple-soft: rgba(128, 112, 207, .12);

  --brand: var(--accent);
  --brand-dark: var(--accent-strong);
  --brand-soft: var(--accent-soft);
  --brand-text: var(--accent-strong);
  --side: var(--surface-2);
  --side-2: var(--hover);
  --side-line: var(--line);
  --side-text: var(--text);
  --side-muted: var(--muted, var(--text-2));
  --green: var(--accent);
  --green-soft: var(--accent-soft);
  --amber: var(--warn);
  --amber-soft: var(--warn-soft);
  --red: var(--danger);
  --red-soft: var(--danger-soft);
  --blue: var(--info);
  --blue-soft: var(--info-soft);
  --purple: var(--event-meeting);
  --focus-ring: 0 0 0 3px var(--accent-soft);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1312;
  --surface: #131817;
  --surface-2: #151a19;
  --surface-3: #1b2220;
  --hover: #1b2220;
  --active: #222a28;
  --line: #232b29;
  --line-strong: #2e3836;
  --text: #e7edeb;
  --text-2: #8b9994;
  --text-3: #6b7975;
  --muted: #8b9994;
  --faint: #6b7975;
  --accent: #2ad3a1;
  --accent-strong: #4be0b3;
  --accent-text: #03140e;
  --accent-soft: rgba(42, 211, 161, .13);
  --field: #1b2220;
  --warn: #f2b54a;
  --warn-soft: rgba(242, 181, 74, .13);
  --danger: #f2716b;
  --danger-soft: rgba(242, 113, 107, .12);
  --info: #7fb2ec;
  --info-soft: rgba(127, 178, 236, .12);
  --pink: #f783ac;
  --pink-soft: rgba(247, 131, 172, .14);
  --chat-bg: #0b0f0e;
  --bubble-in: #1c2321;
  --bubble-out: #0f4a3c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  --series-team: #3987e5;
  --series-automation: #d95926;
  --series-ai: #199e70;
  --viz-grid: #1d2422;
  --ag-accent: #49cfb3;
  --event-visit: #e8a56a;
  --event-meeting: #b8a5ff;
  --event-call: #7ab6ec;
  --event-default: #49cfb3;
  --purple-soft: rgba(184, 165, 255, .14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1312; --surface: #131817; --surface-2: #151a19; --surface-3: #1b2220;
    --hover: #1b2220; --active: #222a28; --line: #232b29; --line-strong: #2e3836;
    --text: #e7edeb; --text-2: #8b9994; --text-3: #6b7975;
    --accent: #2ad3a1; --accent-strong: #4be0b3; --accent-text: #03140e; --accent-soft: rgba(42, 211, 161, .13);
    --field: #1b2220; --warn: #f2b54a; --warn-soft: rgba(242, 181, 74, .13);
    --danger: #f2716b; --danger-soft: rgba(242, 113, 107, .12);
    --info: #7fb2ec; --info-soft: rgba(127, 178, 236, .12);
    --chat-bg: #0b0f0e; --bubble-in: #1c2321; --bubble-out: #0f4a3c;
    --ag-accent: #49cfb3; --event-visit: #e8a56a; --event-meeting: #b8a5ff; --event-call: #7ab6ec; --event-default: #49cfb3;
  }
}

/* Base */
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { letter-spacing: -.01em; }
.page-head h1 { font-size: 22px; font-weight: 600; }
.eyebrow { font-size: 10.5px; font-weight: 750; letter-spacing: 1.5px; color: var(--accent); }
.section-title { font-size: 17px; font-weight: 600; }
.section-title .ico { color: var(--accent); }
.tiny, .muted { color: var(--text-2); }
.sr-only { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Sidebar clara */
.sidebar { background: var(--surface-2); color: var(--text); border-right: 1px solid var(--line); width: 248px; flex-basis: 248px; }
.sidebar-brand { border-bottom-color: var(--line); }
.brand-mark { background: var(--accent); color: var(--accent-text); border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-text strong { color: var(--text); }
.brand-text small { color: var(--accent); border-color: var(--accent); }
.nav-item, .nav-item .ico { color: var(--text-2); }
.nav-item { min-height: 40px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--active); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item.active .ico { color: var(--accent); }
.nav-badge { background: var(--accent); color: var(--accent-text); border-radius: 999px; min-width: 20px; height: 20px; font-weight: 700; }
.nav-separator { color: var(--text-3); letter-spacing: .06em; }
.lock-dot .ico { color: var(--warn); }
.trial-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.trial-top { color: var(--warn); }
.trial-card p { color: var(--text-2); }
.trial-card p strong { color: var(--text); }
.trial-link { color: var(--accent); }
.side-user strong { color: var(--text); }
.side-user small { color: var(--text-2); }
.avatar { background: var(--info-soft); color: var(--info); border-radius: 999px; font-weight: 600; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 44px; height: 44px; }

/* Topbar, botones, inputs */
.topbar { background: var(--surface); border-bottom-color: var(--line); }
.search-trigger { background: var(--field); border-color: var(--line); border-radius: 8px; height: 36px; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.btn { height: 38px; border-radius: 8px; border-color: var(--line-strong); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; gap: 8px; }
.btn:hover { background: var(--hover); border-color: var(--line-strong); }
.btn-primary, .btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-sm { height: 32px; font-size: 12.5px; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { color: var(--text-2); }
.link-btn { color: var(--accent); font-weight: 600; }
.quick-menu, .user-menu { background: var(--surface); border-color: var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.quick-menu button:hover, .user-menu a:hover, .user-menu button:hover { background: var(--hover); }
.user-menu [data-action="salir"], .user-menu [data-action="salir"] .ico { color: var(--danger); }
kbd { border-color: var(--line-strong); background: var(--surface-2); color: var(--text-3); border-radius: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], input[type="tel"], select, textarea {
  background: var(--field); border-color: var(--line); border-radius: 8px; padding: 9px 13px; min-height: 42px; font-size: 14px;
}
input:focus, select:focus, textarea:focus { background: var(--surface); border-color: var(--accent); }
.field label { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.check-row input { accent-color: var(--accent); }
.segmented { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.segmented button { height: 30px; border-radius: 7px; font-size: 12.5px; }
.segmented button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.search-input input { padding-left: 32px; }

/* Tarjetas, KPIs, tablas, badges */
.card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head, .card-foot { border-color: var(--line); }
.kpi { padding: 16px 18px; }
.kpi-label { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.kpi-foot { color: var(--text-3); font-size: 12px; }
.kpi-icon { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.kpi-icon.green { color: var(--accent); background: var(--accent-soft); }
.kpi-icon.amber { color: var(--warn); background: var(--warn-soft); }
.kpi-icon.red { color: var(--danger); background: var(--danger-soft); }
.kpi-icon.blue { color: var(--info); background: var(--info-soft); }
.kpi-icon.purple { color: var(--event-meeting); background: var(--purple-soft); }
.table-wrap { border-radius: var(--radius); }
.data-table { font-size: 13.5px; }
.data-table th { color: var(--text-3); font-size: 11.5px; letter-spacing: .04em; padding: 10px 16px; border-color: var(--line); }
.data-table td { padding: 12px 16px; border-color: var(--line); }
.data-table tbody tr:hover { background: var(--surface-2); }
.icon-action:hover { background: var(--hover); color: var(--accent); }
.icon-action.danger:hover { color: var(--danger); background: var(--danger-soft); }
.badge { height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--hover); color: var(--text-2); }
.badge.green { background: var(--accent-soft); color: var(--accent); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.purple { background: var(--purple-soft); color: var(--event-meeting); }
.badge.brand { background: var(--accent-soft); color: var(--accent); }
.banner { border-radius: 8px; }
.banner.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.banner.info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.banner.success { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.empty { padding: 40px 20px; }
.empty .ico { color: var(--text-3); }
.progress-bar { background: var(--accent); }

/* Modales y toasts */
.modal-backdrop { background: rgba(8, 14, 12, .5); z-index: 300; backdrop-filter: none; }
.modal { width: min(440px, 100%); border-radius: var(--radius-lg); border-color: var(--line); box-shadow: var(--shadow); }
.modal.wide { width: min(650px, 100%); }
.modal:has([data-form="turno-save"]) { width: min(650px, 100%); }
.modal-head, .modal-foot { border-color: var(--line); }
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-head p { color: var(--text-2); }
.toast-stack { top: 18px; right: 18px; bottom: auto; z-index: 400; width: min(400px, calc(100vw - 32px)); }
.toast { border-radius: var(--radius); border-color: var(--line); border-left: 3px solid var(--accent); box-shadow: var(--shadow); padding: 12px 14px 14px; font-size: 13.5px; line-height: 1.45; }
.toast.error { border-left-color: var(--danger); }
.toast .ico { color: var(--accent); }
.toast.error .ico { color: var(--danger); }

/* Login Dotly: formulario a la izquierda, ilustracion a la derecha */
.login-screen { grid-template-columns: 1fr 1.05fr; }
.login-brand {
  order: 2;
  background: radial-gradient(ellipse at 85% 5%, rgba(47, 111, 179, .35), transparent 55%), radial-gradient(ellipse at 10% 95%, rgba(10, 157, 115, .45), transparent 60%), #0f2b25;
  color: #fff;
  border-left: 1px solid var(--line);
}
.login-brand::before { background: repeating-linear-gradient(135deg, transparent 0 24px, #fff 24px 25px); opacity: .05; }
.login-brand-top .ico { color: #7fe3c0; }
.login-brand-top .login-wordmark strong { color: #7fe3c0; }
.login-brand-center h2 { font-size: 30px; font-weight: 700; letter-spacing: -1.4px; }
.login-brand-center p, .login-brand-foot { color: #b9ded1; }
.login-main { order: 1; background: var(--bg); }
.login-card { border-color: var(--line); border-radius: var(--radius-lg); box-shadow: 0 30px 70px -20px rgba(16, 40, 32, .28); padding: 32px; }
.login-card-brand { display: flex; }
.login-card-brand .ico { color: var(--accent); }
.login-card-brand .login-wordmark strong { color: var(--accent); }
.login-card h1 { font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -.035em; }
.login-sub { font-size: 14.5px; color: var(--text-2); }
.login-input-wrap { min-height: 50px; border-radius: 12px; padding: 12px 15px; background: var(--field); border-color: var(--line); font-size: 15px; }
.login-input-wrap input { font-size: 15px; }
.login-input-wrap:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-error { border-color: transparent; background: var(--danger-soft); color: var(--danger); border-radius: 8px; }
.login-error.warning { background: var(--warn-soft); color: var(--warn); }
.login-submit { min-height: 50px; border-radius: 12px; font-size: 15px; }
.login-foot, .login-demo-hint { color: var(--text-2); }
.link-btn { color: var(--accent); }
@media (max-width: 1023px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-card-brand { display: flex; }
}
@media (max-width: 767px) {
  .login-card { padding: 24px; }
  .login-card h1 { font-size: 26px; }
}

/* Conversaciones */
.chat-layout { grid-template-columns: 360px minmax(0, 1fr); border-color: var(--line); border-radius: var(--radius); }
.chat-list { background: var(--surface); border-color: var(--line); }
.chat-item { border-color: var(--line); }
.chat-item:hover { background: var(--hover); }
.chat-item.active { background: var(--active); box-shadow: inset 3px 0 0 var(--accent); }
.chat-item-line strong { font-size: 14px; }
.chat-item-preview { font-size: 13px; color: var(--text-2); }
.unread { background: var(--accent); color: var(--accent-text); border-radius: 999px; font-size: 11px; font-weight: 700; }
.chat-panel-head { border-color: var(--line); min-height: 64px; }
.chat-msgs { background: var(--chat-bg); gap: 6px; padding: 18px 6%; }
.msg { max-width: min(560px, 82%); border-radius: 10px; border-color: var(--line); background: var(--bubble-in); box-shadow: var(--shadow-sm); padding: 8px 12px 6px; font-size: 14px; line-height: 1.45; }
.msg.mine { background: var(--bubble-out); border-color: transparent; color: var(--text); border-radius: 10px; }
.msg.ia { background: var(--accent-soft); border-color: transparent; }
.msg.note { background: var(--warn-soft); border-color: transparent; }
.chat-compose { border-color: var(--line); padding: 12px 16px; }
.chat-compose textarea { border-radius: 22px; background: var(--field); border-color: var(--line); min-height: 44px; max-height: 160px; padding: 11px 14px; }
.chat-compose [data-action="chat-send"] { border-radius: 999px; width: 44px; height: 44px; padding: 0; }
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list { height: 280px; }
}

/* Agenda Dotly */
body:has(.cal-scroll) .page-head {
  background: radial-gradient(ellipse at 85% 0%, rgba(186, 240, 224, .17), transparent 60%), radial-gradient(ellipse at 0% 100%, rgba(207, 198, 255, .13), transparent 70%), var(--surface);
  border: 1px solid var(--ag-line);
  border-radius: 22px;
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}
body:has(.cal-scroll) .page-head h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -1.4px; }
body:has(.cal-scroll) .page-head p { font-size: 14px; color: var(--text-2); }
.cal-toolbar { background: var(--surface); border: 1px solid var(--ag-line); border-radius: 12px; padding: 14px 18px; }
.cal-range { font-weight: 600; font-variant-numeric: tabular-nums; }
.segmented:has([data-action="cal-mode"]) { background: var(--ag-soft); border-color: transparent; border-radius: 12px; padding: 4px; }
.segmented:has([data-action="cal-mode"]) button { min-height: 36px; border-radius: 9px; padding: 8px 17px; font-size: 12px; }
.segmented:has([data-action="cal-mode"]) button.active { background: var(--surface); color: var(--ag-accent); font-weight: 700; box-shadow: 0 2px 7px rgba(19, 59, 38, .06); }
.cal-scroll { border-color: var(--ag-line); border-radius: 20px; }
.cal-day-head { font-size: 11px; letter-spacing: .06em; }
.cal-day-head strong { color: var(--text-2); }
.cal-day-head.today { background: var(--ag-soft); }
.cal-day-head.today span { background: var(--ag-accent); color: var(--accent-text); font-weight: 750; border-radius: 999px; }
.cal-lane.today { background: var(--ag-soft); }
.cal-hour { color: var(--text-3); font-variant-numeric: tabular-nums; }
.cal-slot:hover, .cal-slot:focus-visible { color: var(--ag-accent); background: var(--ag-soft); box-shadow: inset 0 0 0 1px var(--ag-accent); }
.cal-turn { border-radius: 13px; border-left-width: 3px; padding: 6px 8px; background: var(--surface); box-shadow: var(--shadow-sm); height: 72px !important; }
.cal-turn.confirmo { border-left-color: var(--event-default); }
.cal-turn.esperando { border-left-color: var(--event-visit); }
.cal-turn.sinrespuesta { border-left-color: var(--event-call); }
.cal-turn.cancelo { border-left-color: var(--event-cancel); }
.cal-turn .t-hora { color: var(--text); font-size: 11px; font-weight: 750; }
.cal-turn .badge { background: var(--ag-soft); color: var(--ag-accent); }
.cal-turn.cancelo .badge { background: rgba(184, 80, 80, .08); color: var(--event-cancel); }
.cal-turn .t-cliente { font-size: 14px; font-weight: 600; }
.cal-turn .t-servicio { font-size: 12px; color: var(--text-2); }
.cal-nowline { background: var(--ag-accent); }
.cal-nowline span { background: var(--ag-soft); color: var(--ag-accent); }
.cal-more { background: var(--ag-soft); color: var(--ag-accent); }
.cal-empty-day { color: var(--text-3); }
.cal-day-chips button.active { background: var(--ag-accent); color: var(--accent-text); border-color: var(--ag-accent); }
@media (min-width: 768px) and (max-width: 1023px) {
  .cal-header-grid, .cal-body-grid { grid-template-columns: 64px minmax(160px, 1fr); min-width: 0; }
  .cal-scroll { height: calc(100vh - 300px); }
}
@media (max-width: 600px) {
  body:has(.cal-scroll) .page-head { padding: 18px; border-radius: 18px; }
  body:has(.cal-scroll) .page-head h1 { font-size: 28px; }
  .cal-toolbar { padding: 12px; }
}

/* Graficos y estados con tokens Dotly */
.chart-box text { fill: var(--text-3); }
.legend-item { color: var(--text-2); }
.locked-banner { background-image: repeating-linear-gradient(135deg, transparent 0 10px, var(--surface-2) 10px 11px); }
.locked-icon { background: var(--warn-soft); color: var(--warn); }

/* Ajuste de estructura a la referencia Dotly inspeccionada el 28/11/2026. */
.app-shell { min-height: 100dvh; }
.sidebar { height:100dvh; }
.sidebar-brand { height:58px; flex:0 0 58px; padding:0 18px; border-bottom:0; gap:9px; }
.brand-mark { background:transparent; color:var(--text); box-shadow:none; width:30px; height:32px; }
.brand-mark .ico { width:28px; height:28px; stroke-width:2.2; }
.brand-text strong { font-size:25px; font-weight:750; letter-spacing:-1.25px; }
.brand-text small { border:0; font-size:8px; letter-spacing:.9px; color:var(--muted); padding:0; }
.sidebar-business { display:flex; align-items:center; gap:9px; text-align:left; margin:10px 12px 8px; padding:10px; background:var(--surface); border:1px solid var(--line); border-radius:8px; width:calc(100% - 24px); }
.sidebar-business>span:nth-child(2) { min-width:0; flex:1; }
.sidebar-business strong,.sidebar-business small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-business strong { font-size:12.5px; font-weight:600; }
.sidebar-business small { color:var(--muted); font-size:10.5px; margin-top:2px; }
.sidebar-business>.avatar { width:30px; height:30px; background:var(--accent-soft); color:var(--accent); font-size:11px; }
.sidebar-business>.ico { color:var(--faint); }
.sidebar-scroll { padding:10px 12px 12px; scrollbar-width:thin; }
.nav-group { gap:2px; }
.nav-item { padding:9px 12px; min-height:40px; font-size:13px; gap:12px; }
.nav-item.active { box-shadow:none; background:var(--active); }
.nav-item .ico { width:18px; height:18px; }
.nav-separator { margin:18px 12px 8px; text-transform:none; font-size:11px; font-weight:500; letter-spacing:0; }
.sidebar-foot { padding:12px; background:var(--side); }
.side-plan { display:flex; align-items:center; gap:10px; padding:12px 13px; border-radius:11px; background:var(--accent); color:var(--accent-text); margin-bottom:14px; }
.side-plan>span { flex:1; min-width:0; }
.side-plan strong,.side-plan small { display:block; }
.side-plan strong { font-size:13px; font-weight:700; }
.side-plan small { font-size:11px; opacity:.9; margin-top:2px; }
.side-user { gap:8px; }
.side-user>div { flex:1; min-width:0; }
.side-user strong,.side-user small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-user strong { font-size:11.5px; }
.side-user small { font-size:10px; }
.side-user .icon-btn { width:25px; height:30px; flex:0 0 25px; padding:3px; }
.side-user .ico { width:16px; height:16px; }
.sidebar-foot .trial-card { display:none; }
.topbar { height:56px; flex-basis:56px; padding:0 26px; gap:12px; }
.main { padding:30px 32px 44px; }
.view { max-width:1480px; }
.page-head { align-items:center; margin-bottom:24px; gap:16px; }
.page-head h1 { font-size:22px; font-weight:650; letter-spacing:-.6px; }
.page-head p { font-size:13px; color:var(--muted); }
.card { box-shadow:none; }
.card-head { padding:17px 20px; }
.card-head h3 { font-size:14px; font-weight:600; }
.card-body,.card-pad { padding:20px; }
.data-table th { background:var(--surface); font-size:10.5px; font-weight:650; letter-spacing:.04em; padding:12px 16px; }
.data-table td { font-size:12.5px; padding:14px 16px; }
.kpi { padding:20px; min-height:98px; border-radius:14px; }
.kpi-value { font-size:28px; font-weight:650; font-variant-numeric:tabular-nums; }
.kpi-label { font-size:12px; font-weight:500; }
.toolbar:has(+.card),.toolbar:has(+.table-wrap) { background:var(--surface); padding:14px 16px; border:1px solid var(--line); border-radius:12px; }
.empty { min-height:200px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; }
.empty .ico { width:30px; height:30px; color:var(--faint); }
.home-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 26px; }
.home-heading h1 { font-size:36px; line-height:1.18; letter-spacing:-1.5px; margin:12px 0 8px; font-weight:650; }
.home-heading h1::after { content:"."; color:var(--accent); }
.home-heading p { color:var(--muted); margin:0; font-size:14px; }
.business-pill { display:inline-block; background:var(--active); color:var(--muted); border-radius:999px; padding:4px 12px; font-size:10.5px; font-weight:650; letter-spacing:.7px; }
.home-command-card { padding:28px; border-radius:18px; background:var(--surface); margin:24px 0; }
.home-command-card .section-title { font-size:22px; letter-spacing:-.5px; }
.home-command-card .row { margin-top:18px; }
.quick-grid { gap:12px; }
.quick-action { box-shadow:none; border:1px solid var(--line); border-radius:12px; padding:18px; text-align:left; justify-content:flex-start; }
.quick-action:hover { border-color:var(--accent); background:var(--surface); }
.quick-action .ico { color:var(--accent); }
body[data-route="chats"] { overflow:hidden; }
body[data-route="chats"] .workspace { height:100dvh; overflow:hidden; }
body[data-route="chats"] .main { padding:0; min-height:0; overflow:hidden; }
body[data-route="chats"] .view { max-width:none; margin:0; height:100%; animation:none; }
.inbox-workspace.chat-layout { width:100%; height:calc(100dvh - 56px); min-height:0; grid-template-columns:360px minmax(0,1fr); border:0; border-radius:0; box-shadow:none; overflow:hidden; }
.inbox-workspace.has-info { grid-template-columns:340px minmax(0,1fr) 300px; }
.inbox-workspace .chat-list { min-height:0; height:100%; border-right:1px solid var(--line); border-bottom:0; }
.inbox-heading { display:flex; align-items:center; justify-content:space-between; padding:18px 18px 12px; gap:10px; }
.inbox-heading h1 { font-size:20px; font-weight:650; letter-spacing:-.6px; margin:0; }
.inbox-heading-actions { display:flex; gap:0; }
.inbox-heading-actions .icon-btn { width:30px; height:30px; color:var(--muted); }
.inbox-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:0 14px 10px; padding:3px; border-radius:12px; background:var(--hover); }
.inbox-tabs button { min-width:0; height:34px; border:0; background:transparent; border-radius:9px; font-size:12px; font-weight:600; color:var(--muted); display:flex; justify-content:center; align-items:center; gap:5px; padding:0 4px; }
.inbox-tabs button.active { background:var(--surface); color:var(--text); box-shadow:var(--shadow-sm); }
.inbox-tabs button>span { min-width:17px; height:17px; display:grid; place-items:center; padding:0 4px; border-radius:8px; background:var(--accent-soft); color:var(--accent); font-size:10px; }
.inbox-list-filters { padding:0 14px 0; border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:10px; }
.inbox-filter-chips { display:flex; align-items:center; gap:3px; background:var(--hover); border-radius:10px; padding:3px; }
.inbox-filter-chips>button { background:transparent; border:0; color:var(--muted); border-radius:7px; padding:6px 8px; font-size:11.5px; font-weight:600; white-space:nowrap; min-height:30px; }
.inbox-filter-chips>button.active { color:var(--text); background:var(--surface); box-shadow:var(--shadow-sm); }
.inbox-filter-chips>.inbox-unread { display:grid; place-items:center; margin-left:auto; padding:5px; width:30px; }
.inbox-list-filters .search-input input { min-height:36px; height:36px; font-size:12px; border-radius:8px; padding-left:34px; }
.inbox-list-filters .search-input { width:100%; }
.inbox-advisor { display:grid; grid-template-columns:16px minmax(0,1fr); align-items:center; gap:8px; padding:0 0 10px; color:var(--muted); }
.inbox-advisor select { height:36px; min-height:36px; font-size:11.5px; padding:6px 9px; min-width:0; }
.inbox-advisor #chatEstado { grid-column:2; }
.inbox-workspace .chat-items { padding:6px; }
.inbox-workspace .chat-item { width:100%; display:flex; gap:12px; text-align:left; color:var(--text); border:0; border-radius:8px; padding:12px 10px; background:transparent; box-shadow:none; margin:1px 0; }
.inbox-workspace .chat-item:hover { background:var(--hover); }
.inbox-workspace .chat-item.active { background:var(--active); box-shadow:none; }
.inbox-workspace .chat-item>.avatar { width:40px; height:40px; flex:0 0 40px; font-size:12px; font-weight:600; background:var(--accent-soft); color:var(--accent); }
.inbox-workspace .chat-item-body { display:block; overflow:hidden; min-width:0; flex:1; }
.inbox-workspace .chat-item-line { display:flex; }
.inbox-workspace .chat-item-line strong { font-size:13px; font-weight:600; }
.inbox-workspace .chat-item-line time { font-size:10px; color:var(--faint); }
.inbox-workspace .chat-item-preview { display:block; font-size:12px; margin-top:3px; font-weight:400; }
.chat-item-bottom { display:flex; align-items:center; gap:6px; margin-top:5px; }
.chat-item-status { font-size:9.5px; color:var(--muted); display:flex; align-items:center; gap:4px; }
.chat-item-status i { width:5px; height:5px; background:var(--accent); border-radius:50%; }
.chat-assignee { font-size:9.5px; color:var(--faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inbox-workspace .unread { height:19px; min-width:19px; padding:0 5px; margin-left:auto; display:grid; place-items:center; font-size:10px; }
.inbox-list-foot { padding:9px 16px; font-size:10.5px; color:var(--faint); border-top:1px solid var(--line); }
.inbox-list-empty { color:var(--muted); font-size:12px; text-align:center; padding:40px 14px; }
.inbox-list-empty>.ico { display:none; }
.inbox-workspace .chat-panel { height:100%; overflow:hidden; background:var(--chat-bg); }
.inbox-workspace .chat-panel-head { flex:0 0 auto; min-height:64px; padding:10px 16px; background:var(--surface); }
.inbox-workspace .chat-panel-head>.avatar { width:38px; height:38px; flex:0 0 38px; font-size:12px; }
.inbox-workspace .chat-panel-head strong { font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inbox-workspace .chat-panel-head small { font-size:11px; color:var(--muted); }
.inbox-workspace .chat-panel-head select { min-height:34px; height:34px; width:130px; padding:6px 8px; font-size:11px; }
.inbox-workspace .chat-panel-head #chatEstadoEdit { width:112px; }
.inbox-thread-toolbar { display:flex; align-items:center; gap:14px; padding:8px 16px; border-bottom:1px solid var(--line); background:var(--surface); flex:0 0 auto; }
.inbox-ai-pill { border:0; border-radius:16px; background:var(--accent-soft); color:var(--accent); padding:6px 10px; display:flex; align-items:center; gap:5px; font-size:11px; font-weight:600; }
.inbox-thread-toolbar>.link-btn { display:flex; align-items:center; gap:5px; font-size:10.5px; color:var(--muted); }
.inbox-thread-toolbar>.link-btn:last-child { margin-left:auto; }
.inbox-workspace .chat-msgs { background:var(--chat-bg); padding:20px 6%; display:flex; flex-direction:column; gap:7px; min-height:0; }
.inbox-workspace[data-wallpaper="classic"] .chat-msgs { background-color:#efeae2; background-image:radial-gradient(#a0a49b22 .8px,transparent .8px); background-size:22px 22px; }
.inbox-workspace[data-wallpaper="dots"] .chat-msgs { background-image:radial-gradient(#0a9d7320 1px,transparent 1px); background-size:18px 18px; }
.inbox-workspace[data-wallpaper="grid"] .chat-msgs { background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size:24px 24px; }
[data-theme="dark"] .inbox-workspace[data-wallpaper="classic"] .chat-msgs { background-color:#0b141a; }
.inbox-workspace .msg { align-self:flex-start; max-width:min(560px,82%); padding:9px 12px 6px; flex:0 0 auto; white-space:normal; font-size:13px; background:var(--bubble-in); border:0; border-radius:10px; }
.inbox-workspace .msg.mine { align-self:flex-end; background:var(--bubble-out); }
.inbox-workspace .msg.ia { background:var(--accent-soft); }
.inbox-workspace .msg.note { align-self:center; background:var(--warn-soft); }
.inbox-workspace .msg.failed { outline:1px solid var(--danger); }
.msg-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.msg-author { color:var(--accent); font-size:10px; font-weight:700; display:block; margin-bottom:4px; }
.msg-meta { display:flex; gap:7px; justify-content:flex-end; align-items:center; font-size:9px; color:var(--muted); margin-top:5px; }
.msg-meta>span { display:flex; align-items:center; gap:3px; }
.msg-meta .ico { width:12px; height:12px; }
.msg-error { color:var(--danger); font-size:10px; margin:5px 0 0; }
.chat-attachment { display:flex; align-items:center; gap:6px; margin-top:8px; color:var(--accent); font-size:11px; text-decoration:underline; }
.chat-day { display:flex; justify-content:center; flex:0 0 auto; padding:6px 0 10px; }
.chat-day>span { padding:4px 10px; border-radius:7px; background:#d9eefb; color:#2b5468; font-size:10px; font-weight:600; }
[data-theme="dark"] .chat-day>span { background:#1c3644; color:#cde7f6; }
.inbox-workspace .chat-compose { flex:0 0 auto; padding:9px 16px 10px; background:var(--surface); border-top:1px solid var(--line); }
.inbox-compose-mode { display:flex; gap:4px; align-items:center; margin-bottom:8px; }
.inbox-compose-mode>button { padding:4px 9px; border:0; border-radius:5px; background:transparent; color:var(--muted); font-size:10px; font-weight:600; }
.inbox-compose-mode>button.active { background:var(--accent-soft); color:var(--accent); }
.inbox-composer { display:flex; align-items:flex-end; gap:8px; }
.inbox-composer .icon-btn { flex:0 0 32px; width:32px; height:42px; }
.inbox-workspace .inbox-composer textarea { flex:1; min-width:0; min-height:44px; max-height:160px; height:44px; resize:none; border-radius:22px; font-size:12px; line-height:20px; padding:11px 15px; }
.inbox-workspace .inbox-composer [data-action="chat-send"] { flex:0 0 44px; width:44px; height:44px; border-radius:50%; padding:0; }
.inbox-compose-foot { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:7px; }
.inbox-compose-foot>span { margin-right:auto; color:var(--faint); font-size:9px; }
.inbox-compose-foot .link-btn { font-size:10px; color:var(--muted); }
.inbox-file-selection { display:flex; align-items:center; gap:4px; margin-left:auto; font-size:10px; color:var(--muted); max-width:60%; overflow:hidden; white-space:nowrap; }
.inbox-file-selection .icon-btn { width:22px; height:22px; }
.inbox-thread-empty { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:30px; background:var(--chat-bg); }
.inbox-empty-icon>.ico { width:34px; height:34px; color:#8a9790; stroke-width:1.8; }
.inbox-thread-empty h2 { font-size:14px; font-weight:600; margin:14px 0 8px; }
.inbox-thread-empty p { font-size:13px; color:var(--muted); max-width:380px; line-height:1.7; margin:0 0 18px; }
.inbox-thread-empty .btn { font-size:11px; height:34px; background:transparent; }
.chat-mobile-back { display:none; }
.inbox-contact-info { background:var(--surface); border-left:1px solid var(--line); padding:28px 18px; overflow-y:auto; position:relative; text-align:center; }
.inbox-contact-info>.avatar { margin:12px auto 8px; width:62px; height:62px; font-size:20px; }
.inbox-contact-info h2 { font-size:15px; margin:8px 0 4px; }
.inbox-contact-info>p { font-size:12px; color:var(--muted); margin:0 0 18px; }
.inbox-contact-info>section { padding:16px 0; border-bottom:1px solid var(--line); text-align:left; }
.inbox-contact-info h3 { font-size:10px; text-transform:uppercase; letter-spacing:.07em; color:var(--faint); margin:0 0 12px; }
.inbox-contact-info dl { margin:0; display:grid; grid-template-columns:1fr 1.35fr; gap:12px 10px; font-size:11px; }
.inbox-contact-info dt { color:var(--muted); }
.inbox-contact-info dd { margin:0; overflow-wrap:anywhere; text-align:right; }
.inbox-contact-info>.btn { margin-top:20px; }
.inbox-info-close { position:absolute; right:8px; top:8px; }
.chat-wallpaper-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(min-width:901px) and (max-width:1279px) {
 .inbox-workspace.chat-layout { grid-template-columns:320px minmax(0,1fr); }
 .inbox-workspace.has-info { grid-template-columns:320px minmax(0,1fr); }
 .inbox-contact-info { position:absolute; right:0; top:56px; bottom:0; width:300px; z-index:35; box-shadow:var(--shadow); }
 .inbox-workspace .chat-panel-head select { width:105px; }
 .inbox-workspace .chat-panel-head #chatEstadoEdit { width:100px; }
 .inbox-workspace .chat-panel-head { gap:7px; padding:10px; }
}
@media(min-width:901px) {
 .sidebar-collapsed .sidebar { width:72px; flex-basis:72px; }
 .sidebar-collapsed .sidebar-brand { padding:0 20px; }
 .sidebar-collapsed .brand-text,.sidebar-collapsed .sidebar-business>span:nth-child(2),.sidebar-collapsed .sidebar-business>.ico,.sidebar-collapsed .nav-item>span,.sidebar-collapsed .nav-item>.chev,.sidebar-collapsed .nav-separator,.sidebar-collapsed .side-plan,.sidebar-collapsed .side-user>div,.sidebar-collapsed .side-user>.icon-btn { display:none; }
 .sidebar-collapsed .sidebar-business { margin:8px 12px; padding:7px; }
 .sidebar-collapsed .sidebar-business>.avatar { width:30px; flex:0 0 30px; }
 .sidebar-collapsed .sidebar-scroll { padding:12px; }
 .sidebar-collapsed .nav-item { padding:10px; justify-content:center; }
 .sidebar-collapsed .side-user { justify-content:center; }
}
@media(max-width:900px) {
 .topbar { padding:0 14px; }
 .main { padding:24px 20px 36px; }
 .inbox-workspace.chat-layout,.inbox-workspace.has-info { display:grid; grid-template-columns:1fr; height:calc(100dvh - 56px); min-height:0; }
 .inbox-workspace .chat-list { height:100%; border-right:0; }
 .inbox-workspace .chat-panel { display:none; }
 .inbox-workspace.is-thread-open .chat-list { display:none; }
 .inbox-workspace.is-thread-open .chat-panel { display:flex; }
 .chat-mobile-back { display:grid; flex:0 0 30px; width:30px; }
 .inbox-contact-info { position:absolute; right:0; top:56px; bottom:0; z-index:35; width:min(320px,92vw); box-shadow:var(--shadow); }
 .inbox-heading { padding:16px 18px 12px; }
 .inbox-tabs,.inbox-list-filters { max-width:none; }
 .inbox-advisor { grid-template-columns:18px minmax(0,1fr) minmax(0,1fr); }
 .inbox-advisor #chatEstado { grid-column:auto; }
 .home-heading h1 { font-size:30px; }
 .home-heading { align-items:flex-start; }
}
@media(max-width:600px) {
 .main { padding:22px 16px 32px; }
 .topbar .search-trigger { width:36px; padding:0; justify-content:center; border:0; background:transparent; }
 .topbar .search-trigger span,.topbar .search-trigger kbd { display:none; }
 .topbar-actions { gap:3px; }
 .topbar-actions .icon-btn { width:32px; }
 .page-head { align-items:flex-start; gap:14px; }
 .page-head h1 { font-size:22px; }
 .home-heading { flex-wrap:wrap; }
 .home-heading h1 { font-size:30px; }
 .home-heading>.btn { font-size:11px; height:34px; }
 .home-command-card { padding:20px; }
 .home-command-card .row { flex-wrap:wrap; }
 .home-command-card .row input { min-width:0!important; flex-basis:100%!important; }
 .inbox-workspace .chat-panel-head { padding:10px 8px; gap:7px; flex-wrap:wrap; }
 .inbox-workspace .chat-panel-head>.avatar { width:32px; height:32px; flex-basis:32px; }
 .inbox-workspace .chat-panel-head .info { min-width:90px; }
 .inbox-workspace .chat-panel-head select { width:calc(50% - 28px); max-width:none; order:2; height:30px; min-height:30px; flex:1; }
 .inbox-workspace .chat-panel-head #chatEstadoEdit { width:calc(50% - 28px); }
 .inbox-workspace .chat-panel-head>.icon-btn:not(.chat-mobile-back) { width:28px; height:30px; }
 .inbox-thread-toolbar { gap:8px; padding:7px 10px; }
 .inbox-thread-toolbar>.link-btn { font-size:9px; }
 .inbox-thread-toolbar>.link-btn .ico { display:none; }
 .inbox-workspace .chat-msgs { padding:14px 12px; }
 .inbox-workspace .msg { max-width:88%; font-size:13px; }
 .inbox-workspace .chat-compose { padding:8px 8px max(8px,env(safe-area-inset-bottom)); }
 .inbox-composer { gap:3px; }
 .inbox-composer .icon-btn { flex-basis:28px; width:28px; }
 .inbox-compose-foot>span { display:none; }
 .inbox-compose-foot { margin-top:8px; }
 .inbox-workspace .inbox-composer textarea { font-size:13px; }
 .inbox-thread-empty { padding:22px; }
 .inbox-workspace .chat-item-line strong { font-size:14px; }
}
@media(prefers-reduced-motion:reduce) { .view { animation:none; } }
@media(max-width:380px) { .topbar #themeToggle { display:none; } .topbar #quickNew { padding:0 9px; } .topbar-actions .top-user { padding:4px; } .topbar-actions .top-user>.chev { display:none; } }

.step-num { background: var(--hover); color: var(--text-2); }
.step-item.done .step-num { background: var(--accent-soft); color: var(--accent); }
.accordion-item { border-color: var(--line); border-radius: 8px; }
.accordion-body { color: var(--text-2); }
.code-box { border-color: var(--line-strong); background: var(--field); font-family: var(--mono); font-size: .92em; }

.campaign-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.list-row:has(.campaign-actions){flex-wrap:wrap}.campaign-actions .btn{white-space:normal}

.qr-box img{max-width:100%;height:auto}
#welcomeTest{min-width:0!important}

.chat-media{min-width:0;max-width:100%}.chat-media audio{display:block;width:300px;max-width:100%;height:44px;margin:8px 0}.audio-caption{display:grid;gap:8px}.audio-caption .link-btn{justify-self:start}.audio-transcript{font-size:13px;line-height:1.5;border-top:1px solid var(--line);padding-top:8px;margin-top:4px}.audio-transcript strong{font-size:11px;color:var(--muted)}.audio-transcript p{margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}#audioSettings p{overflow-wrap:anywhere}#audioSettings input{max-width:100%}

.chat-image-link{display:block;margin:8px 0}.chat-image{display:block;width:320px;max-width:100%;max-height:350px;object-fit:contain;border-radius:10px}.chat-image.chat-sticker{width:160px;height:160px;object-fit:contain}.chat-media video{display:block;width:360px;max-width:100%;max-height:380px;margin:8px 0;border-radius:10px}.chat-document,.chat-shared-contact,.chat-location{display:grid;gap:7px;min-width:0;max-width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;margin:8px 0;overflow-wrap:anywhere}.chat-document strong{word-break:break-word}.chat-document span{font-size:11px}.chat-location{background:var(--accent-soft)}.chat-location p{margin:0}.chat-location .btn{justify-self:start}.location-pin{color:var(--accent);font-size:24px}.chat-media .chat-attachment{overflow-wrap:anywhere}
