/* CRM Web Systems — celular primero. Colores tomados de la pantalla de acceso de referencia. */
:root {
    --bg: #003368;
    --bg2: #003870;
    --bg3: #193b64;
    --card: #2f5e8d;
    --card-2: #2a5683;
    --input: #2e6192;
    --accent: #0163c3;
    --accent-dark: #003870;
    --text: #f0ffff;
    --muted: #c9d8e8;
    --line: rgba(255, 255, 255, .16);
    --ok: #1f9d57;
    --danger: #b03a3a;
    --warn: #f5b942;
    --radius: 16px;
    --nav-h: 64px;
    --side-w: 252px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh; min-height: 100dvh;
    color: var(--text);
    background: var(--bg) linear-gradient(135deg, var(--bg) 0%, var(--bg2) 55%, var(--bg3) 100%) fixed;
    font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}
body.app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
a { color: #cfe6ff; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .6rem; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.i { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: -4px; }
.big { width: 56px; height: 56px; opacity: .85; }
:focus-visible { outline: 3px solid #8ec5ff; outline-offset: 2px; }
code, kbd, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: rgba(0, 0, 0, .25); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
kbd { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: .8rem; }
pre.code { background: rgba(0, 20, 45, .6); border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-size: .85rem; }
.mob-only { display: inline-flex; }
.desk-only { display: none !important; }

/* ---------- Barra superior con buscador grande ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    background: rgba(0, 40, 85, .94);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { border-radius: 10px; }
.brand small { font-weight: 500; opacity: .8; }
.search { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.search > .i { position: absolute; left: 14px; width: 22px; height: 22px; opacity: .85; pointer-events: none; }
.search input {
    width: 100%; height: 52px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--input); color: var(--text);
    font: inherit; font-size: 17px; padding: 0 16px 0 46px;
    -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: #d4e2f0; opacity: .8; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.kbd-hint { display: none; position: absolute; right: 12px; }
.search-results {
    position: absolute; top: 58px; left: 0; right: 0; z-index: 50;
    background: #0a3a6e; border: 1px solid var(--line); border-radius: 14px;
    max-height: 65vh; overflow: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.search-results a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); min-height: 52px; }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.sel { background: rgba(255, 255, 255, .1); }
.search-results small { color: var(--muted); }
.sr-empty { padding: 14px; color: var(--muted); }
.search-results .sr-all { font-weight: 600; color: #cfe6ff; }

/* ---------- Menú lateral (computador) ---------- */
.sidebar { display: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
    border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 500;
    background: none; border: 0; font: inherit; width: 100%; text-align: left; cursor: pointer;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.nav-item.active { background: rgba(1, 99, 195, .55); color: #fff; font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 14px; color: var(--muted); }
.kbd-help { padding: 10px 14px 4px; color: var(--muted); font-size: .8rem; }

/* ---------- Contenido ---------- */
.main { padding: 16px 14px 24px; max-width: 920px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--text); }
.subtitle { color: var(--muted); margin: -4px 0 14px; display: flex; align-items: center; gap: 8px; }
.block { margin: 22px 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card, .block-card { background: rgba(47, 94, 141, .88); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.block-card { margin: 16px 0; }
.block-card h2, .form h2 { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.block-card h3 { margin: 16px 0 8px; font-size: 1rem; }
.empty { text-align: center; padding: 36px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-line { padding: 4px 2px; }
.stack { display: grid; gap: 10px; margin: 16px 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.btn-row form { display: contents; }

/* ---------- Alertas ---------- */
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.alert-ok { background: rgba(31, 157, 87, .28); border-color: rgba(120, 230, 160, .5); }
.alert-error { background: rgba(176, 58, 58, .38); border-color: rgba(255, 150, 150, .6); }
.alert-warn { background: rgba(245, 185, 66, .22); border-color: rgba(245, 185, 66, .6); }
.alert a { color: #fff; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 16px; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .12); color: var(--text);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
    -webkit-appearance: none; appearance: none; touch-action: manipulation;
}
.btn:hover { background: rgba(255, 255, 255, .2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn-lg { min-height: 54px; font-size: 1.05rem; padding: 0 20px; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); border-color: rgba(120, 190, 255, .55); }
.btn-primary:hover { background: linear-gradient(135deg, #00418a, #0a74e0); }
.btn-ok, .btn-wa { background: var(--ok); border-color: rgba(150, 240, 190, .55); }
.btn-ok:hover, .btn-wa:hover { background: #25b567; }
.btn-danger { background: var(--danger); border-color: rgba(255, 170, 170, .5); }
.btn-danger:hover { background: #c64444; }
.btn-icon { width: 54px; min-width: 54px; padding: 0; }
.linklike { cursor: pointer; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 4px; }
.field-label { display: block; margin: 12px 0 6px; font-weight: 600; color: #e6f1fb; }
.input {
    width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--input); color: var(--text);
    font: inherit; font-size: 16px; /* 16px evita el zoom automático de iPhone */
    -webkit-appearance: none; appearance: none;
}
textarea.input { min-height: 96px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input::placeholder { color: #d4e2f0; opacity: .7; }
.input:disabled { opacity: .6; }
input[type="date"].input, input[type="time"].input { min-height: 50px; }
.file-input { padding: 10px; }
.two-cols { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.form-actions .btn { flex: 1 1 140px; }
.danger-zone { margin: 24px 0; padding-top: 16px; border-top: 1px dashed var(--line); }
.check { display: flex; align-items: center; gap: 12px; margin: 14px 0; min-height: 44px; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); flex: 0 0 auto; }
.optional { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 12px; }
.optional summary { min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .i { position: absolute; left: 14px; opacity: .8; pointer-events: none; }
.input-icon .input { padding-left: 46px; padding-right: 48px; }
.eye { position: absolute; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.inline-form { display: flex; gap: 10px; }
.inline-form .input { flex: 1; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 12px; }
.filter-bar .input { flex: 1; }

/* Selectores en botones (tipo de acción, etapa, período) */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-opt { position: relative; flex: 1 1 140px; display: block; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-opt span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 12px; text-align: center; border-radius: 12px; border: 1px solid var(--line); background: var(--input); font-weight: 600; }
.seg-opt input:checked + span { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5) inset; }
.seg-opt input:focus-visible + span { outline: 3px solid #8ec5ff; outline-offset: 2px; }
.seg-wrap .seg-opt { flex: 1 1 150px; }
.seg-wrap .st-ganado input:checked + span { background: var(--ok); }
.seg-wrap .st-perdido input:checked + span { background: var(--danger); }

/* Botones rápidos de fecha */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 0 -14px 12px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .1); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; flex: 0 0 auto;
}
.chip.on, .chip.active { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); border-color: #fff; }
.chip-n { background: rgba(0, 0, 0, .3); border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.chips-big .chip { flex: 1 1 40%; justify-content: center; min-height: 54px; font-size: 1.05rem; }
.date-quick .chips { margin-bottom: 10px; }
.date-preview { margin-top: 6px; color: #cfe6ff; font-weight: 600; min-height: 1.4em; }

/* ---------- Insignias de etapa ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; background: rgba(0, 20, 50, .6); border: 1px solid currentColor; }
.st-nuevo { color: #a6d4ff; }
.st-por_cotizar { color: #ffd27a; }
.st-enviada { color: #86e8f5; }
.st-ganado { color: #85e8a8; }
.st-perdido { color: #ffa3a3; }
.st-inactivo { color: #c9d8e8; }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; }
.card-list { background: rgba(47, 94, 141, .88); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
a.row:hover { background: rgba(255, 255, 255, .08); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { overflow-wrap: anywhere; }
.row-main small { color: var(--muted); overflow-wrap: anywhere; }
.row-main .match { color: #ffe3a3; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { display: contents; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent-dark), var(--accent)); font-weight: 700; border: 1px solid var(--line); }
.menu-ic { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); }
.list-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; gap: 10px; }
.next { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.next.late, .when.late { color: #ffb0b0; font-weight: 700; }
.next.today { color: #ffe3a3; font-weight: 700; }
.row-header { display: none; }
.cell { display: none; }
.quotes-list .row { flex-wrap: wrap; }
.quotes-list .row-main { flex: 1 1 100%; }
.quotes-list .cell { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.quotes-list .cell[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
.quotes-list .cell-amount { font-weight: 700; }
.pager { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; gap: 10px; }
.menu-list .row { min-height: 68px; }
.client-line { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.current-file { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0; }
.stat { background: rgba(47, 94, 141, .88); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 1.2rem; }
.stat span { color: var(--muted); font-size: .8rem; }
.bullets { padding-left: 18px; margin: 8px 0 0; }
.status-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.status-list li { padding-left: 28px; position: relative; }
.status-list li::before { content: ""; position: absolute; left: 4px; top: .35em; width: 14px; height: 14px; border-radius: 50%; }
.status-list .ok::before { background: #4ee08a; }
.status-list .bad::before { background: #ff8a8a; }

/* ---------- Hoy: tarjetas de acción ---------- */
.group { margin: 18px 0; }
.group-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 10px; }
.count { background: rgba(0, 0, 0, .3); border-radius: 999px; padding: 0 10px; font-size: .9rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-late { background: #ff7b7b; } .dot-today { background: #ffd27a; }
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
.act { display: flex; flex-direction: column; gap: 8px; transition: opacity .25s, transform .25s; }
.act.is-late { border-left: 5px solid #ff7b7b; }
.act.leaving { opacity: 0; transform: translateX(30px); }
.act-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(0, 20, 50, .5); font-size: .9rem; }
.kind-meeting { color: #ffe3a3; }
.when { color: var(--muted); font-size: .9rem; }
.act-client { color: var(--text); text-decoration: none; display: flex; flex-direction: column; font-size: 1.15rem; }
.act-client small { color: var(--muted); font-size: .9rem; }
.act-note { margin: 0; font-size: 1.02rem; }
.act-quote { margin: 0; font-size: .9rem; display: flex; gap: 6px; align-items: baseline; }
.act-buttons { display: flex; gap: 8px; margin-top: 4px; }
.act-buttons .btn { flex: 1 1 0; }
.act-buttons .btn-icon { flex: 0 0 54px; }
.push-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: var(--radius); background: rgba(1, 99, 195, .35); border: 1px solid rgba(140, 200, 255, .5); margin-bottom: 14px; }
.push-banner p { margin: 4px 0 0; }

/* ---------- Ficha de cliente ---------- */
.contact-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin-bottom: 4px; }
.quick-note { display: flex; gap: 10px; margin-bottom: 10px; }
.quick-note .input { flex: 1; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notes li { position: relative; background: rgba(47, 94, 141, .88); border: 1px solid var(--line); border-radius: 12px; padding: 10px 52px 10px 12px; }
.notes li p { margin: 0 0 2px; overflow-wrap: anywhere; }
.notes .icon-btn { position: absolute; right: 4px; top: 4px; }
.notes li.new { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: rgba(120, 200, 255, .6); } to { background: rgba(47, 94, 141, .88); } }
.details { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; }
.details dt { color: var(--muted); } .details dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Planes ---------- */
.cat { margin-bottom: 14px; padding: 0; }
.cat > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; min-height: 58px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.1rem; }
.cat > summary::-webkit-details-marker { display: none; }
.cat-name { display: flex; align-items: center; gap: 10px; }
.cat-body { padding: 0 14px 14px; }
.cat-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.plans { display: grid; gap: 12px; grid-template-columns: 1fr; }
.plan { background: rgba(0, 30, 70, .35); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.plan.is-off { opacity: .7; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-top h3 { font-size: 1.1rem; overflow-wrap: anywhere; }
.plan-price { margin: 0; font-size: 1.1rem; }
.plan-desc { margin: 0; color: #e6f1fb; overflow-wrap: anywhere; }
.plan-buttons { display: flex; gap: 8px; margin-top: 6px; }
.plan-buttons .btn { flex: 1; }
.file-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file-name { display: inline-flex; align-items: center; gap: 6px; color: #cfe6ff; text-decoration: none; overflow-wrap: anywhere; }
.file-name:hover { text-decoration: underline; }
.plan-file { margin-top: 4px; }

/* ---------- Buscador: selector de cliente ---------- */
.picker { position: relative; }
.picker-results { position: absolute; z-index: 10; left: 0; right: 0; top: 56px; background: #0a3a6e; border: 1px solid var(--line); border-radius: 12px; max-height: 260px; overflow: auto; }
.picker-results button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 52px; padding: 8px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.picker-results button:hover { background: rgba(255, 255, 255, .1); }
.picker-chosen { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(31, 157, 87, .3); border: 1px solid rgba(120, 230, 160, .5); }

/* ---------- Hoja inferior (posponer) y avisos ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 10, 30, .6); z-index: 60; }
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 560px; margin: 0 auto;
    background: #0d3f75; border: 1px solid var(--line); border-radius: 22px 22px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .4);
}
.toast {
    position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); z-index: 70;
    max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #062a52; border: 1px solid rgba(140, 200, 255, .5); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
}
.toast a { color: #fff; font-weight: 700; white-space: nowrap; }
.toast.err { border-color: rgba(255, 150, 150, .8); }

/* ---------- Barra inferior y botón + (celular) ---------- */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(0, 36, 76, .97); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
}
.bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--nav-h); color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 600; }
.bn-item .i { width: 24px; height: 24px; }
.bn-item.active { color: #fff; }
.bn-item.active .i { background: rgba(1, 99, 195, .7); border-radius: 10px; padding: 4px; width: 36px; height: 28px; box-sizing: border-box; }
.fab {
    position: fixed; right: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 35;
    width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; border: 1px solid rgba(160, 210, 255, .7);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}
.fab .i { width: 28px; height: 28px; }

/* ---------- Acceso / instalación ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 20px; }
.login-card {
    width: 100%; max-width: 440px; padding: 28px 24px 26px; border-radius: 28px;
    background: rgba(47, 94, 141, .88); border: 1px solid rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.login-head { text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.login-head img { border-radius: 18px; }
.login-head h1 { font-size: 1.7rem; margin-top: 8px; }
.login-head p { margin: 2px 0 0; color: var(--muted); letter-spacing: .12em; }
.login-form .btn-block { margin-top: 6px; }
.setup-card { max-width: 560px; }
.setup-card h2 { margin: 22px 0 8px; }
.install-card { margin: 16px 0; }
.logout-form { margin: 18px 0; }

/* ---------- Tableta ---------- */
@media (min-width: 640px) {
    .main { padding: 20px 24px 28px; }
    .two-cols { grid-template-columns: 1fr 1fr; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .plans { grid-template-columns: repeat(2, 1fr); }
    .contact-buttons { max-width: 560px; }
}

/* ---------- Computador (menú lateral, listas amplias) ---------- */
@media (min-width: 900px) {
    body.app { padding-left: var(--side-w); padding-bottom: 0; }
    .mob-only, .bottomnav, .fab { display: none !important; }
    .desk-only { display: inline-flex !important; }
    .sidebar {
        display: flex; flex-direction: column; position: fixed; z-index: 45; left: 0; top: 0; bottom: 0; width: var(--side-w);
        padding: 16px 12px; background: rgba(0, 36, 76, .97); border-right: 1px solid var(--line); overflow-y: auto;
    }
    .side-brand { padding: 4px 8px 18px; font-size: 1.1rem; }
    .topbar { padding: 14px 32px; gap: 16px; }
    .search { max-width: 680px; }
    .search input { height: 50px; }
    .kbd-hint { display: inline-block; }
    .main { max-width: 1180px; padding: 26px 32px 40px; }
    .cards { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
    .plans { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
    .toast { bottom: 24px; left: calc(var(--side-w) + 24px); right: auto; margin: 0; }
    .sheet { bottom: 50%; transform: translateY(50%); border-radius: 22px; max-width: 480px; left: calc(50% + var(--side-w) / 2 - 240px); right: auto; width: 480px; margin: 0; }
    .row { min-height: 60px; }
    /* Cotizaciones como tabla */
    .quotes-list .row, .row-header { display: grid; grid-template-columns: minmax(0, 3fr) 110px 110px 150px 190px; gap: 14px; align-items: center; }
    .quotes-list .row { flex-wrap: nowrap; }
    .row-header { padding: 10px 14px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
    .quotes-list .cell { display: block; }
    .quotes-list .cell[data-label]::before { content: none; }
    .quotes-list .row-main { flex: none; }
    .form { max-width: 720px; }
    .stage-form { max-width: 720px; }
    .stats { max-width: 560px; }
}

@media (min-width: 1400px) {
    .main { max-width: 1280px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
.center { text-align: center; }
