/* ════════════════════════════════════════════════════════════════════════════
   Pantalla de los planes de Facturación (FacturacionLayout, rutas /app).
   Pensada para el celular: barra inferior con «Facturar» al centro; desde 900 px la
   barra pasa a una columna a la izquierda. Misma paleta del design system (slate +
   esmeralda). Todo va bajo .fx-app para no tocar el POS ni la administración.
   ════════════════════════════════════════════════════════════════════════════ */

.fx-app {
    --fx-bg: #f1f5f9;
    --fx-surface: #ffffff;
    --fx-ink: #0f172a;
    --fx-ink-2: #334155;
    --fx-muted: #64748b;
    --fx-line: #e2e8f0;
    --fx-accent: #10b981;
    --fx-accent-strong: #047857;
    --fx-accent-tint: #ecfdf5;
    --fx-warn: #b45309;
    --fx-warn-tint: #fffbeb;
    --fx-bad: #dc2626;
    --fx-bad-tint: #fef2f2;
    --fx-info: #1d4ed8;
    --fx-info-tint: #eff6ff;
    --fx-chrome: #0f172a;
    --fx-radius: 16px;
    --fx-barra: 68px;

    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: var(--fx-bg);
    color: var(--fx-ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

.fx-app *, .fx-app *::before, .fx-app *::after { box-sizing: border-box; }
.fx-app button { font: inherit; }
.fx-app :focus-visible { outline: 2px solid var(--fx-info); outline-offset: 2px; }

/* ── Columna de escritorio ─────────────────────────────────────────────────── */
.fx-rail { display: none; }

@media (min-width: 900px) {
    .fx-app { grid-template-columns: 248px minmax(0, 1fr); }
    .fx-rail {
        display: flex; flex-direction: column; gap: 4px;
        position: sticky; top: 0; height: 100vh; height: 100dvh;
        padding: 20px 14px; background: var(--fx-chrome); color: #cbd5e1;
    }
}

.fx-rail-marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.fx-rail-marca b { font-weight: 800; letter-spacing: -.01em; }
.fx-rail-marca small { display: block; color: #94a3b8; font-size: .76rem; font-weight: 500; }
.fx-rail-facturar {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 4px 14px;
    height: 46px; border: 0; border-radius: 14px; cursor: pointer; text-decoration: none;
    background: var(--fx-accent-strong); color: #fff; font-weight: 700;
    box-shadow: 0 8px 18px rgba(4, 120, 87, .35);
}
.fx-rail-facturar:hover { background: #065f46; color: #fff; }
.fx-rail a.fx-rail-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    color: #cbd5e1; text-decoration: none; font-weight: 600; font-size: .93rem;
}
.fx-rail a.fx-rail-item:hover { background: #1e293b; color: #fff; }
.fx-rail a.fx-rail-item.active { background: rgba(16, 185, 129, .16); color: #6ee7b7; }
.fx-rail-pie { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #1e293b; font-size: .8rem; color: #94a3b8; }

/* ── Barra superior ────────────────────────────────────────────────────────── */
.fx-main { min-width: 0; display: flex; flex-direction: column; }

.fx-top {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 8px;
    min-height: 56px; padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
    background: var(--fx-chrome); color: #fff;
}
.fx-top-titulo { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.fx-top-titulo b { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-top-titulo small { color: #94a3b8; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-top-chip {
    display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 99px;
    font-size: .72rem; font-weight: 700; background: rgba(255, 255, 255, .12); color: #fff; white-space: nowrap;
}
.fx-top-chip.offline { background: #b91c1c; }
.fx-top-chip.soporte { background: #b45309; }
.fx-avatar {
    width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
    background: rgba(16, 185, 129, .22); color: #a7f3d0; font-weight: 800; font-size: .82rem;
    display: grid; place-items: center;
}
.fx-menu-usuario { min-width: 220px; padding: 6px 0; }
.fx-menu-usuario .fx-menu-cab { padding: 8px 16px 10px; border-bottom: 1px solid var(--fx-line, #e2e8f0); margin-bottom: 4px; }
.fx-menu-usuario .fx-menu-cab b { display: block; }
.fx-menu-usuario .fx-menu-cab small { color: #64748b; }

/* ── Contenido ─────────────────────────────────────────────────────────────── */
.fx-content {
    width: 100%; max-width: 980px; margin: 0 auto;
    padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(var(--fx-barra) + 28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    display: flex; flex-direction: column; gap: 14px;
}
.fx-content.sin-barra { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) {
    .fx-content, .fx-content.sin-barra { padding: 24px 32px 48px; gap: 16px; }
}

.fx-aviso-offline {
    display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 10px 12px;
    background: var(--fx-bad-tint); color: #7f1d1d; font-size: .86rem;
}

/* ── Barra inferior (teléfono) ─────────────────────────────────────────────── */
.fx-bottom {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
    min-height: var(--fx-barra);
    padding: 0 max(6px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(6px, env(safe-area-inset-left, 0px));
    background: var(--fx-surface); border-top: 1px solid var(--fx-line);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .06);
}
@media (min-width: 900px) { .fx-bottom { display: none; } }

.fx-bottom a.fx-tab {
    display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 12px;
    color: var(--fx-muted); text-decoration: none; font-size: .68rem; font-weight: 600;
}
.fx-bottom a.fx-tab .mud-icon-root { font-size: 1.45rem; }
.fx-bottom a.fx-tab.active { color: var(--fx-accent-strong); }
.fx-bottom a.fx-fab-wrap { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--fx-accent-strong); font-size: .68rem; font-weight: 800; }
.fx-fab {
    width: 58px; height: 58px; margin-top: -26px; border-radius: 20px;
    display: grid; place-items: center; background: var(--fx-accent-strong); color: #fff;
    box-shadow: 0 10px 22px rgba(4, 120, 87, .38);
}
.fx-fab .mud-icon-root { font-size: 2rem; }

/* ── Encabezados de página ─────────────────────────────────────────────────── */
.fx-pagina-cab { display: flex; align-items: center; gap: 12px; }
.fx-pagina-cab h1 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.fx-pagina-cab small { display: block; color: var(--fx-muted); font-size: .8rem; font-weight: 500; }
.fx-pagina-cab .fx-cab-acciones { margin-left: auto; display: flex; gap: 8px; }
.fx-volver {
    width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--fx-line); background: var(--fx-surface); color: var(--fx-ink); text-decoration: none;
}

.fx-sec-t {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px;
    font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fx-muted);
}
.fx-sec-t a, .fx-sec-t button { text-transform: none; letter-spacing: 0; font-size: .84rem; color: var(--fx-accent-strong); font-weight: 700; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; }

/* ── Tarjetas ──────────────────────────────────────────────────────────────── */
.fx-card { background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 14px 16px; min-width: 0; }
.fx-card-t { font-weight: 700; margin: 0 0 8px; font-size: .95rem; }

.fx-hero { background: var(--fx-chrome); color: #f8fafc; border-radius: 20px; padding: 18px; display: grid; gap: 10px; }
.fx-hero .fx-lbl { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: #94a3b8; font-weight: 700; }
.fx-hero .fx-amt { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fx-hero .fx-sub { color: #cbd5e1; font-size: .82rem; }
.fx-cupo { display: grid; gap: 6px; }
.fx-cupo-barra { height: 7px; border-radius: 99px; background: #1e293b; overflow: hidden; }
.fx-cupo-barra span { display: block; height: 100%; border-radius: 99px; background: var(--fx-accent); }
.fx-cupo-barra span.alto { background: #f59e0b; }
.fx-cupo-barra span.lleno { background: #ef4444; }
.fx-cupo-fila { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: #cbd5e1; }
.fx-cupo-fila a { color: #6ee7b7; font-weight: 700; text-decoration: none; }

.fx-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .fx-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fx-kpi { background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.fx-kpi span { color: var(--fx-muted); font-size: .76rem; font-weight: 600; }
.fx-kpi b { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-kpi small { font-size: .74rem; font-weight: 700; }
.fx-kpi small.sube { color: var(--fx-accent-strong); }
.fx-kpi small.baja { color: var(--fx-bad); }

.fx-accesos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-acceso {
    display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; text-align: left; cursor: pointer; text-decoration: none;
    background: var(--fx-surface); border: 1px solid var(--fx-line); color: var(--fx-ink); min-width: 0;
}
.fx-acceso b { font-size: .88rem; }
.fx-acceso span { font-size: .76rem; color: var(--fx-muted); }

/* ── Botones ───────────────────────────────────────────────────────────────── */
.fx-btn {
    appearance: none; border: 0; cursor: pointer; border-radius: 14px; min-height: 48px; padding: 0 18px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    font-weight: 700; font-size: .95rem; text-decoration: none; transition: background .15s ease;
}
.fx-btn .mud-icon-root { font-size: 1.25rem; }
.fx-btn:disabled { opacity: .55; cursor: default; }
.fx-btn.pri { background: var(--fx-accent-strong); color: #fff; box-shadow: 0 8px 18px rgba(4, 120, 87, .25); }
.fx-btn.pri:hover:not(:disabled) { background: #065f46; }
.fx-btn.sec { background: var(--fx-surface); color: var(--fx-ink); border: 1px solid var(--fx-line); }
.fx-btn.sec:hover:not(:disabled) { background: #f8fafc; }
.fx-btn.wa { background: #128c4b; color: #fff; }
.fx-btn.wa:hover:not(:disabled) { background: #0f7a41; }
.fx-btn.peligro { background: var(--fx-surface); color: var(--fx-bad); border: 1px solid #fecaca; }
.fx-btn.texto { background: none; color: var(--fx-muted); min-height: 40px; }
.fx-btn.chico { min-height: 38px; width: auto; padding: 0 14px; font-size: .85rem; border-radius: 11px; }
.fx-acciones { display: grid; gap: 10px; }
@media (min-width: 700px) { .fx-acciones.fila { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }

/* Barra de acción fija abajo (asistente de facturar). */
.fx-barra-accion {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 44;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--fx-surface); border-top: 1px solid var(--fx-line); box-shadow: 0 -6px 20px rgba(15, 23, 42, .06);
    display: flex; gap: 10px;
}
.fx-barra-accion .fx-btn { flex: 1; }
.fx-barra-accion .fx-total-mini { display: grid; align-content: center; min-width: 0; padding-right: 4px; }
.fx-barra-accion .fx-total-mini span { font-size: .72rem; color: var(--fx-muted); font-weight: 600; }
.fx-barra-accion .fx-total-mini b { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 900px) {
    .fx-barra-accion { position: static; padding: 0; background: none; border: 0; box-shadow: none; }
}

/* ── Listas ────────────────────────────────────────────────────────────────── */
.fx-lista { background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); overflow: hidden; }
.fx-fila {
    appearance: none; background: none; border: 0; border-bottom: 1px solid var(--fx-line); width: 100%; text-align: left;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 12px 16px; cursor: pointer;
    color: inherit; text-decoration: none;
}
.fx-fila:last-child { border-bottom: 0; }
.fx-fila:hover { background: #f8fafc; }
.fx-fila.estatica { cursor: default; }
.fx-fila.estatica:hover { background: none; }
.fx-fila .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-fila .m { color: var(--fx-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-fila .a { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fx-fila.con-icono { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; }
.fx-fila .ico {
    width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
    background: var(--fx-accent-tint); color: var(--fx-accent-strong); grid-row: span 2;
}
.fx-fila.con-icono .ico { grid-row: auto; }
.fx-fila .chev { color: var(--fx-muted); font-size: .85rem; }

.fx-pill { display: inline-block; justify-self: end; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.fx-pill.ok { background: var(--fx-accent-tint); color: var(--fx-accent-strong); }
.fx-pill.espera { background: var(--fx-warn-tint); color: var(--fx-warn); }
.fx-pill.no { background: var(--fx-bad-tint); color: var(--fx-bad); }
.fx-pill.gris { background: #f1f5f9; color: var(--fx-muted); }
.fx-pill.info { background: var(--fx-info-tint); color: var(--fx-info); }

.fx-vacio { display: grid; justify-items: center; gap: 6px; padding: 32px 16px; text-align: center; color: var(--fx-muted); }
.fx-vacio .mud-icon-root { font-size: 2.4rem; color: #cbd5e1; }
.fx-vacio b { color: var(--fx-ink-2); }

.fx-cargando { display: grid; gap: 10px; }
.fx-esqueleto { height: 58px; border-radius: 14px; background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%); background-size: 200% 100%; animation: fx-brillo 1.3s ease-in-out infinite; }
@keyframes fx-brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .fx-esqueleto { animation: none; } }

/* ── Chips de filtro ───────────────────────────────────────────────────────── */
.fx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-chips.desliza { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fx-chips.desliza::-webkit-scrollbar { display: none; }
.fx-chip {
    appearance: none; cursor: pointer; flex: none; border: 1px solid var(--fx-line); background: var(--fx-surface); color: var(--fx-ink-2);
    border-radius: 99px; padding: 7px 14px; font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.fx-chip[aria-pressed="true"] { background: var(--fx-ink); border-color: var(--fx-ink); color: #fff; }

.fx-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e2e8f0; border-radius: 12px; padding: 3px; }
.fx-seg button { appearance: none; border: 0; background: none; border-radius: 9px; min-height: 38px; font-weight: 600; font-size: .85rem; color: var(--fx-muted); cursor: pointer; }
.fx-seg button[aria-pressed="true"] { background: var(--fx-surface); color: var(--fx-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* ── Campos ────────────────────────────────────────────────────────────────── */
.fx-campo { display: grid; gap: 6px; min-width: 0; }
.fx-campo > label, .fx-etiqueta { font-size: .74rem; font-weight: 700; color: var(--fx-muted); text-transform: uppercase; letter-spacing: .05em; }
.fx-input {
    width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid #cbd5e1;
    background: var(--fx-surface); color: var(--fx-ink); font: inherit; font-size: 16px;   /* 16 px: iOS no hace zoom */
}
.fx-input:focus { outline: none; border-color: var(--fx-accent); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.fx-input.num { text-align: right; font-variant-numeric: tabular-nums; }
textarea.fx-input { padding: 12px 14px; min-height: 88px; resize: vertical; }
.fx-buscar { position: relative; }
.fx-buscar .mud-icon-root { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fx-muted); pointer-events: none; }
.fx-buscar .fx-input { padding-left: 42px; }
.fx-fila-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-ayuda { font-size: .78rem; color: var(--fx-muted); }
.fx-error { font-size: .82rem; color: var(--fx-bad); font-weight: 600; }

/* ── Avisos ────────────────────────────────────────────────────────────────── */
.fx-alerta { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; font-size: .86rem; }
.fx-alerta .mud-icon-root { flex: none; margin-top: 1px; }
.fx-alerta b { display: block; }
.fx-alerta.mal { background: var(--fx-bad-tint); color: #7f1d1d; }
.fx-alerta.info { background: var(--fx-info-tint); color: #1e3a8a; }
.fx-alerta.ojo { background: var(--fx-warn-tint); color: #78350f; }
.fx-alerta.bien { background: var(--fx-accent-tint); color: #064e3b; }
.fx-alerta a, .fx-alerta button.link { color: inherit; font-weight: 700; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }

/* ── Asistente de facturar ─────────────────────────────────────────────────── */
.fx-pasos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fx-pasos span { height: 5px; border-radius: 99px; background: #cbd5e1; }
.fx-pasos span.on { background: var(--fx-accent); }
.fx-wiz { display: grid; gap: 14px; }
@media (min-width: 900px) {
    .fx-wiz.dos { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
    .fx-wiz.dos > .fx-resumen { position: sticky; top: 76px; }
}

.fx-linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--fx-line); }
.fx-linea:last-child { border-bottom: 0; }
.fx-linea .t { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.fx-linea .m { color: var(--fx-muted); font-size: .78rem; }
.fx-linea .a { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.fx-linea .quitar { grid-column: 2; justify-self: end; border: 0; background: none; color: var(--fx-muted); cursor: pointer; padding: 2px; border-radius: 8px; }
.fx-linea .quitar:hover { color: var(--fx-bad); }
.fx-linea-acciones { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.fx-cant { display: inline-flex; align-items: center; border: 1px solid var(--fx-line); border-radius: 10px; overflow: hidden; }
.fx-cant button { border: 0; background: #f8fafc; width: 34px; height: 32px; cursor: pointer; font-weight: 800; color: var(--fx-ink-2); }
.fx-cant span { min-width: 40px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.fx-agregar {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; cursor: pointer;
    border: 1.5px dashed #a7f3d0; border-radius: 14px; background: var(--fx-accent-tint); color: var(--fx-accent-strong); font-weight: 700;
}

.fx-totales { display: grid; gap: 4px; font-size: .88rem; }
.fx-totales div { display: flex; justify-content: space-between; gap: 10px; color: var(--fx-muted); font-variant-numeric: tabular-nums; }
.fx-totales .grande { color: var(--fx-ink); font-size: 1.3rem; font-weight: 800; margin-top: 4px; }

.fx-kv { display: grid; gap: 8px; font-size: .88rem; }
.fx-kv div { display: flex; justify-content: space-between; gap: 12px; }
.fx-kv span { color: var(--fx-muted); flex: none; }
.fx-kv b { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fx-clave { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .74rem; color: var(--fx-muted); word-break: break-all; }

.fx-listo { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 22px 8px 6px; }
.fx-listo .fx-listo-ico { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--fx-accent-strong); box-shadow: 0 14px 30px rgba(4, 120, 87, .3); }
.fx-listo .fx-listo-ico.espera { background: #d97706; box-shadow: 0 14px 30px rgba(217, 119, 6, .28); }
.fx-listo .fx-listo-ico .mud-icon-root { font-size: 2.6rem; }
.fx-listo h2 { margin: 6px 0 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.fx-listo p { margin: 0; color: var(--fx-muted); font-size: .9rem; max-width: 46ch; }

/* Hoja de búsqueda (agregar servicio): ocupa la pantalla en el teléfono. */
.fx-hoja-fondo { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; justify-content: center; }
.fx-hoja {
    width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--fx-bg); border-radius: 22px 22px 0 0;
    padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    display: grid; gap: 12px; align-content: start;
}
@media (min-width: 700px) { .fx-hoja-fondo { align-items: center; } .fx-hoja { border-radius: 22px; max-height: 86vh; } }
.fx-hoja-cab { display: flex; align-items: center; gap: 10px; }
.fx-hoja-cab h2 { margin: 0; font-size: 1.1rem; font-weight: 800; flex: 1; }
.fx-cerrar { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--fx-line); background: var(--fx-surface); cursor: pointer; display: grid; place-items: center; color: var(--fx-ink); }

/* El cliente del cobro (ClienteComprobante) se ve como una tarjeta más. */
.fx-app .fx-cliente-cobro { background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 14px 16px; }

/* Grilla de dos columnas en escritorio para pantallas de lista + detalle. */
.fx-grid-2 { display: grid; gap: 14px; }
@media (min-width: 900px) { .fx-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Barras simples de los reportes. */
.fx-barras { display: grid; gap: 8px; }
.fx-barra-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: .84rem; }
.fx-barra-item .t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.fx-barra-item .a { font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-barra-item .pista { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.fx-barra-item .pista span { display: block; height: 100%; border-radius: 99px; background: var(--fx-accent); }
.fx-meses { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; height: 140px; }
.fx-meses .col { display: grid; align-content: end; justify-items: center; gap: 4px; height: 100%; min-width: 0; }
.fx-meses .col span { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--fx-accent); min-height: 2px; }
.fx-meses .col span.actual { background: var(--fx-accent-strong); }
.fx-meses .col small { font-size: .62rem; color: var(--fx-muted); }

/* ── Numeración: el último emitido de cada tipo ─────────────────────────────── */
.fx-ultimos { display: grid; gap: 10px; }
.fx-ultimo { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 2px 12px; align-items: center; }
.fx-ultimo > span { font-weight: 600; color: var(--fx-ink); }
.fx-ultimo > small { grid-column: 1 / -1; color: var(--fx-muted); font-size: .76rem; }

/* ── Primeros pasos: cada paso y la lista de actividades económicas ───────────── */
.fx-paso-cuerpo { display: grid; gap: 12px; min-width: 0; }
.fx-act { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--fx-line); }
.fx-act:last-child { border-bottom: 0; }
.fx-act input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--fx-accent-strong); margin: 0; }
.fx-act label { display: grid; gap: 2px; min-width: 0; cursor: pointer; }
.fx-act label b { font-size: .9rem; font-weight: 600; }
.fx-act label small { color: var(--fx-muted); font-size: .76rem; }

/* Inicio: la tarjeta de los primeros pasos. */
.fx-primeros { display: grid; gap: 10px; text-decoration: none; color: inherit; border-color: #bbf7d0; background: linear-gradient(135deg, #ecfdf5, #f0f9ff); }
.fx-primeros b { display: block; font-size: 1rem; }
.fx-primeros span.sub { color: var(--fx-muted); font-size: .84rem; }

