/* =====================================================================
   Tema v1.7 · capa de diseño que se carga DESPUÉS de app.css
   Paleta índigo/violeta, superficies suaves, popups elegantes.
   ===================================================================== */
:root {
    /* Color de marca (cambia con el tema elegido en Configuración) */
    --brand: #059669; --brand-2: #0d9488; --brand-dark: #047857; --brand-dark-2: #0f766e;
    --brand-grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    --brand-grad-dark: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-dark-2) 100%);
    --soft: #ecfdf5; --soft-2: #d1fae5; --soft-line: #a7f3d0; --brand-ink: #065f46; --brand-light: #6ee7b7;
    --ring: 5, 150, 105;
    --side-1: #07211b; --side-2: #0c3027;
    --accent: var(--brand);
    --ink: #0b1220;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e8ecf3;
    --page-bg: #f4f7f6;
    --surface: #ffffff;
    --radius: 1rem;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-md: 0 4px 14px rgba(16, 24, 40, .08);
    --shadow-lg: 0 24px 60px rgba(16, 24, 40, .28);
}
html[data-theme="azul"] { --brand:#2563eb; --brand-2:#0284c7; --brand-dark:#1d4ed8; --brand-dark-2:#0369a1; --soft:#eff6ff; --soft-2:#dbeafe; --soft-line:#bfdbfe; --brand-ink:#1e40af; --brand-light:#93c5fd; --ring:37,99,235; --side-1:#0a1630; --side-2:#102a52; --page-bg:#f3f6fb; }
html[data-theme="violeta"] { --brand:#4f46e5; --brand-2:#7c3aed; --brand-dark:#4338ca; --brand-dark-2:#6d28d9; --soft:#eef2ff; --soft-2:#e0e7ff; --soft-line:#c7d2fe; --brand-ink:#3730a3; --brand-light:#a5b4fc; --ring:99,102,241; --side-1:#0b1020; --side-2:#111a35; --page-bg:#f4f6fb; }
html[data-theme="rosa"] { --brand:#e11d48; --brand-2:#db2777; --brand-dark:#be123c; --brand-dark-2:#be185d; --soft:#fff1f2; --soft-2:#ffe4e6; --soft-line:#fecdd3; --brand-ink:#9f1239; --brand-light:#fda4af; --ring:225,29,72; --side-1:#26101a; --side-2:#3a1624; --page-bg:#faf5f6; }
html[data-theme="ambar"] { --brand:#d97706; --brand-2:#b45309; --brand-dark:#b45309; --brand-dark-2:#92400e; --soft:#fffbeb; --soft-2:#fef3c7; --soft-line:#fde68a; --brand-ink:#92400e; --brand-light:#fcd34d; --ring:217,119,6; --side-1:#1c1917; --side-2:#292524; --page-bg:#f8f6f2; }
html[data-theme="grafito"] { --brand:#1f2937; --brand-2:#4b5563; --brand-dark:#111827; --brand-dark-2:#1f2937; --soft:#f3f4f6; --soft-2:#e5e7eb; --soft-line:#d1d5db; --brand-ink:#111827; --brand-light:#d1d5db; --ring:31,41,55; --side-1:#0a0a0b; --side-2:#18181b; --page-bg:#f5f5f6; }

body { background: var(--page-bg); color: var(--ink-2); font-feature-settings: "cv11", "ss01"; }
.kpi-value, .fw-bold, table td.text-end, .ticket { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); }
::selection { background: rgba(var(--ring), .18); }

/* ---------- Menú lateral ---------- */
.sidebar-col { background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 100%); }
.sidebar { --bs-offcanvas-bg: var(--side-1); background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 100%); }
@media (min-width: 992px) { .sidebar { background: transparent; } }
.sidebar-brand { padding: 1.25rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand-link { font-size: 1.02rem; letter-spacing: -.01em; }
.brand-icon { background: var(--brand-grad); box-shadow: 0 6px 16px rgba(var(--ring), .45); border-radius: 11px; }
.side-title { color: #5b6b86; font-size: .66rem; letter-spacing: .12em; padding: 1.1rem .75rem .35rem; }
.side-link { color: #a3b1c6; border-radius: .7rem; padding: .6rem .8rem; transition: background .15s, color .15s, transform .15s; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active {
    background: linear-gradient(90deg, rgba(var(--ring), .38), rgba(var(--ring), .08));
    color: #fff; box-shadow: inset 3px 0 0 var(--brand-light);
}
.side-link.active i { color: var(--brand-light); }
.sidebar-foot { color: #4b5a75; border-top: 1px solid rgba(255, 255, 255, .05); }

/* ---------- Barra superior ---------- */
.topbar { background: rgba(255, 255, 255, .82); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.page-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.avatar { background: var(--brand-grad); box-shadow: 0 2px 8px rgba(var(--ring), .4); }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); font-size: .92rem; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-body { padding: 1.15rem; }
.card.shadow-sm, .card.shadow { box-shadow: var(--shadow-sm) !important; }
.kpi-card-hover, .card:has(> .kpi) { transition: transform .18s ease, box-shadow .18s ease; }
.card:has(> .kpi):hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon { border-radius: 14px; }
.kpi-label { font-size: .7rem; letter-spacing: .07em; font-weight: 600; color: var(--muted); }
.kpi-value { font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.bg-soft-indigo { background: linear-gradient(135deg, var(--soft-2), var(--soft)); color: var(--brand-ink); }
.bg-soft-green { background: linear-gradient(135deg, #dcfce7, #d1fae5); color: #15803d; }
.bg-soft-amber { background: linear-gradient(135deg, #fef3c7, #ffedd5); color: #b45309; }
.bg-soft-rose { background: linear-gradient(135deg, #ffe4e6, #fce7f3); color: #be123c; }
.bg-soft-sky { background: linear-gradient(135deg, #e0f2fe, #cffafe); color: #0369a1; }

/* ---------- Tablas ---------- */
.card > .table-responsive { border-radius: var(--radius); }
.table { --bs-table-hover-bg: var(--soft); }
.table thead th { background: #f8fafd; color: #6b7a90; font-size: .68rem; letter-spacing: .08em; border-bottom: 1px solid var(--line); padding-top: .8rem; padding-bottom: .8rem; }
.table > tbody > tr > td { border-color: #f0f3f8; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table-sm > :not(caption) > * > * { padding: .5rem .75rem; }
.table-light { --bs-table-bg: #f8fafd; --bs-table-color: #6b7a90; }
tfoot.table-light td, tr.table-light td { background: #f8fafd; }
.list-group-item { border-color: #f0f3f8; padding: .8rem 1.1rem; }

/* ---------- Botones ---------- */
.btn { border-radius: .7rem; font-weight: 600; letter-spacing: -.005em; transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-dark, .btn-primary {
    background: var(--brand-grad); border: 0; color: #fff;
    box-shadow: 0 4px 14px rgba(var(--ring), .32);
}
.btn-dark:hover, .btn-primary:hover, .btn-dark:focus, .btn-primary:focus { background: var(--brand-grad-dark); color: #fff; box-shadow: 0 6px 18px rgba(var(--ring), .42); }
.btn-dark:disabled, .btn-primary:disabled { background: var(--soft-line); color: #fff; box-shadow: none; opacity: 1; }
.btn-outline-dark { color: var(--ink-2); border: 1px solid #d5dbe6; background: #fff; }
.btn-outline-dark:hover, .btn-outline-dark:focus { background: var(--soft); border-color: var(--soft-line); color: var(--brand-ink); }
.btn-outline-secondary { color: var(--ink-2); border-color: #d5dbe6; background: #fff; }
.btn-outline-secondary:hover { background: #f1f5f9; border-color: #cbd5e1; color: var(--ink); }
.btn-outline-primary { color: var(--brand); border-color: var(--soft-line); background: #fff; }
.btn-outline-primary:hover { background: var(--soft); border-color: var(--brand-light); color: var(--brand-ink); }
.btn-outline-danger { background: #fff; border-color: #fecaca; color: #dc2626; }
.btn-outline-danger:hover { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
.btn-outline-success { background: #fff; border-color: #bbf7d0; color: #15803d; }
.btn-outline-success:hover { background: #f0fdf4; border-color: #86efac; color: #166534; }
.btn-outline-warning { background: #fff; border-color: #fde68a; color: #b45309; }
.btn-outline-warning:hover { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.btn-success { background: linear-gradient(135deg, #16a34a, #059669); border: 0; box-shadow: 0 4px 14px rgba(22, 163, 74, .28); }
.btn-success:hover { background: linear-gradient(135deg, #15803d, #047857); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); border: 0; box-shadow: 0 4px 14px rgba(220, 38, 38, .28); }
.btn-danger:hover { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.btn-light { background: #f1f5f9; border-color: transparent; color: var(--ink-2); }
.btn-light:hover { background: #e8edf4; }
.btn-secondary { background: #475569; border: 0; }
.btn-link { font-weight: 500; text-decoration: none; }
.btn-close:focus { box-shadow: 0 0 0 .2rem rgba(var(--ring), .25); }

/* ---------- Formularios ---------- */
.form-control, .form-select, .ts-control { border-color: #d5dbe6; background-color: #fff; }
.form-control:hover:not(:focus), .ts-control:hover { border-color: #b8c2d4; }
.form-control:focus, .form-select:focus, .ts-wrapper.focus .ts-control { border-color: var(--brand); box-shadow: 0 0 0 .25rem rgba(var(--ring), .16); }
.input-group-text { background: #f8fafd; border-color: #d5dbe6; color: var(--muted); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(var(--ring), .2); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }

/* ---------- Insignias suaves ---------- */
.badge { border-radius: 999px; padding: .38em .75em; font-weight: 600; font-size: .72rem; }
.badge.text-bg-success { background: #dcfce7 !important; color: #15803d !important; }
.badge.text-bg-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.text-bg-warning { background: #fef3c7 !important; color: #b45309 !important; }
.badge.text-bg-info { background: #e0f2fe !important; color: #0369a1 !important; }
.badge.text-bg-primary { background: var(--soft-2) !important; color: var(--brand-ink) !important; }
.badge.text-bg-secondary { background: #eef1f6 !important; color: #475569 !important; }
.badge.text-bg-dark { background: #e2e8f0 !important; color: #0f172a !important; }
.badge.text-bg-light { background: #f1f5f9 !important; color: #475569 !important; border: 0 !important; }

/* ---------- Menús desplegables ---------- */
.dropdown-menu { border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 16px 40px rgba(16, 24, 40, .16); padding: .4rem; }
.dropdown-item { border-radius: .55rem; padding: .55rem .8rem; font-weight: 500; font-size: .9rem; }
.dropdown-item:hover { background: var(--soft); }

/* ---------- Ventanas emergentes (popups) ---------- */
.modal-backdrop.show { opacity: 1; background: rgba(11, 18, 32, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal.fade .modal-dialog { transform: translateY(18px) scale(.97); opacity: 0; transition: transform .26s cubic-bezier(.2, .9, .3, 1.1), opacity .2s ease; }
.modal.show .modal-dialog { transform: none; opacity: 1; }
.modal-content { border: 0; border-radius: 1.35rem; box-shadow: var(--shadow-lg); overflow: hidden; background: #fff; }
.modal-header { border: 0; padding: 1.15rem 1.35rem .35rem; align-items: center; }
.modal-header .modal-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -.015em; color: var(--ink); display: flex; align-items: center; gap: .65rem; }
.modal-header .modal-title > i, .modal-title .pop-ico {
    width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 1.1rem;
    background: linear-gradient(135deg, var(--soft-2), var(--soft)); color: var(--brand-ink); flex: 0 0 38px;
}
.modal-header .btn-close { background-color: #f1f5f9; border-radius: 50%; padding: .65rem; opacity: 1; background-size: .7em; transition: background-color .15s; }
.modal-header .btn-close:hover { background-color: #e2e8f0; }
.modal-body { padding: 1rem 1.35rem 1.2rem; }
.modal-footer { border: 0; background: #f8fafd; padding: .9rem 1.35rem; gap: .5rem; }
.modal-footer > * { margin: 0; }

/* Popup dinámico de formularios (ui.js · data-popup) */
.ui-popup .modal-body { padding-top: .6rem; }
.ui-popup .modal-body .card { border: 0; box-shadow: none; background: transparent; }
.ui-popup .modal-body .card-body { padding: 0; }
.ui-popup .modal-body .row.g-3 { --bs-gutter-y: 1rem; }
.ui-popup-loading { display: grid; place-items: center; padding: 3rem 0; color: var(--muted); }
.ui-popup-loading .spinner-border { width: 2rem; height: 2rem; color: var(--brand); }

/* Confirmaciones */
.ui-confirm .modal-content { border-radius: 1.5rem; }
.ui-confirm-icon { width: 68px; height: 68px; box-shadow: 0 0 0 8px rgba(0, 0, 0, .03); }
.ui-confirm-icon.is-danger { background: #fee2e2; color: #dc2626; box-shadow: 0 0 0 8px #fef2f2; }
.ui-confirm-icon.is-info { background: var(--soft-2); color: var(--brand-ink); box-shadow: 0 0 0 8px var(--soft); }
.ui-confirm-icon.is-success { background: #dcfce7; color: #16a34a; box-shadow: 0 0 0 8px #f0fdf4; }
.ui-confirm-title { letter-spacing: -.02em; }

/* En celular los popups suben desde abajo como una hoja */
@media (max-width: 575.98px) {
    .modal-dialog:not(.modal-fullscreen) { margin: 0; min-height: 100%; display: flex; align-items: flex-end; max-width: none; }
    .modal-dialog .modal-content { border-radius: 1.5rem 1.5rem 0 0; width: 100%; max-height: 92vh; }
    .modal.fade .modal-dialog { transform: translateY(100%); opacity: 1; transition: transform .3s cubic-bezier(.2, .9, .3, 1); }
    .modal.show .modal-dialog { transform: none; }
    .modal-dialog-scrollable .modal-content { max-height: 92vh; }
    .ui-confirm .modal-dialog { align-items: center; padding: 1.25rem; }
    .ui-confirm .modal-content { border-radius: 1.5rem; }
    .ui-confirm.fade .modal-dialog { transform: scale(.94); opacity: 0; }
    .ui-confirm.show .modal-dialog { transform: none; opacity: 1; }
    .modal-header::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #d5dbe6; }
    .ui-confirm .modal-header::before { display: none; }
    .modal-content { position: relative; }
}

/* ---------- Avisos ---------- */
.ui-toast { border: 1px solid var(--line); border-left-width: 5px; border-radius: 1rem; box-shadow: 0 14px 40px rgba(16, 24, 40, .2); }

/* ---------- Listas desplegables ---------- */
.ts-dropdown { border-radius: 1rem; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(16, 24, 40, .2); }
.ts-dropdown .option.active { background: var(--soft); color: var(--brand-ink); }

/* ---------- Pantalla de ingreso ---------- */
.auth-bg { background: #fff; }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth-art {
    display: none; position: relative; overflow: hidden; color: #fff; padding: 3.5rem;
    background:
        radial-gradient(900px 500px at 10% 0%, rgba(var(--ring), .6), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(var(--ring), .35), transparent 60%),
        linear-gradient(160deg, var(--side-1) 0%, var(--side-2) 100%);
}
.auth-art::after {
    content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { color: #fff; font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; max-width: 440px; }
.auth-art p { color: #b6c0e0; max-width: 420px; }
.auth-feature { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1.1rem; max-width: 420px; }
.auth-feature .ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); display: grid; place-items: center; flex: 0 0 40px; font-size: 1.1rem; }
.auth-feature strong { display: block; font-weight: 600; }
.auth-feature span { color: #aab6d8; font-size: .88rem; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: linear-gradient(180deg, var(--soft) 0%, #fff 100%); }
.auth-form-inner { width: 100%; max-width: 400px; }
.auth-form-wrap .card { border: 0; box-shadow: none; background: transparent; }
.auth-form-wrap .card-body { padding: 0 !important; }
@media (min-width: 992px) {
    .auth-split { grid-template-columns: 1.1fr 1fr; }
    .auth-art { display: flex; flex-direction: column; justify-content: space-between; }
}
.auth-brand-mini { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; color: #fff; }
.auth-brand-mini .brand-icon { width: 38px; height: 38px; }

/* ---------- Caja ---------- */
.count-result { background: linear-gradient(180deg, #f8faff, #f4f6fb); border: 1px solid var(--line); border-radius: 1rem; }
.cash-hero { box-shadow: 0 8px 22px rgba(180, 83, 9, .18); }

/* ---------- Punto de venta ---------- */
#scanInput { border-width: 2px; border-color: var(--soft-line); }
#scanInput:focus { border-color: var(--brand); }
.cart-box { scrollbar-width: thin; }
#results .list-group-item:hover, #custResults .list-group-item:hover { background: var(--soft); }
.drop-zone { border-radius: 1.1rem; border-color: var(--soft-line); background: var(--soft); }
.drop-zone:hover, .drop-zone.over { border-color: var(--brand); background: var(--soft-2); color: var(--brand-ink); }

/* ---------- Pequeños detalles ---------- */
a { color: var(--brand); }
.text-muted { color: var(--muted) !important; }
hr { border-color: var(--line); opacity: 1; }
.alert { border-radius: .9rem; }
.main-area { max-width: 1500px; width: 100%; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Selector de color (Configuración) y utilidades de marca */
.bg-indigo { background-color: var(--brand) !important; }
.theme-picker { display: flex; flex-wrap: wrap; gap: .75rem; }
.theme-opt { position: relative; cursor: pointer; text-align: center; font-size: .78rem; color: var(--ink-2); }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt .sw { display: block; width: 52px; height: 52px; border-radius: 16px; margin: 0 auto .3rem; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.theme-opt:hover .sw { transform: translateY(-2px); }
.theme-opt input:checked + .sw { box-shadow: 0 0 0 3px var(--brand), var(--shadow-md); }
.theme-opt input:checked ~ .nm { font-weight: 700; color: var(--ink); }
.theme-opt input:focus-visible + .sw { box-shadow: 0 0 0 3px rgba(var(--ring), .5); }

/* =====================================================================
   v1.9 · Tipografía profesional, códigos, WhatsApp, login móvil, responsive
   ===================================================================== */
:root { --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
body {
    --bs-body-font-size: .94rem; --bs-body-line-height: 1.55;
    font-size: .94rem; line-height: 1.55; font-weight: 400; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .page-title, .kpi-value, .brand-link, .modal-title, .auth-art h2, .auth-brand-mini, .hero-name {
    font-family: var(--font-head); letter-spacing: -.02em;
}
h4 { font-size: 1.25rem; font-weight: 700; } h5 { font-size: 1.08rem; font-weight: 700; } h6 { font-size: .98rem; font-weight: 700; }
.card-header { font-family: var(--font-head); font-weight: 700; letter-spacing: -.01em; }
.form-label { font-size: .8rem; font-weight: 600; color: #3b4a5f; letter-spacing: .005em; }
.table > tbody > tr > td { font-size: .9rem; }
.table thead th { font-family: var(--font-head); font-weight: 700; }
.btn { font-size: .9rem; }
.kpi-value { font-weight: 800; }
.badge { font-family: var(--font-head); }

/* Códigos de documento (PRD-000001, V-000123…) */
.doc-code {
    display: inline-block; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .76rem; font-weight: 600;
    letter-spacing: .02em; padding: .16rem .5rem; border-radius: .45rem; background: var(--soft); color: var(--brand-ink); white-space: nowrap;
}
.doc-code-field { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .03em; background: var(--soft) !important; color: var(--brand-ink); }

/* Todo texto escrito se ve en MAYÚSCULAS (el valor también se convierte al escribir) */
input:not([type]), input[type=text], input[type=search], textarea { text-transform: uppercase; }
input[data-no-upper], input[name=username], input[readonly], .ts-wrapper input { text-transform: none; }
::placeholder { text-transform: none; }

/* Vista previa del mensaje de WhatsApp */
.wa-preview {
    background: #dcf8c6; border-radius: .9rem .9rem .9rem .25rem; padding: .8rem 1rem; font-size: .82rem; line-height: 1.5;
    color: #0b3d20; max-height: 230px; overflow: auto; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); word-break: break-word;
}
.btn-success .bi-whatsapp, .modal-title .bi-whatsapp { color: inherit; }
.modal-title .bi-whatsapp { background: #dcfce7; color: #16a34a; }

/* Numeración en Configuración */
.seq-table th { font-size: .68rem; }
.seq-table .form-control-sm { min-height: 2.2rem; }

/* Campos con ícono (login) */
.input-group-icon > .input-group-text { background: #fff; border: 1px solid #d5dbe6; border-right: 0; border-radius: .7rem 0 0 .7rem; color: var(--brand); font-size: 1.1rem; padding: 0 .85rem; }
.input-group-icon > .form-control { border-left: 0; padding-left: .2rem; }
.input-group-icon > .form-control:focus { box-shadow: none; }
.input-group-icon:focus-within > .input-group-text, .input-group-icon:focus-within > .form-control, .input-group-icon:focus-within > .btn-eye { border-color: var(--brand); }
.input-group-icon:focus-within { border-radius: .7rem; box-shadow: 0 0 0 .25rem rgba(var(--ring), .16); }
.btn-eye { background: #fff; border: 1px solid #d5dbe6; border-left: 0; color: var(--muted); border-radius: 0 .7rem .7rem 0 !important; box-shadow: none !important; }
.btn-eye:hover { color: var(--brand); background: #fff; }
.login-head h3 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }

/* ---------- Login · celular y tablet ---------- */
.auth-mobile-hero { text-align: center; color: #fff; padding: 3.2rem 1.25rem 4.8rem; position: relative; z-index: 1; }
.hero-logo {
    width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 24px; display: grid; place-items: center; font-size: 2.1rem; color: #fff;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.hero-name { font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
.hero-sub { color: rgba(255, 255, 255, .72); font-size: .9rem; margin-top: .25rem; letter-spacing: .02em; }
.auth-mobile-foot { text-align: center; color: rgba(255, 255, 255, .5); font-size: .75rem; margin: 0; padding: 1rem 0 1.2rem; background: #fff; }
@media (max-width: 991.98px) {
    .auth-split { min-height: 100vh; min-height: 100dvh; }
    .auth-form-wrap {
        flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 0; min-height: 100vh; min-height: 100dvh; position: relative; overflow: hidden;
        background:
            radial-gradient(520px 320px at 85% -5%, rgba(var(--ring), .55), transparent 65%),
            radial-gradient(420px 300px at -10% 35%, rgba(var(--ring), .35), transparent 65%),
            linear-gradient(165deg, var(--side-1) 0%, var(--side-2) 100%);
    }
    .auth-form-wrap::before {
        content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
        background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px); background-size: 22px 22px;
        -webkit-mask-image: linear-gradient(180deg, #000, transparent 45%); mask-image: linear-gradient(180deg, #000, transparent 45%);
    }
    .auth-form-inner {
        position: relative; z-index: 2; flex: 1; max-width: none; width: 100%; background: #fff; margin-top: -2.2rem;
        border-radius: 2rem 2rem 0 0; padding: 2rem 1.5rem 1rem; box-shadow: 0 -18px 50px rgba(0, 0, 0, .25);
        animation: sheetUp .5s cubic-bezier(.2, .9, .3, 1) both;
    }
    .auth-form-inner > .card { max-width: 420px; margin: 0 auto; }
    .auth-mobile-foot { position: relative; z-index: 2; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 576px) and (max-width: 991.98px) { .auth-mobile-hero { padding-top: 4.5rem; } .auth-form-inner { padding-top: 2.5rem; } }

/* ---------- Responsive general ---------- */
.page-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-responsive { -webkit-overflow-scrolling: touch; }
@media (max-width: 767.98px) {
    .main-area { padding: .9rem; }
    h4 { font-size: 1.12rem; }
    .card-body { padding: 1rem; }
    .quick-actions { width: 100%; }
    .quick-actions .btn { flex: 1 1 calc(50% - .5rem); justify-content: center; }
    .table > :not(caption) > * > * { padding: .65rem .7rem; }
}
@media (max-width: 575.98px) {
    body { font-size: .92rem; }
    .topbar { padding: .55rem .75rem; }
    .page-title { font-size: 1.02rem; }
    .kpi-value { font-size: 1.15rem; }
    .btn { font-size: .88rem; }
    .d-flex.flex-wrap.gap-2 > .btn { flex: 1 1 auto; }
    .modal-body { padding: .9rem 1.1rem 1.1rem; }
}
