/* VULCANO PMS — hoja de estilos principal (sin dependencias externas) */

:root {
  /* Paleta Agua Azul: azul marino del logotipo y azules de las montañas */
  --brand-950: #060e33;
  --brand-900: #0b1749;
  --brand-800: #142463;
  --brand-700: #1a3f9e;
  --brand-600: #1f5fd6;
  --brand-500: #2b7bf0;
  --brand-100: #e3ecfd;
  --brand-50: #f2f6fe;
  --aqua-500: #29b6f0;
  --aqua-100: #e0f5fd;

  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #16253a;
  --text-2: #334155;
  --muted: #64748b;

  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #a16207;
  --warn-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --info: #0e66b0;
  --info-bg: #e3f0fb;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --sidebar-w: 264px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  color: var(--text); background: var(--bg);
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.55rem; font-weight: 650; }
h2 { font-size: 1.1rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2;
        stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon.lg { width: 22px; height: 22px; }
.icon.xl { width: 28px; height: 28px; }
.icon.sm { width: 15px; height: 15px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-950) 100%);
  color: #cfe0f3; padding: 18px 14px 24px; scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--aqua-500), var(--brand-500)); color: #fff;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; background: #fff; }
.brand-name { font-weight: 700; letter-spacing: .02em; font-size: 1.02rem; line-height: 1.1; }
.brand-sub { font-size: .72rem; color: #8fb2d6; }
.brand-logo { display: block; padding: 2px 8px 6px; }
.brand-logo img { width: 150px; height: auto; display: block; }
.brand-caption { display: block; padding: 0 10px 12px; margin-bottom: 4px; font-size: .68rem; letter-spacing: .08em;
                 text-transform: uppercase; color: #8fa6d6; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.auth-logo { width: 300px; max-width: 100%; height: auto; display: block; }
.company-logo { height: 44px; width: auto; display: block; margin-bottom: 22px; mix-blend-mode: multiply; }

.nav-section { margin-top: 14px; }
.nav-title { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
             color: #7c9cc0; padding: 0 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  color: #d3e3f5; font-size: .9rem; margin-bottom: 1px;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(43, 123, 240, .32); color: #fff; box-shadow: inset 3px 0 0 var(--aqua-500); }
.nav-item.soon { color: #6f8db0; cursor: default; }
.nav-item.soon:hover { background: none; color: #6f8db0; }
.nav-item .tag { margin-left: auto; font-size: .63rem; padding: 1px 6px; border-radius: 99px;
                 border: 1px solid #3a5a80; color: #8fb2d6; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.topbar .company { font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.btn.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brand-100); color: var(--brand-700); font-weight: 700; font-size: .8rem;
}
.user-chip .who { line-height: 1.15; text-align: right; }
.user-chip .who strong { display: block; font-size: .88rem; }
.user-chip .who span { font-size: .74rem; color: var(--muted); }

.content { padding: 26px 28px 48px; width: 100%; max-width: 1440px; }

/* ---------- Page header ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
               flex-wrap: wrap; margin-bottom: 20px; }
.page-header .crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.page-header .crumbs a { color: var(--muted); }
.page-header p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font: inherit; font-weight: 550; font-size: .88rem; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: var(--muted); }
.btn:focus-visible, .input:focus-visible { outline: 3px solid rgba(26, 127, 209, .35); outline-offset: 1px; }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-danger { color: var(--danger); border-color: #fca5a5; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-success { color: var(--ok); border-color: #86efac; }
.btn-success:hover { background: var(--ok-bg); border-color: var(--ok); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--brand-50); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 10px; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px;
               padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-header h2 { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: 2fr 1fr; }
.grid .card + .card { margin-top: 0; }

/* ---------- KPIs ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
       box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; }
.kpi .kpi-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
                 background: var(--brand-50); color: var(--brand-600); flex: none; }
.kpi .kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-label { font-size: .84rem; color: var(--text-2); font-weight: 550; }
.kpi .kpi-hint { font-size: .75rem; color: var(--muted); }

.welcome {
  background: linear-gradient(120deg, var(--brand-800), var(--brand-600) 60%, var(--aqua-500));
  color: #fff; border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.welcome h1 { color: #fff; }
.welcome p { color: #d7e8f8; margin: 6px 0 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius);
        background: var(--surface); color: var(--text); }
.tile:hover { border-color: var(--brand-500); text-decoration: none; box-shadow: var(--shadow); }
.tile .icon { color: var(--brand-600); margin-top: 2px; }
.tile strong { display: block; font-size: .9rem; }
.tile span { font-size: .8rem; color: var(--muted); }

/* ---------- Roadmap ---------- */
.roadmap { list-style: none; margin: 0; padding: 0; }
.roadmap li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: .88rem; }
.roadmap li:last-child { border-bottom: 0; }
.roadmap .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
                font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.roadmap .current .dot { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.roadmap .done .dot { background: var(--ok-bg); color: var(--ok); border-color: #86efac; }
.roadmap .current { font-weight: 600; }

/* ---------- Tables ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.toolbar .search { position: relative; flex: 1 1 260px; max-width: 380px; }
.toolbar .search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { padding-left: 36px; }
.toolbar .select { width: auto; min-width: 150px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
            font-weight: 650; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th a { color: inherit; }
.table th a:hover { color: var(--brand-600); text-decoration: none; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--brand-50); }
.table tr.inactive td { color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .first a { font-weight: 600; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
                padding: 12px 18px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px;
         font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.badge.off { background: #f1f5f9; color: #64748b; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.badge.master { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; border-color: #f59e0b; }

.pagination { display: flex; gap: 4px; align-items: center; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center;
                                  border-radius: 6px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); }
.pagination .current { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

.empty { text-align: center; padding: 48px 18px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: 8px; }

/* ---------- Forms ---------- */
.input {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(26, 127, 209, .15); outline: none; }
.textarea { height: auto; padding: 9px 11px; min-height: 80px; resize: vertical; }
.select { appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
select[multiple].select { height: auto; padding: 6px; background-image: none; }
input[type=file].input { padding: 6px; height: auto; }
.checkbox { width: 18px; height: 18px; accent-color: var(--brand-600); vertical-align: middle; }

.form-section { padding: 18px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; }
.form-section > h3 { margin-bottom: 14px; color: var(--brand-700); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > label { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--danger); }
.field .help { font-size: .76rem; color: var(--muted); }
.field .errors { color: var(--danger); font-size: .78rem; margin: 0; padding: 0; list-style: none; }
.field.has-error .input { border-color: var(--danger); }
.field.check { flex-direction: row; align-items: center; gap: 9px; padding-top: 24px; }
.field.check > label { order: 2; font-weight: 550; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.checklist label { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border);
                   border-radius: 8px; font-weight: 500; font-size: .87rem; cursor: pointer; }
.checklist label:hover { border-color: var(--brand-500); background: var(--brand-50); }
.checklist input { accent-color: var(--brand-600); width: 16px; height: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; background: var(--surface-2);
                border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.form-errors { margin: 18px 18px 0; }

/* ---------- Detail ---------- */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 24px; margin: 0; }
.dl div { min-width: 0; }
.dl dt { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dl dd { margin: 2px 0 0; font-size: .92rem; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .78rem; color: var(--muted); padding: 12px 18px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: .84rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: .76rem; }
.changes { margin: 6px 0 0; padding: 0; list-style: none; font-size: .8rem; }
.changes li { padding: 2px 0; border: 0; }
.changes .old { color: var(--danger); text-decoration: line-through; }
.changes .new { color: var(--ok); }

/* ---------- Alerts ---------- */
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; font-size: .88rem;
         border: 1px solid; background: var(--info-bg); border-color: #bfdbfe; color: #0c4a6e; }
.alert.success { background: var(--ok-bg); border-color: #bbf7d0; color: #14532d; }
.alert.error { background: var(--danger-bg); border-color: #fecaca; color: #7f1d1d; }
.alert.warning { background: var(--warn-bg); border-color: #fde68a; color: #713f12; }
.alert .close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 0; }

/* ---------- Matriz de permisos ---------- */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix .group td { background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: .78rem;
                    text-transform: uppercase; letter-spacing: .06em; }
.matrix .mod-name { font-weight: 600; }
.matrix .mod-desc { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; max-width: 380px; }
.matrix .yes { color: var(--ok); }
.matrix .no { color: var(--border-strong); }
.matrix .na { color: transparent; }
.matrix input { width: 17px; height: 17px; accent-color: var(--brand-600); cursor: pointer; }

/* ---------- Inventario ---------- */
.lines-table td { padding: 6px 8px; vertical-align: top; }
.lines-table .input { height: 36px; }
.lines-table td.narrow { width: 140px; }
.lines-table td.narrow .input { min-width: 100px; }
.lines-table tr.has-error td { background: var(--danger-bg); }
.field-error { color: var(--danger); font-size: .75rem; margin-top: 3px; }
.row-alert td { background: #fffbeb; }
.stock-table td:first-child { min-width: 240px; }
.stock-table td:first-child strong { white-space: nowrap; }
.checkline { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; color: var(--text-2); }
.checkline input { width: 17px; height: 17px; accent-color: var(--brand-600); }
.void-box { position: relative; }
.void-box > summary { list-style: none; }
.void-box > summary::-webkit-details-marker { display: none; }
.void-form { position: absolute; right: 0; top: 44px; z-index: 30; width: 320px; padding: 14px; display: grid; gap: 8px;
             box-shadow: var(--shadow-lg); }
.print-header, .print-signatures { display: none; }

/* ---------- Metas y estadística ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--brand-500); }
.progress span.ok { background: #16a34a; }
.progress span.warn { background: #f59e0b; }
.progress span.low { background: var(--brand-500); }
.goal-cell { min-width: 170px; }
.goal-numbers { display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.goal-pct { margin-left: auto; font-size: .78rem; font-weight: 700; }
.goal-pct.ok { color: #15803d; }
.goal-pct.warn { color: var(--warn); }
.goal-pct.low { color: var(--brand-700); }

/* ---------- Venta diaria ---------- */
.daily-table th.route-head { text-align: center; border-left: 2px solid var(--border-strong); }
.daily-table td.route-amount { border-right: 2px solid var(--border-strong); font-weight: 600; }
.daily-table td, .daily-table th { padding: 6px 8px; font-size: .8rem; }

/* ---------- Login ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.auth-hero { background: linear-gradient(150deg, var(--brand-900), var(--brand-700) 55%, var(--aqua-500));
             color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h1 { color: #fff; font-size: 2.1rem; margin-top: 18px; }
.auth-hero p { color: #d2e6f8; max-width: 440px; font-size: 1rem; }
.auth-hero ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; color: #e2effb; }
.auth-hero li { display: flex; gap: 10px; align-items: center; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 1.4rem; margin-bottom: 6px; }
.auth-box form { display: grid; gap: 16px; margin-top: 22px; }

/* ---------- Responsive ---------- */
.overlay { display: none; }
@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: var(--sidebar-w); transform: translateX(-100%);
             transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(7, 26, 46, .45); z-index: 40; }
  .btn.menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 40px; }
  .user-chip .who { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.3rem; }
  .toolbar .search { max-width: none; }
  .toolbar .select { flex: 1 1 140px; }
  .page-header .actions { width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .sidebar, .topbar, .actions, .toolbar, .pagination, .messages { display: none !important; }
  .content { padding: 0; }
  .print-header { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
  .print-header .company-logo { margin: 0; height: 40px; }
  .print-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 70px; text-align: center; }
  .print-signatures div { border-top: 1px solid #333; padding-top: 6px; font-size: .85rem; }
  .app { display: block; }
  .card { box-shadow: none; }
}

/* --- María: conversaciones estilo WhatsApp --------------------------------- */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: #efeae2; min-height: 320px;
        max-height: 62vh; overflow-y: auto; border-radius: 0 0 var(--radius) var(--radius); }
.chat .bubble { max-width: min(78%, 560px); padding: 8px 12px; border-radius: 10px; font-size: .9rem; line-height: 1.4;
                white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0,0,0,.08); background: #fff; }
.chat .bubble.in { align-self: flex-start; }
.chat .bubble.out { align-self: flex-end; background: #d9fdd3; }
.chat .bubble.human { align-self: flex-end; background: #dbeafe; }
.chat .bubble.note { align-self: center; background: #fef9c3; font-size: .8rem; }
.chat .bubble .meta { display: block; margin-top: 4px; font-size: .7rem; color: var(--muted); text-align: right; }
.chat-form { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); }
.chat-form textarea { flex: 1 1 280px; min-height: 44px; resize: vertical; }
.chat-form .loc { display: flex; gap: 6px; flex: 0 1 auto; }
.chat-form .loc .input { width: 120px; }
.htmx-request .chat-sending { display: inline; }
.chat-sending { display: none; color: var(--muted); font-size: .85rem; align-self: center; }
