/* ─────────────────────────────────────────────────────────────────────────────
   STATERA WEB — Estilos (antes dentro de index.html; separados para que el navegador los reutilice entre visitas)
   ───────────────────────────────────────────────────────────────────────────── */
        /* ── Reset & Base ── */
        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
        :root {
            --bg: #5C3A24;
            --bg-rgb: 92, 58, 36;
            --bg-card: rgba(245, 240, 225, 0.05);
            --bg-glass: rgba(92, 58, 36, 0.85);
            --text: #F5F0E1;
            --text-rgb: 245, 240, 225;
            --text-secondary: rgba(245, 240, 225, 0.65);
            --brand: #F5F0E1;
            --brand-rgb: 245, 240, 225;
            --brand-soft: rgba(245, 240, 225, 0.1);
            --border: rgba(245, 240, 225, 0.08);
            --color-light: #F5F0E1;
            --color-light-rgb: 245, 240, 225;
            --color-dark: #5C3A24;
            --color-dark-rgb: 92, 58, 36;
            --color-adaptive-bg: #F5F0E1;
            --color-adaptive-bg-rgb: 245, 240, 225;
            --color-adaptive-text: #5C3A24;
            --color-adaptive-text-rgb: 92, 58, 36;
            --radius-sm: 14px;
            --radius: 28px;
            --radius-lg: 40px;
            --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
            --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.3);
        }
        html { scroll-behavior: smooth; }
        /* Barras de desplazamiento: todas como la del panel de Ajustes (finita, del color del tema, sin flechas) */
        ::-webkit-scrollbar { width: 4px; height: 4px; }
        /* Con margen arriba y abajo: la barrita no llega a las esquinas redondeadas de los recuadros */
        ::-webkit-scrollbar-track { background: transparent; margin-block: 16px; }
        /* La de la página entera va de punta a punta */
        html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { margin-block: 0; }
        ::-webkit-scrollbar-thumb { background: rgba(var(--text-rgb), 0.15); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(var(--text-rgb), 0.28); }
        ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
        ::-webkit-scrollbar-corner { background: transparent; }
        /* Firefox no tiene esos estilos: barra fina del mismo color */
        @supports not selector(::-webkit-scrollbar) {
            * { scrollbar-width: thin; scrollbar-color: rgba(var(--text-rgb), 0.15) transparent; }
        }
        /* Botones y campos con la misma letra de la página (el navegador les pone otra por defecto) */
        button, input, select, textarea, option { font-family: inherit; }
        body {
            font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg);
            color: var(--text);
            line-height: 1.7;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        /* ── Typography ── */
        h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; }
        p { opacity: 0.85; }
        a { color: var(--brand); text-decoration: none; transition: var(--transition); }
        a:hover { opacity: 0.8; }

        /* ── Container ── */
        .container {
            width: 100%;
            max-width: 1440px;
            margin: 0 auto;
            padding: 0 48px;
        }

        /* ── Dashboard Styles ── */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 24px;
            margin-top: 32px;
        }
        .dash-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 24px;
            backdrop-filter: blur(10px);
            display: flex;
            flex-direction: column;
            transition: var(--transition);
            overflow: visible;
        }
        .dash-card:hover { border-color: rgba(245, 240, 225, 0.3); transform: translateY(-4px); }
        .dash-card-title { font-size: 14px; font-weight: 700; color: var(--text-secondary); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
        .dash-card-value { font-size: 32px; font-weight: 800; color: var(--text); }
        .dash-card-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
        
        .chart-container { position: relative; width: 100%; height: 260px; margin-top: auto; }
        
        .tx-item {
            display: flex;
            flex-direction: column;
            padding: 16px;
            background: rgba(245, 240, 225, 0.03);
            border-radius: 20px;
            margin-bottom: 12px;
            border: 1px solid rgba(245, 240, 225, 0.05);
            transition: var(--transition);
        }
        .tx-item:last-child { margin-bottom: 0; }
        .tx-item:hover { background: rgba(245, 240, 225, 0.06); border-color: rgba(245, 240, 225, 0.1); }
        .tx-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-right: 14px; flex-shrink: 0; }
        .tx-main-row { display: flex; align-items: center; width: 100%; margin-bottom: 12px; }
        .tx-name { font-weight: 800; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .tx-details-row { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; color: var(--text-secondary); opacity: 0.8; font-size: 11px; }
        .tx-detail-item { display: flex; align-items: center; gap: 5px; }
        .tx-amount { font-weight: 900; font-size: 18px; text-align: right; margin-left: 12px; white-space: nowrap; }
        .tx-amount.income { color: #4ade80; }
        .tx-amount.expense { color: #f87171; }
        .tx-meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
            color: rgba(255,255,255,0.7);
            font-size: 0.8rem;
            background: rgba(255,255,255,0.08);
            padding: 4px 12px;
            border-radius: 20px;
            border: 1px solid rgba(255,255,255,0.1);
            transition: var(--transition);
        }

        .tx-meta-item i {
            font-size: 0.8rem;
            color: #C4A484; /* Use the brand's secondary color for icons */
        }

        .tx-meta-item:hover {
            background: rgba(255,255,255,0.15);
            color: #fff;
            transform: translateY(-1px);
        }

        .tx-meta-container {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        @media (max-width: 1024px) {
            .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
            /* Una sola columna: cada bloque ocupa esa columna (con "span 12" la grilla creaba 12 columnas y la página se desbordaba) */
            .dashboard-grid > *, .dashboard-grid > [class] { grid-column: 1 / -1; }
        }
        .col-span-3 { grid-column: span 3; }
        .col-span-4 { grid-column: span 4; }
        .col-span-5 { grid-column: span 5; }
        .col-span-7 { grid-column: span 7; }
        .col-span-6 { grid-column: span 6; }
        .col-span-8 { grid-column: span 8; }
        .col-span-9 { grid-column: span 9; }
        .col-span-12 { grid-column: span 12; }

        .kpis-wrapper {
            grid-column: span 12;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 24px;
            width: 100%;
        }
        @media (max-width: 1024px) {
            .kpis-wrapper {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }
        @media (max-width: 640px) {
            .kpis-wrapper {
                grid-template-columns: minmax(0, 1fr);
            }
        }

        /* Plan-specific visibility */
        .zeus-only, .zeus-only-inline { display: none !important; }
        .arche-only { display: block; }
        
        body.is-premium .zeus-only { display: block !important; }
        body.is-premium .zeus-only-inline { display: flex !important; }
        body.is-premium .arche-only { display: none !important; }

        /* Stratos chat panel special override: the panel is zeus-only but
           its open/close state must be fully controlled by JS via inline style.
           These rules ensure the panel is never force-shown by zeus-only when closed. */
        #stratos-chat-panel { display: none !important; }
        #stratos-chat-panel.open { display: flex !important; }

        .plan-tag {
            font-size: 10px;
            font-weight: 800;
            padding: 4px 10px;
            border-radius: 20px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .summary-mini { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
        .summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
        .summary-label { color: var(--text-secondary); }
        .summary-val { font-weight: 700; }

        /* ── Account Dropdown ── */
        .account-dropdown-container { position: relative; display: inline-block; }
        .btn-accounts {
            background: rgba(245, 240, 225, 0.08);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 8px 16px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: var(--transition);
        }
        .btn-accounts:hover { background: rgba(245, 240, 225, 0.15); border-color: rgba(245, 240, 225, 0.3); }
        .dropdown-menu {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            background: var(--bg); /* Contrast with sidebar */
            border: 1px solid var(--border);
            border-radius: 16px;
            width: 220px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.4);
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: var(--transition);
            overflow: hidden;
            backdrop-filter: blur(20px);
        }
        .dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
        .dropdown-item {
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 32px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 14px;
            font-weight: 600;
        }
        .dropdown-item:hover { background: rgba(245, 240, 225, 0.08); }
        .dropdown-item.loading { opacity: 0.5; cursor: default; }

        /* ── Profile Dropdown ── */
        .profile-dropdown {
            background: var(--text) !important;
            width: 320px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            color: var(--bg) !important;
            border: 1px solid rgba(var(--bg-rgb), 0.15);
            left: 0;
            top: calc(100% + 12px);
        }
        .btn-guest-action {
            background: var(--bg) !important;
            color: var(--text) !important;
            border-radius: 12px !important;
            padding: 14px 16px !important;
            font-size: 14px !important;
            font-weight: 700 !important;
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            text-decoration: none !important;
            border: none !important;
            box-shadow: 0 4px 10px rgba(var(--bg-rgb), 0.2) !important;
            transition: all 0.2s ease-in-out !important;
            white-space: nowrap !important; /* Prevent text wrapping */
        }
        .btn-guest-action:hover {
            font-size: 15px !important;
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(var(--bg-rgb), 0.3) !important;
        }
        .profile-dropdown .large-avatar {
            width: 100px;
            height: 100px;
            border-radius: 22px;
            background: var(--bg);
            color: var(--text);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
            border: 4px solid rgba(var(--bg-rgb), 0.08);
            font-size: 36px;
            font-weight: 800;
            overflow: hidden;
            box-shadow: 0 10px 25px rgba(var(--bg-rgb), 0.15);
        }
        .profile-dropdown .large-avatar img { width: 100%; height: 100%; object-fit: cover; }
        .profile-dropdown .user-name {
            font-size: 18px;
            font-weight: 900;
            margin-bottom: 4px;
            color: var(--bg);
        }
        .profile-dropdown .user-email {
            font-size: 14px;
            opacity: 0.7;
            font-weight: 600;
            color: var(--bg);
            word-break: break-all;
        }
        .dropdown-item {
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 32px;
            cursor: pointer;
            transition: var(--transition);
            border-bottom: 1px solid rgba(245, 240, 225, 0.05);
        }
        .dropdown-item:last-child { border-bottom: none; }
        .dropdown-item:hover { background: rgba(245, 240, 225, 0.05); }
        .dropdown-item i { width: 18px; color: var(--text-secondary); }
        .dropdown-item .acc-name { flex: 1; font-weight: 600; font-size: 14px; }
        .dropdown-item .acc-val { font-weight: 800; font-size: 13px; color: var(--brand); }
        .dropdown-item.loading { justify-content: center; color: var(--text-secondary); font-style: italic; font-size: 12px; }

        .mini-select {
            background: rgba(196, 164, 132, 0.1);
            border: 1px solid rgba(196, 164, 132, 0.3);
            color: var(--text);
            font-size: 11px;
            padding: 4px 8px;
            border-radius: 8px;
            outline: none;
            cursor: pointer;
            font-family: inherit;
        }
        .mini-select option {
            background: #2D241E;
            color: var(--text);
        }
        .dash-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        /* ── Nav ── */
        nav {
            position: fixed;
            top: 0; left: 0; right: 0;
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            z-index: 1100;
            height: 76px;
            display: flex;
            align-items: center;
            transition: left 0.3s;
        }
        nav::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 48px;
            right: 48px;
            border-bottom: 1px solid var(--border);
        }
        .nav-content {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            width: 100%;
        }
        .nav-left {
            display: flex;
            align-items: center;
        }
        .nav-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
            background: rgba(245, 240, 225, 0.05);
            border-radius: 14px;
            border: 1px solid var(--border);
            cursor: pointer;
            color: var(--text);
            transition: var(--transition);
        }
        .nav-logo:hover {
            background: var(--brand-soft);
            transform: translateY(-2px);
            border-color: rgba(245, 240, 225, 0.3);
        }
        .nav-logo svg { width: 28px; height: 28px; color: var(--brand); }
        
        .nav-links {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-left: 24px;
        }
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 6px 12px;
            border-radius: 12px;
            cursor: pointer;
            color: var(--text-secondary);
            transition: var(--transition);
            text-decoration: none;
        }
        .nav-item:hover {
            color: var(--brand);
            background: rgba(245, 240, 225, 0.05);
        }
        .nav-item svg { width: 20px; height: 20px; margin-bottom: 4px; }
        .nav-item span { font-size: 9px; font-weight: 800; letter-spacing: 0.5px; }

        .nav-actions { display: flex; gap: 32px; align-items: center; justify-content: flex-end; }
        
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border-radius: var(--radius-sm);
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            transition: var(--transition);
            border: 1px solid transparent;

            outline: none;
            text-align: center;
        }
        .btn-primary {
            background: var(--brand);
            color: var(--bg);
            box-shadow: 0 4px 20px rgba(245, 240, 225, 0.2);
        }
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 24px rgba(245, 240, 225, 0.3);
        }
        .btn-primary:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }
        .btn-secondary {
            background: var(--brand-soft);
            color: var(--text);
            border: 1px solid var(--border);
        }
        .btn-secondary:hover { background: rgba(245, 240, 225, 0.2); }
        .btn-icon-only { padding: 12px; border-radius: 50%; }

        /* ── Sidebar ── */
        .sidebar {
            position: fixed;
            top: 0; left: 0; bottom: 0;
            width: 216px;
            background: var(--brand);
            border-right: 1px solid rgba(0,0,0,0.1);
            border-top-right-radius: 24px;
            border-bottom-right-radius: 24px;
            z-index: 1010;
            padding: 0 12px 12px;
            display: flex;
            flex-direction: column;
            box-shadow: 2px 0 20px rgba(0,0,0,0.1);
            transition: transform 0.3s, width 0.3s, padding 0.3s;
            overflow: hidden;
        }
        .sidebar-logo-container {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            height: 76px;
            padding: 0 4px;
            border-bottom: 1px solid rgba(var(--bg-rgb), 0.3);
            flex-shrink: 0;
            transition: var(--transition);
        }
        .sidebar-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            padding: 10px 16px;
            border-radius: var(--radius-sm);
            border: 1px solid rgba(var(--bg-rgb), 0.15);
            background: rgba(var(--bg-rgb), 0.04);
            color: var(--bg);
            text-decoration: none;
            font-weight: 700;
            font-size: 15px;
            transition: var(--transition);
            white-space: nowrap;
            width: 100%;
        }
        .sidebar-logo:hover {
            background: rgba(var(--bg-rgb), 0.08);
            border-color: rgba(var(--bg-rgb), 0.3);
            transform: translateX(4px);
        }
        .sidebar-logo.active {
            background: var(--bg);
            border-color: var(--bg);
            color: var(--brand);
            font-weight: 800;
        }
        .sidebar-logo svg.logo-scale {
            width: 26px; height: 26px;
            color: inherit;
            stroke-width: 2.3;
            transition: var(--transition);
        }
        .logo-text {
            font-size: 15px;
            font-weight: 800;
            letter-spacing: 0.05em;
            color: inherit;
            text-transform: uppercase;
            transition: var(--transition);
        }
        .pillar-icon {
            width: 28px;
            height: 38px;
            color: var(--bg);
            opacity: 0.4;
            flex-shrink: 0;
        }
        .sidebar-nav {
            display: flex;
            flex-direction: column;
            padding-top: 0;
            justify-content: flex-start;
        }
        .sidebar-group-title {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(var(--bg-rgb), 0.5);
            margin: 12px 12px 8px;
            white-space: nowrap;
            font-weight: 800;
        }
        .sidebar-plan-label {
            color: var(--bg) !important;
            opacity: 0.9 !important;
            font-weight: 900 !important;
        }
        .sidebar-main-links {
            display: flex;
            flex-direction: column;
            gap: 2px;
            justify-content: flex-start;
        }
        .sidebar-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 9px 12px;
            border-radius: var(--radius-sm);
            border: 1px solid transparent;
            color: var(--bg);
            text-decoration: none;
            font-weight: 700;
            font-size: 14px;
            transition: var(--transition);
            white-space: nowrap;
        }
        .sidebar-link:hover {
            background: rgba(var(--bg-rgb), 0.08);
            transform: translateX(4px);
        }
        .sidebar-link.active {
            background: rgba(var(--bg-rgb), 0.12);
            border-color: rgba(var(--bg-rgb), 0.3);
            font-weight: 800;
            padding-left: 16px;
        }
        .sidebar-link svg { width: 20px; height: 20px; stroke-width: 2.5; flex-shrink: 0; }
        
        /* Clase para iconos personalizados (PNG que actúan como SVG) */
        .sidebar-icon-custom {
            width: 28px;
            height: 28px;
            background-color: currentColor;
            -webkit-mask-size: contain;
            mask-size: contain;
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            -webkit-mask-position: center;
            mask-position: center;
            display: inline-block;
            flex-shrink: 0;
        }
        
        .sidebar-icon-right {
            margin-left: auto;
            opacity: 0.7;
            transition: var(--transition);
        }
        .sidebar-link:hover .sidebar-icon-right {
            opacity: 1;
            transform: scale(1.1);
        }
        
        .sidebar-separator {
            height: 1px;
            background: rgba(var(--bg-rgb), 0.3);
            margin: 0;
            margin-top: auto;
        }

        .sidebar-bottom-area {
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        .sidebar-footer {
            padding: 0;
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
        }

        /* ── Cuentas View ── */
        .accounts-layout {
            display: grid;
            grid-template-columns: 340px 1fr;
            gap: 24px;
            height: calc(100vh - 200px);
            min-height: 500px;
        }

        .accounts-sidebar-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            overflow-y: auto;
            padding-right: 4px;
        }


        .account-select-checkbox {
            width: 20px;
            height: 20px;
            border: 2.5px solid var(--border);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
            flex-shrink: 0;
            background: rgba(var(--text-rgb), 0.03);
        }
        .account-select-checkbox:hover {
            border-color: var(--brand);
            background: rgba(var(--brand-rgb), 0.1);
        }
        .account-select-checkbox.checked {
            border-color: var(--brand);
            background: var(--brand);
        }
        .account-select-checkbox.checked svg {
            stroke: var(--bg) !important;
            stroke-width: 3.5 !important;
        }

        .account-item-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            gap: 14px;
            cursor: pointer;
            transition: var(--transition);
            flex-shrink: 0;
        }

        .account-item-card:hover {
            background: rgba(245,240,225,0.08);
            border-color: rgba(245,240,225,0.2);
            transform: translateX(4px);
        }

        .account-item-card.active {
            background: rgba(245,240,225,0.1);
            border-color: var(--brand);
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        }

        .account-item-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            flex-shrink: 0;
        }

        .account-item-info { flex: 1; min-width: 0; }
        .account-item-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
        .account-item-balance { font-weight: 800; font-size: 17px; }

        .account-detail-main {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 36px;
            display: flex;
            flex-direction: column;
            gap: 28px;
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }


        .account-detail-header {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .account-detail-info h2 { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
        .account-detail-info p { color: var(--text-secondary); font-size: 13px; font-weight: 500; margin: 0; display: flex; align-items: center; gap: 6px; }

        .arche-restriction-banner {
            background: linear-gradient(135deg, rgba(196,164,132,0.12) 0%, rgba(196,164,132,0.04) 100%);
            border: 1px dashed rgba(196,164,132,0.35);
            border-radius: 16px;
            padding: 14px 20px;
            display: flex;
            align-items: flex-start;
            gap: 14px;
            margin-top: auto;
            padding-top: 14px;
        }

        .arche-restriction-banner i { color: var(--brand); flex-shrink: 0; margin-top: 2px; }
        .arche-restriction-banner p { font-size: 13px; margin: 0; line-height: 1.5; opacity: 1; }

        @media (max-width: 1100px) {
            .accounts-layout { grid-template-columns: 1fr; height: auto; }
            .accounts-sidebar-list { max-height: 260px; }
            .account-detail-main { min-height: 400px; }
        }

        /* ── Reportes Page ── */
        .reports-layout {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .reports-range-tabs {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(var(--text-rgb), 0.05);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 5px;
            backdrop-filter: blur(8px);
        }
        .reports-range-tab {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 700;
            padding: 8px 18px;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-family: var(--font);
        }
        .reports-range-tab:hover { color: var(--text); background: rgba(var(--text-rgb), 0.08); }
        .reports-range-tab.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(196,164,132,0.3); }
        
        .reports-month-nav {
            display: flex;
            align-items: center;
            gap: 6px;
            padding-left: 12px;
            margin-left: 4px;
            border-left: 1px solid var(--border);
        }

        .reports-month-btn {
            background: rgba(var(--text-rgb), 0.05);
            border: 1px solid var(--border);
            color: var(--text);
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
        }
        .reports-month-btn:hover { background: rgba(var(--text-rgb), 0.1); border-color: var(--brand); }

        .reports-summary-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }
        .report-stat-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }
        .report-stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.2); border-color: rgba(var(--text-rgb), 0.2); }
        
        .report-stat-main {
            background: linear-gradient(135deg, #5C3A24 0%, #3d2618 100%);
            border-color: transparent;
            grid-column: span 1;
        }
        .report-stat-label {
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 1px;
            opacity: 0.6;
            margin-bottom: 8px;
        }
        .report-stat-value {
            font-size: 24px;
            font-weight: 900;
            letter-spacing: -0.5px;
        }
        .report-stat-sub {
            font-size: 12px;
            margin-top: 8px;
            opacity: 0.5;
            font-weight: 600;
        }

        .reports-main-grid {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 24px;
        }
        
        .report-widget {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            backdrop-filter: blur(10px);
            transition: var(--transition);
        }
        .report-widget:hover { border-color: rgba(var(--text-rgb), 0.2); box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
        
        .widget-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }
        .widget-title {
            font-size: 16px;
            font-weight: 800;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .rpt-dist-tabs {
            display: flex;
            background: rgba(var(--text-rgb), 0.05);
            padding: 4px;
            border-radius: 10px;
            gap: 4px;
        }
        .rpt-dist-tab {
            background: none;
            border: none;
            border-radius: 7px;
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 800;
            padding: 4px 12px;
            cursor: pointer;
            transition: all 0.2s;
            font-family: var(--font);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .rpt-dist-tab.active { background: var(--brand); color: #fff; }
        /* Distribución: Gastos / Ingresos como un selector (la opción elegida, del color contrario al fondo) */
        .ap-dist-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 11px; border: 1px solid rgba(var(--text-rgb), 0.18); background: rgba(var(--text-rgb), 0.04); }
        .ap-dist-switch .rpt-dist-tab { height: 26px; padding: 0 12px !important; border-radius: 8px; color: var(--text-secondary); background: transparent; transition: background-color 200ms ease, color 200ms ease; }
        .ap-dist-switch .rpt-dist-tab:hover { color: var(--text); }
        .ap-dist-switch .rpt-dist-tab.active { background: var(--text); color: var(--bg); }
        .ap-dist-switch .rpt-dist-tab:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

        .rpt-bar-container {
            display: flex;
            align-items: flex-end;
            justify-content: space-around;
            height: 180px;
            padding: 0 10px;
            gap: 15px;
        }
        .rpt-bar-col {
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1;
            gap: 8px;
            height: 100%;
            justify-content: flex-end;
        }
        .rpt-bar-label {
            font-size: 10px;
            font-weight: 800;
            opacity: 0.5;
            text-transform: uppercase;
        }
        .rpt-bar-fill {
            width: 100%;
            border-radius: 12px 12px 6px 6px;
            min-height: 8px;
            transition: height 1s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
        }
        .rpt-bar-amount {
            font-size: 12px;
            font-weight: 900;
            margin-bottom: 4px;
        }

        .rpt-cat-list {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .rpt-cat-row {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .rpt-cat-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            font-weight: 700;
        }
        .rpt-cat-bar-bg {
            height: 8px;
            background: rgba(var(--text-rgb), 0.05);
            border-radius: 10px;
            overflow: hidden;
        }
        .rpt-cat-bar-fill {
            height: 100%;
            border-radius: 10px;
            transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .rpt-tx-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .rpt-tx-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px;
            background: rgba(var(--text-rgb), 0.03);
            border-radius: 16px;
            border: 1px solid var(--border);
            transition: var(--transition);
        }
        .rpt-tx-item:hover { background: rgba(var(--text-rgb), 0.06); transform: scale(1.01); }
        .rpt-tx-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .rpt-tx-info { flex: 1; min-width: 0; }
        .rpt-tx-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .rpt-tx-meta { font-size: 11px; opacity: 0.5; margin-top: 2px; font-weight: 600; }
        .rpt-tx-amount { font-size: 15px; font-weight: 800; text-align: right; }

        @media (max-width: 1200px) {
            .reports-summary-grid { grid-template-columns: 1fr 1fr; }
        }
        @media (max-width: 900px) {
            .reports-main-grid { grid-template-columns: 1fr; }
            .reports-summary-grid { grid-template-columns: 1fr 1fr; }
        }
        @media (max-width: 600px) {
            .reports-summary-grid { grid-template-columns: 1fr; }
        }
        .btn-store {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 12px 16px;
            border-radius: var(--radius-sm);
            color: var(--bg);
            text-decoration: none;
            font-weight: 700;
            font-size: 13px;
            background: transparent;
            border: 2px solid rgba(92, 58, 36, 0.2);
            transition: var(--transition);
        }
        .btn-store:hover {
            background: rgba(92, 58, 36, 0.08);
            border-color: rgba(92, 58, 36, 0.5);
            transform: translateY(-2px);
        }
        
        /* User Avatar in Top Nav */
        .user-avatar {
            width: 44px; height: 44px;
            border-radius: 12px;
            background: var(--brand);
            color: var(--bg);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border: 1px solid var(--border);
            flex-shrink: 0;
            box-shadow: 0 4px 10px rgba(0,0,0,0.15);
            transition: var(--transition);
        }
        .user-avatar:hover, #nav-notif-btn:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 24px rgba(245, 240, 225, 0.3) !important;
        }

        .user-avatar svg { width: 24px; height: 24px; stroke-width: 2; opacity: 0.8; }
        .user-avatar img { width: 100%; height: 100%; object-fit: cover; }

        .nav-back-btn {
            display: none; /* Hidden by default, shown via JS if not on #home */
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            background: transparent;
            border: none;
            cursor: pointer;
            color: var(--text);
            transition: var(--transition);
            margin-right: 12px;
            padding: 0;
            outline: none;
        }
        .nav-back-btn:hover {
            color: var(--brand);
            transform: translateX(-3px);
        }
        .nav-back-btn svg {
            width: 32px;
            height: 32px;
            stroke-width: 3.5;
        }

        /* Botón para abrir y cerrar la barra lateral (todos los planes) */
        .sidebar-toggle {
            display: flex; align-items: center; justify-content: center; gap: 8px;
            width: 100%; margin: 8px 0 4px; padding: 10px 12px;
            background: transparent; color: var(--bg);
            border: 1px solid rgba(var(--bg-rgb), 0.2); border-radius: 12px;
            font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700;
            white-space: nowrap; overflow: hidden; cursor: pointer;
            transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
        }
        .sidebar-toggle svg { width: 20px; height: 20px; flex-shrink: 0; }
        .sidebar-toggle:active { transform: scale(0.97); }
        @media (hover: hover) and (pointer: fine) {
            .sidebar-toggle:hover { background: rgba(var(--bg-rgb), 0.08); border-color: rgba(var(--bg-rgb), 0.35); }
        }
        .sidebar-toggle-ico { display: flex; }
        .sidebar-toggle-open { display: none; }
        body.sidebar-collapsed .sidebar-toggle-open { display: flex; }
        body.sidebar-collapsed .sidebar-toggle-close { display: none; }

        /* Menú del teléfono */
        .nav-menu-btn, .sidebar-scrim { display: none; }

        @media (max-width: 900px) {
            .sidebar { transform: translateX(-100%); }
            nav { left: 0; }
            main { margin-left: 0; }
            footer { margin-left: 0; }

            .nav-menu-btn {
                display: flex; align-items: center; justify-content: center;
                width: 44px; height: 44px; margin-right: 4px; flex-shrink: 0;
                background: transparent; border: 0; border-radius: 12px;
                color: var(--text); cursor: pointer;
            }
            .nav-menu-btn svg { width: 24px; height: 24px; }
            .sidebar-toggle { display: none; }
            .sidebar-scrim {
                display: block; position: fixed; inset: 0; z-index: 1150;
                background: rgba(30, 18, 10, 0.42);
                opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
            }
            body.sidebar-mobile-open .sidebar { transform: none; z-index: 1200; box-shadow: 0 0 40px rgba(0, 0, 0, 0.25); }
            body.sidebar-mobile-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
        }
        @media (min-width: 901px) {
            nav { left: 216px; }
            main { margin-left: 216px; }
            footer { margin-left: 216px; }

            /* Barra lateral cerrada (riel de íconos) */
            body.sidebar-collapsed .sidebar { width: 64px; padding: 0 8px 12px; }
            body.sidebar-collapsed .sidebar-logo-container {
                justify-content: center;
                padding: 0;
            }
            body.sidebar-collapsed .sidebar-logo {
                justify-content: center;
                padding: 12px 0;
                font-size: 0;
                gap: 0;
            }
            body.sidebar-collapsed .sidebar-logo:hover {
                transform: none;
            }
            body.sidebar-collapsed .sidebar-logo .logo-text { display: none; }
            body.sidebar-collapsed .sidebar-logo .logo-scale-right { display: none; }
            body.sidebar-collapsed .sidebar-group-title { display: none; }
            body.sidebar-collapsed .sidebar-nav { padding-top: 16px; }
            body.sidebar-collapsed .sidebar-link { justify-content: center; padding: 12px 0; font-size: 0; gap: 0; }
            body.sidebar-collapsed .sidebar-link i { margin-right: 0; }
            body.sidebar-collapsed .sidebar-link svg { width: 22px; height: 22px; }
            body.sidebar-collapsed .sidebar-link:hover { transform: none; }
            body.sidebar-collapsed #promo-zeus { padding: 0; margin: 0 0 16px 0; }
            body.sidebar-collapsed #promo-zeus .plan-label-text { display: none; }
            body.sidebar-collapsed #promo-zeus .plan-label-icon { display: block !important; }
            body.sidebar-collapsed #promo-adsense { display: none !important; }
            body.sidebar-collapsed #promo-visitante .sidebar-group-title { display: none; }
            body.sidebar-collapsed #promo-visitante .btn-store { font-size: 0; gap: 0; padding: 10px 0; margin-top: 12px; }
            body.sidebar-collapsed #promo-visitante .btn-store svg { width: 18px; height: 18px; }
            body.sidebar-collapsed .sidebar-toggle { padding: 10px 0; gap: 0; }
            body.sidebar-collapsed .sidebar-toggle .collapse-btn-text { display: none; }
            body.sidebar-collapsed nav { left: 64px; }
            body.sidebar-collapsed main { margin-left: 64px; }
            body.sidebar-collapsed footer { margin-left: 64px; }
        }

        /* ── Main Layout ── */
        main { flex: 1; margin-top: 76px; transition: margin-left 0.3s; }
        .view { display: none; animation: fadeIn 0.4s ease; padding: 40px 0 80px; }
        .view.active { display: block; }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ── Page Constraints ── */
        .page-narrow {
            max-width: 720px;
            margin: 0 auto;
        }

        /* ── Hero Section ── */
        .hero {
            text-align: center;
            padding: 40px 0 60px;
        }
        .hero-logo {
            width: 120px;
            height: 120px;
            background: var(--brand);
            border-radius: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 24px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            color: var(--bg);
        }
        .hero h1 { font-size: clamp(64px, 10vw, 110px); letter-spacing: -5px; margin-bottom: 0; line-height: 1; text-transform: uppercase; }
        .hero h2 { font-size: clamp(20px, 3vw, 38px); font-weight: 500; color: var(--text-secondary); margin-bottom: 32px; letter-spacing: 6px; text-transform: uppercase; }
        .hero p { font-size: clamp(18px, 2vw, 24px); color: var(--text-secondary); max-width: 800px; margin: 0 auto 48px; line-height: 1.6; opacity: 0.85; }

        .home-section { padding: 120px 0; position: relative; }
        .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; margin-top: 64px; }
        .feature-card { 
            background: rgba(245, 240, 225, 0.03); 
            padding: 56px 40px; 
            border-radius: var(--radius); 
            border: 1px solid var(--border); 
            text-align: center; 
            transition: var(--transition); 
            position: relative;
            overflow: hidden;
        }
        .feature-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: radial-gradient(circle at top right, rgba(245, 240, 225, 0.05), transparent);
            opacity: 0; transition: var(--transition);
        }
        .feature-card:hover { 
            transform: translateY(-12px); 
            border-color: rgba(245, 240, 225, 0.2); 
            background: rgba(245, 240, 225, 0.05);
            box-shadow: var(--shadow-premium);
        }
        .feature-card:hover::before { opacity: 1; }
        .feature-icon { 
            width: 72px; height: 72px; 
            background: rgba(245, 240, 225, 0.08); 
            color: var(--brand); 
            border-radius: 22px; 
            display: flex; align-items: center; justify-content: center; 
            margin: 0 auto 32px; 
            transition: var(--transition);
        }
        .feature-card:hover .feature-icon { background: var(--brand); color: var(--bg); transform: scale(1.1); }
        
        .stratos-preview { 
            background: linear-gradient(145deg, rgba(245, 240, 225, 0.05) 0%, rgba(245, 240, 225, 0.02) 100%); 
            border-radius: var(--radius-lg); 
            padding: 80px; 
            border: 1px solid var(--border); 
            display: flex; align-items: center; gap: 80px; 
            margin-top: 40px; 
            position: relative;
            overflow: visible;
        }
        .stratos-preview::after {
            content: '';
            position: absolute;
            width: 400px; height: 400px;
            background: radial-gradient(circle, rgba(196, 164, 132, 0.1), transparent 70%);
            top: -100px; left: -100px; z-index: -1;
        }
        @media (max-width: 1024px) { 
            .stratos-preview { flex-direction: column; text-align: center; padding: 60px 32px; gap: 48px; } 
            .hero h1 { font-size: 64px; }
            .hero h2 { font-size: 24px; }
        }
        .store-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
        
        .premium-text-gradient {
            background: linear-gradient(135deg, #F5F0E1 0%, #C4A484 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .chat-mockup {
            background: #1e1e1e;
            border-radius: 32px;
            width: 100%;
            max-width: 400px;
            border: 8px solid #2d2d2d;
            box-shadow: 0 40px 100px rgba(0,0,0,0.6);
            padding: 24px;
            position: relative;
            animation: float 6s ease-in-out infinite;
        }
        @keyframes float {
            0%, 100% { transform: translateY(0) rotateY(-5deg); }
            50% { transform: translateY(-20px) rotateY(0deg); }
        }

        .btn-lg { padding: 20px 48px; font-size: 16px; border-radius: 18px; }

        /* ── Feature Sections ── */
        .section { padding: 60px 0; border-top: 1px solid var(--border); }
        .section-header { text-align: center; margin-bottom: 48px; }
        .section-header h2 { font-size: 32px; margin-bottom: 16px; color: var(--brand); }
        
        .grid-3 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 24px;
        }
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 32px;
            transition: var(--transition);
        }
        .card:hover { transform: translateY(-12px); border-color: rgba(245, 240, 225, 0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
        .card-icon {
            width: 48px; height: 48px;
            background: var(--brand-soft);
            border-radius: 16px;
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 24px;
            color: var(--brand);
        }
        .card h3 { font-size: 20px; margin-bottom: 12px; }

        /* ── Stratos Highlight ── */
        .stratos-card {
            background: linear-gradient(145deg, var(--bg-card), rgba(245, 240, 225, 0.05));
            border: 1px solid rgba(245, 240, 225, 0.2);
            position: relative;
            overflow: hidden;
            text-align: center;
            padding: 60px 32px;
            border-radius: var(--radius-lg);
        }
        .stratos-card h3 { color: var(--brand); font-size: 28px; }

        /* ── Pricing ── */
        .pricing-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 32px;
            max-width: 1100px;
            margin: 0 auto;
            justify-content: center;
        }
        .plan-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 24px 32px;
            display: flex;
            flex-direction: column;
            position: relative;
        }
        .plan-card.premium { border-color: var(--brand); box-shadow: 0 8px 32px rgba(245, 240, 225, 0.1); }
        .plan-badge {
            position: absolute;
            top: -12px; left: 50%; transform: translateX(-50%);
            background: var(--brand); color: var(--bg);
            padding: 4px 16px; border-radius: 20px;
            font-size: 12px; font-weight: 800; letter-spacing: 1px;
        }
        .plan-name { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
        .plan-price { font-size: 32px; font-weight: 800; margin-bottom: 24px; }
        .plan-features { list-style: none; margin-bottom: 0px; }
        .plan-features li { display: flex; gap: 32px; margin-bottom: 16px; font-size: 15px; align-items: flex-start; }
        .plan-features li svg { color: var(--brand); flex-shrink: 0; margin-top: 2px; }

        /* ── Auth Form ── */
        .auth-container { max-width: 400px; margin: 0 auto; text-align: center; }
        .auth-container h2 { font-size: 32px; margin-bottom: 8px; }
        .auth-subtitle { color: var(--text-secondary); margin-bottom: 32px; font-size: 15px; }
        .form-group { margin-bottom: 20px; text-align: left; }
        .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
        .form-control {
            width: 100%;
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border);
            padding: 14px 16px;
            border-radius: var(--radius-sm);
            color: var(--text);
            font-family: inherit;
            font-size: 15px;
            transition: var(--transition);
        }
        .form-control:focus { outline: none; border-color: var(--brand); background: rgba(0,0,0,0.3); }
        .password-container {
            position: relative;
            width: 100%;
        }
        .password-toggle {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            z-index: 10;
        }
        .password-toggle:hover {
            color: var(--brand);
        }
        .password-toggle svg {
            width: 20px;
            height: 20px;
        }
        .auth-divider {
            display: flex; align-items: center; text-align: center; margin: 24px 0; color: var(--text-secondary); font-size: 13px;
        }
        .auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); }
        .auth-divider::before { margin-right: 16px; }
        .auth-divider::after { margin-left: 16px; }
        
        .success-box {
            background: rgba(67, 160, 71, 0.15);
            border: 1px solid #43a047;
            padding: 24px;
            border-radius: var(--radius-sm);
            margin-bottom: 32px;
            display: none;
        }

        /* ── Dashboard ── */
        .dashboard-header {
            display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px;
            flex-wrap: wrap; gap: 16px;
        }

        /* ── Dashboard Quick Actions ── */
        .quick-actions-container {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0px; /* Reduced gap since the list has padding-top */
            margin-left: auto;
            flex-shrink: 1;
            margin-bottom: 3px; /* Align bottom edge of cards with bottom edge of filter buttons */
        }
        .quick-actions-title {
            font-size: 10px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-secondary);
            margin-bottom: 2px;
        }
        .quick-actions-list {
            display: flex;
            align-items: flex-end; /* Align cards to the bottom of the list */
            gap: 8px;
            overflow-x: auto;
            width: 100%;
            scrollbar-width: none; /* Firefox */
            padding-top: 6px; /* Clearance space to prevent clipping on hover */
        }
        .quick-actions-list::-webkit-scrollbar {
            display: none; /* Chrome, Safari, Opera */
        }
        .quick-action-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 52px;
            height: 52px;
            background: var(--color-light);
            color: var(--color-dark);
            border: 1px solid rgba(var(--color-dark-rgb), 0.12);
            border-radius: 12px;
            cursor: pointer;
            transition: var(--transition);
            text-decoration: none;
            gap: 2px;
            padding: 3px 1px;
            flex-shrink: 0;
        }
        .quick-action-card:hover {
            transform: translateY(-2px);
            border-color: rgba(var(--color-dark-rgb), 0.3);
            box-shadow: 0 4px 12px rgba(var(--color-dark-rgb), 0.15);
        }
        .quick-action-card svg {
            width: 16px;
            height: 16px;
            stroke-width: 2.5;
            color: var(--color-dark);
        }
        .quick-action-label {
            font-size: 7.5px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            text-align: center;
            white-space: nowrap;
            color: var(--color-dark);
            opacity: 0.8;
        }

        @media (max-width: 900px) {
            .dashboard-header > div {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 16px !important;
            }
            .quick-actions-container {
                margin-left: 0;
                margin-right: 0;
                width: 100%;
                margin-top: 0;
            }
            .quick-actions-list {
                justify-content: flex-start;
            }
        }
        .user-greeting { font-size: 40px; font-weight: 800; }
        .plan-tag {
            background: var(--brand-soft); padding: 4px 12px; border-radius: 12px;
            font-size: 12px; font-weight: 700; color: var(--brand); border: 1px solid var(--border);
            text-transform: uppercase; letter-spacing: 1px;
        }
        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 32px; }
        .stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
        .stat-title { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; }
        .stat-value { font-size: 32px; font-weight: 900; }
        .stat-value.income { color: #4ade80; }
        .stat-value.expense { color: #f87171; }
        
        .dashboard-main { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
        @media (max-width: 768px) { .dashboard-main { grid-template-columns: 1fr; } }
        
        .panel { background: var(--bg-card); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
        .panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
        .panel-title { font-size: 18px; font-weight: 700; }
        
        .empty-state { text-align: center; padding: 40px 0; color: var(--text-secondary); }
        .empty-state svg { margin: 0 auto 16px; opacity: 0.5; }
        


        /* ── Terms & Privacy Styles (Reused from previous) ── */
        .doc-card { background: var(--bg-card); border-radius: var(--radius); padding: 40px; border: 1px solid var(--border); margin-bottom: 40px; }
        .doc-title { font-size: 16px; font-weight: 900; letter-spacing: 2px; color: var(--brand); text-transform: uppercase; }
        .doc-date { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-top: 6px; margin-bottom: 24px; }
        .section-block { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
        .section-block:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
        .section-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
        .section-body { font-size: 15px; line-height: 1.8; opacity: 0.85; white-space: pre-line; }

        /* ── Footer ── */
        footer { padding: 40px 0 20px; margin-top: 40px; text-align: center; position: relative; transition: margin-left 0.3s; }
        footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 48px;
            right: 48px;
            border-top: 1px solid var(--border);
        }
        .footer-links { display: flex; justify-content: center; gap: 24px; margin: 24px 0; flex-wrap: wrap; }
        .footer-links a { font-size: 14px; color: var(--text-secondary); font-weight: 600; }
        .footer-copy { font-size: 13px; color: var(--text-secondary); opacity: 0.6; }

        /* Loading Overlay */
        #loader {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: var(--bg); z-index: 9999;
            display: flex; align-items: center; justify-content: center; transition: opacity 0.5s;
        }
        .spinner { width: 40px; height: 40px; border: 3px solid rgba(245,240,225,0.2); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Helpers */
        .premium-lock {
            position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(var(--bg-rgb), 0.9); backdrop-filter: blur(4px);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            border-radius: var(--radius); z-index: 10; text-align: center; padding: 24px;
        }
        .premium-lock svg { color: var(--brand); margin-bottom: 16px; width: 32px; height: 32px; }

        /* ── Refresh Button ── */
        .btn-refresh {
            background: rgba(245, 240, 225, 0.08);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            width: 40px; height: 40px;
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer;
            transition: var(--transition);
            flex-shrink: 0;
        }
        .btn-refresh:hover { background: rgba(245, 240, 225, 0.15); color: var(--text); border-color: rgba(245, 240, 225, 0.3); }
        .btn-refresh.spinning svg { animation: spin 0.8s linear infinite; }

        /* ── Dashboard Range Buttons (same style as btn-refresh) ── */
        .dash-range-btn {
            background: rgba(245, 240, 225, 0.08);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            height: 40px;
            padding: 0 14px;
            border-radius: 12px;
            display: flex; align-items: center; gap: 6px;
            cursor: pointer;
            transition: var(--transition);
            flex-shrink: 0;
            font-family: var(--font);
            font-size: 13px;
            font-weight: 700;
            white-space: nowrap;
        }
        .dash-range-btn:hover { background: rgba(245, 240, 225, 0.15); color: var(--text); border-color: rgba(245, 240, 225, 0.3); }
        .dash-range-btn.active { background: var(--brand); color: var(--bg); border-color: var(--brand); box-shadow: 0 4px 12px rgba(196,164,132,0.3); }
        .dash-range-btn.active svg { color: var(--bg); }

        /* ── Período de Inicio (igual que la app) ── */
        .home-period-sq { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: rgba(var(--text-rgb), 0.08); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: var(--transition); padding: 0; }
        .home-period-sq svg { width: 18px; height: 18px; pointer-events: none; }
        .home-period-sq:hover:not(:disabled) { background: rgba(var(--text-rgb), 0.16); }
        .home-period-sq:disabled { opacity: 0.3; cursor: default; }
        .home-period-sq.danger { background: #EF4444; border-color: #EF4444; color: #FFFFFF; }
        .home-period-label { font-size: 15px; font-weight: 800; color: var(--text); white-space: nowrap; min-width: 84px; text-align: center; }
        .home-period-close { width: 32px; height: 32px; border-radius: 10px; border: none; background: rgba(var(--text-rgb), 0.1); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
        .home-period-close svg { width: 18px; height: 18px; pointer-events: none; }
        .home-period-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 16px; border-radius: 14px; font-family: var(--font); font-size: 15px; font-weight: 800; cursor: pointer; background: transparent; color: var(--text); border: 1.5px solid rgba(var(--text-rgb), 0.25); transition: var(--transition); }
        .home-period-opt:hover:not(.selected) { background: rgba(var(--text-rgb), 0.06); }
        .home-period-opt.selected { background: var(--text); color: var(--bg); border-color: transparent; }
        .home-period-opt svg { width: 20px; height: 20px; pointer-events: none; }
        .home-cal-btn { flex: 1; padding: 10px 8px; border-radius: 10px; font-family: var(--font); font-size: 13px; font-weight: 800; cursor: pointer; border: 1px solid var(--border); background: rgba(var(--text-rgb), 0.06); color: var(--text); }
        .home-cal-btn.primary { background: var(--text); color: var(--bg); border-color: transparent; }
        .home-cal-btn:disabled { opacity: 0.4; cursor: default; }

        /* ── Mapa de calor de Inicio (ingresos arriba, gastos abajo, como en la app) ── */
        .hm2-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
        .hm2-grid.year { grid-template-columns: repeat(4, 1fr); gap: 8px; }
        .hm2-head { font-size: 11px; font-weight: 900; text-align: center; color: var(--text-secondary); padding-bottom: 4px; }
        .hm2-cell { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 7px; background: rgba(var(--text-rgb), 0.06); display: flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 10px; font-weight: 900; color: var(--text-secondary); cursor: pointer; border: 2px solid transparent; padding: 0; }
        .hm2-grid.year .hm2-cell { aspect-ratio: auto; height: 44px; border-radius: 10px; font-size: 12px; }
        .hm2-cell.future { opacity: 0.25; cursor: default; }
        .hm2-cell.sel { border-color: var(--text); font-size: 12px; }
        .hm2-cell.filled { color: #FFFFFF; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
        .hm2-cell > span { position: relative; z-index: 1; }
        .hm2-part { position: absolute; left: 0; right: 0; }
        .hm2-tip { margin-top: 12px; min-height: 58px; border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(var(--text-rgb), 0.05); border: 1px solid rgba(var(--text-rgb), 0.12); }
        .hm2-legend { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(var(--text-rgb), 0.12); }
        .hm2-legend-row { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--text-secondary); }
        .hm2-legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

        /* ── KPI Variation Badge ── */
        .kpi-variation {
            display: inline-flex; align-items: center; gap: 4px;
            font-size: 12px; font-weight: 700; padding: 3px 10px;
            border-radius: 20px; margin-top: 8px;
        }
        .kpi-variation.up { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
        .kpi-variation.down { background: rgba(248, 113, 113, 0.15); color: #f87171; }
        .kpi-variation.neutral { background: rgba(196, 164, 132, 0.15); color: var(--text-secondary); }
        .kpi-variation svg { width: 14px; height: 14px; }

        /* ── Savings Rate Ring ── */
        .savings-ring-container { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
        .savings-ring { position: relative; width: 80px; height: 80px; }
        .savings-ring svg { transform: rotate(-90deg); }
        .savings-ring-label {
            position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
            font-size: 16px; font-weight: 900; color: var(--text);
        }
        .savings-info { display: flex; flex-direction: column; gap: 4px; }
        .savings-info span:first-child { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
        .savings-info span:last-child { font-size: 11px; color: var(--text-secondary); opacity: 0.7; }

        /* ── Goals Progress ── */
        .goal-item { margin-bottom: 16px; }
        .goal-item:last-child { margin-bottom: 0; }
        .goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
        .goal-name { font-size: 14px; font-weight: 700; }
        .goal-pct { font-size: 13px; font-weight: 800; color: var(--brand); }
        .goal-bar { height: 8px; background: rgba(0,0,0,0.3); border-radius: 10px; overflow: hidden; }
        .goal-bar-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, #C4A484, #F5F0E1); transition: width 1s ease; }
        .goal-amounts { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

        /* ── Budget Alerts ── */
        .budget-alert-item {
            display: flex; align-items: center; gap: 32px;
            padding: 12px; border-radius: 12px; margin-bottom: 10px;
            border: 1px solid transparent;
        }
        .budget-alert-item:last-child { margin-bottom: 0; }
        .budget-alert-item.ok { background: rgba(74, 222, 128, 0.06); border-color: rgba(74, 222, 128, 0.15); }
        .budget-alert-item.warning { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.2); }
        .budget-alert-item.danger { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.2); }
        .budget-alert-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .budget-alert-item.ok .budget-alert-icon { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
        .budget-alert-item.warning .budget-alert-icon { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
        .budget-alert-item.danger .budget-alert-icon { background: rgba(248, 113, 113, 0.15); color: #f87171; }
        .budget-alert-info { flex: 1; }
        .budget-alert-name { font-size: 13px; font-weight: 700; }
        .budget-alert-detail { font-size: 11px; color: var(--text-secondary); }
        .budget-alert-pct { font-size: 14px; font-weight: 800; }

        /* ── Time Filter Pills ── */
        .time-pills { display: flex; gap: 6px; flex-wrap: wrap; }
        .time-pill {
            padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
            background: rgba(245, 240, 225, 0.06); border: 1px solid var(--border);
            color: var(--text-secondary); cursor: pointer; transition: var(--transition);
        }
        .time-pill:hover { background: rgba(245, 240, 225, 0.12); }
        .time-pill.active { background: var(--brand); color: var(--bg); border-color: var(--brand); }

        /* ── Heatmap ── */
        .heatmap-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
        .heatmap-cell {
            aspect-ratio: 1; border-radius: 4px; position: relative;
            background: rgba(245, 240, 225, 0.04); transition: var(--transition);
            display: flex; align-items: center; justify-content: center;
            font-size: 8px; font-weight: 800; color: var(--text-primary);
            opacity: 0.6; cursor: pointer; user-select: none;
        }
        .heatmap-cell.l1 { background: rgba(196, 164, 132, 0.15); }
        .heatmap-cell.l2 { background: rgba(196, 164, 132, 0.3); }
        .heatmap-cell.l3 { background: rgba(196, 164, 132, 0.5); }
        .heatmap-cell.l4 { background: rgba(248, 113, 113, 0.5); }
        .heatmap-day-label { font-size: 9px; color: var(--text-secondary); text-align: center; font-weight: 600; }
        .heatmap-legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; justify-content: flex-end; }
        .heatmap-legend span { font-size: 10px; color: var(--text-secondary); }
        .heatmap-legend-cell { width: 12px; height: 12px; border-radius: 3px; }

        /* ── Stratos Floating Chat ── */
        .stratos-fab {
            position: fixed; bottom: 32px; right: 32px; z-index: 3000;
            width: 68px; height: 68px; border-radius: 50%;
            background: var(--brand);
            border: 2px solid rgba(var(--brand-rgb), 0.5);
            display: none; align-items: center; justify-content: center;
            cursor: pointer; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
            transition: var(--transition); overflow: hidden;
        }
        .stratos-fab:hover { transform: scale(1.08) rotate(5deg); box-shadow: 0 12px 40px rgba(var(--brand-rgb),0.3); }
        .stratos-fab img { width: 84px; height: 84px; object-fit: contain; object-position: center; }
        .stratos-fab svg { width: 28px; height: 28px; color: var(--text); }
        /* Busto de Stratos: de perfil (espejado, mira a la izquierda) y de frente al pasar el mouse.
           Fundido escalonado con leve desenfoque y escala, igual que en la sección Stratos de la bienvenida */
        .stratos-fab .stratos-fab-bust { position: relative; display: block; width: 30px; height: 38px; flex-shrink: 0; pointer-events: none; }
        .stratos-fab .stratos-fab-bust img {
            --d-in: 0ms; --d-out: 170ms;
            position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain;
            transition: opacity 330ms cubic-bezier(0.4, 0, 0.2, 1) var(--d), transform 480ms cubic-bezier(0.4, 0, 0.2, 1), filter 330ms cubic-bezier(0.4, 0, 0.2, 1) var(--d);
        }
        .stratos-fab .stratos-fab-side { z-index: 1; --d: var(--d-in); transform: scaleX(-1); }
        .stratos-fab .stratos-fab-front { z-index: 2; --d: var(--d-out); opacity: 0; transform: scale(0.97); filter: blur(1.5px); }
        @media (hover: hover) and (pointer: fine) {
            .stratos-fab:hover .stratos-fab-side { --d: var(--d-out); opacity: 0; transform: scaleX(-1) scale(0.97); filter: blur(1.5px); }
            .stratos-fab:hover .stratos-fab-front { --d: var(--d-in); opacity: 1; transform: none; filter: none; }
        }
        /* Con el recuadro abierto, Stratos mira al frente (con o sin el mouse encima) */
        .stratos-fab.is-open .stratos-fab-side { --d: var(--d-out); opacity: 0; transform: scaleX(-1) scale(0.97); filter: blur(1.5px); }
        .stratos-fab.is-open .stratos-fab-front { --d: var(--d-in); opacity: 1; transform: none; filter: none; }
        @media (prefers-reduced-motion: reduce) {
            .stratos-fab .stratos-fab-bust img { transition: opacity 200ms linear; filter: none !important; }
            .stratos-fab .stratos-fab-front { transform: none; }
        }

        .stratos-chat-panel {
            position: fixed; bottom: 112px; right: 32px; z-index: 3001;
            width: 520px; height: 580px;
            min-width: 520px; min-height: 580px;
            max-width: 520px; max-height: 580px;
            background: rgba(var(--bg-rgb), 0.85); 
            backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
            border: 1px solid rgba(245, 240, 225, 0.1);
            border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
            flex-direction: column; overflow: hidden;
            animation: slideUpFade 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        }
        @keyframes slideUpFade { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .stratos-chat-header {
            display: flex; align-items: center; gap: 12px;
            padding: 14px 18px; border-bottom: 1px solid var(--border);
            background: rgba(245, 240, 225, 0.03);
        }
        .stratos-chat-avatar-container {
            width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
            background: var(--brand);
            border: 2px solid #FFFFFF;
            display: flex; align-items: center; justify-content: center;
            overflow: visible;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
        .stratos-header-avatar-img { 
            width: 80px; height: 80px; 
            object-fit: contain; 
            object-position: center; 
        }
        .stratos-header-icon-btn {
            background: none; border: none; color: var(--text-secondary);
            cursor: pointer; padding: 6px; display: flex; align-items: center; justify-content: center;
            border-radius: 50%; transition: all 0.2s ease;
        }
        .stratos-header-icon-btn:hover {
            color: var(--text);
            background: rgba(245, 240, 225, 0.08);
        }
        
        .stratos-chat-body { 
            flex: 1; 
            overflow-y: auto; 
            padding: 20px; 
            display: flex; 
            flex-direction: column; 
            gap: 20px; 
            min-height: 0; 
        }
        .stratos-scroll-bottom-btn {
            position: absolute;
            bottom: 85px;
            right: 24px;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: var(--bg-card);
            color: var(--text);
            border: 1px solid var(--border);
            box-shadow: 0 8px 20px rgba(0,0,0,0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 100;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, color 0.2s, border-color 0.2s;
            pointer-events: none;
        }
        .stratos-scroll-bottom-btn.show {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        .stratos-scroll-bottom-btn:hover {
            background: var(--brand);
            color: var(--bg);
            border-color: var(--brand);
            transform: scale(1.08);
            box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.2);
        }
        .stratos-scroll-bottom-btn i {
            width: 18px;
            height: 18px;
            stroke-width: 2.5px;
        }
        .stratos-msg { max-width: 85%; padding: 10px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
        .stratos-msg.user { align-self: flex-end; background: var(--bg-card) !important; color: var(--text) !important; border-bottom-right-radius: 4px; border: 1px solid var(--border) !important; }
        .stratos-msg.bot { align-self: flex-start; background: var(--brand); color: var(--bg); border-bottom-left-radius: 4px; }
        .stratos-msg.error { background: rgba(220, 38, 38, 0.1); color: #ef4444; border: 1px solid rgba(220, 38, 38, 0.2); }
        .stratos-msg.stratos-introcard-msg {
            align-self: flex-start !important;
            background: var(--brand) !important;
            color: var(--bg) !important;
            border-radius: 28px !important;
            border-bottom-left-radius: 4px !important;
            padding: 18px 20px !important;
            max-width: 88% !important;
            box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
            border: none !important;
        }
        .stratos-introcard {
            width: 100%;
        }
        .stratos-introcard button {
            transition: opacity 0.2s, transform 0.1s;
        }
        .stratos-introcard button:hover {
            opacity: 0.9;
            transform: scale(0.98);
        }
        .stratos-introcard button:active {
            transform: scale(0.95);
        }
        #stratos-editor-modal-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            display: none; align-items: center; justify-content: center; z-index: 5000;
        }
        .stratos-modal-content {
            display: flex; flex-direction: column; gap: 16px;
            animation: scaleUpStratos 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        @keyframes scaleUpStratos {
            from { transform: scale(0.9); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }
        
        .typing-indicator { display: flex; gap: 4px; padding: 4px 0; }
        .typing-indicator span { width: 6px; height: 6px; background: var(--text-secondary); border-radius: 50%; opacity: 0.4; animation: typing 1s infinite alternate; }
        .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
        .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes typing { from { transform: translateY(0); opacity: 0.4; } to { transform: translateY(-4px); opacity: 1; } }
        
        .stratos-chat-input-container {
            border-top: 1px solid var(--border);
            background: rgba(0,0,0,0.15);
            padding: 12px 16px;
        }
        .stratos-chat-input-capsule {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--brand);
            border-radius: 28px;
            padding: 6px 8px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        }
        .stratos-chat-input-capsule textarea {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--bg);
            font-family: inherit;
            font-size: 14px;
            outline: none;
            resize: none;
            max-height: 120px;
            padding: 8px 4px;
            line-height: 1.4;
            font-weight: 600;
        }
        .stratos-chat-input-capsule textarea::placeholder {
            color: rgba(var(--bg-rgb), 0.6);
        }
        .stratos-input-btn {
            background: transparent !important;
            color: var(--bg) !important;
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }
        .stratos-input-btn:hover {
            transform: scale(1.06);
            opacity: 0.95;
            background: rgba(var(--bg-rgb), 0.08) !important;
        }
        .stratos-input-btn i, .stratos-input-btn svg {
            width: 18px; height: 18px;
            color: var(--bg) !important;
        }
        
        .stratos-input-btn.btn-send {
            background: var(--bg) !important;
            color: var(--brand) !important;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        .stratos-input-btn.btn-send:hover {
            transform: scale(1.06);
            opacity: 0.95;
            background: var(--bg) !important;
        }
        .stratos-input-btn.btn-send i, .stratos-input-btn.btn-send svg {
            color: var(--brand) !important;
        }
        
        /* Disabled state for send button */
        .stratos-input-btn.btn-send.disabled {
            opacity: 0.3;
            cursor: not-allowed;
            pointer-events: none;
            box-shadow: none;
        }
        
        /* AI Settings Screen */
        .stratos-settings-body {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            min-height: 0;
        }
        .stratos-settings-card {
            background: rgba(245, 240, 225, 0.03);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .stratos-settings-card-title {
            font-size: 13px;
            font-weight: 850;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .stratos-settings-card-title i, .stratos-settings-card-title svg {
            width: 16px; height: 16px;
            color: var(--brand);
        }
        .stratos-settings-input {
            width: 100%;
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text);
            padding: 10px 12px;
            font-size: 13px;
            font-family: inherit;
            outline: none;
            transition: border-color 0.2s ease;
        }
        .stratos-settings-input:focus {
            border-color: var(--brand);
        }
        .stratos-settings-textarea {
            width: 100%;
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text);
            padding: 10px 12px;
            font-size: 13px;
            font-family: inherit;
            outline: none;
            resize: none;
            height: 70px;
            transition: border-color 0.2s ease;
        }
        .stratos-settings-textarea:focus {
            border-color: var(--brand);
        }
        .stratos-settings-help-text {
            font-size: 11px;
            color: var(--text-secondary);
            font-weight: 600;
            line-height: 1.4;
        }
        
        .stratos-settings-section-title {
            font-size: 11px;
            font-weight: 850;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--brand);
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 10px;
            margin-bottom: 8px;
        }
        .stratos-settings-section-title i, .stratos-settings-section-title svg {
            width: 14px; height: 14px;
        }
        .stratos-settings-option-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 12px;
        }
        .stratos-settings-pill {
            background: transparent;
            border: 1px solid var(--border);
            color: var(--text-secondary);
            padding: 8px 14px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .stratos-settings-pill:hover {
            color: var(--text);
            border-color: rgba(var(--brand-rgb), 0.4);
            background: rgba(var(--brand-rgb), 0.04);
        }
        .stratos-settings-pill.active {
            background: var(--brand) !important;
            color: var(--bg) !important;
            border-color: var(--brand) !important;
            box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.2);
        }
        .stratos-settings-action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 12px;
            background: rgba(245, 240, 225, 0.03);
            color: var(--text);
            border: 1px solid var(--border);
            border-radius: 12px;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }
        .stratos-settings-action-btn:hover {
            background: rgba(var(--brand-rgb), 0.08);
            border-color: var(--brand);
        }

        .history-item-hover:hover {
            background: rgba(var(--brand-rgb), 0.05) !important;
            border-color: var(--brand) !important;
        }
        .history-item-hover:hover .delete-btn-hover {
            opacity: 1;
        }
        .delete-btn-hover {
            opacity: 0.6;
        }
        .delete-btn-hover:hover {
            background: rgba(239, 68, 68, 0.1) !important;
            transform: scale(1.1);
        }

        .config-toggle-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: rgba(245, 240, 225, 0.05);
            transition: .3s;
            border-radius: 24px;
            border: 1px solid var(--border);
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background-color: var(--text-secondary);
            transition: .3s;
            border-radius: 50%;
        }
        input:checked + .slider {
            background-color: var(--brand);
            border-color: var(--brand);
        }
        input:checked + .slider:before {
            transform: translateX(20px);
            background-color: var(--bg);
        }

        @keyframes pulse-red {
            0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
            70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
            100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        .recording {
            animation: pulse-red 1.5s infinite !important;
            background: rgba(239, 68, 68, 0.15) !important;
            border-color: #ef4444 !important;
            color: #ef4444 !important;
        }
        .stratos-attach-dropdown button:hover {
            background: rgba(var(--brand-rgb), 0.08) !important;
        }

        /* ── Premium Stratos Custom Elements (faithful to App) ── */
        .stratos-chat-avatar-container {
            width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
            background: var(--brand);
            border: 2px solid rgba(var(--brand-rgb), 0.3);
            display: flex; align-items: center; justify-content: center;
            overflow: visible;
        }
        .stratos-header-avatar-img {
            width: 80px; height: 80px; object-fit: contain; object-position: center;
        }
        #btn-stratos-voice:hover, #btn-stratos-attach:hover {
            background: var(--bg) !important;
            color: var(--brand) !important;
            opacity: 1 !important;
        }
        #btn-stratos-voice:hover svg, #btn-stratos-attach:hover svg {
            color: var(--brand) !important;
        }
        .stratos-header-dots-btn {
            opacity: 0.8;
            transition: opacity 0.2s;
        }
        .stratos-header-dots-btn:hover {
            opacity: 1;
        }
        .stratos-header-icon-btn {
            color: var(--text-secondary);
            transition: color 0.2s, transform 0.2s;
        }
        .stratos-header-icon-btn:hover {
            color: var(--brand);
            transform: scale(1.1);
        }

        /* Input capsule styled exactly like app */
        .stratos-chat-input-capsule {
            display: flex;
            align-items: center;
            gap: 10px;
            background: var(--brand);
            border-radius: 9999px;
            padding: 6px 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
            width: 100%;
        }
        .stratos-chat-input-capsule:focus-within {
            box-shadow: 0 4px 20px rgba(var(--brand-rgb), 0.3);
        }
        .stratos-chat-input-capsule textarea {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--bg);
            font-family: inherit;
            font-size: 14px;
            font-weight: 600;
            outline: none;
            resize: none;
            max-height: 80px;
            padding: 8px 4px;
            line-height: 1.4;
        }
        .stratos-chat-input-capsule textarea::placeholder {
            color: rgba(30, 41, 59, 0.6);
            font-weight: 500;
        }
        .stratos-input-btn {
            background: var(--bg) !important;
            color: var(--brand) !important;
            border: none;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            flex-shrink: 0;
            margin-bottom: 0 !important;
        }
        .stratos-input-btn:hover {
            transform: scale(1.06);
            opacity: 0.95;
        }
        .stratos-input-btn svg {
            width: 18px;
            height: 18px;
            color: var(--brand) !important;
        }

        /* Config layout: Option buttons & cards */
        .stratos-config-card {
            background: rgba(245, 240, 225, 0.04);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 16px;
            margin-bottom: 20px;
        }
        .stratos-option-grid-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 20px;
        }
        .stratos-option-btn {
            background: transparent;
            color: var(--text);
            border: 1px solid rgba(245, 240, 225, 0.2);
            padding: 10px 12px;
            border-radius: 9999px;
            font-size: 12px;
            font-weight: 750;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .stratos-option-btn:hover {
            border-color: var(--brand);
            background: rgba(var(--brand-rgb), 0.05);
        }
        .stratos-option-btn.selected {
            background: var(--brand) !important;
            color: var(--bg) !important;
            border-color: var(--brand) !important;
        }
        .stratos-config-label {
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 10px;
        }
        .stratos-config-label i {
            width: 14px;
            height: 14px;
            color: var(--brand);
        }
        .stratos-action-btn-large {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 14px;
            background: var(--brand);
            color: var(--bg);
            border: none;
            border-radius: 9999px;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 12px;
        }
        .stratos-action-btn-large:hover {
            transform: translateY(-2px);
            opacity: 0.95;
            box-shadow: 0 4px 15px rgba(var(--brand-rgb), 0.2);
        }

        /* Message Timestamps container */
        .stratos-msg-container {
            display: flex;
            flex-direction: column;
            gap: 4px;
            width: 100%;
        }
        .stratos-msg-container.user {
            align-items: flex-end;
        }
        .stratos-msg-container.bot {
            align-items: flex-start;
        }
        .stratos-msg-time {
            font-size: 10px;
            color: var(--text-secondary);
            margin-top: 2px;
            padding: 0 4px;
            font-weight: 500;
        }

        .history-item-hover:hover {
            background: rgba(245, 240, 225, 0.08) !important;
            border-color: var(--brand) !important;
        }
        .delete-btn-hover:hover {
            background: rgba(239, 68, 68, 0.1) !important;
        }

        .ctx-card {
            background: rgba(245, 240, 225, 0.02);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 16px;
        }
        .ctx-tx-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 12px;
            border-radius: 10px;
            background: rgba(245, 240, 225, 0.01);
            border: 1px solid var(--border);
            font-size: 13px;
        }
        .ctx-tx-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .ctx-tx-title {
            font-weight: 700;
        }
        .ctx-tx-date {
            font-size: 11px;
            color: var(--text-secondary);
        }
        .ctx-tx-amount {
            font-weight: 800;
        }
        .ctx-tx-amount.income {
            color: #4ade80;
        }
        .ctx-tx-amount.expense {
            color: #f87171;
        }

        @keyframes pulse-mic-anim {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.15); opacity: 0.8; }
            100% { transform: scale(1); opacity: 1; }
        }
        .pulse-mic {
            animation: pulse-mic-anim 1.5s infinite ease-in-out;
        }
        .stratos-chat-input-container button:hover { opacity: 0.85; }

        /* ── Quick Add Modal ── */
        .modal-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
            z-index: 4000; display: none; align-items: center; justify-content: center;
        }
        .modal-overlay.open { display: flex; }
        .modal-box {
            background: var(--bg); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 32px; width: 420px; max-width: 90vw;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: fadeIn 0.3s ease;
        }
        .modal-title { font-size: 20px; font-weight: 800; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
        .modal-actions { display: flex; gap: 32px; margin-top: 24px; }
        .modal-actions .btn { flex: 1; }

        /* ── Quick-Add FAB ── */
        .quick-add-fab {
            position: fixed; bottom: 32px; right: 108px; z-index: 3000;
            width: 48px; height: 48px; border-radius: 50%;
            background: var(--brand); color: var(--bg);
            border: none; display: none; align-items: center; justify-content: center;
            cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,0.3);
            transition: var(--transition); font-size: 24px; font-weight: 900;
        }
        .quick-add-fab:hover { transform: scale(1.08); }

        /* ── Type Toggle in Modal ── */
        .type-toggle { display: flex; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 20px; }
        .type-toggle-btn {
            flex: 1; padding: 10px; text-align: center; font-weight: 700; font-size: 14px;
            cursor: pointer; transition: var(--transition); background: transparent; color: var(--text-secondary); border: none;
        }
        .type-toggle-btn.active-income { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
        .type-toggle-btn.active-expense { background: rgba(248, 113, 113, 0.15); color: #f87171; }

        /* ── Forecast Card ── */
        .forecast-value { font-size: 24px; font-weight: 900; margin-top: 8px; }
        .forecast-detail { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }

        /* ── Landing Page Styles ── */
        .landing-container { display: flex; flex-direction: column; gap: 0; }
        .hero-section { padding: 40px 0 100px; text-align: center; }
        .hero-logo-box { 
            margin: 0 auto 40px; transform: scale(1.1); background: var(--brand); 
            width: 100px; height: 100px; border-radius: 32px; 
            display: flex; align-items: center; justify-content: center;
        }
        .premium-text-gradient {
            background: linear-gradient(135deg, #F5F0E1 0%, #C4A484 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .hero-title { font-weight: 950; letter-spacing: 4px; font-size: clamp(48px, 10vw, 80px); padding-left: 4px; }
        .hero-subtitle { font-weight: 800; font-size: clamp(20px, 4vw, 28px); letter-spacing: 6px; opacity: 0.9; margin-top: 10px; padding-left: 6px; }
        .hero-p { font-size: 20px; max-width: 1000px; margin: 32px auto; line-height: 1.6; color: var(--text-secondary); white-space: nowrap; }
        @media (max-width: 1024px) {
            .hero-p { white-space: normal; font-size: 18px; padding: 0 20px; }
        }
        .store-btns { display: flex; justify-content: center; gap: 24px; margin-top: 48px; flex-wrap: wrap; }
        
        .trust-bar { margin-top: 120px; display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; opacity: 0.6; padding: 0 20px; }
        .trust-item { display: flex; align-items: center; gap: 32px; font-size: 11px; font-weight: 900; letter-spacing: 1.5px; }
        
        .section-padding { padding: 120px 0; border-top: 1px solid rgba(245,240,225,0.05); }
        .flex-split { display: flex; align-items: center; gap: 60px; flex-wrap: wrap; }
        .flex-split > * { flex: 1; min-width: 320px; }
        
        .feature-label { color: var(--brand); font-weight: 800; font-size: 14px; letter-spacing: 4px; text-transform: uppercase; display: block; margin-bottom: 20px; }
        .feature-title { font-size: clamp(32px, 5vw, 48px); font-weight: 900; line-height: 1.2; margin-bottom: 32px; }
        
        .feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
        .feature-item { display: flex; align-items: flex-start; gap: 16px; font-size: 16px; }
        .feature-icon-box { 
            width: 32px; height: 32px; border-radius: 8px; background: rgba(196,164,132,0.1); 
            display: flex; align-items: center; justify-content: center; color: var(--brand); flex-shrink: 0; 
        }
        
        .mockup-card-container { width: 100%; max-width: 500px; height: 350px; background: linear-gradient(135deg, rgba(245,240,225,0.05), rgba(245,240,225,0.01)); border: 1px solid rgba(245,240,225,0.1); border-radius: 40px; position: relative; padding: 40px; overflow: hidden; }
        
        .ai-section { text-align: center; margin-bottom: 80px; }
        .ai-badge { display: inline-flex; align-items: center; gap: 10px; background: rgba(196,164,132,0.1); color: var(--brand); padding: 10px 20px; border-radius: 100px; font-size: 13px; font-weight: 800; letter-spacing: 2px; margin-bottom: 24px; border: 1px solid rgba(196,164,132,0.2); }
        
        .chat-container-mock { background: rgba(0,0,0,0.35); padding: 40px; border-radius: 40px; max-width: 440px; width: 100%; border: 1px solid rgba(245,240,225,0.05); box-shadow: 0 40px 80px rgba(0,0,0,0.5); }
        .chat-bubble { padding: 16px 24px; border-radius: 24px; font-size: 15px; line-height: 1.6; }
        .chat-bubble-user { align-self: flex-end; background: rgba(245,240,225,0.05); border: 1px solid rgba(245,240,225,0.1); color: #fff; border-radius: 24px 24px 4px 24px; font-weight: 700; }
        .chat-bubble-ai { align-self: flex-start; background: var(--text); color: var(--bg); border-radius: 24px 24px 24px 4px; }
        
        .ai-feature-card { display: flex; gap: 24px; align-items: flex-start; }
        .ai-feature-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); display: flex; align-items: center; justify-content: center; color: var(--bg); flex-shrink: 0; }
        .ai-feature-icon-alt { background: rgba(245,240,225,0.05); color: var(--brand); border: 1px solid rgba(196,164,132,0.2); }
        
        .web-mockup-frame { background: linear-gradient(180deg, rgba(245,240,225,0.08) 0%, rgba(245,240,225,0.02) 100%); border: 1px solid rgba(245,240,225,0.1); border-radius: 40px; padding: 20px; box-shadow: 0 60px 120px rgba(0,0,0,0.4); }
        .web-mockup-inner { background: var(--bg); border-radius: 24px; overflow: hidden; border: 1px solid rgba(245,240,225,0.05); }
        
        .plan-card { flex: 1; min-width: 300px; max-width: 400px; background: rgba(245,240,225,0.03); border: 1px solid rgba(245,240,225,0.05); border-radius: 40px; padding: 48px; display: flex; flex-direction: column; transition: var(--transition); }
        .plan-card:hover { transform: translateY(-10px); border-color: rgba(245,240,225,0.2); }
        .plan-card-zeus { background: linear-gradient(135deg, rgba(196,164,132,0.15), rgba(196,164,132,0.05)); border: 1px solid rgba(196,164,132,0.3); position: relative; overflow: hidden; }
        
        .final-cta { text-align: center; }
        .final-cta-title { font-size: clamp(48px, 10vw, 72px); font-weight: 950; margin-bottom: 24px; letter-spacing: -3px; line-height: 1; }

        /* Entrance Animations */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes scaleIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        .hero-section > * { animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both; }
        .hero-section h1 { animation-delay: 0.2s; }
        .hero-section p { animation-delay: 0.4s; }
        .hero-section .hero-cta { animation-delay: 0.6s; }
        
        .section-padding { 
            animation: fadeIn 1.2s ease-out both;
        }

        /* ── Mobile Overrides ── */
        @media (max-width: 768px) {
            .container { padding: 0 24px; }
            .hero-section { padding: 30px 0 60px; }
            .section-padding { padding: 80px 0; }
            .trust-bar { gap: 30px; margin-top: 80px; }
            .flex-split { gap: 40px; }
            .ai-feature-card { flex-direction: column; align-items: center; text-align: center; }
            .ai-feature-icon { margin-bottom: 16px; }
            .feature-title { font-size: 32px; }
            .final-cta-title { font-size: 48px; }
        }

        /* ── Hero Scroll Indicators ── */
        .hero-section { position: relative; }
        .hero-scroll-indicator {
            position: absolute;
            top: 50%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            color: var(--brand);
            opacity: 0.6;
            animation: bounceScroll 3s infinite ease-in-out;
            pointer-events: none;
            z-index: 10;
        }
        .hero-scroll-indicator.left { left: 80px; }
        .hero-scroll-indicator.right { right: 80px; }
        
        @keyframes bounceScroll {
            0%, 100% { transform: translateY(-50%) translateY(0); opacity: 0.3; }
            50% { transform: translateY(-50%) translateY(25px); opacity: 0.8; }
        }

        @media (max-width: 1400px) {
            .hero-scroll-indicator.left { left: 40px; }
            .hero-scroll-indicator.right { right: 40px; }
        }

        @media (max-width: 1200px) {
            .hero-scroll-indicator { display: none; }
        }


        /* ── Notification Dropdown ── */
        .notification-dropdown {
            position: absolute; top: calc(100% + 12px); right: 0; left: auto; width: 400px;
            background: var(--text); border: 1px solid rgba(var(--bg-rgb), 0.15);
            border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            display: none; flex-direction: column; z-index: 5000;
            overflow: hidden; animation: fadeIn 0.2s ease;
        }
        .notification-dropdown.show { display: flex; }
        .notification-header { padding: 16px; border-bottom: 1px solid rgba(92, 58, 36, 0.15); display: flex; align-items: center; gap: 12px; }
        .notification-header h4 { font-size: 14px; font-weight: 800; color: var(--bg); margin: 0; flex: 1; }
        .notification-list { height: 300px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; }
        .notification-item { padding: 12px; border-radius: 10px; display: flex; gap: 12px; cursor: pointer; transition: var(--transition); }
        .notification-item:hover { background: rgba(92, 58, 36, 0.05); }
        .notification-item.unread { background: rgba(196, 164, 132, 0.05); }
        .notification-icon-circle { width: 32px; height: 32px; border-radius: 8px; background: rgba(var(--bg-rgb), 0.1); display: flex; align-items: center; justify-content: center; color: var(--bg); flex-shrink: 0; }
        .notification-content { flex: 1; }
        .notification-title { font-size: 13px; font-weight: 700; color: var(--bg); margin-bottom: 2px; }
        .notification-time { font-size: 11px; color: var(--bg); opacity: 0.6; }
        .notification-footer { padding: 12px; border-top: 1px solid rgba(92, 58, 36, 0.15); text-align: center; }
        .notification-footer button { background: none; border: none; color: var(--bg); font-size: 12px; font-weight: 700; cursor: pointer; }

        /* New Card Style for Dropdown */
        .notif-dropdown-card {
            display: flex; align-items: center; gap: 12px; padding: 12px;
            border-radius: 12px; margin-bottom: 8px; transition: var(--transition);
            background: rgba(var(--bg-rgb), 0.05); cursor: pointer;
            border-left: 4px solid transparent;
        }
        .notif-dropdown-card:hover { background: rgba(var(--bg-rgb), 0.1); transform: translateX(4px); }
        .notif-dropdown-icon {
            width: 36px; height: 36px; border-radius: 10px;
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .notif-dropdown-content { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
        .notif-dropdown-title { font-size: 13px; font-weight: 700; color: var(--bg); }
        .notif-dropdown-dot { width: 8px; height: 8px; border-radius: 50%; background: #f87171; flex-shrink: 0; }

        /* ── Notification History (Mobile Format) ── */
        .notif-history-container { max-width: 800px; margin: 0 auto; padding: 20px 0; }
        .notif-history-card {
            display: flex; align-items: center; gap: 16px; padding: 20px;
            border-radius: 24px; margin-bottom: 16px; transition: var(--transition);
            border: 2px solid transparent; background: var(--text);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1); cursor: pointer;
            position: relative; overflow: hidden;
        }
        .notif-history-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
        .notif-history-icon {
            width: 48px; height: 48px; border-radius: 16px;
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
            color: #000000;
        }
        .notif-history-content { flex: 1; min-width: 0; }
        .notif-history-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
        .notif-history-title { 
            font-size: 16px; font-weight: 800; color: var(--bg); margin: 0; 
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
        }
        .notif-history-time { font-size: 11px; font-weight: 700; color: var(--bg); opacity: 0.6; flex-shrink: 0; }
        .notif-history-body { display: none; } /* Oculto en la lista */

        .notif-unread-dot {
            width: 8px; height: 8px; background: var(--bg); border-radius: 50%;
            position: absolute; top: 12px; right: 12px;
        }

        /* Detail View */
        .notif-detail-view { animation: fadeIn 0.3s ease; }
        .notif-detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
        .notif-detail-back {
            width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
            display: flex; align-items: center; justify-content: center; cursor: pointer;
            color: var(--text); transition: var(--transition);
        }
        .notif-detail-back:hover { background: var(--brand-soft); color: var(--brand); }
        .notif-detail-card {
            background: var(--text); border-radius: 32px; padding: 40px;
            border-left: 8px solid var(--brand); color: var(--bg);
        }
        .notif-detail-type-box {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 8px 16px; border-radius: 12px; font-size: 11px; font-weight: 900;
            text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px;
        }
        .notif-detail-title { font-size: 28px; font-weight: 900; margin-bottom: 16px; line-height: 1.2; }
        .notif-detail-body { font-size: 16px; line-height: 1.6; font-weight: 600; opacity: 0.9; margin-bottom: 32px; }
        .notif-detail-footer { border-top: 1px solid rgba(0,0,0,0.05); pt: 20px; font-size: 12px; font-weight: 700; opacity: 0.5; }

        .notif-filter-btn {
            padding: 10px 20px;
            border-radius: 50px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            transition: var(--transition);
            white-space: nowrap;
        }
        .notif-filter-btn:hover {
            background: rgba(var(--text-rgb), 0.05);
            color: var(--text);
        }
        .notif-filter-btn.active {
            background: var(--brand);
            color: var(--bg);
            border-color: var(--brand);
        }

        /* ── Configuration Page Layout ── */
        .config-container { display: flex; gap: 40px; margin-top: 20px; min-height: 70vh; }
        .config-sidebar { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
        .config-nav-item { 
            display: flex; align-items: center; gap: 12px; padding: 14px 20px; 
            border-radius: 14px; color: var(--text-secondary); font-weight: 700; 
            cursor: pointer; transition: var(--transition); text-decoration: none;
        }
        .config-nav-item:hover { background: rgba(245, 240, 225, 0.04); color: var(--text); }
        .config-nav-item.active { background: var(--brand); color: var(--bg); }
        .config-nav-item.config-nav-danger { color: #ef4444 !important; border: 1px solid rgba(239, 68, 68, 0.15); }
        .config-nav-item.config-nav-danger:hover { background: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; }
        .config-nav-item.config-nav-danger.active { background: #ef4444 !important; color: #fff !important; border-color: #ef4444; }
        .config-content { flex: 1; background: rgba(245, 240, 225, 0.02); border: 1px solid var(--border); border-radius: 24px; padding: 40px; }
        .config-section { display: none; }
        .config-section.active { display: block; animation: fadeIn 0.3s ease; }
        .config-title { font-size: 24px; font-weight: 900; margin-bottom: 32px; display: flex; align-items: center; gap: 12px; color: var(--brand); }
        
        .config-group { margin-bottom: 40px; }
        .config-group-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-bottom: 20px; opacity: 0.6; }
        
        .config-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid rgba(245,240,225,0.05); }
        .config-row:last-child { border-bottom: none; }
        .config-info { flex: 1; }
        .config-label { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
        .config-desc { font-size: 13px; color: var(--text-secondary); opacity: 0.8; }
        
        /* Theme Selector */
        .theme-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 10px; }
        .theme-card { 
            padding: 12px 8px; border-radius: 16px; border: 1px solid var(--border); 
            background: rgba(245, 240, 225, 0.03); cursor: pointer; transition: var(--transition);
            text-align: center;
        }
        .theme-card:hover { border-color: var(--brand); transform: translateY(-4px); }
        .theme-card.active { border-color: var(--brand); background: rgba(196, 164, 132, 0.1); }
        .theme-preview { width: 100%; height: 60px; border-radius: 8px; margin-bottom: 8px; }
        .theme-name { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
        
        .mode-selector { display: flex; gap: 16px; margin-top: 12px; }
        .mode-btn {
            width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
            border-radius: 16px; border: 1px solid var(--border); background: rgba(245, 240, 225, 0.03);
            cursor: pointer; transition: var(--transition); color: var(--text);
        }
        .mode-btn i { width: 28px; height: 28px; }
        .mode-btn:hover { border-color: var(--brand); transform: translateY(-4px); }
        .mode-btn.active { border-color: var(--brand); background: rgba(196, 164, 132, 0.1); color: var(--brand); }
        
        /* ── Active Nav Buttons ── */
        .nav-btn-active {
            background: rgba(245, 240, 225, 0.12) !important;
            border: 1px solid rgba(245, 240, 225, 0.6) !important;
            border-radius: 12px !important;
        }

        /* ── Custom Date Range Picker Calendar ── */
        .cal-day-cell {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 600;
            color: var(--text);
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
            user-select: none;
        }
        .cal-day-cell:hover:not(.empty) {
            background: rgba(196, 164, 132, 0.15);
        }
        .cal-day-cell.empty {
            cursor: default;
            opacity: 0.3 !important;
            pointer-events: none;
        }
        .cal-day-cell.selected {
            background: var(--brand) !important;
            color: var(--bg) !important;
            font-weight: 700 !important;
            border-radius: 6px !important;
        }
        .cal-day-cell.range-start {
            background: var(--brand) !important;
            color: var(--bg) !important;
            font-weight: 700 !important;
            border-top-left-radius: 6px !important;
            border-bottom-left-radius: 6px !important;
            border-top-right-radius: 0 !important;
            border-bottom-right-radius: 0 !important;
        }
        .cal-day-cell.range-end {
            background: var(--brand) !important;
            color: var(--bg) !important;
            font-weight: 700 !important;
            border-top-right-radius: 6px !important;
            border-bottom-right-radius: 6px !important;
            border-top-left-radius: 0 !important;
            border-bottom-left-radius: 0 !important;
        }
        .cal-day-cell.in-range {
            background: rgba(196, 164, 132, 0.2) !important;
            color: var(--text) !important;
            border-radius: 0 !important;
        }
        .cal-day-cell.disabled-date {
            opacity: 0.35 !important;
            cursor: not-allowed !important;
            pointer-events: none !important;
            background: transparent !important;
            color: var(--text-secondary) !important;
        }

        /* ═══════════════════════════════════════
           GESTIÓN PAGE STYLES
           ═══════════════════════════════════════ */

        /* Tab Navigation */
        .gestion-tabs {
            display: flex;
            gap: 4px;
            background: rgba(245,240,225,0.04);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 4px;
            margin-bottom: 28px;
            width: fit-content;
        }
        .gestion-tab-btn {
            padding: 10px 20px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-family: 'DM Sans', sans-serif;
            font-size: 13px;
            font-weight: 700;
            border-radius: 12px;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }
        .gestion-tab-btn:hover { color: var(--text); background: rgba(245,240,225,0.06); }
        .gestion-tab-btn.active {
            background: var(--brand);
            color: var(--bg);
        }
        .gestion-tab-btn i { width: 15px; height: 15px; }
        .gestion-tab-count {
            background: rgba(0,0,0,0.2);
            color: inherit;
            font-size: 10px;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 20px;
            min-width: 18px;
            text-align: center;
        }
        .gestion-tab-btn.active .gestion-tab-count { background: rgba(0,0,0,0.15); }

        /* Tab Content */
        .gestion-tab-panel { display: none; }
        .gestion-tab-panel.active { display: block; }

        /* Management Cards Grid */
        .mgmt-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
        }

        /* Management Card */
        .mgmt-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 20px;
            backdrop-filter: blur(10px);
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }
        .mgmt-card:hover {
            border-color: rgba(245,240,225,0.2);
            transform: translateY(-3px);
            box-shadow: 0 12px 30px rgba(0,0,0,0.2);
        }
        .mgmt-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--mgmt-accent, var(--brand)), transparent);
            opacity: 0.6;
        }

        /* Card Header */
        .mgmt-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }
        .mgmt-card-left {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }
        .mgmt-card-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 18px;
        }
        .mgmt-card-name {
            font-weight: 800;
            font-size: 15px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .mgmt-card-sub {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 2px;
        }
        .mgmt-card-actions {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .mgmt-action-btn {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            background: rgba(245,240,225,0.06);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
        }
        .mgmt-action-btn:hover { background: rgba(245,240,225,0.12); color: var(--text); }
        .mgmt-action-btn.danger:hover { background: rgba(248,113,113,0.15); color: #f87171; border-color: rgba(248,113,113,0.3); }
        .mgmt-action-btn i { width: 14px; height: 14px; }

        /* Progress Bar */
        .mgmt-progress-wrap {
            margin: 14px 0 8px;
        }
        .mgmt-progress-labels {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            margin-bottom: 8px;
        }
        .mgmt-progress-bar {
            height: 6px;
            background: rgba(245,240,225,0.08);
            border-radius: 100px;
            overflow: hidden;
        }
        .mgmt-progress-fill {
            height: 100%;
            border-radius: 100px;
            transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
        }
        .mgmt-progress-fill.ok { background: linear-gradient(90deg, #4ade80, #22c55e); }
        .mgmt-progress-fill.warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
        .mgmt-progress-fill.danger { background: linear-gradient(90deg, #f87171, #ef4444); }

        /* Badges */
        .mgmt-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
        }
        .mgmt-badge.income { background: rgba(74,222,128,0.12); color: #4ade80; }
        .mgmt-badge.expense { background: rgba(248,113,113,0.12); color: #f87171; }
        .mgmt-badge.freq { background: rgba(196,164,132,0.12); color: #C4A484; }
        .mgmt-badge.unread { background: rgba(96,165,250,0.15); color: #60a5fa; }
        .mgmt-badge.read { background: rgba(245,240,225,0.06); color: var(--text-secondary); }
        .mgmt-badge.info { background: rgba(96,165,250,0.12); color: #60a5fa; }
        .mgmt-badge.alert { background: rgba(251,191,36,0.12); color: #fbbf24; }
        .mgmt-badge.warning { background: rgba(248,113,113,0.12); color: #f87171; }
        .mgmt-badge.active { background: rgba(74,222,128,0.12); color: #4ade80; }
        .mgmt-badge.inactive { background: rgba(245,240,225,0.06); color: var(--text-secondary); }

        /* Goals Progress Ring */
        .goal-ring-container {
            position: relative;
            width: 64px;
            height: 64px;
            flex-shrink: 0;
        }
        .goal-ring-container svg { transform: rotate(-90deg); }
        .goal-ring-bg { fill: none; stroke: rgba(245,240,225,0.08); stroke-width: 5; }
        .goal-ring-fill { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.23,1,0.32,1); }
        .goal-ring-pct {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 800;
        }

        /* Goal amounts */
        .goal-amounts-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-top: 12px;
        }
        .goal-current { font-size: 18px; font-weight: 900; }
        .goal-target { font-size: 12px; color: var(--text-secondary); }

        /* Reminder Card */
        .reminder-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .reminder-date-badge {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 8px;
        }

        /* Recurring toggle switch */
        .toggle-switch {
            width: 40px;
            height: 22px;
            border-radius: 100px;
            border: none;
            cursor: pointer;
            position: relative;
            transition: var(--transition);
            flex-shrink: 0;
        }
        .toggle-switch.on { background: rgba(74,222,128,0.3); }
        .toggle-switch.off { background: rgba(245,240,225,0.1); }
        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 3px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--text);
            transition: var(--transition);
        }
        .toggle-switch.on::after { left: calc(100% - 19px); background: #4ade80; }
        .toggle-switch.off::after { left: 3px; background: var(--text-secondary); }

        /* Page header action button */
        .mgmt-add-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: var(--brand);
            color: var(--bg);
            border: none;
            border-radius: 14px;
            font-family: 'DM Sans', sans-serif;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            transition: var(--transition);
        }
        .mgmt-add-btn:hover { opacity: 0.85; transform: translateY(-2px); }
        .mgmt-add-btn i { width: 16px; height: 16px; }

        /* Empty state per tab */
        .mgmt-empty {
            text-align: center;
            padding: 60px 20px;
            opacity: 0.6;
        }
        .mgmt-empty i { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }
        .mgmt-empty h3 { font-size: 16px; margin-bottom: 8px; }
        .mgmt-empty p { font-size: 14px; color: var(--text-secondary); }
        .mgmt-empty button {
            background: var(--color-adaptive-bg) !important;
            color: var(--color-adaptive-text) !important;
            border: 1px solid rgba(var(--color-adaptive-text-rgb), 0.15) !important;
            padding: 8px 16px !important;
            font-size: 12px !important;
            font-weight: 800 !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            transition: var(--transition) !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
        }
        .mgmt-empty button:hover {
            opacity: 0.90 !important;
            transform: translateY(-1px) !important;
            box-shadow: 0 4px 10px rgba(var(--color-adaptive-text-rgb), 0.15) !important;
        }

        /* ── Notification Settings Accordion Card ── */
        .notif-config-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            overflow: hidden;
            transition: var(--transition);
        }
        .notif-config-card:hover {
            border-color: rgba(var(--text-rgb), 0.15);
        }
        .notif-card-main {
            display: flex;
            align-items: center;
            padding: 16px 20px;
            cursor: pointer;
            gap: 16px;
        }
        .notif-card-icon {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .notif-card-icon i {
            width: 20px;
            height: 20px;
        }
        .notif-card-info {
            flex: 1;
        }
        .notif-card-info h4 {
            font-size: 15px;
            font-weight: 800;
            color: var(--text);
            margin-bottom: 2px;
        }
        .notif-card-info p {
            font-size: 12px;
            color: var(--text-secondary);
            margin: 0;
            line-height: 1.4;
        }
        .notif-card-actions {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .notif-card-actions .chevron-arrow {
            width: 20px;
            height: 20px;
            color: var(--text-secondary);
            transition: var(--transition);
        }
        .notif-config-card.expanded .chevron-arrow {
            transform: rotate(180deg);
        }
        
        .notif-card-subtypes {
            padding: 16px 20px 20px 80px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            border-top: 1px dashed var(--border);
            animation: slideDown 0.3s ease;
        }
        .notif-subtype-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 0;
        }
        .notif-subtype-item span {
            font-size: 13.5px;
            font-weight: 600;
            color: var(--text);
        }

        /* ── Statera Custom Switch ── */
        .statera-switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }
        .statera-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .statera-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(var(--text-rgb), 0.1);
            transition: .3s;
            border-radius: 24px;
            border: 1px solid var(--border);
        }
        .statera-slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background-color: var(--text);
            transition: .3s;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0,0,0,0.15);
        }
        .statera-switch input:checked + .statera-slider {
            background-color: var(--brand);
            border-color: var(--brand);
        }
        .statera-switch input:checked + .statera-slider:before {
            transform: translateX(20px);
            background-color: var(--bg);
        }
        
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Form input select for gestion modals */
        .form-group { margin-bottom: 16px; }
        .form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
        .form-control {
            width: 100%;
            background: rgba(245,240,225,0.06);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text);
            font-family: 'DM Sans', sans-serif;
            font-size: 14px;
            padding: 10px 14px;
            outline: none;
            transition: var(--transition);
        }
        .form-control:focus { border-color: rgba(245,240,225,0.3); background: rgba(245,240,225,0.08); }
        .form-control option { background: #3d2b1a; color: var(--text); }

        /* Modal wider for gestion */
        .modal-box-wide { width: 480px; max-width: 92vw; }

        /* Add funds row for goals */
        .goal-add-funds-row {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        .goal-add-funds-input {
            flex: 1;
            background: rgba(245,240,225,0.06);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text);
            font-family: 'DM Sans', sans-serif;
            font-size: 14px;
            padding: 8px 12px;
            outline: none;
        }
        .goal-add-funds-btn {
            padding: 8px 16px;
            background: rgba(74,222,128,0.15);
            color: #4ade80;
            border: 1px solid rgba(74,222,128,0.3);
            border-radius: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: var(--transition);
            white-space: nowrap;
        }
        .goal-add-funds-btn:hover { background: rgba(74,222,128,0.25); }

        /* Gestion header row */
        .gestion-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 24px;
            gap: 16px;
            flex-wrap: wrap;
        }

        /* Two-col form grid */
        .form-grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0 16px;
        }
        .form-grid-2 .form-group.span-2 { grid-column: span 2; }

        /* Contrasted / Mobile-inspired Cards Styles */
        .mgmt-card {
            background: var(--text) !important; /* Lighter color of the active theme (Gaia -> #F5F0E1, Atenea -> #F2E8B6, Ares -> #FFECE0, etc.) */
            color: var(--bg) !important; /* Darker color of the active theme for robust contrast and readability */
            border: 1px solid var(--border) !important;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-height: 175px;
            border-radius: 24px;
            padding: 22px 26px;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            position: relative;
            cursor: pointer;
        }
        .mgmt-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        }
        .mgmt-card-title {
            color: var(--bg) !important;
            font-weight: 800;
        }
        .mgmt-card-body {
            color: var(--bg) !important;
            opacity: 0.95;
        }
        .mgmt-detail-expanded {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease-out, opacity 0.3s ease;
            opacity: 0;
            margin-top: 0;
            border-top: 1px dashed rgba(var(--bg-rgb), 0.15);
            padding-top: 0;
        }
        .mgmt-card.expanded .mgmt-detail-expanded {
            max-height: 500px;
            opacity: 1;
            margin-top: 15px;
            padding-top: 15px;
        }
        .mgmt-detail-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            margin-bottom: 12px;
            opacity: 0.85;
            color: var(--bg);
        }
        .mgmt-detail-item i {
            width: 16px;
            height: 16px;
            opacity: 0.7;
        }
        .mgmt-history-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: rgba(var(--bg-rgb), 0.07);
            border: none;
            color: var(--bg);
            padding: 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: var(--transition);
            width: 100%;
            margin-top: 10px;
        }
        .mgmt-history-btn:hover {
            background: rgba(var(--bg-rgb), 0.14);
        }
        .mgmt-card-actions {
            border-top: 1px solid rgba(var(--bg-rgb), 0.1);
            padding-top: 10px;
            margin-top: 12px;
        }
        .btn-card-action {
            background: rgba(var(--bg-rgb), 0.05);
            border: 1px solid rgba(var(--bg-rgb), 0.1);
            color: var(--bg);
            font-size: 12px;
            font-weight: 700;
            padding: 6px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .btn-card-action:hover {
            background: rgba(var(--bg-rgb), 0.12);
            color: var(--bg);
        }
        .btn-card-action.text-danger {
            color: #dc2626 !important;
            border-color: rgba(220, 38, 38, 0.25);
            background: rgba(220, 38, 38, 0.06);
        }
        .btn-card-action.text-danger:hover {
            background: rgba(220, 38, 38, 0.15);
            color: #b91c1c !important;
        }
        .btn-card-action.text-success {
            color: #16a34a !important;
            border-color: rgba(22, 163, 74, 0.25);
            background: rgba(22, 163, 74, 0.06);
        }
        .btn-card-action.text-success:hover {
            background: rgba(22, 163, 74, 0.15);
            color: #15803d !important;
        }
        .mgmt-progress-bar {
            background: rgba(var(--bg-rgb), 0.12) !important;
        }

        /* Trash specific styles */
        .trash-badge {
            background: rgba(248,113,113,0.1) !important;
            color: #dc2626 !important;
            border: 1px solid rgba(248,113,113,0.2);
            border-radius: 20px;
            padding: 2px 8px;
            font-size: 10px;
            font-weight: 700;
        }

        @media (max-width: 640px) {
            .gestion-tabs { flex-wrap: wrap; width: 100%; }
            .gestion-tab-btn { flex: 1; justify-content: center; font-size: 12px; padding: 8px 10px; }
            .mgmt-grid { grid-template-columns: 1fr; }
            .form-grid-2 { grid-template-columns: 1fr; }
            .form-grid-2 .form-group.span-2 { grid-column: span 1; }
        }


        /* ══════════════════════════════════════════════════════════════
           Página de bienvenida (#home). Todo lleva el prefijo lp- o se
           aplica con body.lp-mode, así no toca las vistas de la sesión.
           ══════════════════════════════════════════════════════════════ */
        :root {
            /* Fondo marrón y tinta beige (como la web por defecto) */
            --lp-canvas: #5C3A24;
            --lp-surface: #67442D;
            --lp-ink: #F5F0E1;
            --lp-brand: #F5F0E1;
            --lp-muted: #D2C5B3;
            --lp-line: rgba(245, 240, 225, 0.14);
            --lp-line-strong: rgba(245, 240, 225, 0.28);
            --lp-pos: #A9D8A4;
            --lp-neg: #F2A78F;
            --lp-hover: #FFFDF6;
            /* Banda clara (Stratos) y tarjeta de Zeus: beige con tinta marrón */
            --lp-on-dark: #5C3A24;
            --lp-on-dark-muted: #76594A;
            --lp-band-line: rgba(92, 58, 36, 0.18);
            --lp-display: 'DM Sans', system-ui, -apple-system, sans-serif;
            --lp-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
            --lp-ease: cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Cáscara compartida mientras se ve la bienvenida */
        body.lp-mode { background: var(--lp-canvas); color: var(--lp-ink); }
        body.lp-mode ::selection { background: var(--lp-brand); color: var(--lp-canvas); }
        body.lp-mode #loader { background: var(--lp-canvas); }
        body.lp-mode #loader .spinner { border-color: rgba(245, 240, 225, 0.18); border-top-color: var(--lp-brand); }
        body.lp-mode > footer { display: none; }
        /* Inicio de sesión: mismo estilo que la bienvenida, sin barra lateral ni barra superior global */
        /* Las páginas legales usan el mismo encabezado y el mismo estilo (body.legal-mode) */
        body.auth-mode, body.legal-mode { background: var(--lp-canvas); color: var(--lp-ink); }
        body.auth-mode ::selection, body.legal-mode ::selection { background: var(--lp-brand); color: var(--lp-canvas); }
        body.auth-mode #loader, body.legal-mode #loader { background: var(--lp-canvas); }
        body.auth-mode > nav,
        body.auth-mode > footer,
        body.auth-mode .sidebar,
        body.auth-mode .sidebar-scrim,
        body.legal-mode > nav,
        body.legal-mode > footer,
        body.legal-mode .sidebar,
        body.legal-mode .sidebar-scrim { display: none; }
        html body.auth-mode main, html body.legal-mode main { margin-left: 0; margin-top: 0; }
        #view-privacy.view, #view-terms.view, #view-arrepentimiento.view, #view-baja.view { padding: 0; }
        .lp-legal-main { padding: clamp(40px, 7vw, 88px) 16px clamp(64px, 9vw, 112px); }
        .lp-legal .page-narrow { max-width: 760px; margin: 0 auto; padding: 0; }
        .lp-legal .doc-card { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
        /* Selector de documento legal: botón con la página actual y lista con las otras tres */
        .lp-legal-menu { position: relative; justify-self: end; }
        .lp-legal-trigger {
            display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px;
            border: 1px solid var(--lp-line-strong); border-radius: 10px; background: transparent;
            color: var(--lp-ink); font: 600 14px var(--lp-sans); white-space: nowrap; cursor: pointer;
            transition: background-color 200ms ease, border-color 200ms ease, transform 160ms var(--lp-ease);
        }
        .lp-legal-trigger:active { transform: scale(0.97); }
        .lp-legal-trigger-ico { display: none; }
        .lp-legal-trigger svg { width: 18px; height: 18px; }
        .lp-legal-chev { display: flex; color: var(--lp-muted); transition: transform 200ms var(--lp-ease); }
        .lp-legal-chev svg { width: 16px; height: 16px; stroke-width: 2.2; }
        .lp-legal-menu.is-open .lp-legal-trigger { background: rgba(245, 240, 225, 0.08); border-color: var(--lp-ink); }
        .lp-legal-menu.is-open .lp-legal-chev { transform: rotate(180deg); }
        .lp-legal-dropdown {
            position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 250px; padding: 6px;
            border: 1px solid var(--lp-line-strong); border-radius: 14px; background: #67442D;
            box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
            opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px) scale(0.98); transform-origin: top right;
            transition: opacity 150ms ease, transform 150ms var(--lp-ease), visibility 0s linear 150ms;
        }
        .lp-legal-menu.is-open .lp-legal-dropdown {
            opacity: 1; visibility: visible; pointer-events: auto; transform: none;
            transition: opacity 150ms ease, transform 150ms var(--lp-ease), visibility 0s;
        }
        .lp .lp-legal-dropdown a {
            display: block; padding: 11px 12px; border-radius: 9px; white-space: nowrap;
            font-size: 14px; font-weight: 500; color: var(--lp-ink); text-decoration: none;
            transition: background-color 150ms ease;
        }
        .lp .lp-legal-dropdown a:focus-visible { outline: none; background: rgba(245, 240, 225, 0.1); }
        .lp-legal-dd-current { display: none; margin: 0; padding: 8px 12px 10px; border-bottom: 1px solid var(--lp-line); margin-bottom: 4px; font-size: 12px; color: var(--lp-muted); }
        @media (hover: hover) and (pointer: fine) {
            .lp-legal-trigger:hover { background: rgba(245, 240, 225, 0.08); }
            .lp .lp-legal-dropdown a:hover { background: rgba(245, 240, 225, 0.1); }
        }
        /* Pantallas angostas: solo ícono y flechita (el nombre está en el título y arriba de la lista) */
        @media (max-width: 560px) {
            .lp-legal-trigger { gap: 4px; padding: 0 8px 0 10px; }
            .lp-legal-trigger-ico { display: flex; }
            .lp-legal-trigger-label { display: none; }
            .lp-legal-dd-current { display: block; }
        }
        .lp-legal .doc-title {
            font-family: var(--lp-display); font-weight: 500; font-size: clamp(40px, 5.5vw, 60px);
            line-height: 1.04; letter-spacing: -0.025em; text-transform: none; color: var(--lp-ink); text-wrap: balance;
        }
        .lp-legal .doc-date { margin: 14px 0 32px; font-size: 14px; font-weight: 500; color: var(--lp-muted); }
        .lp-legal .section-body { font-size: 16px; line-height: 1.75; color: var(--lp-muted); opacity: 1; overflow-wrap: anywhere; }
        .lp-legal .doc-date + .section-body { font-size: 18px; line-height: 1.65; color: var(--lp-ink); }
        .lp-legal .section-block { margin: 0; padding: 28px 0; border-top: 1px solid var(--lp-line); border-bottom: 0; }
        .lp-legal .section-block:last-child { padding-bottom: 0; }
        .lp-legal .section-title { margin-bottom: 10px; font-family: var(--lp-sans); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; color: var(--lp-ink); }
        /* Pedido de reembolso con sesión iniciada (Botón de arrepentimiento) */
        .lp-legal .legal-refund[hidden], .lp-legal #legal-arr-mail[hidden] { display: none; }
        .lp-legal .legal-refund-card { margin: 4px 0 16px; padding: 18px 20px; border: 1px solid var(--lp-line-strong); border-radius: 14px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
        .lp-legal .legal-refund-card .section-body { color: var(--lp-ink); }
        .lp-legal .legal-refund-card.is-loading { align-items: center; }
        .lp-legal .legal-refund-note { padding-top: 10px; border-top: 1px solid var(--lp-line); font-size: 15px; }
        .lp-legal .legal-refund-spinner { width: 20px; height: 20px; border: 2px solid var(--lp-line-strong); border-top-color: var(--lp-ink); border-radius: 50%; animation: spin 0.8s linear infinite; }
        .lp-legal .legal-refund .lp-btn[disabled] { opacity: 0.6; cursor: progress; }
        .lp-legal .legal-refund-support { display: block; margin-top: 14px; text-align: center; font-size: 14px; font-weight: 600; color: var(--lp-muted); text-decoration: underline; text-underline-offset: 3px; }
        @media (prefers-reduced-motion: reduce) { .lp-legal .legal-refund-spinner { animation-duration: 2.4s; } }
        .lp-legal .form-control {
            width: 100%; height: 50px; padding: 0 16px; border: 1px solid var(--lp-line-strong); border-radius: 12px;
            background-color: rgba(245, 240, 225, 0.06); color: var(--lp-ink); font: 400 16px var(--lp-sans);
            transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
        }
        .lp-legal .form-control::placeholder { color: rgba(245, 240, 225, 0.5); }
        .lp-legal .form-control:focus { outline: none; border-color: var(--lp-ink); background-color: rgba(245, 240, 225, 0.09); box-shadow: 0 0 0 3px rgba(245, 240, 225, 0.12); }
        .lp-legal select.form-control {
            appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23F5F0E1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 14px center;
        }
        .lp-legal select.form-control option { background: #5C3A24; color: #F5F0E1; }
        .lp-legal .lp-btn-block { margin-top: 4px; }
        .lp-legal #legal-arr-result, .lp-legal #legal-baja-result {
            padding: 12px 14px; border: 1px solid rgba(169, 216, 164, 0.45); border-radius: 12px;
            background: rgba(169, 216, 164, 0.1); color: #D6EDD3; font-size: 14px; line-height: 1.55; font-weight: 500 !important;
        }
        #view-login.view { padding: 0; }
        .lp-auth-bar { position: sticky; top: 0; z-index: 60; background: rgba(92, 58, 36, 0.92); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--lp-line); }
        .lp-auth-bar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; }
        .lp-back {
            justify-self: start; display: inline-flex; align-items: center; justify-content: center;
            width: 40px; height: 40px; border: 1px solid var(--lp-line-strong); border-radius: 10px;
            background: transparent; color: var(--lp-ink); cursor: pointer;
            transition: background-color 200ms ease, transform 160ms var(--lp-ease);
        }
        .lp-back svg { width: 20px; height: 20px; stroke-width: 2.2; }
        .lp-back:active { transform: scale(0.95); }
        .lp .lp-auth-word { font-size: 16px; font-weight: 800; letter-spacing: 0.24em; color: var(--lp-ink); text-decoration: none; padding-left: 0.24em; }
        .lp-auth-main { min-height: calc(100svh - 72px); display: flex; align-items: center; justify-content: center; padding: clamp(32px, 6vh, 72px) 16px; }
        .lp-auth .auth-container { width: 100%; max-width: 420px; text-align: center; }
        .lp-auth .hero-logo {
            width: 56px; height: 56px; margin: 0 auto 24px; border-radius: 16px;
            background: var(--lp-brand); color: var(--lp-canvas); box-shadow: none;
        }
        .lp-auth .hero-logo svg { width: 28px; height: 28px; stroke-width: 2.2; }
        .lp-auth .auth-container h2 {
            margin-bottom: 28px; font-family: var(--lp-display); font-weight: 500;
            font-size: clamp(38px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.02em; color: var(--lp-ink);
        }
        .lp-auth-desc { max-width: 36ch; margin: -16px auto 28px; font-size: 16px; line-height: 1.55; color: var(--lp-muted); }
        .lp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
        #auth-forms .register-only { display: none; }
        #auth-forms.is-register .register-only { display: flex; }
        #auth-forms.is-register .lp-reqs.register-only { display: grid; }
        #auth-forms.is-register .login-only { display: none; }
        .lp-field { position: relative; display: flex; align-items: center; margin-bottom: 12px; }
        .lp-field-ico { position: absolute; left: 16px; display: flex; color: var(--lp-muted); pointer-events: none; }
        .lp-field-ico svg { width: 18px; height: 18px; stroke-width: 2; }
        .lp-input {
            width: 100%; height: 50px; padding: 0 16px 0 46px;
            border: 1px solid var(--lp-line-strong); border-radius: 12px;
            background: rgba(245, 240, 225, 0.06); color: var(--lp-ink); font: 400 16px var(--lp-sans);
            transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
        }
        .lp-field:has(.lp-field-eye) .lp-input { padding-right: 50px; }
        .lp-input::placeholder { color: rgba(245, 240, 225, 0.5); }
        .lp-input:focus { outline: none; border-color: var(--lp-ink); background: rgba(245, 240, 225, 0.09); box-shadow: 0 0 0 3px rgba(245, 240, 225, 0.12); }
        .lp-field:focus-within .lp-field-ico { color: var(--lp-ink); }
        .lp-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #67442D inset; -webkit-text-fill-color: var(--lp-ink); caret-color: var(--lp-ink); }
        .lp-field-eye {
            position: absolute; right: 6px; display: flex; align-items: center; justify-content: center;
            width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--lp-muted); cursor: pointer;
        }
        .lp-field-eye svg { width: 18px; height: 18px; }
        .lp-reqs { list-style: none; gap: 6px; margin: 2px 0 14px; padding: 0 4px; text-align: left; }
        .lp-reqs li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--lp-muted); transition: color 200ms ease; }
        .lp-reqs li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lp-neg); flex-shrink: 0; transition: background-color 200ms ease; }
        .lp-reqs li.is-ok { color: var(--lp-ink); }
        .lp-reqs li.is-ok::before { background: var(--lp-pos); }
        .lp-check { position: relative; align-items: flex-start; gap: 12px; margin: 6px 0 18px; padding: 0 2px; text-align: left; font-size: 13px; line-height: 1.5; color: var(--lp-ink); cursor: pointer; }
        .lp-check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
        .lp-check-box {
            display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
            border: 1.5px solid var(--lp-line-strong); border-radius: 6px; color: var(--lp-canvas); transition: background-color 160ms ease, border-color 160ms ease;
        }
        .lp-check-box svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transition: opacity 160ms ease; }
        .lp-check input:checked + .lp-check-box { background: var(--lp-brand); border-color: var(--lp-brand); }
        .lp-check input:checked + .lp-check-box svg { opacity: 1; }
        .lp-check input:focus-visible + .lp-check-box { outline: 2px solid var(--lp-ink); outline-offset: 3px; }
        .lp .lp-check a, .lp-auth-links a { color: var(--lp-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--lp-line-strong); text-underline-offset: 3px; }
        .lp .lp-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
        .lp-auth-submit { gap: 10px; }
        .lp-auth-submit svg { width: 18px; height: 18px; }
        .lp-btn.is-loading { position: relative; color: transparent !important; }
        .lp-btn.is-loading > * { visibility: hidden; }
        .lp-btn.is-loading::after {
            content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
            border: 2px solid currentColor; border-color: var(--lp-canvas) var(--lp-canvas) transparent transparent;
            animation: lp-spin 0.7s linear infinite;
        }
        .lp-btn-ghost.is-loading::after { border-color: var(--lp-ink) var(--lp-ink) transparent transparent; }
        @keyframes lp-spin { to { transform: rotate(360deg); } }
        .lp-google-ico { width: 18px; height: 18px; flex-shrink: 0; }
        .lp-auth .auth-divider { margin: 20px 0; font-size: 13px; color: var(--lp-muted); }
        .lp-auth .auth-divider::before, .lp-auth .auth-divider::after { border-bottom-color: var(--lp-line-strong); }
        .lp-auth-links { display: grid; gap: 12px; margin-top: 24px; font-size: 14px; color: var(--lp-muted); }
        .lp-auth-links a { font-weight: 500; text-decoration-color: transparent; }
        .lp-auth-links .lp-auth-legal { margin-top: 4px; font-size: 12px; color: var(--lp-muted); }
        .lp-auth-notice {
            display: grid; gap: 4px; margin: -8px 0 20px; padding: 12px 14px; border-radius: 12px; text-align: left;
            font-size: 14px; line-height: 1.5; border: 1px solid;
        }
        .lp-auth-notice[hidden] { display: none; }
        .lp-auth-notice strong { font-weight: 600; }
        .lp-auth-notice.is-error { border-color: rgba(242, 167, 143, 0.45); background: rgba(242, 167, 143, 0.1); color: #F8D3C6; }
        .lp-auth-notice.is-success { border-color: rgba(169, 216, 164, 0.45); background: rgba(169, 216, 164, 0.1); color: #D6EDD3; }
        .lp-notice-action {
            justify-self: start; margin-top: 6px; padding: 6px 12px; border: 1px solid currentColor; border-radius: 8px;
            background: transparent; color: inherit; font: 600 13px var(--lp-sans); cursor: pointer;
        }
        @media (hover: hover) and (pointer: fine) {
            .lp-back:hover { background: rgba(245, 240, 225, 0.08); }
            .lp-field-eye:hover { color: var(--lp-ink); background: rgba(245, 240, 225, 0.06); }
            .lp-auth-links a:hover, .lp .lp-check a:hover { text-decoration-color: currentColor; }
        }
        @media (max-width: 900px) {
            .lp-auth-bar-inner { height: 64px; }
            .lp-auth-main { min-height: calc(100svh - 64px); align-items: flex-start; }
        }

        /* En la bienvenida no van la barra lateral ni la barra superior de la sesión:
           la página tiene su propio encabezado y usa todo el ancho */
        body.lp-mode > nav,
        body.lp-mode .sidebar,
        body.lp-mode .sidebar-scrim { display: none; }
        html body.lp-mode main { margin-left: 0; margin-top: 0; }

        #view-home.view { padding: 0; }
        .lp {
            font-family: var(--lp-sans);
            font-size: 17px;
            line-height: 1.6;
            color: var(--lp-ink);
            font-variant-numeric: tabular-nums;
            -webkit-font-smoothing: antialiased;
        }
        .lp p { opacity: 1; }
        .lp a { color: inherit; }
        .lp a:hover { opacity: 1; }
        .lp b, .lp strong { font-weight: 600; }
        .lp :focus-visible { outline: 2px solid var(--lp-brand); outline-offset: 3px; border-radius: 6px; }
        .lp-dark :focus-visible, .lp-plan-zeus :focus-visible { outline-color: var(--lp-on-dark); }

        .lp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
        .lp-section { padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--lp-line); scroll-margin-top: 72px; }
        .lp-hero { scroll-margin-top: 72px; }

        /* Encabezado de la bienvenida */
        .lp-topbar {
            position: sticky; top: 0; z-index: 60;
            background: rgba(92, 58, 36, 0.92);
            -webkit-backdrop-filter: saturate(140%) blur(14px);
            backdrop-filter: saturate(140%) blur(14px);
            border-bottom: 1px solid transparent;
            transition: border-color 200ms ease;
        }
        .lp-topbar.is-scrolled { border-bottom-color: var(--lp-line); }
        .lp-topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; height: 72px; }
        .lp .lp-brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; text-decoration: none; color: var(--lp-ink); }
        /* Mismo ícono y forma que el botón INICIO de la barra lateral, con los colores invertidos de la bienvenida */
        .lp-brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lp-brand); color: var(--lp-canvas); flex-shrink: 0; }
        .lp-brand-mark svg { width: 22px; height: 22px; stroke-width: 2.3; }
        .lp-brand span { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
        .lp-nav { display: flex; align-items: center; gap: 4px; }
        .lp .lp-nav a {
            position: relative; padding: 8px 14px; border-radius: 10px;
            font-size: 14px; font-weight: 500; color: var(--lp-muted); text-decoration: none; white-space: nowrap;
            transition: color 200ms ease, background-color 200ms ease;
        }
        .lp .lp-nav a.is-active { color: var(--lp-ink); }
        .lp-nav a::after {
            content: ''; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px;
            border-radius: 50%; background: var(--lp-ink); opacity: 0; transform: scale(0.4);
            transition: opacity 200ms ease, transform 200ms var(--lp-ease);
        }
        .lp-nav a.is-active::after { opacity: 1; transform: none; }
        .lp-topbar-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
        .lp .lp-btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; white-space: nowrap; }
        /* "Iniciar sesión" como texto, al lado del botón "Crear cuenta" */
        .lp .lp-text-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--lp-muted); text-decoration: none; white-space: nowrap; transition: color 200ms ease; }
        .lp .lp-user-only { display: none; }
        body.is-logged .lp .lp-user-only { display: inline-flex; }
        body.is-logged .lp .lp-guest-only { display: none; }
        .lp-menu-btn {
            display: none; align-items: center; justify-content: center; width: 40px; height: 40px;
            border: 1px solid var(--lp-line-strong); border-radius: 10px; background: transparent;
            color: var(--lp-ink); cursor: pointer;
        }
        .lp-menu-btn svg { width: 20px; height: 20px; }
        .lp-menu { border-top: 1px solid var(--lp-line); }
        .lp-menu[hidden] { display: none; }
        .lp-menu-inner { display: grid; padding-top: 8px; padding-bottom: 20px; }
        .lp .lp-menu a:not(.lp-btn) {
            display: flex; justify-content: space-between; align-items: center; padding: 14px 2px;
            border-bottom: 1px solid var(--lp-line); font-size: 17px; font-weight: 500; color: var(--lp-ink); text-decoration: none;
        }
        .lp .lp-menu a.is-active:not(.lp-btn) { font-weight: 600; }
        .lp .lp-menu a.is-active:not(.lp-btn)::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--lp-ink); }
        .lp .lp-menu .lp-btn { margin-top: 18px; }
        body.is-logged .lp .lp-menu .lp-guest-only { display: none; }
        /* Celular y tablet: «Crear cuenta» / «Ir a Statera Web» van dentro del menú; fondo oscuro y la página
           quieta mientras el menú está abierto (en computadora no cambia nada: el menú no existe) */
        .lp-menu-scrim { display: none; }
        @media (max-width: 900px) {
            .lp .lp-top-cta { display: none !important; }
            /* Secciones del menú: la actual, más clara, con un fondo suave y el puntito a la derecha */
            .lp-menu-inner { gap: 2px; padding-top: 10px; padding-bottom: 16px; }
            .lp .lp-menu a:not(.lp-btn) { padding: 14px 12px; border-bottom: 0; border-radius: 10px; color: var(--lp-muted); transition: background-color 200ms ease, color 200ms ease; }
            .lp .lp-menu a.is-active:not(.lp-btn) { color: var(--lp-ink); background: rgba(245, 240, 225, 0.08); }
            .lp .lp-menu a.is-active:not(.lp-btn)::after { width: 7px; height: 7px; }
            .lp-menu { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; }
            .lp-menu-scrim {
                display: block; position: fixed; inset: 0; z-index: 59; background: rgba(20, 12, 7, 0.55);
                opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 0s linear 220ms;
            }
            html.lp-menu-open .lp-menu-scrim { opacity: 1; visibility: visible; transition: opacity 220ms ease, visibility 0s; }
            /* Solo en <html>: si el body también corta el scroll, el encabezado fijo pierde su lugar */
            html.lp-menu-open { overflow: hidden; overscroll-behavior: none; }
        }
        @media (prefers-reduced-motion: reduce) { .lp-menu-scrim { transition: none !important; } }
        /* Idioma: ícono del mundo con la lista de idiomas (el elegido con un tilde) */
        .lp-lang { position: relative; display: flex; }
        .lp-lang-trigger {
            display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
            border: 0; border-radius: 10px; background: transparent; color: var(--lp-muted); cursor: pointer;
            transition: color 200ms ease, background-color 200ms ease, transform 160ms var(--lp-ease);
        }
        .lp-lang-trigger svg { width: 19px; height: 19px; stroke-width: 1.8; }
        .lp-lang-trigger:active { transform: scale(0.96); }
        .lp-lang-trigger:focus-visible { outline: 2px solid var(--lp-ink); outline-offset: 2px; }
        .lp-lang.is-open .lp-lang-trigger { color: var(--lp-ink); background: rgba(245, 240, 225, 0.08); }
        .lp-lang-dropdown {
            position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 200px; padding: 6px;
            border: 1px solid var(--lp-line-strong); border-radius: 14px; background: #67442D;
            box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
            opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px) scale(0.98); transform-origin: top right;
            transition: opacity 150ms ease, transform 150ms var(--lp-ease), visibility 0s linear 150ms;
        }
        .lp-lang.is-open .lp-lang-dropdown {
            opacity: 1; visibility: visible; pointer-events: auto; transform: none;
            transition: opacity 150ms ease, transform 150ms var(--lp-ease), visibility 0s;
        }
        .lp .lp-lang-dropdown button {
            display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 11px 12px;
            border: 0; border-radius: 9px; background: transparent; color: var(--lp-ink); text-align: left; white-space: nowrap;
            font: 500 14px var(--lp-sans); cursor: pointer; transition: background-color 150ms ease;
        }
        .lp .lp-lang-dropdown button[aria-checked="true"] { font-weight: 600; }
        .lp .lp-lang-dropdown button:focus-visible { outline: none; background: rgba(245, 240, 225, 0.1); }
        .lp-lang-check { width: 16px; height: 16px; stroke-width: 2.2; opacity: 0; transition: opacity 150ms ease; }
        .lp-lang-dropdown button[aria-checked="true"] .lp-lang-check { opacity: 1; }
        @media (prefers-reduced-motion: reduce) { .lp-lang-dropdown { transition: none; transform: none; } }
        /* Teléfonos: con el ícono del idioma, la marca queda solo con su logo para que entren los botones */
        /* Compu chica / tablet horizontal (901–1120 px): marca con su logo y enlaces más juntos para que entre todo el encabezado */
        @media (min-width: 901px) and (max-width: 1120px) {
            .lp .lp-topbar .lp-brand > span:not(.lp-brand-mark) { display: none; }
            .lp-topbar-inner { gap: 16px; }
            .lp .lp-nav a { padding: 8px 10px; }
        }
        /* Pantallas angostas: la lista se alinea con el borde derecho del encabezado (no con el ícono) para no salirse */
        @media (max-width: 900px) { .lp-topbar-actions { position: relative; } .lp-lang { position: static; } }
        /* En portugués «em equilíbrio» es más largo: el título baja un poco para que la balanza siga en su línea */
        html[lang="pt"] .lp-h1 { font-size: clamp(42px, 5.4vw, 72px); }
        @media (hover: hover) and (pointer: fine) {
            .lp-lang-trigger:hover { color: var(--lp-ink); background: rgba(245, 240, 225, 0.08); }
            .lp .lp-lang-dropdown button:hover { background: rgba(245, 240, 225, 0.1); }
        }
        @media (hover: hover) and (pointer: fine) {
            .lp .lp-nav a:hover { color: var(--lp-ink); background: rgba(245, 240, 225, 0.06); }
            .lp .lp-text-link:hover { color: var(--lp-ink); }
            .lp-menu-btn:hover { background: rgba(245, 240, 225, 0.08); }
        }

        .lp-h1 {
            font-family: var(--lp-display);
            font-weight: 500;
            font-size: clamp(46px, 6vw, 80px);
            line-height: 0.98;
            letter-spacing: -0.03em;
            color: var(--lp-brand);
            text-wrap: balance;
        }
        .lp-h2 {
            font-family: var(--lp-display);
            font-weight: 500;
            font-size: clamp(34px, 4.4vw, 56px);
            line-height: 1.04;
            letter-spacing: -0.025em;
            color: var(--lp-brand);
            text-wrap: balance;
            max-width: 18ch;
        }
        .lp-sub { margin-top: 18px; font-size: 18px; color: var(--lp-muted); max-width: 52ch; text-wrap: pretty; }
        .lp-head { margin-bottom: clamp(40px, 5vw, 64px); }
        .lp-caption { margin-top: 14px; font-size: 12px; color: var(--lp-muted); text-align: center; }
        .lp-pos { color: var(--lp-pos); }
        .lp-neg { color: var(--lp-neg); }

        /* Botones */
        .lp-btn {
            display: inline-flex; align-items: center; justify-content: center; gap: 10px;
            min-height: 48px; padding: 0 22px; border-radius: 12px;
            font: 600 15px/1 var(--lp-sans); letter-spacing: -0.005em;
            text-decoration: none; border: 1px solid transparent; cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: transform 160ms var(--lp-ease), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
        }
        .lp-btn svg { width: 18px; height: 18px; stroke-width: 2; }
        .lp-btn:active { transform: scale(0.97); }
        .lp .lp-btn-primary { background: var(--lp-brand); color: var(--lp-canvas); }
        .lp .lp-btn-ghost { background: transparent; color: var(--lp-brand); border-color: var(--lp-line-strong); }
        /* «Iniciar sesión»: misma forma que «Crear cuenta», solo con el borde beige */
        .lp .lp-btn-outline { background: transparent; color: var(--lp-brand); border-color: var(--lp-brand); }
        .lp-btn-block { width: 100%; }
        @media (hover: hover) and (pointer: fine) {
            .lp .lp-btn-primary:hover { background: var(--lp-hover); }
.lp .lp-btn-ghost:hover {background: rgba(245, 240, 225, 0.08); border-color: var(--lp-brand); }
            .lp .lp-btn-outline:hover { background: rgba(245, 240, 225, 0.08); }
            .lp .lp-plan-zeus .lp-btn-primary:hover { background: #4A2E1C; }
            .lp-footer-col a:hover, .lp-fine a:hover, .lp-faq a:hover, .lp-about a:hover { text-decoration-color: currentColor; }
        }

        /* Hero */
        .lp-hero { padding: clamp(24px, 3.5vw, 44px) 0 clamp(72px, 9vw, 112px); }
        .lp-hero-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
            gap: clamp(40px, 6vw, 88px);
            align-items: center;
        }
        /* La balanza mide lo mismo que las letras altas del título (su base apoya en la línea del texto) */
        .lp-mark-wrap { display: inline-block; margin-left: 0.24em; vertical-align: -0.11em; line-height: 0; cursor: default; }
        .lp-mark {
            display: block; width: 0.98em; height: 0.98em; overflow: visible;
            fill: none; stroke: var(--lp-brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
        }
        .lp-mark circle { fill: var(--lp-brand); stroke: none; }
        .lp-mark-beam { transform-box: view-box; transform-origin: 32px 17px; }
        .lp-mark-beam.is-swinging { animation: lp-settle 1.9s both; }
        .lp-mark-beam.is-swinging.is-first { animation-delay: 0.45s; }
        @keyframes lp-settle {
            0%   { transform: rotate(-11deg); animation-timing-function: cubic-bezier(0.33, 0, 0.2, 1); }
            30%  { transform: rotate(6deg);   animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
            54%  { transform: rotate(-2.6deg); animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
            76%  { transform: rotate(1deg);   animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
            100% { transform: rotate(0deg); }
        }
        .lp-lead { margin-top: 24px; font-size: clamp(17px, 1.6vw, 19px); color: var(--lp-muted); max-width: 46ch; text-wrap: pretty; }
        .lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
        .lp-play-ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.lp-hero-copy > * { animation: lp-rise 0.9s var(--lp-ease) both; }
        .lp-hero-copy > :nth-child(2) { animation-delay: 0.06s; }
        .lp-hero-copy > :nth-child(3) { animation-delay: 0.14s; }
        .lp-hero-copy > :nth-child(4) { animation-delay: 0.22s; }
        .lp-hero-copy > :nth-child(5) { animation-delay: 0.3s; }
        .lp-hero-copy > :nth-child(6) { animation-delay: 0.38s; }
        @keyframes lp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
        @keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
        @keyframes lp-pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }

        /* Capturas de la app: panel con dos teléfonos solapados y dos etiquetas */
        .lp-hero-visual { margin: 0; justify-self: center; width: 100%; max-width: 600px; }
        @media (min-width: 901px) {
            /* El recuadro (alto = 1,1 × ancho) se achica según el alto de la pantalla para verse entero */
            .lp-hero-visual { max-width: min(500px, calc((100svh - 230px) / 1.1)); }
        }
        .lp-stage {
            position: relative; aspect-ratio: 60 / 66;
            border: 1px solid var(--lp-line); border-radius: 28px; background: var(--lp-surface);
            animation: lp-fade 0.8s ease both;
        }
        .lp-phone {
            position: absolute;
            border: 1px solid var(--lp-line-strong); border-radius: 30px; padding: 6px;
            background: var(--lp-canvas);
            box-shadow: 0 40px 70px -36px rgba(0, 0, 0, 0.55);
        }
        .lp-phone img { display: block; width: 100%; height: auto; border-radius: 25px; }
        .lp-phone-back { left: 8%; top: 7%; width: 38%; z-index: 1; animation: lp-rise 1s var(--lp-ease) 0.15s both; }
        .lp-phone-front { left: 40%; top: 10%; width: 43%; z-index: 2; animation: lp-rise 1s var(--lp-ease) 0.32s both; }
        .lp-chip {
            position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px;
            padding: 8px 14px 8px 8px; border-radius: 14px;
            background: var(--lp-brand); color: var(--lp-on-dark);
            box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
            font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap;
            animation: lp-pop 0.7s var(--lp-ease) 0.95s both;
        }
        .lp-chip small { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: var(--lp-on-dark-muted); }
        .lp-chip-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--lp-canvas); color: var(--lp-brand); flex-shrink: 0; }
        .lp-chip-ico svg { width: 18px; height: 18px; stroke-width: 2.4; }
        /* Cada cartel apenas pisa una esquina de su captura: el de arriba la de Stratos, el de abajo la de Inicio */
        .lp-chip-a { top: 1%; left: -20%; }
        .lp-chip-b { bottom: 3%; right: -8%; animation-delay: 1.15s; }
        .lp-scr-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
        .lp-scr-dim { color: var(--lp-muted); font-size: 12px; }
        .lp-bar { height: 6px; border-radius: 3px; background: rgba(245, 240, 225, 0.16); overflow: hidden; }
        .lp-bar span { display: block; height: 100%; border-radius: inherit; background: var(--lp-brand); }

        /* Cómo funciona */
        .lp-steps {
            list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: clamp(28px, 4vw, 56px); margin-top: clamp(40px, 5vw, 64px);
        }
        .lp-steps li { position: relative; border-top: 1px solid var(--lp-line-strong); padding-top: 24px; }
        .lp-steps li::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--lp-brand); }
        .lp-step-k { display: block; margin-bottom: 10px; font-family: var(--lp-display); font-size: 30px; line-height: 1.1; letter-spacing: -0.015em; color: var(--lp-brand); }
        .lp-steps p { color: var(--lp-muted); max-width: 36ch; }

        /* Funciones: grilla de 6 columnas (grandes = 4, chicas = 2, la última fila de a tres) */
        .lp-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; }
        .lp-cell {
            grid-column: span 2; min-width: 0; display: flex; flex-direction: column; gap: 14px;
            padding: clamp(24px, 2.6vw, 32px); border: 1px solid var(--lp-line); border-radius: 16px;
            background: var(--lp-surface);
        }
        .lp-cell-wide { grid-column: span 4; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; align-content: center; }
        .lp-cell-text { display: grid; gap: 14px; align-content: start; }
        .lp-cell-head { display: flex; align-items: center; gap: 12px; }
        .lp-cell-ico { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--lp-brand); color: var(--lp-canvas); }
        .lp-cell-ico svg { width: 18px; height: 18px; stroke-width: 2.1; }
        .lp-cell h3 { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.012em; color: var(--lp-ink); }
        .lp-cell p { font-size: 15.5px; line-height: 1.6; color: var(--lp-muted); max-width: 46ch; }
        .lp-viz { margin-top: auto; }
        .lp-cell-wide .lp-viz { margin-top: 0; }
        .lp-shot { display: block; width: 100%; height: auto; border: 1px solid var(--lp-line); border-radius: 14px; }
        /* Cuentas de ejemplo (como las tarjetas de Cuentas en la app): se puede elegir cuál está seleccionada */
        .lp-accs { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--lp-line); border-radius: 16px; background: var(--lp-canvas); }
        .lp-acc {
            display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left;
            border: 1px solid var(--lp-line-strong); border-radius: 14px; background: transparent; color: var(--lp-ink);
            font-family: var(--lp-sans); cursor: pointer;
            transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease, transform 160ms var(--lp-ease);
        }
        .lp-acc:active { transform: scale(0.98); }
        .lp-acc.is-on { background: var(--lp-brand); border-color: var(--lp-brand); color: var(--lp-canvas); }
        .lp-acc-ico { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; border: 2px solid #F5F0E1; background: var(--c); color: #F5F0E1; }
        .lp-acc-ico svg { width: 19px; height: 19px; }
        .lp-acc-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
        .lp-acc-txt b { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; line-height: 1.25; }
        .lp-acc-shared { display: inline-flex; }
        .lp-acc-shared svg { width: 15px; height: 15px; stroke-width: 2.2; }
        .lp-acc-txt small { font-size: 12px; font-weight: 500; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        @media (hover: hover) and (pointer: fine) {
            .lp-acc:not(.is-on):hover { background: rgba(245, 240, 225, 0.06); border-color: var(--lp-ink); }
        }
        .lp-widget-img { display: block; width: 100%; max-width: 420px; height: auto; margin-left: auto; margin-right: auto; }
        /* Widget de ejemplo hecho con HTML: copia exacta de widget/StateraWidgetLayout.tsx (tema Gaia, modo noche).
           Las medidas están en el lienzo de 833 × 300 de la captura original y escalan con el ancho (--u = 1 px del lienzo). */
        .lp-hw { position: relative; aspect-ratio: 833 / 300; container-type: inline-size; }
        .lp-hw-frame {
            --u: calc(100cqw / 833); --bg: #5C3A24; --fg: #F5F0E1;
            position: absolute; left: calc(var(--u) * 45.7); top: calc(var(--u) * 32.6); width: calc(var(--u) * 740.6); height: calc(var(--u) * 234.8);
            box-sizing: border-box; border: calc(var(--u) * 3.2) solid var(--fg); border-radius: calc(var(--u) * 47); background: var(--bg);
            font-family: 'Roboto', var(--lp-sans); color: var(--fg); line-height: 1; user-select: none;
        }
        .lp-hw-frame > *, .lp-hw-capsule > * { position: absolute; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
        .lp-hw svg { display: block; flex-shrink: 0; }
        /* Las posiciones de adentro se miden desde el borde interior del marco */
        .lp-hw-hbtn { top: calc(var(--u) * 22.9); width: calc(var(--u) * 60); height: calc(var(--u) * 60); border-radius: 50%; background: var(--fg); color: var(--bg); }
        .lp-hw-hbtn svg { width: calc(var(--u) * 30); height: calc(var(--u) * 30); }
        .lp-hw-hbtn-l { left: calc(var(--u) * 30.6); }
        .lp-hw-hbtn-r { left: calc(var(--u) * 646.6); }
        .lp-hw-title {
            top: calc(var(--u) * 22.9); height: calc(var(--u) * 60); left: calc(var(--u) * 90.6); width: calc(var(--u) * 556);
            padding-left: calc(var(--u) * 7.5); font-size: calc(var(--u) * 36.4); font-weight: 900; letter-spacing: calc(var(--u) * 7.5);
        }
        .lp-hw-divider { top: calc(var(--u) * 95.6); left: calc(var(--u) * 30.6); width: calc(var(--u) * 676); height: calc(var(--u) * 2.1); background: rgba(245, 240, 225, 0.145); }
        .lp-hw-capsule { top: calc(var(--u) * 109.7); left: calc(var(--u) * 30.6); width: calc(var(--u) * 675); height: calc(var(--u) * 96); border-radius: calc(var(--u) * 32); background: var(--fg); }
        .lp-hw-capsule > * { top: calc(var(--u) * 10); height: calc(var(--u) * 74.5); }
        .lp-hw-acc { left: calc(var(--u) * 10); width: calc(var(--u) * 74.5); border-radius: calc(var(--u) * 21); background: #6B4A3A; color: #FFFFFF; }
        .lp-hw-acc svg { width: calc(var(--u) * 36.4); height: calc(var(--u) * 36.4); }
        .lp-hw-send { left: calc(var(--u) * 98); width: calc(var(--u) * 397.5); border-radius: calc(var(--u) * 37.25); background: var(--bg); color: var(--fg); font-size: calc(var(--u) * 22.4); font-weight: 700; white-space: nowrap; padding-top: calc(var(--u) * 2); }
        .lp-hw-round { width: calc(var(--u) * 74.5); border-radius: 50%; background: var(--bg); color: var(--fg); }
        .lp-hw-round svg { width: calc(var(--u) * 38.6); height: calc(var(--u) * 38.6); }
        /* Ajuste fino de 1 px del lienzo para coincidir con cómo Android ubica los íconos */
        .lp-hw-capsule svg { transform: translate(var(--u), var(--u)); }
        .lp-hw-hbtn svg, .lp-hw-title { transform: translateY(var(--u)); }
        .lp-hw-plus { left: calc(var(--u) * 506); }
        .lp-hw-mic { left: calc(var(--u) * 591); }
        /* Widget un poco más grande (ocupa parte del margen interno) y centrado en el espacio libre, más cerca del texto */
        @media (min-width: 901px) {
            .lp-cell-third .lp-widget-img { width: calc(100% + 24px); max-width: 444px; margin: auto -12px; align-self: center; }
            /* Ejemplo de notificación a la misma altura que el widget (el JS hace el ajuste fino) */
            .lp-cell-third .lp-notif { margin: auto 0; transform: translateY(var(--lp-align, 0px)); }
        }
        /* Mini paneles de cada tarjeta */
        .lp-viz-dash, .lp-mini-chat, .lp-notif, .lp-themes { padding: 16px; border: 1px solid var(--lp-line); border-radius: 14px; background: var(--lp-canvas); }
        .lp-viz-dash { display: grid; gap: 14px; }
        .lp-seg { display: inline-flex; gap: 2px; width: fit-content; padding: 3px; border: 1px solid var(--lp-line-strong); border-radius: 10px; }
        .lp-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--lp-muted); }
        .lp-seg span.is-on { background: var(--lp-brand); color: var(--lp-canvas); }
        .lp-seg svg { width: 14px; height: 14px; }
        .lp-viz-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
        .lp-viz-label { font-size: 12px; color: var(--lp-muted); }
        .lp-viz-row b { font-size: 20px; letter-spacing: -0.01em; }
        .lp-chart.lp-chart-sm { height: 104px; gap: 8px; }
        .lp-seg-btns button {
            display: inline-flex; align-items: center; padding: 6px 12px; border: 0; border-radius: 7px; background: transparent;
            font: 600 12px var(--lp-sans); color: var(--lp-muted); cursor: pointer;
            transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--lp-ease);
        }
        .lp-seg-btns button.is-on { background: var(--lp-brand); color: var(--lp-canvas); }
        .lp-seg-btns button:active { transform: scale(0.96); }
        .lp-viz-row b { font-variant-numeric: tabular-nums; }
        .lp-chart-sm .lp-chart-bars span { transition: height 450ms var(--lp-ease), transform 0.9s var(--lp-ease); }
        .lp-dash-line { display: block; width: 100%; height: 56px; overflow: visible; }
        /* Dashboard: texto a todo el ancho arriba y el ejemplo a todo el ancho abajo */
        .lp-cell-wide.lp-cell-stack { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 24px; align-content: stretch; }
        .lp-cell-stack .lp-viz-dash { height: 100%; grid-template-rows: auto 1fr; }
        .lp-cell-stack .lp-dash-charts { align-items: stretch; }
        .lp-cell-stack .lp-chart.lp-chart-sm { height: 100%; min-height: 104px; }

        .lp-cell-stack .lp-cell-text p { max-width: 78ch; }
        .lp-dash-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
        .lp-dash-top .lp-viz-row { gap: 14px; }
        .lp-dash-charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 28px; }
        /* Gráfico de línea con ejes X e Y (sin valores) y las mismas etiquetas que las barras */
        .lp-line-chart { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-height: 104px; }
        .lp-line-plot {
            position: relative; min-height: 80px;
            border-left: 1px solid var(--lp-line-strong); border-bottom: 1px solid var(--lp-line-strong);
            background-image: linear-gradient(to bottom, rgba(245, 240, 225, 0.07) 1px, transparent 1px);
            background-size: 100% 33.333%;
        }
        .lp-line-plot .lp-dash-line { position: absolute; left: 0; top: 10%; width: 100%; height: 80%; margin: 0; min-height: 0; }
        .lp-line-ticks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); text-align: center; }
        .lp-line-ticks small { font-size: 11px; color: var(--lp-muted); }
        .lp-dash-line path {
            fill: none; stroke: var(--lp-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
            vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 350ms ease;
        }
        .lp-dash-line path.is-on { opacity: 1; }
        @media (hover: hover) and (pointer: fine) {
            .lp-seg-btns button:not(.is-on):hover { color: var(--lp-ink); background: rgba(245, 240, 225, 0.08); }
        }
        .lp-mini-chat { display: grid; gap: 10px; }
        .lp .lp-mini-user { justify-self: end; max-width: 88%; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: rgba(245, 240, 225, 0.14); color: var(--lp-ink); font-size: 13.5px; line-height: 1.4; }
        /* Tarjeta "Registro Confirmado" (igual a la del chat de Stratos en la app) */
        .lp-rec { justify-self: start; display: grid; gap: 10px; width: min(100%, 300px); padding: 10px; border-radius: 18px; background: var(--lp-brand); }
        .lp-rec-ok { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #2E9D5B; color: #FFFFFF; font-size: 13.5px; font-weight: 700; }
        .lp-rec-ok svg { width: 16px; height: 16px; stroke-width: 3; }
        .lp-rec-card { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--lp-canvas); color: var(--lp-ink); font-size: 14px; font-weight: 500; }
        .lp-rec-card > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
        .lp-rec-card svg { width: 17px; height: 17px; flex-shrink: 0; }
        .lp-rec-neg { color: #F08C7C; font-weight: 700; }
        /* Las cinco herramientas: dos arriba y tres abajo, separadas por líneas finas */
        .lp-tools { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--lp-line); border-radius: 14px; background: var(--lp-line); }
        .lp-tools li { grid-column: span 2; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--lp-canvas); }
        .lp-tools li:nth-child(-n+2) { grid-column: span 3; }
        .lp-cell-stack .lp-tools { height: 100%; grid-auto-rows: 1fr; }
        .lp-tool-ico { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border: 1px solid var(--lp-line-strong); border-radius: 9px; color: var(--lp-ink); }
        .lp-tool-ico svg { width: 16px; height: 16px; }
        .lp-tools li > div { display: grid; gap: 4px; }
        .lp-tools b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
        .lp-tools li > div > span { font-size: 15px; line-height: 1.5; color: var(--lp-muted); }
        /* Apariencia: el recuadro toma los colores del tema y modo elegidos (los mismos de la app) */
        .lp-themes {
            --t-bg: var(--t-dark); --t-fg: var(--t-light);
            display: grid; gap: 16px; background: var(--t-bg); border-color: var(--t-fg); color: var(--t-fg);
            transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease;
        }
        .lp-themes.is-day { --t-bg: var(--t-light); --t-fg: var(--t-dark); }
        /* Perímetro un poco más marcado en los ejemplos de Apariencia y Notificaciones (mismo espesor; el padding compensa para no cambiar el tamaño) */
        .lp-themes, .lp-cell-third .lp-notif { border-width: 2px; padding: 15px; }
        .lp-cell-third .lp-notif { border-color: var(--lp-ink); }
        .lp-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
        .lp-swatches button {
            display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer;
            font-family: var(--lp-sans); font-size: 12px; color: var(--t-fg); transition: color 300ms ease;
        }
        .lp-swatches button.is-on { font-weight: 700; }
        .lp-swatches i {
            width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
            box-shadow: 0 0 0 1px var(--t-fg); transition: box-shadow 200ms ease, transform 160ms var(--lp-ease);
        }
        .lp-swatches button.is-on i { box-shadow: 0 0 0 2px var(--t-bg), 0 0 0 4px var(--t-fg); }
        .lp-swatches button:active i { transform: scale(0.92); }
        .lp-themes .lp-seg { justify-self: center; border-color: var(--t-fg); }
        .lp-themes .lp-seg button {
            display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 7px; background: none; cursor: pointer;
            font-family: var(--lp-sans); font-size: 12px; font-weight: 600; color: var(--t-fg); opacity: 0.75;
            transition: background-color 300ms ease, color 300ms ease, opacity 200ms ease;
        }
        .lp-themes .lp-seg button.is-on { background: var(--t-fg); color: var(--t-bg); opacity: 1; }
        .lp-themes button:focus-visible { outline: 2px solid var(--t-fg); outline-offset: 3px; border-radius: 8px; }
        .lp-notif { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; }
        .lp-notif-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(242, 167, 143, 0.16); color: var(--lp-neg); }
        .lp-notif-ico svg { width: 17px; height: 17px; }
        .lp-notif > div { display: grid; gap: 3px; }
        .lp-notif b { font-size: 14px; font-weight: 600; }
        .lp-notif > div > span { font-size: 13px; line-height: 1.45; color: var(--lp-muted); }
        .lp-notif small { font-size: 11px; color: var(--lp-muted); white-space: nowrap; }

        /* Stratos (banda oscura) */
        .lp-dark { background: var(--lp-brand); color: var(--lp-on-dark); border-top: 0; }
        .lp-dark .lp-h2 { color: var(--lp-on-dark); }
        .lp-dark .lp-sub, .lp-dark .lp-note { color: var(--lp-on-dark-muted); }
        .lp-dark .lp-caption { color: rgba(92, 58, 36, 0.72); }
        .lp-split-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
        .lp-checks { list-style: none; display: grid; gap: 12px; margin-top: 32px; }
        .lp-checks li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
        .lp-checks svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2.25; opacity: 0.8; }
        .lp-note { margin-top: 28px; font-size: 14px; }
        .lp-chat { margin: 0; }
        /* Stratos: su busto a la derecha del título. Mira a la derecha y, al pasar el mouse (o tocarlo),
           gira la cabeza hacia el frente: fundido entre las dos capas con un leve desenfoque y escala */
        .lp-stratos-head { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 24px); }
        .lp-stratos-bust { position: relative; flex-shrink: 0; display: block; width: clamp(64px, 7.2vw, 100px); aspect-ratio: 233 / 298; }
        /* Fundido escalonado: la cara que llega aparece primero (arriba) y la que se va se desvanece después,
           así nunca quedan las dos a medias. ~0,5 s en total. */
        .lp-stratos-bust img {
            --d-in: 0ms; --d-out: 170ms;
            position: absolute; inset: 0; display: block; width: 100%; height: 100%;
            transition: opacity 330ms cubic-bezier(0.4, 0, 0.2, 1) var(--d), transform 480ms cubic-bezier(0.4, 0, 0.2, 1), filter 330ms cubic-bezier(0.4, 0, 0.2, 1) var(--d);
        }
        .lp-bust-side { z-index: 1; --d: var(--d-in); }
        .lp-bust-front { z-index: 2; --d: var(--d-out); opacity: 0; transform: scale(0.97); filter: blur(1.5px); }
        .lp-stratos-bust.is-front .lp-bust-side { --d: var(--d-out); opacity: 0; transform: scale(0.97); filter: blur(1.5px); }
        .lp-stratos-bust.is-front .lp-bust-front { --d: var(--d-in); opacity: 1; transform: none; filter: none; }
        @media (hover: hover) and (pointer: fine) {
            .lp-stratos-bust:hover .lp-bust-side { --d: var(--d-out); opacity: 0; transform: scale(0.97); filter: blur(1.5px); }
            .lp-stratos-bust:hover .lp-bust-front { --d: var(--d-in); opacity: 1; transform: none; filter: none; }
        }
        @media (prefers-reduced-motion: reduce) {
            .lp-stratos-bust img { transition: opacity 200ms linear; transform: none !important; filter: none !important; }
        }
        /* El título ocupa solo el ancho de su línea más larga, así el busto queda pegado al texto */
        /* Planes: título corto en una sola línea cuando entra */
        #lp-planes-title { max-width: none; }
        #lp-stratos-title { max-width: 14.8ch; }
        /* El texto de abajo ocupa exactamente el ancho del título + el busto (contain: no agranda el bloque) */
        .lp-stratos-intro { width: fit-content; max-width: 100%; }
        .lp-stratos-intro .lp-sub { contain: inline-size; max-width: none; font-size: 19px; }
        @media (max-width: 640px) { .lp-stratos-intro .lp-sub { font-size: 18px; } }
        @media (min-width: 901px) { #lp-stratos-title { max-width: 11.8ch; } }
        .lp-chat-box { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--lp-band-line); border-radius: 20px; background: rgba(92, 58, 36, 0.05); }
        .lp-msg { max-width: 86%; padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
        .lp-msg-user { justify-self: end; background: var(--lp-canvas); color: var(--lp-ink); border-bottom-right-radius: 6px; }
        .lp-msg-bot { justify-self: start; display: grid; gap: 10px; background: rgba(92, 58, 36, 0.07); border: 1px solid var(--lp-band-line); border-bottom-left-radius: 6px; }
        .lp-msg.lp-msg-rec { max-width: 100%; padding: 0; border-radius: 0; background: none; }
        #lp-stratos .lp-chat-box { background: var(--lp-surface); border-color: var(--lp-surface); }
        #lp-stratos .lp-msg-bot { background: #E3DBCB; color: var(--lp-on-dark); }

        /* Statera Web */
        .lp-browser-fig { margin: 0; }
        .lp-browser { overflow: hidden; border: 1px solid var(--lp-line-strong); border-radius: 14px; background: var(--lp-surface); box-shadow: 0 40px 70px -44px rgba(0, 0, 0, 0.45); }
        .lp-browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--lp-line); background: var(--lp-canvas); }
        .lp-browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(245, 240, 225, 0.28); }
        .lp-browser-bar span { margin-left: 10px; padding: 3px 12px; border: 1px solid var(--lp-line); border-radius: 6px; background: var(--lp-surface); font-size: 12px; color: var(--lp-muted); }
        .lp-browser-body { display: grid; gap: 18px; padding: 20px; }
        .lp-browser-shot { display: block; width: 100%; height: auto; }
        /* La captura de Statera Web tiene más lugar que el texto, para que se lean los números */
        @media (min-width: 901px) { #lp-web .lp-split-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
        .lp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
        .lp-kpis div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--lp-line); border-radius: 10px; min-width: 0; }
        .lp-kpis span { font-size: 11px; color: var(--lp-muted); }
        .lp-kpis b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .lp-chart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; height: 150px; }
        .lp-chart-col { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; text-align: center; }
        .lp-chart-bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 100%; border-bottom: 1px solid var(--lp-line); }
        .lp-chart-bars span { width: 34%; max-width: 14px; border-radius: 3px 3px 0 0; background: var(--lp-brand); transform-origin: bottom; transition: transform 0.9s var(--lp-ease); }
        .lp-chart-bars span + span { background: rgba(245, 240, 225, 0.4); }
        .lp-chart-col:nth-child(2) span { transition-delay: 60ms; }
        .lp-chart-col:nth-child(3) span { transition-delay: 120ms; }
        .lp-chart-col:nth-child(4) span { transition-delay: 180ms; }
        .lp-chart-col:nth-child(5) span { transition-delay: 240ms; }
        .lp-chart-col:nth-child(6) span { transition-delay: 300ms; }
        .lp-chart-col small { font-size: 11px; color: var(--lp-muted); }
        .lp-legend { display: flex; gap: 16px; font-size: 12px; color: var(--lp-muted); }
        .lp-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--lp-brand); }
        .lp-dot-2 { background: rgba(245, 240, 225, 0.4); }
        .lp-tiers { margin: 28px 0 32px; border-top: 1px solid var(--lp-line); }
        .lp-tiers div { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--lp-line); }
        .lp-tiers dt { flex: 0 0 auto; min-width: 96px; font-weight: 600; white-space: nowrap; }
        .lp-tiers dd { color: var(--lp-muted); }
        .lp-btn svg[data-lucide="arrow-right"], .lp-btn .lucide-arrow-right { width: 16px; height: 16px; }

        /* Planes */
        .lp-plans {
            display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
            grid-template-rows: repeat(5, auto) 1fr;
            column-gap: 16px; max-width: 920px;
        }
        .lp-plan {
            grid-row: span 6; display: grid; grid-template-rows: subgrid;
            padding: clamp(28px, 3.5vw, 40px); border: 1px solid var(--lp-line-strong); border-radius: 16px;
            background: var(--lp-surface);
        }
        .lp-plan-zeus { background: var(--lp-brand); border-color: var(--lp-brand); color: var(--lp-on-dark); }
        .lp-plan-name { font-family: var(--lp-display); font-size: 38px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
        .lp-plan-desc { margin-top: 8px; color: var(--lp-muted); }
        .lp-plan-zeus .lp-plan-desc, .lp-plan-zeus .lp-price-per, .lp-plan-zeus .lp-price-eq { color: var(--lp-on-dark-muted); }
        .lp-period {
            justify-self: start; align-self: start; display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px;
            margin-top: 24px; padding: 3px; border-radius: 10px;
            background: rgba(92, 58, 36, 0.06); border: 1px solid var(--lp-band-line);
        }
        .lp-period button {
            padding: 9px 14px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
            font: 600 13px/1 var(--lp-sans); color: var(--lp-on-dark-muted);
            transition: background-color 200ms ease, color 200ms ease;
        }
        .lp-period button[aria-checked="true"] { background: var(--lp-canvas); color: var(--lp-brand); }
        .lp-period-ph { align-self: center; margin-top: 24px; font-size: 14px; color: var(--lp-muted); }
        .lp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 24px 0; }
        .lp-price-num { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
        .lp-price-per { font-size: 15px; color: var(--lp-muted); }
        .lp-price-eq { flex-basis: 100%; min-height: 20px; font-size: 13px; color: var(--lp-muted); }
        .lp .lp-plan-zeus .lp-btn-primary { background: var(--lp-canvas); color: var(--lp-brand); }
        .lp-feats { list-style: none; display: grid; gap: 12px; align-content: start; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--lp-line); }
        .lp-plan-zeus .lp-feats { border-top-color: var(--lp-band-line); }
        .lp-feats li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
        .lp-feats svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2.25; }
        /* Ícono de cada ítem dentro de un circulito, como en las tarjetas de planes de la app */
        .lp-feat-ico {
            display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
            border: 1px solid currentColor; background: color-mix(in srgb, currentColor 12.5%, transparent);
        }
        .lp-feats .lp-feat-ico svg { width: 12px; height: 12px; stroke-width: 2.25; }
        .lp-feats-limit li { color: var(--lp-muted); }
        .lp-fine { margin-top: 28px; max-width: 80ch; font-size: 13px; line-height: 1.6; color: var(--lp-muted); }
        .lp-fine a, .lp-faq a, .lp-about a { text-decoration: underline; text-decoration-color: var(--lp-line-strong); text-underline-offset: 3px; }

        /* Seguridad */
        .lp-trust { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
        .lp-trust li { display: grid; gap: 8px; align-content: start; padding-top: 20px; border-top: 1px solid var(--lp-line-strong); }
        .lp-trust svg { width: 22px; height: 22px; margin-bottom: 6px; stroke-width: 1.75; color: var(--lp-brand); }
        .lp-trust h3 { font-size: 17px; font-weight: 600; }
        .lp-trust p { font-size: 15px; color: var(--lp-muted); }

        /* Preguntas frecuentes */
        .lp-faq-grid, .lp-about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
        .lp-faq details { border-bottom: 1px solid var(--lp-line-strong); }
        .lp-faq details:first-child { border-top: 1px solid var(--lp-line-strong); }
        .lp-faq summary {
            display: flex; justify-content: space-between; align-items: center; gap: 24px;
            padding: 22px 0; list-style: none; cursor: pointer;
            font-size: 18px; font-weight: 500; color: var(--lp-ink);
        }
        .lp-faq summary::-webkit-details-marker { display: none; }
        .lp-faq summary::after {
            content: ''; flex-shrink: 0; width: 14px; height: 14px;
            background:
                linear-gradient(var(--lp-brand), var(--lp-brand)) center / 14px 1.5px no-repeat,
                linear-gradient(var(--lp-brand), var(--lp-brand)) center / 1.5px 14px no-repeat;
            transition: background-size 250ms var(--lp-ease);
        }
        .lp-faq details[open] summary::after { background-size: 14px 1.5px, 1.5px 0; }
        .lp-faq details p { max-width: 62ch; padding-bottom: 24px; color: var(--lp-muted); }

        /* Acerca */
        .lp-about p { max-width: 60ch; font-size: 18px; }
        .lp-about p + p { margin-top: 18px; color: var(--lp-muted); }
        .lp-about em { font-family: var(--lp-display); font-size: 1.12em; }
        .lp-about-text > p:first-child { color: var(--lp-ink); }
        .lp-about-text > p { color: var(--lp-muted); }
        /* Entrada de diccionario */
        .lp-lex { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--lp-line); }
        .lp-lex dd { margin: 0; }
        .lp-lex-word { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
        .lp-lex-word dfn { font-family: var(--lp-display); font-style: normal; font-weight: 500; font-size: clamp(42px, 5vw, 60px); line-height: 1; letter-spacing: -0.02em; color: var(--lp-ink); }
        .lp-lex-pron { font-size: 14px; letter-spacing: 0.06em; color: var(--lp-muted); }
        .lp-lex-meta { margin-top: 10px !important; font-family: var(--lp-display); font-style: italic; font-size: 16px; color: var(--lp-muted); }
        .lp-lex-senses { list-style: none; counter-reset: sense; display: grid; gap: 12px; margin-top: 20px; }
        .lp-lex-senses li { counter-increment: sense; position: relative; padding-left: 24px; font-size: 16px; line-height: 1.55; color: var(--lp-ink); }
        .lp-lex-senses li::before { content: counter(sense) "."; position: absolute; left: 0; top: 0; font-family: var(--lp-display); font-size: 17px; color: var(--lp-muted); }
        .lp-lex-senses abbr { text-decoration: none; font-style: italic; color: var(--lp-muted); }
        .lp-lex-origin { margin-top: 18px !important; font-size: 15px; line-height: 1.6; color: var(--lp-muted); }
        .lp-lex-origin b { font-weight: 600; color: var(--lp-ink); }
        .lp-lex-greek { font-family: var(--lp-display); font-style: italic; font-size: 1.15em; color: var(--lp-ink); }
        /* Aparición de la definición, acepción por acepción */
        .lp-js .lp-lex > * { opacity: 0; transform: translateY(8px); transition: opacity 0.7s var(--lp-ease), transform 0.7s var(--lp-ease); }
        .lp-js .lp-lex.is-in > * { opacity: 1; transform: none; }
        .lp-js .lp-lex.is-in > :nth-child(2) { transition-delay: 120ms; }
        .lp-js .lp-lex.is-in > :nth-child(3) { transition-delay: 240ms; }
        .lp-js .lp-lex.is-in > :nth-child(4) { transition-delay: 380ms; }
        /* Balanza romana: se dibuja y encuentra el equilibrio */
        .lp-steelyard { margin: 36px 0 0; max-width: 380px; color: var(--lp-ink); }
        .lp-steelyard svg { display: block; width: 100%; height: auto; overflow: visible; }
        .lp-steelyard .sy-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
        .lp-steelyard .sy-pivot { fill: var(--lp-canvas); }
        .lp-steelyard .sy-arm { stroke-width: 2.5; }
        .lp-steelyard .sy-weight-body { fill: currentColor; fill-opacity: 0.9; transition: fill-opacity 0.6s var(--lp-ease) 0.9s; }
        .lp-steelyard .sy-coin .sy-line { stroke: var(--lp-muted); }
        .lp-steelyard .sy-ring { fill: var(--lp-canvas); }
        .lp-js .lp-steelyard .sy-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--lp-ease); }
        .lp-js .lp-steelyard .sy-beam .sy-line { transition-delay: 0.15s; }
        .lp-js .lp-steelyard .sy-pan .sy-line, .lp-js .lp-steelyard .sy-weight .sy-line { transition-delay: 0.35s; }
        .lp-js .lp-steelyard:not(.is-drawn) .sy-weight-body { fill-opacity: 0; }
        .lp-js .lp-steelyard.is-drawn .sy-line { stroke-dashoffset: 0; }
        .lp-js .lp-steelyard.is-done .sy-line { stroke-dasharray: none; }
        /* Cierre */
        .lp-about-quote { margin: 40px 0 0; padding-top: 30px; border-top: 1px solid var(--lp-line); }
        .lp-about .lp-about-quote p { max-width: 30ch; font-family: var(--lp-display); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.25; letter-spacing: -0.015em; color: var(--lp-ink); text-wrap: balance; }
        .lp-about .lp-about-sign { margin-top: 22px; font-size: 15px; color: var(--lp-muted); }

        /* Cierre y pie */
        .lp-cta { padding: clamp(88px, 12vw, 148px) 0; border-top: 1px solid var(--lp-line); text-align: center; }
        .lp-cta .lp-h2 { margin: 0 auto; font-size: clamp(40px, 6vw, 76px); max-width: 14ch; }
        .lp-cta .lp-actions { justify-content: center; }
        .lp-footer { padding: 56px 0 32px; border-top: 1px solid var(--lp-line); font-size: 14px; }
        .lp-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
        /* Mismo logo que el encabezado: ícono y, a su derecha, «Statera / Finanzas» en dos líneas */
        .lp-footer-brand { display: flex; align-items: center; align-self: start; gap: 12px; }
        .lp-footer-mark { width: 46px; height: 46px; border-radius: 14px; }
        .lp-footer-mark svg { width: 26px; height: 26px; }
        .lp-footer-brand strong { font-size: 17px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--lp-ink); white-space: nowrap; }
        .lp-footer-col { display: grid; gap: 10px; align-content: start; }
        .lp-footer-col h3 { margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lp-muted); }
        .lp-footer-col a { width: fit-content; color: var(--lp-ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color 200ms ease; overflow-wrap: anywhere; }
        .lp-footer-copy { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--lp-line); font-size: 13px; color: var(--lp-muted); }

        /* Entradas al hacer scroll (solo si hay JS) */
        .lp-js .lp-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--lp-ease), transform 0.7s var(--lp-ease); transition-delay: calc(var(--i, 0) * 80ms); }
        .lp-js .lp-reveal.is-in { opacity: 1; transform: none; }
        .lp-js .lp-chat-box .lp-msg { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--lp-ease), transform 0.6s var(--lp-ease); transition-delay: calc(var(--i, 0) * 380ms); }
        .lp-js .lp-chat-box.is-in .lp-msg { opacity: 1; transform: none; }
        .lp-js .lp-browser:not(.is-in) .lp-chart-bars span { transform: scaleY(0.06); }

        @media (max-width: 1100px) {
            .lp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .lp-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
            .lp-footer-brand { grid-column: 1 / -1; }
        }
        @media (max-width: 900px) {
            .lp-nav { display: none; }
            .lp-chip-a { left: -4%; }
            .lp-menu-btn { display: inline-flex; }
            .lp .lp-text-link, .lp .lp-login-btn { display: none; }
            .lp-topbar-inner { grid-template-columns: 1fr auto; height: 64px; }
            .lp-section, .lp-hero { scroll-margin-top: 64px; }
            .lp-hero-grid,.lp-split-grid, .lp-faq-grid, .lp-about { grid-template-columns: minmax(0, 1fr); }
            .lp-split-rev > figure { order: 2; }
            .lp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .lp-cell { grid-column: span 1; }
            .lp-cell-wide, .lp-bento .lp-cell-widget { grid-column: span 2; }
            .lp-steps { grid-template-columns: minmax(0, 1fr); }
            .lp-plans { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 16px; }
            .lp-plan { grid-row: auto; display: flex; flex-direction: column; }
            .lp-period-ph { align-self: flex-start; margin-top: 16px; }
        }
        @media (max-width: 640px) {
            .lp { font-size: 16px; }
            .lp-bento { grid-template-columns: minmax(0, 1fr); }
            .lp-cell, .lp-cell-wide, .lp-bento .lp-cell-widget { grid-column: auto; }
            .lp-cell-wide { grid-template-columns: minmax(0, 1fr); gap: 20px; }
            .lp-dash-charts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
            .lp-tools { grid-template-columns: minmax(0, 1fr); }
            .lp-tools li, .lp-tools li:nth-child(-n+2) { grid-column: auto; }
            .lp-line-chart { min-height: 120px; }
            .lp-brand span { font-size: 15px; }
            .lp .lp-btn-sm { padding: 0 14px; }
            .lp-topbar-inner { gap: 12px; }
            .lp-hero-visual { max-width: 460px; }
            /* Celular vertical: los dos carteles, más chicos y en diagonal (Registro rápido arriba a la derecha,
               Dashboard interactivo abajo a la izquierda), cada uno apenas sobre una esquina de las capturas */
            .lp-chip-a { left: auto; right: 2%; top: -2.5%; font-size: 13px; padding: 7px 11px 7px 7px; gap: 9px; }
            .lp-chip-b { right: auto; left: 3%; bottom: -4.5%; font-size: 13px; padding: 8px 12px 8px 8px; gap: 10px; }
            .lp-chip small { font-size: 11.5px; }
            .lp-chip-ico { width: 30px; height: 30px; }
            .lp-phone { border-radius: 20px; padding: 4px; }
            .lp-phone img { border-radius: 16px; }
            .lp-phone-back { left: 6%; width: 41%; }
            .lp-phone-front { left: 40%; width: 46%; }

            .lp-trust { grid-template-columns: minmax(0, 1fr); }
            .lp-footer-grid { grid-template-columns: 1fr 1fr; }
            .lp-footer-col:last-child { grid-column: 1 / -1; }
            .lp-actions .lp-btn { flex: 1 1 100%; }
            .lp-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
            .lp-kpis div:first-child { grid-column: 1 / -1; }
            .lp-sub, .lp-about p { font-size: 17px; }
            .lp-faq summary { font-size: 17px; }
        }
        /* Barra superior en pantallas chicas (toda la web): que entren el menú, el nombre y el botón */
        @media (max-width: 600px) {
            nav .container.nav-content { padding: 0 12px; }
            .nav-wordmark { font-size: 18px !important; letter-spacing: 1px !important; }
            #nav-login-btn { padding: 10px 12px; font-size: 12px; white-space: nowrap; }
            .nav-actions { gap: 12px; }
        }
        @media (prefers-reduced-motion: reduce) {
            .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; }
            .lp-js .lp-reveal, .lp-js .lp-chat-box .lp-msg { opacity: 1 !important; transform: none !important; }
            .lp-js .lp-browser .lp-chart-bars span { transform: none !important; }
        }

        /* ═══════════════════════════════════════════════════════════════════════════
           SESIÓN INICIADA — la misma estética de la bienvenida (DM Sans, líneas
           finas, tarjetas de 16 px), con los colores del tema que eligió el usuario (los
           mismos de la app: Gaia, Hades, Atenea, Ares, Chronos o Poseidón, en día o noche).
           Con Gaia noche se ve igual que la bienvenida.
           ═══════════════════════════════════════════════════════════════════════════ */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) {
            --ap-canvas: var(--bg);
            --ap-ink: var(--text);
            --ap-surface: color-mix(in srgb, var(--text) 7%, var(--bg));
            --ap-surface-2: color-mix(in srgb, var(--text) 12%, var(--bg));
            --ap-line: rgba(var(--text-rgb), 0.14);
            --ap-line-strong: rgba(var(--text-rgb), 0.28);
            --ap-muted: color-mix(in srgb, var(--text) 76%, var(--bg));
            --ap-display: 'DM Sans', system-ui, -apple-system, sans-serif;
            --ap-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
            --ap-ease: cubic-bezier(0.16, 1, 0.3, 1);
            --text-secondary: var(--ap-muted);
            font-family: var(--ap-sans);
            background: var(--ap-canvas);
            color: var(--ap-ink);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) ::selection { background: var(--ap-ink); color: var(--ap-canvas); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) :focus-visible { outline: 2px solid var(--ap-ink); outline-offset: 3px; }

        /* Barra lateral */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar {
            background: var(--ap-surface); border-right: 1px solid var(--ap-line);
            border-radius: 0; box-shadow: none; font-family: var(--ap-sans);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo-container { height: 76px; border-bottom: 1px solid var(--ap-line); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-link {
            justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px;
            border: 1px solid transparent; background: transparent; color: var(--ap-muted);
            font-family: var(--ap-sans); font-size: 14px; font-weight: 600; letter-spacing: 0;
            transition: background-color 200ms var(--ap-ease), color 200ms var(--ap-ease);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo .logo-scale-right { display: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo svg.logo-scale, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-link svg { width: 19px; height: 19px; stroke-width: 2; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .logo-text { font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo.active, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-link.active {
            background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-canvas); font-weight: 600; padding-left: 12px;
        }
        @media (hover: hover) and (pointer: fine) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo:not(.active):hover, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-link:not(.active):hover { background: rgba(var(--text-rgb), 0.07); color: var(--ap-ink); transform: none; }
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-group-title { color: var(--ap-muted); opacity: 0.75; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; margin: 20px 12px 8px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-plan-label { color: var(--ap-ink) !important; font-weight: 700 !important; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #promo-zeus .plan-label-icon { color: var(--ap-muted) !important; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-separator { background: var(--ap-line); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-toggle { color: var(--ap-muted); border-color: var(--ap-line); font-family: var(--ap-sans); font-weight: 600; }
        @media (hover: hover) and (pointer: fine) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-toggle:hover { background: rgba(var(--text-rgb), 0.07); border-color: var(--ap-line-strong); color: var(--ap-ink); }
        }
        @media (min-width: 901px) {
            body.sidebar-collapsed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo,
            body.sidebar-collapsed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-link { justify-content: center; padding: 11px 0; gap: 0; font-size: 0; }
        }

        /* Barra superior: logo de la bienvenida al centro, cuenta y avisos a los costados */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav { background: color-mix(in srgb, var(--ap-canvas) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav::after { left: 0; right: 0; border-bottom-color: var(--ap-line); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-wordmark { display: inline-flex; align-items: center; gap: 12px; font-family: var(--ap-sans); font-size: 16px !important; font-weight: 800 !important; letter-spacing: -0.01em !important; color: var(--ap-ink) !important; white-space: nowrap; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-wordmark .lp-brand-mark { background: var(--ap-ink); color: var(--ap-canvas); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .user-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--ap-ink); color: var(--ap-canvas); border: 1px solid var(--ap-line); box-shadow: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .user-avatar span { font-family: var(--ap-sans) !important; font-size: 15px !important; font-weight: 700 !important; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #nav-notif-btn, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #nav-logout-btn {
            display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0 !important;
            border-radius: 12px; border: 1.5px solid var(--ap-line-strong) !important; background: transparent !important; color: var(--ap-ink) !important; box-shadow: none !important;
            transition: background-color 200ms var(--ap-ease);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #nav-notif-btn svg, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #nav-logout-btn svg { width: 19px; height: 19px; }
        @media (hover: hover) and (pointer: fine) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #nav-notif-btn:hover, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #nav-logout-btn:hover { background: rgba(var(--text-rgb), 0.08) !important; }
        }
        /* Avisos sin leer: un punto, como en la app */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #notif-badge { top: 6px !important; right: 6px !important; width: 10px !important; height: 10px !important; font-size: 0 !important; background: var(--ap-ink) !important; border: 2px solid var(--ap-canvas); }

        /* Encabezado de Inicio (como la app): saludo y cuenta; abajo, el período */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .ap-home-top {
            /* Encabezado de Inicio sólido (sin vidrio), igual que su barra superior */
            position: sticky; top: 76px; z-index: 100;
            background: var(--ap-canvas);
            padding: 28px 0 0; margin-bottom: 28px; border-bottom: 1px solid transparent;
            transition: border-color 200ms ease;
        }
        /* En Inicio la barra superior también es sólida (sin vidrio), para que el encabezado sea una sola pieza */
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav { background: var(--ap-canvas); backdrop-filter: none; -webkit-backdrop-filter: none; }
        /* La línea de abajo aparece recién al desplazar, como en la bienvenida */
        body.ap-scrolled.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .ap-home-top { border-bottom-color: var(--ap-line); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hello { display: grid; gap: 12px; min-width: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-greeting {
            margin: 0; font-family: var(--ap-display); font-weight: 500; font-size: clamp(34px, 3.6vw, 46px);
            line-height: 1.05; letter-spacing: -0.02em; color: var(--ap-ink); text-wrap: balance;
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-greeting span { color: var(--ap-ink); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-chip {
            display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%;
            padding: 6px 12px 6px 6px; border-radius: 14px; border: 1px solid var(--ap-line-strong);
            background: transparent; color: var(--ap-ink); font: 600 14px var(--ap-sans); cursor: pointer;
            transition: background-color 200ms var(--ap-ease), border-color 200ms var(--ap-ease);
        }
        @media (hover: hover) and (pointer: fine) { body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-chip:hover { background: rgba(var(--text-rgb), 0.06); border-color: var(--ap-ink); } }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid rgba(255, 255, 255, 0.85); color: #FFFFFF; flex-shrink: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-ico svg { width: 15px !important; height: 15px !important; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-cur { padding: 2px 6px; border-radius: 6px; background: rgba(var(--text-rgb), 0.1); font-size: 11px; font-weight: 700; color: var(--ap-muted); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-chev { width: 16px; height: 16px; color: var(--ap-muted); }

        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-period-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 16px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-nav { display: flex; align-items: center; gap: 8px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-period-actions { display: flex; align-items: center; gap: 8px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .home-period-sq {
            width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--ap-line); background: rgba(var(--text-rgb), 0.06); color: var(--ap-ink);
            transition: background-color 200ms var(--ap-ease), border-color 200ms var(--ap-ease);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .home-period-sq:hover:not(:disabled) { background: rgba(var(--text-rgb), 0.12); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-btn { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-canvas); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-btn:hover { background: var(--ap-ink); opacity: 0.88; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .home-period-sq.danger { background: #E53935; border-color: #E53935; color: #FFFFFF; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .home-period-label { font-family: var(--ap-sans); font-size: 15px; font-weight: 700; letter-spacing: -0.005em; color: var(--ap-ink); min-width: 92px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-menu, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #custom-date-picker-menu { left: auto; right: 0; background: var(--ap-surface); border-color: var(--ap-line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); }

        /* Atajos (por ahora en el encabezado; en la próxima etapa pasan a su propio bloque) */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .quick-actions-title { font-family: var(--ap-sans); color: var(--ap-muted); font-weight: 600; letter-spacing: 0.08em; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .quick-action-card { background: var(--ap-ink); color: var(--ap-canvas); border: 1px solid var(--ap-ink); box-shadow: none; border-radius: 12px; font-family: var(--ap-sans); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .quick-action-label { font-family: var(--ap-sans); font-weight: 700; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .quick-action-card svg, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .quick-action-card .quick-action-label { color: inherit !important; }

        /* Tarjetas: misma piel que las de la bienvenida (el contenido se rehace bloque por bloque) */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .dash-card { background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 16px; box-shadow: none; backdrop-filter: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .dash-card:hover { transform: none; border-color: var(--ap-line-strong); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .dash-card-title { font-family: var(--ap-sans); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-muted); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .dash-card-value { font-family: var(--ap-sans); font-weight: 700; letter-spacing: -0.02em; }


        /* ── Barra lateral: logo «Statera Web» arriba; Inicio primero en la lista ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-brand { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 4px; text-decoration: none; color: var(--ap-ink); white-space: nowrap; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-brand .lp-brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--ap-ink); color: var(--ap-canvas); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-brand .lp-brand-mark svg { width: 18px; height: 18px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-brand-text { font-family: var(--ap-sans); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #sidebar-main-title { display: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-nav { padding-top: 14px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #sidebar-auth-links .sidebar-logo { width: 100%; margin-bottom: 2px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo svg { width: 19px; height: 19px; stroke-width: 2; flex-shrink: 0; }
        @media (min-width: 901px) {
            body.sidebar-collapsed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-brand { justify-content: center; padding: 6px 0; }
            body.sidebar-collapsed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-brand-text { display: none; }
            body.sidebar-collapsed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sidebar-logo { font-size: 0; }
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .config-logout {
            display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; text-align: left; cursor: pointer;
            background: #D32F2F !important; border: 1px solid #D32F2F !important; color: #FFFFFF !important; font: inherit;
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .config-logout svg { width: 18px; height: 18px; }

        /* ── Barra superior: sin línea, sin avatar ni cerrar sesión (el avatar va junto al saludo) ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav::after { display: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .nav-left > .account-dropdown-container, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #nav-logout-btn { display: none !important; }

        /* ── Saludo en la barra superior (solo en Inicio) ── */
        body:not(.on-dashboard) .ap-hello { display: none !important; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello { display: flex; align-items: center; gap: 14px; min-width: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .nav-left { min-width: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-avatar { width: 42px; height: 42px; border-radius: 12px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-greeting {
            margin: 0; min-width: 0; font-size: 36px; line-height: 42px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        @media (max-width: 640px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello { gap: 10px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-avatar { width: 34px; height: 34px; border-radius: 10px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-avatar span { font-size: 13px !important; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-greeting { font-size: 22px; line-height: 34px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .ap-home-top { padding: 2px 0 12px; }
        }

        /* ═══ Celular: la cuenta se usa desde la app ═══ */
        .app-gate {
            position: fixed; inset: 0; z-index: 4000; display: none; overflow-y: auto;
            background: var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif;
        }
        body.app-gate-open .app-gate { display: block; animation: appGateIn 360ms cubic-bezier(0.16, 1, 0.3, 1); }
        body.app-gate-open { overflow: hidden; }
        /* Recuadro abierto: la página de atrás no scrollea (sin salto por la barra de scroll) */
        html.overlay-scroll-lock { overflow: hidden; padding-right: var(--overlay-scroll-gap, 0px); }
        @keyframes appGateIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
        .app-gate-inner {
            position: relative; display: flex; flex-direction: column; gap: 20px; min-height: 100%;
            max-width: 460px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
        }
        .app-gate-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
        .app-gate-close {
            display: grid; place-items: center; flex-shrink: 0;
            width: 40px; height: 40px; padding: 0; border-radius: 12px; border: 1.5px solid rgba(var(--text-rgb), 0.28);
            background: transparent; color: var(--text); cursor: pointer;
        }
        .app-gate-close svg { width: 20px; height: 20px; }
        .app-gate-brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
        .app-gate-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--text); color: var(--bg); }
        .app-gate-mark svg { width: 22px; height: 22px; stroke-width: 2.3; }
        .app-gate-title {
            margin: auto 0 0; padding-top: 24px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-weight: 500;
            font-size: clamp(34px, 9vw, 44px); line-height: 1.05; letter-spacing: -0.02em; color: var(--text); text-wrap: balance;
        }
        .app-gate-text { margin: 0; font-size: 17px; line-height: 1.55; color: color-mix(in srgb, var(--text) 76%, var(--bg)); text-wrap: pretty; }
        .app-gate-actions { display: grid; gap: 12px; margin-top: 8px; }
        .app-gate-actions[hidden] { display: none; }
        .app-gate-btn {
            display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; border-radius: 14px;
            font: 700 16px 'DM Sans', sans-serif; text-decoration: none; cursor: pointer; border: 1px solid transparent;
            -webkit-tap-highlight-color: transparent; transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .app-gate-btn:active { transform: scale(0.98); }
        .app-gate-btn svg { width: 20px; height: 20px; }
        .app-gate-btn-primary { background: var(--text); color: var(--bg); }
        .app-gate-btn-ghost { background: transparent; color: var(--text); border-color: rgba(var(--text-rgb), 0.28); }
        /* Descargar: se ve igual, pero no lleva a ningún lado hasta que la app esté en Google Play */
        .app-gate-btn[aria-disabled="true"] { cursor: default; }
        .app-gate-btn[aria-disabled="true"]:active { transform: none; }
        .app-gate-hint { margin: 2px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.2); background: rgba(var(--text-rgb), 0.06); font-size: 14px; line-height: 1.5; color: var(--text); text-align: center; }
        .app-gate-hint[hidden] { display: none; }
        .app-gate-note { margin: 0; font-size: 14px; line-height: 1.5; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .app-gate-logout { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--text); font: 600 14px 'DM Sans', sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
        .app-gate-logout[hidden] { display: none; }
        .app-gate-legal { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(var(--text-rgb), 0.14); font-size: 12.5px; line-height: 1.8; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .app-gate-legal a { color: inherit; text-decoration: underline; text-decoration-color: rgba(var(--text-rgb), 0.3); text-underline-offset: 3px; }

        /* ── Mapa de calor (como la app) ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-heatmap { padding: 20px 22px 22px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hm-box { padding: 16px; border-radius: 18px; background: rgba(var(--text-rgb), 0.035); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-grid { gap: 6px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-head { font-family: var(--ap-sans); font-size: 12px; font-weight: 800; color: var(--ap-muted); padding-bottom: 6px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-cell { font-family: var(--ap-sans); font-size: 11px; font-weight: 800; color: var(--ap-muted); background: rgba(var(--text-rgb), 0.06); border-radius: 8px; border: 2.5px solid transparent; transition: transform 120ms var(--ap-ease); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-cell:not(.future):hover { transform: scale(1.05); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-cell.sel { border-color: var(--ap-ink); font-size: 14px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-cell.filled { color: #FFFFFF; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-grid.year .hm2-cell { height: 48px; border-radius: 10px; font-size: 12px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-grid.year .hm2-cell.sel { font-size: 15px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip { margin-top: 14px; min-height: 62px; border-radius: 16px; padding: 10px 16px; background: rgba(var(--text-rgb), 0.04); border: 1px solid rgba(var(--text-rgb), 0.1); font-family: var(--ap-sans); }
        /* Con un día elegido, el recuadro toma el color de las tarjetas de la app (claro sobre oscuro) */
        /* Alto fijo: elegir un día o un mes no agranda el recuadro del mapa de calor */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip { height: 68px; min-height: 68px; overflow: hidden; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip > div { flex: 1; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip > div > span,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip > div > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip:has(.home-period-close) { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-canvas); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip:has(.home-period-close) span[style*="var(--text)"] { color: var(--ap-canvas) !important; }
        /* Cruz del cartel del día: línea de perímetro (como las demás cruces), sin fondo y circular */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip .home-period-close { background: transparent; color: var(--ap-canvas); border: 1.5px solid rgba(var(--bg-rgb), 0.45); border-radius: 50% !important; display: grid; place-items: center; cursor: pointer; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-tip .home-period-close svg { width: 16px; height: 16px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .hm2-legend { margin-top: 16px; padding-top: 12px; border-top-color: var(--ap-line); font-family: var(--ap-sans); }

        /* ── Panel de detalle (Análisis de actividad) ── */
        .ap-dialog { width: min(480px, 100%); max-height: min(680px, 88vh); }
        .ap-dialog .ap-sheet-head { gap: 10px; }
        .ap-dialog .ap-sheet-head h3 { flex: 1; }
        .ap-dialog .ap-sheet-close[hidden] { display: none; }
        .ap-dialog-body { display: grid; gap: 12px; padding: 16px; overflow-y: auto; }
        .ap-peak-card {
            display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: left; cursor: pointer;
            border-radius: 18px; border: 1px solid rgba(var(--bg-rgb), 0.12); background: var(--text); color: var(--bg); font-family: inherit;
            transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .ap-peak-card:active { transform: scale(0.99); }
        .ap-peak-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
        .ap-peak-ico svg { width: 22px; height: 22px; }
        .ap-peak-ico.expense { background: rgba(229, 57, 53, 0.15); color: #E53935; }
        .ap-peak-ico.income { background: rgba(67, 160, 71, 0.15); color: #43A047; }
        .ap-peak-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
        .ap-peak-text b { font-size: 15px; font-weight: 800; }
        .ap-peak-text small { font-size: 13px; font-weight: 600; opacity: 0.75; }
        .ap-peak-chev { width: 20px; height: 20px; flex-shrink: 0; }
        .ap-peak-total { display: grid; gap: 4px; padding: 18px; border-radius: 18px; background: var(--text); color: var(--bg); }
        .ap-peak-total-label { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; opacity: 0.8; }
        .ap-peak-total-date { font-size: 13px; font-weight: 600; opacity: 0.75; }
        .ap-peak-total-amount { margin-top: 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
        .ap-peak-total-amount.expense { color: #E53935; }
        .ap-peak-total-amount.income { color: #2E7D32; }
        .ap-dialog-subtitle { margin: 6px 0 0; font-size: 15px; font-weight: 800; }
        .ap-dialog-empty { margin: 0; padding: 18px; text-align: center; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .ap-dialog-body .tx-item { padding: 12px 14px; }
        .ap-dialog-body .tx-main-row > div:nth-child(2) { flex-direction: column; align-items: flex-start !important; gap: 6px !important; }
        .ap-dialog-body .tx-meta-container { flex-wrap: wrap; gap: 6px; }
        .ap-dialog-body .tx-main-row > div:nth-child(2) { min-width: 0; }
        .ap-dialog-body .tx-meta-item { white-space: nowrap; }

        /* ── Análisis por categoría y Exportar registros (paneles como los de la app) ── */
        .ap-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(var(--text-rgb), 0.08); }
        .ap-seg button { flex: 1; height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; cursor: pointer; opacity: 0.7; transition: background-color 160ms ease, opacity 160ms ease; }
        .ap-seg button:hover { opacity: 1; }
        .ap-seg button.on { background: var(--text); color: var(--bg); opacity: 1; }
        /* Análisis por categoría: tamaño fijo (no cambia con la cantidad de categorías) y barra de scroll fina, como la leyenda */
        .ap-dialog.is-fixed { height: min(640px, 88vh); }
        .ap-dialog.is-fixed .ap-dialog-body { flex: 1; min-height: 0; align-content: start; }
        /* Todos los recuadros de la web: barra de desplazamiento fina y del color del tema (nunca la genérica) */
        .ap-dialog .ap-dialog-body::-webkit-scrollbar, .ap-sheet-list::-webkit-scrollbar { width: 4px; }
        .ap-dialog .ap-dialog-body::-webkit-scrollbar-track, .ap-sheet-list::-webkit-scrollbar-track { background: transparent; }
        .ap-dialog .ap-dialog-body::-webkit-scrollbar-thumb, .ap-sheet-list::-webkit-scrollbar-thumb { background: rgba(var(--text-rgb), 0.15); border-radius: 10px; }
        .ap-cat-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
        .ap-sort { display: flex; gap: 8px; }
        .ap-sort button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.2); background: transparent; cursor: pointer; }
        .ap-sort button.on { background: var(--text); border-color: var(--text); }
        .ap-sort-ico { display: grid; gap: 2.5px; justify-items: start; width: 18px; }
        .ap-sort-ico span { display: block; height: 2.5px; border-radius: 2px; background: color-mix(in srgb, var(--text) 55%, var(--bg)); }
        .ap-sort button.on .ap-sort-ico span { background: var(--bg); }
        .ap-cat-row {
            display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
            border-radius: 18px; border: 0; background: var(--text); color: var(--bg); font-family: inherit;
            transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .ap-cat-row:active { transform: scale(0.99); }
        .ap-cat-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(var(--bg-rgb), 0.12); flex-shrink: 0; }
        .ap-cat-ico svg { width: 22px; height: 22px; }
        .ap-cat-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
        .ap-cat-main > b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ap-cat-pct { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; opacity: 0.85; }
        .ap-cat-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(var(--bg-rgb), 0.18); overflow: hidden; }
        .ap-cat-bar span { display: block; height: 100%; border-radius: 3px; }
        .ap-cat-amt { max-width: 140px; font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ap-cat-amt.expense { color: #E53935; }
        .ap-cat-amt.income { color: #2E7D32; }
        .ap-month-nav { display: flex; align-items: center; justify-content: center; gap: 16px; }
        .ap-month-nav b { min-width: 150px; text-align: center; font-size: 16px; font-weight: 800; }
        .ap-month-nav button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(var(--text-rgb), 0.08); color: var(--text); cursor: pointer; }
        .ap-month-nav button svg { width: 20px; height: 20px; }
        .ap-cat-total-head { display: flex; align-items: center; justify-content: space-between; }
        .ap-cat-total-head svg { width: 18px; height: 18px; }
        .ap-export-label { margin: 0; font-size: 12px; font-weight: 800; opacity: 0.8; }
        .ap-export-label.strong { margin-top: 4px; font-size: 13px; opacity: 1; }
        .ap-export-sum { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: rgba(var(--text-rgb), 0.08); border: 1px solid rgba(var(--text-rgb), 0.15); }
        .ap-export-sum div { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; }
        .ap-export-sum b { font-size: 14px; font-weight: 900; }
        .ap-export-sum .income { color: #43A047; }
        .ap-export-sum .expense { color: #E53935; }
        .ap-export-fmt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        .ap-export-fmt button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 52px; border-radius: 14px; border: 1.5px solid rgba(var(--text-rgb), 0.25); background: transparent; color: var(--text); font-family: inherit; font-size: 16px; font-weight: 900; cursor: pointer; }
        .ap-export-fmt button.on { background: var(--text); color: var(--bg); border-color: transparent; }
        .ap-export-fmt button svg { width: 18px; height: 18px; }
        .ap-cta { height: 52px; margin-top: 4px; border: 0; border-radius: 14px; background: var(--text); color: var(--bg); font-family: inherit; font-size: 16px; font-weight: 900; cursor: pointer; transition: opacity 160ms ease; }
        .ap-cta:hover:not(:disabled) { opacity: 0.9; }
        .ap-cta:disabled { opacity: 0.4; cursor: default; }
        .ap-paywall { display: grid; justify-items: center; gap: 16px; padding: 8px 4px 4px; text-align: center; }
        .ap-paywall-ico { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: rgba(var(--text-rgb), 0.08); border: 1px solid rgba(var(--text-rgb), 0.2); }
        .ap-paywall-ico svg { width: 34px; height: 34px; }
        .ap-paywall p { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.5; opacity: 0.85; }
        .ap-paywall p b { font-weight: 900; }

        /* ── Movimientos recientes (como la app), al lado del mapa de calor ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent { padding: 20px 22px 22px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-pill-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 14px; background: var(--ap-ink); color: var(--ap-canvas); font: 800 12px var(--ap-sans); text-decoration: none; transition: opacity 200ms var(--ap-ease); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-pill-btn:hover { opacity: 0.86; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent #dash-tx-list-new, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent #dash-tx-list-arche { display: grid; gap: 10px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent .tx-item { margin: 0; padding: 12px 14px; border-radius: 14px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent .tx-main-row { gap: 12px; }
        /* Nombre arriba y datos abajo: entra completo en el ancho del bloque */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent .tx-main-row > div:nth-child(2) { flex-direction: column; align-items: flex-start !important; gap: 6px !important; min-width: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent .tx-name { font-size: 15px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent .tx-meta-container { flex-wrap: wrap; gap: 6px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent .tx-meta-item { white-space: nowrap; font-size: 11px; padding: 3px 8px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-recent .tx-meta-item svg { width: 12px; height: 12px; }
        /* Tablet: el mapa de calor y los movimientos recientes siguen lado a lado */
        @media (min-width: 768px) and (max-width: 1024px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .dashboard-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .dashboard-grid > [data-widget=heatmap] { grid-column: span 5; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .dashboard-grid > [data-widget=recent] { grid-column: span 7; }
        }

        /* ── Inicio: saludo · controles (centro) · avisos y atajos, separados por líneas verticales ── */
        .ap-nav-center { display: none !important; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center { display: flex !important; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .nav-content { grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; column-gap: 0; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { grid-column: 3; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center { grid-column: 2; justify-self: center; position: relative; align-items: center; gap: 10px; padding: 0 22px; flex-wrap: nowrap !important; }
        /* Líneas verticales finas que se desvanecen en las puntas, como las de la bienvenida */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center::before, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center::after {
            content: ''; position: absolute; top: 50%; width: 1px; height: 40px; transform: translateY(-50%);
            background: linear-gradient(to bottom, transparent, var(--ap-line-strong) 25%, var(--ap-line-strong) 75%, transparent);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center::before { left: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center::after { right: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-period-bar { padding: 0; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello { padding-right: 22px; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { padding-left: 22px; }
        /* El encabezado de abajo ya no hace falta: los controles subieron */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .ap-home-top { display: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard > .container { padding-top: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .dashboard-grid { margin-top: 24px; }
        /* Línea divisoria al final del encabezado de Inicio */
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav::after { display: block; left: 48px; right: 48px; border-bottom: 1px solid var(--ap-line); }
        /* Desplegable de cuenta: la cuenta seleccionada lleva un tilde a la derecha */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-menu .ap-acc-check { margin-left: auto; width: 16px; height: 16px; flex-shrink: 0; }
        @media (max-width: 1180px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-greeting { font-size: 28px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center { padding: 0 14px; gap: 8px; }
            body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello { padding-right: 14px; }
            body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { padding-left: 14px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-acc-name { width: 84px; max-width: none; }
        }
        @media (max-width: 1000px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-greeting { font-size: 24px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-acc-name, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-acc-cur { display: none; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .home-period-label { min-width: 0; font-size: 13px; }
        }

        /* ── Desplegable de notificaciones: mismo color que el de atajos (no el contrario al fondo) ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #notif-dropdown {
            /* Se invierten las variables solo dentro del desplegable: fondo = superficie, texto = tinta */
            --text: var(--ap-surface); --bg: var(--ap-ink); --bg-rgb: var(--text-rgb);
            background: var(--ap-surface); border: 1px solid var(--ap-line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #notif-dropdown .notification-header, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #notif-dropdown .notification-footer { border-color: var(--ap-line); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #notif-dropdown .notification-header h4 { font-family: var(--ap-sans); }

        /* ── Evolución de balance: interruptores de Ingresos y Gastos arriba a la derecha ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggles { display: flex; align-items: center; gap: 18px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggle { display: inline-flex; align-items: center; gap: 8px; font: 700 12px var(--ap-sans); color: var(--ap-muted); cursor: pointer; user-select: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggle > i { width: 8px; height: 8px; border-radius: 50%; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggle .ap-switch { width: 34px; height: 20px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggle .ap-switch span { background: rgba(var(--text-rgb), 0.2); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggle .ap-switch span::after { top: 3px; left: 3px; width: 14px; height: 14px; background: var(--ap-canvas); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggle .ap-switch input:checked + span { background: var(--ap-ink); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-evo-toggle .ap-switch input:checked + span::after { transform: translateX(14px); }

        /* ── KPI: totales de ingresos y gastos, y datos de la tasa de ahorro ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kpi-total { display: grid; gap: 2px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ap-line); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kpi-total-label { font: 600 11px var(--ap-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-muted); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kpi-total-val { font: 700 18px var(--ap-sans); letter-spacing: -0.01em; color: var(--ap-ink); font-variant-numeric: tabular-nums; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kpi-rows { display: grid; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ap-line); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kpi-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font: 500 12.5px var(--ap-sans); color: var(--ap-muted); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kpi-row b { font-weight: 700; color: var(--ap-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

        /* ── Exportar registros: igual al filtro de período; en Arché se ve apagado, como la app ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-export-btn { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-canvas); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-export-btn:hover { background: var(--ap-ink); opacity: 0.88; }
        body.is-logged:not(.is-premium, .lp-mode, .auth-mode, .legal-mode) #home-export-btn, body.is-logged:not(.is-premium, .lp-mode, .auth-mode, .legal-mode) #home-export-btn:hover { opacity: 0.45; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #dash-donut-cats-card .ap-kebab { width: 30px; height: 30px; margin-left: 4px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #dash-donut-cats-card .ap-kebab svg { width: 18px; height: 18px; }

        /* ── Pie de página: el logo con el mismo color que el de la barra lateral (sigue al tema) ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) footer .nav-logo { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-canvas); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) footer .nav-logo svg { color: var(--ap-canvas); }

        /* ── Encabezado de Inicio: la línea divisoria queda por debajo de los desplegables ── */
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav::after { z-index: -1; }
        /* Cruz de Notificaciones: mismo formato que la de Filtrar por período */
        .ap-notif-close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; padding: 0; border: none; border-radius: 10px; background: rgba(var(--text-rgb), 0.1); color: var(--bg); cursor: pointer; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-notif-close { color: var(--ap-ink); }
        .ap-notif-close svg { width: 18px; height: 18px; pointer-events: none; }
        /* ══ Stratos (burbuja): misma estructura que la pantalla de la app, con la estética de la web ══ */
        /* Fondo oscurecido mientras el recuadro está abierto (un toque afuera lo cierra) */
        .sx-backdrop { position: fixed; inset: 0; z-index: 2999; background: rgba(10, 6, 4, 0.28); opacity: 0; visibility: hidden; transition: opacity 260ms ease, visibility 260ms; }
        .sx-backdrop.open { opacity: 1; visibility: visible; }
        /* El botón + de registro queda atrás del oscurecido (y sin uso) mientras Stratos está abierto */
        body.sx-open .quick-add-fab { z-index: 2998; }
        /* Las burbujas de Stratos y + son de Statera Web: no aparecen en la presentación, el inicio de sesión ni las
           páginas legales, aunque haya sesión iniciada (se muestran con display en línea, por eso visibility) */
        body.lp-mode #stratos-fab, body.lp-mode #quick-add-fab,
        body.auth-mode #stratos-fab, body.auth-mode #quick-add-fab,
        body.legal-mode #stratos-fab, body.legal-mode #quick-add-fab { visibility: hidden !important; pointer-events: none !important; transition: none !important; }
        /* La burbuja de Stratos queda «encendida» junto al recuadro: por encima de él, así su sombra no la oscurece */
        .stratos-fab.is-open { z-index: 3002; }
        /* Campos de texto del recuadro: sin el rectángulo de foco general de la web (solo el cursor) */
        #stratos-chat-panel .sx-input:focus, #stratos-chat-panel .sx-input:focus-visible,
        #stratos-chat-panel .sx-edit-input:focus-visible, #stratos-chat-panel .sx-step-input:focus-visible { outline: none; }
        @media (prefers-reduced-motion: reduce) { .sx-backdrop { transition: none; } }

        #stratos-chat-panel.sx-panel {
            --sx-ink: var(--text);
            --sx-canvas: var(--bg);
            --sx-surface: color-mix(in srgb, var(--text) 7%, var(--bg));
            --sx-surface-2: color-mix(in srgb, var(--text) 12%, var(--bg));
            --sx-line: rgba(var(--text-rgb), 0.14);
            --sx-line-strong: rgba(var(--text-rgb), 0.28);
            --sx-muted: color-mix(in srgb, var(--text) 70%, var(--bg));
            --sx-display: 'DM Sans', system-ui, -apple-system, sans-serif;
            --sx-ease: cubic-bezier(0.16, 1, 0.3, 1);
            position: fixed; right: 32px; bottom: 112px; z-index: 3001;
            width: 440px; height: min(760px, calc(100vh - 140px));
            min-width: 0; min-height: 0; max-width: calc(100vw - 48px); max-height: none;
            flex-direction: column; overflow: hidden;
            background: var(--sx-canvas); color: var(--sx-ink);
            backdrop-filter: none; -webkit-backdrop-filter: none;
            border: 1px solid var(--sx-line-strong); border-radius: 20px;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
            font-family: 'DM Sans', system-ui, sans-serif;
            animation: sxPanelIn 320ms var(--sx-ease);
        }
        @keyframes sxPanelIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
        .sx-panel button { font-family: inherit; }
        .sx-panel [hidden] { display: none !important; }

        /* Encabezado (chat y Ajustes de IA) */
        .sx-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--sx-line); flex-shrink: 0; }
        .sx-head-settings, .sx-panel.is-settings .sx-head-chat { display: none; }
        .sx-panel.is-settings .sx-head-settings { display: flex; }
        .sx-avatar-btn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; flex-shrink: 0; transition: border-color 200ms ease; }
        .sx-avatar-btn:hover { opacity: 0.88; }
        .sx-avatar-btn .ua { --ua-fg: var(--sx-ink); --ua-bg: var(--sx-canvas); }
        .sx-dialog .sx-avatar-btn .ua { --ua-bg: var(--sx-surface); }
        .sx-head-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
        .sx-title { margin: 0; font-family: var(--sx-display); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; color: var(--sx-ink); }
        .sx-title-settings { flex: 1; min-width: 0; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .sx-acc { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; width: fit-content; height: 26px; padding: 0 10px 0 4px; border: 1px solid var(--sx-line); border-radius: 999px; background: transparent; color: var(--sx-ink); cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease; }
        .sx-acc:hover { background: var(--sx-surface); border-color: var(--sx-line-strong); }
        .sx-acc-ico { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; color: #fff; flex-shrink: 0; }
        .sx-acc-ico svg { width: 11px; height: 11px; }
        .sx-acc-ico.big { width: 34px; height: 34px; border-radius: 10px; }
        .sx-acc-ico.big svg { width: 18px; height: 18px; }
        .sx-acc-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .sx-acc-chev { width: 14px; height: 14px; color: var(--sx-muted); flex-shrink: 0; }
        .sx-head-actions { display: flex; align-items: center; gap: 8px; }
        .sx-hbtn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 11px; border: 1px solid var(--sx-line); background: transparent; color: var(--sx-ink); cursor: pointer; flex-shrink: 0; transition: background-color 200ms ease, border-color 200ms ease; }
        .sx-hbtn:hover { background: var(--sx-surface); border-color: var(--sx-line-strong); }
        .sx-hbtn svg { width: 18px; height: 18px; }
        .sx-gear { border-color: var(--sx-ink); background: var(--sx-ink); color: var(--sx-canvas); }
        .sx-gear:hover { background: var(--sx-ink); border-color: var(--sx-ink); opacity: 0.88; }
        .sx-gear-ico { position: relative; display: grid; place-items: center; width: 20px; height: 20px; }
        .sx-gear-spark { position: absolute; right: -5px; bottom: -4px; display: grid; place-items: center; padding: 1px; border-radius: 10px; background: var(--sx-ink); }
        .sx-gear-spark svg { width: 10px; height: 10px; stroke-width: 2.5; }
        .sx-apply { height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--sx-line); background: transparent; color: var(--sx-muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: default; flex-shrink: 0; transition: background-color 200ms ease, color 200ms ease, opacity 200ms ease; }
        .sx-apply:disabled { opacity: 0.6; }
        .sx-apply.is-dirty { border-color: var(--sx-ink); background: var(--sx-ink); color: var(--sx-canvas); opacity: 1; cursor: pointer; }
        .sx-apply.is-dirty:hover { opacity: 0.88; }

        /* Vistas: chat o Ajustes de IA */
        .sx-settings { display: none; flex: 1; min-height: 0; overflow-y: auto; }
        .sx-panel.is-settings .sx-settings { display: block; }
        .sx-panel.is-settings .sx-scroll, .sx-panel.is-settings .sx-bottom { display: none; }

        /* Conversación */
        .sx-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 0; }
        .sx-scroll::-webkit-scrollbar, .sx-settings::-webkit-scrollbar { width: 4px; }
        .sx-scroll::-webkit-scrollbar-thumb, .sx-settings::-webkit-scrollbar-thumb { background: rgba(var(--text-rgb), 0.15); border-radius: 10px; }
        .sx-list { display: flex; flex-direction: column; padding-bottom: var(--sx-bottom-space, 96px); }
        .sx-day { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
        .sx-day::before, .sx-day::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--sx-line)); }
        .sx-day::after { background: linear-gradient(to left, transparent, var(--sx-line)); }
        .sx-day span { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sx-muted); }
        .sx-msg { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; max-width: 85%; animation: sxMsgIn 260ms var(--sx-ease); }
        @keyframes sxMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
        .sx-msg.is-bot { align-self: flex-start; align-items: flex-start; width: 85%; }
        .sx-msg.is-user { align-self: flex-end; align-items: flex-end; }
        .sx-msg.has-action { align-self: stretch; align-items: stretch; width: 100%; max-width: 100%; }
        .sx-bubble { display: flex; flex-direction: column; gap: 10px; padding: 12px 15px; border-radius: 16px; max-width: 100%; box-sizing: border-box; }
        .is-bot > .sx-bubble { background: var(--sx-surface); color: var(--sx-ink); border: 1px solid var(--sx-line); border-bottom-left-radius: 6px; }
        .is-user > .sx-bubble { background: var(--sx-ink); color: var(--sx-canvas); border-bottom-right-radius: 6px; }
        .has-action > .sx-bubble { gap: 4px; width: 100%; }
        .sx-user-text { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 21px; white-space: pre-wrap; overflow-wrap: anywhere; }
        .sx-time { padding: 0 6px; font-size: 11px; font-weight: 500; color: var(--sx-muted); font-variant-numeric: tabular-nums; }
        .is-bot > .sx-time { text-align: left; }
        .is-user > .sx-time { text-align: right; }
        .sx-att-badges { display: flex; gap: 6px; align-self: flex-end; margin-bottom: 2px; }
        .sx-att-badge { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--sx-surface); border: 1px solid var(--sx-line); color: var(--sx-ink); }
        .sx-att-badge svg { width: 14px; height: 14px; }

        /* Markdown de las respuestas */
        .sx-md { width: 100%; overflow-wrap: anywhere; }
        .sx-md-p { margin: 0 0 2px; font-size: 14.5px; line-height: 22px; }
        .sx-md-h1 { margin: 10px 0 4px; font-family: var(--sx-display); font-size: 20px; font-weight: 500; line-height: 1.2; }
        .sx-md-h2 { margin: 8px 0 3px; font-family: var(--sx-display); font-size: 18px; font-weight: 500; line-height: 1.25; }
        .sx-md-h3 { margin: 6px 0 2px; font-size: 14px; font-weight: 700; }
        .sx-md > :first-child { margin-top: 0; }
        .sx-md-hr { height: 1px; margin: 8px 0; border: 0; background: var(--sx-line); }
        .sx-md-li { display: flex; gap: 8px; margin-bottom: 2px; padding-right: 4px; font-size: 14.5px; line-height: 22px; }
        .sx-md-bullet { flex-shrink: 0; color: var(--sx-muted); }
        .sx-md-quote { margin: 4px 0; padding-left: 12px; border-left: 2px solid var(--sx-line-strong); color: var(--sx-muted); font-size: 14.5px; line-height: 22px; }
        .sx-md-gap { height: 4px; }
        .sx-md strong { font-weight: 700; }

        /* Puntos (enviando / Stratos escribiendo) */
        .sx-dots { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 40px; max-width: 70px; margin: 4px 0 12px; padding: 10px 14px; border-radius: 16px; box-sizing: border-box; }
        .sx-dots span { width: 5px; height: 5px; border-radius: 50%; animation: sxDot 1.2s infinite; }
        .sx-dots span:nth-child(2) { animation-delay: 0.2s; }
        .sx-dots span:nth-child(3) { animation-delay: 0.4s; }
        .sx-dots-bot { align-self: flex-start; background: var(--sx-surface); border: 1px solid var(--sx-line); border-bottom-left-radius: 6px; }
        .sx-dots-bot span { background: var(--sx-ink); }
        .sx-dots-user { align-self: flex-end; background: var(--sx-ink); border-bottom-right-radius: 6px; }
        .sx-dots-user span { background: var(--sx-canvas); }
        @keyframes sxDot { 0%, 50%, 100% { opacity: 0.3; transform: scale(0.8); } 25% { opacity: 1; transform: scale(1.25); } }

        /* Estado de la tarjeta, botón de ir a una sección y mensajes informativos */
        .sx-exec, .sx-status { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-bottom: 6px; padding: 9px 14px; border-radius: 12px; box-sizing: border-box; font-size: 13px; font-weight: 700; letter-spacing: 0.01em; }
        .sx-exec { background: var(--sx-surface-2); color: var(--sx-ink); border: 1px solid var(--sx-line); }
        .sx-status.ok { background: rgba(67, 160, 71, 0.14); color: #43A047; border: 1px solid rgba(67, 160, 71, 0.35); }
        .sx-status.ko { background: rgba(229, 57, 53, 0.12); color: #E53935; border: 1px solid rgba(229, 57, 53, 0.32); }
        .sx-status svg { width: 16px; height: 16px; stroke-width: 2.6; }
        .sx-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: sxSpin 0.8s linear infinite; flex-shrink: 0; }
        @keyframes sxSpin { to { transform: rotate(360deg); } }
        .sx-redirect { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; align-self: flex-start; margin-top: 4px; height: 34px; padding: 0 12px 0 14px; border: 0; border-radius: 12px; background: var(--sx-ink); color: var(--sx-canvas); font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity 200ms ease; }
        .sx-redirect:hover { opacity: 0.88; }
        .sx-redirect svg { width: 15px; height: 15px; }
        .sx-insight { display: grid; gap: 10px; margin-top: 4px; padding: 14px; border-radius: 14px; background: var(--sx-canvas); border: 1px solid var(--sx-line); }
        .sx-insight-title { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sx-muted); }
        .sx-insight-btns { display: flex; gap: 8px; }
        .sx-insight-btns button { flex: 1; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--sx-line-strong); background: transparent; color: var(--sx-ink); font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color 200ms ease, opacity 200ms ease; }
        .sx-insight-btns button:hover { background: var(--sx-surface); }
        .sx-insight-btns button.primary { flex: 1.5; border-color: var(--sx-ink); background: var(--sx-ink); color: var(--sx-canvas); }
        .sx-insight-btns button.primary:hover { opacity: 0.88; }

        /* Tarjeta de registro (CollectDataCard de la app) */
        .sx-card { display: grid; gap: 12px; margin-top: 6px; padding: 14px; border-radius: 14px; background: var(--sx-canvas); color: var(--sx-ink); border: 1px solid var(--sx-line); }
        .sx-card-done { gap: 10px; margin: 2px 0; }
        .sx-done-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
        .sx-done-row svg { width: 16px; height: 16px; color: var(--sx-muted); flex-shrink: 0; }
        .sx-done-row.inc span { color: #43A047; font-weight: 700; }
        .sx-done-row.exp span { color: #E53935; font-weight: 700; }
        .sx-edit-list { display: grid; }
        .sx-edit-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--sx-line); border-radius: 0; background: transparent; color: var(--sx-ink); text-align: left; cursor: pointer; transition: background-color 160ms ease; }
        .sx-edit-row:first-child { padding-top: 4px; }
        .sx-edit-row:last-child { border-bottom: 0; }
        .sx-edit-row:hover { background: var(--sx-surface); }
        .sx-row-label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
        .sx-row-label svg { width: 15px; height: 15px; color: var(--sx-muted); flex-shrink: 0; }
        .sx-row-val { margin-right: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .sx-row-pen { width: 13px !important; height: 13px !important; color: var(--sx-muted); flex-shrink: 0; opacity: 0.7; }
        .sx-color-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--sx-line-strong); }
        .sx-card-entity { display: grid; justify-items: center; gap: 4px; margin-top: 8px; }
        .sx-card-entity > span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; color: #FFF; margin-bottom: 8px; }
        .sx-card-entity > span svg { width: 28px; height: 28px; }
        .sx-card-entity b { font-size: 15px; font-weight: 700; }
        .sx-card-entity small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sx-muted); }
        .sx-card-btns { display: flex; gap: 8px; margin-top: 2px; }
        .sx-card-btns button { flex: 1; height: 40px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity 200ms ease, background-color 200ms ease; }
        .sx-btn-cancel { background: transparent; color: var(--sx-ink); border: 1px solid var(--sx-line-strong); }
        .sx-btn-cancel:hover { background: rgba(229, 57, 53, 0.1); border-color: rgba(229, 57, 53, 0.45); color: #E53935; }
        .sx-btn-confirm { background: var(--sx-ink); color: var(--sx-canvas); border: 1px solid var(--sx-ink); }
        .sx-btn-confirm:hover:not(:disabled) { opacity: 0.88; }
        .sx-btn-confirm:disabled { background: var(--sx-surface-2); color: var(--sx-muted); border-color: transparent; cursor: default; }
        .sx-step { display: grid; gap: 12px; }
        .sx-step-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; }
        .sx-step-title svg { width: 16px; height: 16px; color: var(--sx-muted); }
        .sx-step-input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--sx-line-strong); background: var(--sx-surface); color: var(--sx-ink); font-family: inherit; font-size: 15px; font-weight: 600; outline: none; }
        .sx-step-input:focus { border-color: var(--sx-ink); }
        .sx-step-btn { height: 42px; border: 0; border-radius: 12px; background: var(--sx-ink); color: var(--sx-canvas); font-size: 14px; font-weight: 700; cursor: pointer; }

        /* Gráficos de las respuestas */
        .sx-chart { width: 100%; margin-top: 8px; padding: 14px; border-radius: 14px; background: var(--sx-canvas); border: 1px solid var(--sx-line); box-sizing: border-box; }
        .sx-chart-title { margin: 0 0 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sx-muted); }
        .sx-bar { display: grid; gap: 5px; margin-bottom: 12px; }
        .sx-bar-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
        .sx-bar-top b { font-weight: 700; font-variant-numeric: tabular-nums; }
        .sx-bar-track { height: 6px; border-radius: 3px; overflow: hidden; background: var(--sx-surface-2); }
        .sx-bar-track span { display: block; height: 100%; border-radius: 3px; background: var(--sx-ink); }
        .sx-pie { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
        .sx-pie-item { display: flex; align-items: center; gap: 6px; }
        .sx-pie-item > span { width: 10px; height: 10px; border-radius: 3px; }
        .sx-pie-item b { display: block; font-size: 12px; font-weight: 600; }
        .sx-pie-item small { font-size: 11px; font-weight: 600; color: var(--sx-muted); }

        /* Sin mensajes */
        .sx-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 8px; text-align: center; }
        .sx-empty-icon { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; overflow: hidden; background: var(--sx-ink); border: 1px solid var(--sx-line-strong); margin-bottom: 6px; }
        .sx-empty-icon img { width: 104px; height: 104px; object-fit: cover; transform: translate(-2px, 2px); }
        .sx-empty h3 { margin: 0; font-family: var(--sx-display); font-size: 30px; font-weight: 500; letter-spacing: -0.01em; color: var(--sx-ink); }
        .sx-empty p { margin: 0; padding: 0 16px; font-size: 14.5px; font-weight: 500; line-height: 22px; color: var(--sx-muted); }

        /* Barra de escritura flotante */
        .sx-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 14px; z-index: 10; pointer-events: none; background: linear-gradient(to top, var(--sx-canvas) 62%, transparent); }
        .sx-bottom > * { pointer-events: auto; }
        .sx-down { position: absolute; right: 18px; top: -40px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--sx-line-strong); background: var(--sx-surface); color: var(--sx-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); cursor: pointer; opacity: 0; transform: scale(0.6); pointer-events: none !important; transition: opacity 200ms ease, transform 260ms var(--sx-ease); }
        .sx-down.show { opacity: 1; transform: scale(1); pointer-events: auto !important; }
        .sx-down svg { width: 20px; height: 20px; }
        .sx-menu-backdrop { position: fixed; inset: 0; z-index: 0; background: transparent; }
        .sx-menu { position: relative; z-index: 2; display: flex; justify-content: space-around; align-items: center; margin-bottom: 10px; padding: 14px 12px; border-radius: 16px; background: var(--sx-surface); border: 1px solid var(--sx-line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); animation: sxMenuIn 220ms var(--sx-ease); }
        @keyframes sxMenuIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
        .sx-menu button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 10px; border: 0; background: none; color: var(--sx-ink); font-size: 12.5px; font-weight: 600; cursor: pointer; }
        .sx-menu button > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--sx-canvas); border: 1px solid var(--sx-line); color: var(--sx-ink); transition: transform 200ms var(--sx-ease), border-color 200ms ease; }
        .sx-menu button:hover > span { transform: translateY(-2px); border-color: var(--sx-line-strong); }
        .sx-menu button svg { width: 22px; height: 22px; }
        .sx-inputbox { position: relative; z-index: 1; min-height: 52px; padding: 6px; border-radius: 18px; background: var(--sx-surface); border: 1px solid var(--sx-line-strong); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); box-sizing: border-box; transition: border-color 200ms ease; }
        .sx-inputbox:focus-within { border-color: color-mix(in srgb, var(--text) 50%, transparent); }
        .sx-preview { display: flex; align-items: center; margin-bottom: 4px; padding: 6px 2px 8px; border-bottom: 1px solid var(--sx-line); overflow-x: auto; }
        .sx-clip { display: grid; place-items: center; width: 30px; height: 28px; color: var(--sx-muted); flex-shrink: 0; }
        .sx-clip svg { width: 16px; height: 16px; }
        .sx-prev-item { position: relative; display: grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 8px; background: var(--sx-canvas); border: 1px solid var(--sx-line); color: var(--sx-ink); flex-shrink: 0; }
        .sx-prev-item svg { width: 14px; height: 14px; }
        .sx-prev-item button { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 15px; height: 15px; padding: 0; border-radius: 50%; border: 1px solid var(--sx-canvas); background: #E53935; color: #FFF; cursor: pointer; }
        .sx-prev-item button svg { width: 8px; height: 8px; stroke-width: 3; }
        .sx-row { position: relative; display: flex; align-items: center; }
        .sx-compose { display: flex; align-items: center; flex: 1; min-width: 0; transition: opacity 200ms ease; }
        .sx-inputbox.is-recording .sx-compose { opacity: 0; pointer-events: none; }
        .sx-plus, .sx-send, .sx-mic, .sx-trash { display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer; flex-shrink: 0; transition: opacity 160ms ease, transform 200ms var(--sx-ease), background-color 200ms ease; }
        .sx-plus { width: 38px; height: 38px; border: 1px solid var(--sx-line-strong); background: transparent; color: var(--sx-ink); }
        .sx-plus:hover:not(:disabled) { background: var(--sx-surface-2); }
        .sx-plus svg { width: 20px; height: 20px; transition: transform 220ms var(--sx-ease); }
        .sx-plus.is-open svg { transform: rotate(180deg); }
        .sx-plus:disabled { opacity: 0.35; cursor: default; }
        .sx-plus.is-dim, .sx-send.is-dim, .sx-mic.is-dim { opacity: 0.45; }
        .sx-input { flex: 1; min-width: 0; max-height: 120px; padding: 8px 10px; border: 0; outline: none; resize: none; background: transparent; color: var(--sx-ink); font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.4; }
        .sx-input::placeholder { color: var(--sx-muted); }
        .sx-input.is-pending::placeholder { color: var(--sx-ink); opacity: 0.75; }
        .sx-input:disabled { opacity: 0.7; }
        .sx-limit { flex: 1; min-width: 0; padding: 8px 10px; border: 0; background: none; color: var(--sx-muted); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .sx-send, .sx-mic { width: 38px; height: 38px; border: 0; background: var(--sx-ink); color: var(--sx-canvas); }
        .sx-send { margin-left: 4px; }
        .sx-send:hover:not(:disabled), .sx-mic:hover:not(.is-disabled) { opacity: 0.88; }
        .sx-send svg, .sx-mic svg, .sx-trash svg { width: 18px; height: 18px; }
        .sx-send:disabled { opacity: 0.3; cursor: default; }
        .sx-send-rec { margin-left: 0; }
        .sx-mic { touch-action: none; user-select: none; -webkit-user-select: none; }
        .sx-mic.is-disabled { opacity: 0.3; cursor: default; }
        .sx-inputbox.is-recording .sx-mic { transform: scale(1.12); }
        .sx-locked { display: flex; align-items: center; gap: 8px; }
        .sx-trash { width: 38px; height: 38px; border: 0; background: #E53935; color: #FFF; }
        .sx-lock { position: absolute; right: 0; bottom: 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 20px; background: var(--sx-surface); border: 1px solid var(--sx-line-strong); color: var(--sx-ink); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); animation: sxMenuIn 200ms ease; }
        .sx-lock svg { width: 16px; height: 16px; }
        .sx-recrow { position: absolute; left: 6px; right: 48px; top: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
        .sx-inputbox.is-locked .sx-recrow { right: 136px; }
        /* Grabando sola (clic): onda en vivo, pausa y envío */
        .sx-wave { flex: 1; min-width: 0; height: 26px; color: var(--sx-ink); }
        .sx-recrow.is-locked { gap: 12px; }
        .sx-recrow.is-paused .sx-red-dot { animation: none; background: var(--sx-muted); }
        .sx-recrow.is-paused .sx-wave { opacity: 0.5; }
        .sx-pause { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--sx-line-strong); background: transparent; color: var(--sx-ink); cursor: pointer; flex-shrink: 0; transition: background-color 200ms ease; }
        .sx-pause:hover { background: var(--sx-surface-2); }
        .sx-pause svg { width: 17px; height: 17px; }
        .sx-trash:hover { opacity: 0.88; }
        .sx-notice { position: relative; z-index: 2; margin-bottom: 8px; padding: 9px 12px; border-radius: 12px; background: var(--sx-surface); border: 1px solid var(--sx-line-strong); color: var(--sx-ink); font-size: 12.5px; font-weight: 500; line-height: 1.45; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16); animation: sxMenuIn 200ms var(--sx-ease); }
        .sx-rec-ind { display: flex; align-items: center; gap: 8px; color: var(--sx-ink); }
        .sx-rec-ind b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .sx-red-dot { width: 10px; height: 10px; border-radius: 50%; background: #E53935; animation: sxPulse 1s ease-in-out infinite alternate; }
        @keyframes sxPulse { from { transform: scale(1); opacity: 1; } to { transform: scale(1.25); opacity: 0.7; } }
        .sx-slide { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--sx-muted); white-space: nowrap; }
        .sx-slide.is-cancel { color: #E53935; }
        .sx-rectrash { display: grid; place-items: center; width: 34px; height: 34px; color: var(--sx-muted); }
        .sx-rectrash.is-cancel { color: #E53935; }
        .sx-rectrash svg { width: 18px; height: 18px; }

        /* Recuadros dentro del panel (mismo estilo que los paneles de Inicio) */
        .sx-overlay { position: absolute; inset: 0; z-index: 30; }
        .sx-ov { position: absolute; inset: 0; background: rgba(10, 6, 4, 0.45); animation: sxFade 200ms ease; }
        @keyframes sxFade { from { opacity: 0; } to { opacity: 1; } }
        .sx-ov-center { display: grid; place-items: center; padding: 16px; }
        .sx-dialog { width: 100%; max-width: 360px; max-height: calc(100% - 20px); overflow-y: auto; padding: 16px 18px 14px; border-radius: 20px; border: 1px solid var(--sx-line-strong); background: var(--sx-surface); color: var(--sx-ink); box-sizing: border-box; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4); animation: sxDialogIn 240ms var(--sx-ease); }
        @keyframes sxDialogIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
        .sx-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
        .sx-dialog-head h3 { margin: 0; flex: 1; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
        .sx-x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: rgba(var(--text-rgb), 0.08); color: var(--sx-ink); cursor: pointer; flex-shrink: 0; transition: background-color 200ms ease; }
        .sx-x:hover { background: rgba(var(--text-rgb), 0.14); }
        .sx-x svg { width: 17px; height: 17px; stroke-width: 2.2; }
        .sx-x.lg { width: 34px; height: 34px; }
        .sx-divider { height: 1px; background: var(--sx-line); }
        .sx-dialog > .sx-divider { margin: 0 -18px 10px; }
        .sx-acc-list { display: grid; gap: 6px; padding-bottom: 4px; }
        .sx-acc-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: var(--sx-ink); text-align: left; cursor: pointer; transition: background-color 160ms ease; }
        .sx-acc-item:hover { background: rgba(var(--text-rgb), 0.05); }
        .sx-acc-item.sel { background: var(--sx-canvas); border-color: var(--sx-line); }
        .sx-acc-item-text { flex: 1; min-width: 0; display: grid; }
        .sx-acc-item-text b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .sx-acc-item.sel .sx-acc-item-text b { font-weight: 800; }
        .sx-acc-item-text small { margin-top: 1px; font-size: 11px; font-weight: 600; color: var(--sx-muted); }
        .sx-acc-check { width: 18px; height: 18px; stroke-width: 2.5; }
        .sx-info { max-width: 340px; padding: 18px; }
        .sx-info-head { display: flex; align-items: center; gap: 14px; }
        .sx-info-title { flex: 1; min-width: 0; display: grid; gap: 4px; }
        .sx-info-title > div { display: flex; align-items: center; justify-content: space-between; }
        .sx-info-title h3 { margin: 0; font-family: var(--sx-display); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
        .sx-info-title p { margin: 0; font-size: 12px; font-weight: 500; color: var(--sx-muted); }
        .sx-info > .sx-divider { margin: 16px 0; }
        .sx-info-label { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--sx-muted); }
        .sx-info-rows { display: grid; gap: 4px; margin-top: 10px; }
        .sx-info-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--sx-canvas); border: 1px solid var(--sx-line); }
        .sx-info-row svg { width: 16px; height: 16px; color: var(--sx-muted); flex-shrink: 0; }
        .sx-info-row small { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sx-muted); }
        .sx-info-row b { display: block; margin-top: 1px; font-size: 14px; font-weight: 700; }
        .sx-ov-avatar { display: grid; place-items: center; background: rgba(0, 0, 0, 0.9); }
        .sx-avatar-top { position: absolute; top: 16px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; color: #FFF; }
        .sx-avatar-top b { font-family: var(--sx-display); font-size: 24px; font-weight: 500; }
        .sx-avatar-top button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.16); color: #FFF; cursor: pointer; }
        .sx-avatar-top svg { width: 18px; height: 18px; }
        .sx-avatar-big { display: grid; place-items: center; width: min(280px, 70%); aspect-ratio: 1; border-radius: 18.75%; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: sxDialogIn 260ms var(--sx-ease); }
        .sx-avatar-big .ua { --ua-fg: #FFFFFF; --ua-bg: #000000; }
        .sx-ov-sheet { display: flex; align-items: flex-end; }
        .sx-sheet { display: flex; flex-direction: column; width: 100%; max-height: 92%; border-radius: 20px 20px 0 0; border: 1px solid var(--sx-line-strong); border-bottom: 0; background: var(--sx-surface); color: var(--sx-ink); overflow: hidden; animation: sxSheetIn 280ms var(--sx-ease); }
        .sx-sheet.tall { height: 75%; }
        @keyframes sxSheetIn { from { transform: translateY(100%); } to { transform: none; } }
        .sx-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 14px; }
        .sx-sheet-head h3 { margin: 0; flex: 1; font-family: var(--sx-display); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
        .sx-sheet-body { padding: 16px 18px 10px; }
        .sx-sheet-body.listy { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 18px; }
        .sx-sheet-foot { padding: 14px 18px 18px; }
        .sx-sheet-confirm { width: 100%; height: 46px; border: 0; border-radius: 12px; background: var(--sx-ink); color: var(--sx-canvas); font-size: 14.5px; font-weight: 700; cursor: pointer; transition: opacity 200ms ease; }
        .sx-sheet-confirm:hover:not(:disabled) { opacity: 0.88; }
        .sx-sheet-confirm:disabled { opacity: 0.35; cursor: default; }
        .sx-type-btns { display: grid; gap: 10px; }
        .sx-type-btn { height: 52px; border-radius: 14px; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: transparent; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .sx-type-btn.expense { color: #E53935; border: 1px solid rgba(229, 57, 53, 0.4); }
        .sx-type-btn.income { color: #43A047; border: 1px solid rgba(67, 160, 71, 0.4); }
        .sx-type-btn.expense.sel { background: #E53935; border-color: #E53935; color: #FFF; }
        .sx-type-btn.income.sel { background: #43A047; border-color: #43A047; color: #FFF; }
        .sx-opt-list { display: grid; gap: 6px; }
        .sx-opt { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--sx-line); background: var(--sx-canvas); color: var(--sx-ink); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
        .sx-opt:hover { border-color: var(--sx-line-strong); }
        .sx-opt.sel { background: var(--sx-ink); color: var(--sx-canvas); border-color: var(--sx-ink); }
        .sx-opt.row { justify-content: space-between; text-align: left; }
        .sx-opt.row svg { width: 17px; height: 17px; stroke-width: 2.6; }
        .sx-edit-input { width: 100%; height: 54px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--sx-line-strong); background: var(--sx-canvas); color: var(--sx-ink); font-family: inherit; font-size: 17px; font-weight: 600; box-sizing: border-box; outline: none; transition: border-color 200ms ease; }
        .sx-edit-input:focus { border-color: var(--sx-ink); }
        .sx-tabs { display: flex; gap: 6px; padding: 0 18px 14px; }
        .sx-tabs button { height: 32px; padding: 0 12px; border: 1px solid var(--sx-line); border-radius: 999px; background: transparent; color: var(--sx-ink); font-size: 12.5px; font-weight: 700; cursor: pointer; }
        .sx-tabs button.sel { background: var(--sx-ink); color: var(--sx-canvas); border-color: var(--sx-ink); }
        .sx-empty-line { margin: 0; padding: 28px 0; text-align: center; font-size: 13.5px; font-weight: 500; color: var(--sx-muted); }
        .sx-confirm h3 { margin: 0 0 8px; font-family: var(--sx-display); font-size: 22px; font-weight: 500; }
        .sx-confirm p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--sx-muted); }
        .sx-confirm-btns { display: flex; justify-content: flex-end; gap: 8px; }
        .sx-confirm-btns button { height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--sx-line-strong); background: transparent; color: var(--sx-ink); font-size: 13.5px; font-weight: 700; cursor: pointer; }
        .sx-confirm-btns button.danger { border-color: #E53935; background: #E53935; color: #FFF; }

        /* Ajustes de IA dentro del recuadro (como app/settings/personality.tsx) */
        .sx-settings-body { padding: 18px 18px 22px; }
        .sx-set-heading { margin: 0 0 12px; font-family: var(--sx-display); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; color: var(--sx-ink); }
        .sx-set-info { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 14px 16px; border-radius: 16px; background: var(--sx-surface); border: 1px solid var(--sx-line); }
        .sx-set-info svg { width: 18px; height: 18px; color: var(--sx-ink); flex-shrink: 0; }
        .sx-set-info p { margin: 0; font-size: 13px; font-weight: 500; line-height: 19px; color: var(--sx-muted); }
        .sx-set-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--sx-line); }
        .sx-set-section:last-of-type { border-bottom: 0; padding-bottom: 4px; }
        .sx-set-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sx-muted); }
        .sx-set-title svg { width: 15px; height: 15px; color: var(--sx-ink); }
        .sx-set-options { display: flex; flex-wrap: wrap; gap: 8px; }
        .sx-set-option { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sx-line-strong); background: transparent; color: var(--sx-ink); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease; }
        .sx-set-option:hover { background: var(--sx-surface); }
        .sx-set-option.active { background: var(--sx-ink); border-color: var(--sx-ink); color: var(--sx-canvas); }
        .sx-set-clear { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin-top: 8px; border-radius: 12px; border: 1px solid rgba(229, 57, 53, 0.45); background: rgba(229, 57, 53, 0.08); color: #E53935; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color 200ms ease; }
        .sx-set-clear:hover:not(:disabled) { background: rgba(229, 57, 53, 0.14); }
        .sx-set-clear svg { width: 17px; height: 17px; }
        .sx-set-clear.is-empty { border-color: var(--sx-line); background: transparent; color: var(--sx-muted); opacity: 0.6; cursor: default; }


        /* ── Cartel de los gráficos de Inicio (mismo diseño en los tres), con el lenguaje de la web:
              color contrario al fondo, título con línea fina, nombres en mayúsculas espaciadas ── */
        .ap-chart-tip {
            position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none;
            min-width: 168px; max-width: 280px; padding: 12px 14px 10px; border-radius: 14px;
            background: var(--text); color: var(--bg);
            border: 1px solid rgba(var(--bg-rgb), 0.14);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), 0 18px 44px rgba(0, 0, 0, 0.24);
            font-family: 'DM Sans', system-ui, sans-serif; white-space: nowrap;
            opacity: 0; transform: translateY(6px) scale(0.98); transform-origin: 50% 100%;
            transition: opacity 160ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .ap-chart-tip.is-below { transform-origin: 50% 0; transform: translateY(-6px) scale(0.98); }
        .ap-chart-tip.show { opacity: 1; transform: none; }
        .ap-chart-tip-title {
            margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(var(--bg-rgb), 0.16);
            font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 17px; font-weight: 500;
            letter-spacing: -0.01em; line-height: 1.15;
        }
        .ap-chart-tip-row { display: flex; align-items: center; gap: 10px; line-height: 1.75; }
        .ap-chart-tip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2.5px rgba(var(--bg-rgb), 0.16); }
        .ap-chart-tip-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.66; overflow: hidden; text-overflow: ellipsis; }
        .ap-chart-tip-row b { margin-left: auto; padding-left: 18px; font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }
        /* Versión compacta (Evolución de balance) */
        .ap-chart-tip.is-compact { min-width: 140px; padding: 9px 11px 7px; border-radius: 12px; }
        .ap-chart-tip.is-compact .ap-chart-tip-title { margin-bottom: 6px; padding-bottom: 6px; font-size: 14.5px; }
        .ap-chart-tip.is-compact .ap-chart-tip-row { gap: 8px; line-height: 1.65; }
        .ap-chart-tip.is-compact .ap-chart-tip-dot { width: 7px; height: 7px; box-shadow: 0 0 0 2px rgba(var(--bg-rgb), 0.16); }
        .ap-chart-tip.is-compact .ap-chart-tip-label { font-size: 9.5px; }
        .ap-chart-tip.is-compact .ap-chart-tip-row b { padding-left: 14px; font-size: 12px; }
        @media (prefers-reduced-motion: reduce) { .ap-chart-tip { transition: none; } }

        /* ── Tarjeta de movimiento (TransactionCard de la app) con la estética de la web ── */
        .txc { display: block; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(var(--text-rgb), 0.14); background: color-mix(in srgb, var(--text) 7%, var(--bg)); color: var(--text); cursor: pointer; box-sizing: border-box; transition: border-color 200ms ease, background-color 200ms ease; font-family: 'DM Sans', system-ui, sans-serif; }
        .txc:hover { border-color: rgba(var(--text-rgb), 0.28); }
        .txc:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .txc + .txc { margin-top: 10px; }
        .ap-recent .txc + .txc { margin-top: 0; }
        .txc-main { display: flex; align-items: center; gap: 14px; }
        .txc-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; color: #FFF; }
        .txc-ico svg { width: 18px; height: 18px; stroke-width: 2.4; }
        .txc-ico.inc { background: #43A047; }
        .txc-ico.exp { background: #E53935; }
        .txc-ico.neu { background: var(--text); color: var(--bg); }
        .txc-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
        .txc-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .txc-cat { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; font-weight: 500; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .txc-cat svg { width: 13px; height: 13px; flex-shrink: 0; }
        .txc-cat span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .txc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
        .txc-amount { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
        .txc-amount.inc { color: #43A047; }
        .txc-amount.exp { color: #E53935; }
        .txc-amount.neu { color: var(--text); }
        .txc-actions { display: flex; gap: 6px; }
        .txc-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 9px; border: 1px solid rgba(var(--text-rgb), 0.22); background: rgba(var(--text-rgb), 0.05); color: var(--text); cursor: pointer; transition: background-color 160ms ease; }
        .txc-btn:hover { background: rgba(var(--text-rgb), 0.12); }
        .txc-btn svg { width: 14px; height: 14px; }
        .txc-btn-del { border-color: rgba(229, 57, 53, 0.4); background: rgba(229, 57, 53, 0.08); color: #E53935; }
        .txc-btn-del:hover { background: rgba(229, 57, 53, 0.16); }
        /* Detalle desplegable (como la app al tocar la tarjeta) */
        .txc-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms cubic-bezier(0.16, 1, 0.3, 1); }
        .txc.open .txc-more { grid-template-rows: 1fr; }
        .txc-more-inner { overflow: hidden; min-height: 0; }
        .txc-detail { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 12px; padding: 12px 4px 0; border-top: 1px solid rgba(var(--text-rgb), 0.12); opacity: 0; transition: opacity 200ms ease; }
        .txc.open .txc-detail { opacity: 1; }
        .txc-infos { display: grid; gap: 8px; min-width: 0; }
        .txc-info { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
        .txc-info svg { width: 14px; height: 14px; flex-shrink: 0; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .txc-info b { font-weight: 700; }
        .txc-info-top { align-items: flex-start; }
        .txc-info-top svg { margin-top: 2px; }
        .txc-transfer { display: grid; gap: 4px; }
        .txc-time { flex-shrink: 0; }
        .txc-note { margin: 0 0 0 22px; font-size: 12px; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        @media (prefers-reduced-motion: reduce) { .txc-more, .txc-detail { transition: none; } }
        /* ── Recuadros de Inicio (Análisis de actividad, Análisis por categoría, Exportar) con la estética de la web ── */
        /* Por encima de las burbujas de Stratos y + (z-index 3000), debajo de los avisos (3100) */
        #ap-dialog.ap-sheet-overlay, #ap-sheet.ap-sheet-overlay { z-index: 3005; }
        .ap-dialog { width: min(500px, 100%); }
        .ap-dialog.is-fixed { height: min(660px, 88vh); }
        .ap-dialog .ap-sheet-head { gap: 10px; padding: 16px 18px 14px; }
        .ap-dialog .ap-sheet-head h3 { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 23px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ap-dialog .ap-sheet-close { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(var(--text-rgb), 0.14); background: transparent; transition: background-color 200ms ease, border-color 200ms ease; }
        .ap-dialog .ap-sheet-close:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.28); }
        .ap-dialog-body { gap: 10px; padding: 16px 18px 20px; align-content: start; }
        .ap-dialog-body .txc { background: var(--bg); }
        .ap-dialog-body .txc + .txc { margin-top: 0; }
        /* Análisis de actividad: días de mayor gasto / ingreso */
        .ap-peak-card { gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); transition: border-color 200ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
        .ap-peak-card:hover { border-color: rgba(var(--text-rgb), 0.3); }
        .ap-peak-card:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .ap-peak-ico { width: 42px; height: 42px; border-radius: 12px; }
        .ap-peak-ico svg { width: 20px; height: 20px; }
        .ap-peak-ico.expense { background: rgba(229, 57, 53, 0.12); color: #E53935; }
        .ap-peak-ico.income { background: rgba(67, 160, 71, 0.14); color: #43A047; }
        .ap-peak-text b { font-size: 15px; font-weight: 600; }
        .ap-peak-text small { font-size: 12.5px; font-weight: 500; opacity: 1; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .ap-peak-chev { width: 18px; height: 18px; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        /* Total del día / balance de la categoría */
        .ap-peak-total { gap: 4px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); }
        .ap-peak-total-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 1; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .ap-peak-total-date { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; opacity: 1; }
        .ap-peak-total-amount { margin-top: 4px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
        .ap-peak-total-amount.expense { color: #E53935; }
        .ap-peak-total-amount.income { color: #43A047; }
        .ap-cat-total-head svg { width: 16px; height: 16px; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        /* Subtítulos con línea fina (Movimientos del día, Historial) */
        .ap-dialog-subtitle { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .ap-dialog-subtitle::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, rgba(var(--text-rgb), 0.18), transparent); }
        .ap-dialog-empty { padding: 22px 16px; border-radius: 14px; border: 1px dashed rgba(var(--text-rgb), 0.2); }
        /* Controles: Gastos / Ingresos, Histórico / Mensual, orden y mes */
        .ap-seg { gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: transparent; }
        .ap-seg button { height: 32px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; opacity: 1; color: color-mix(in srgb, var(--text) 68%, var(--bg)); transition: background-color 200ms ease, color 200ms ease; }
        .ap-seg button:hover { color: var(--text); }
        .ap-seg button.on { background: var(--text); color: var(--bg); }
        .ap-sort { gap: 6px; }
        .ap-sort button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(var(--text-rgb), 0.14); transition: background-color 200ms ease, border-color 200ms ease; }
        .ap-sort button:hover { border-color: rgba(var(--text-rgb), 0.3); }
        .ap-sort button.on { background: var(--text); border-color: var(--text); }
        .ap-month-nav b { min-width: 170px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
        .ap-month-nav button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(var(--text-rgb), 0.14); background: transparent; transition: background-color 200ms ease, border-color 200ms ease; }
        .ap-month-nav button:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.3); }
        .ap-month-nav button svg { width: 18px; height: 18px; }
        /* Categorías */
        .ap-cat-row { gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); transition: border-color 200ms ease; }
        .ap-cat-row:hover { border-color: rgba(var(--text-rgb), 0.3); }
        .ap-cat-row:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .ap-cat-ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(var(--text-rgb), 0.07); color: var(--text); }
        .ap-cat-ico svg { width: 19px; height: 19px; }
        .ap-cat-main > b { font-size: 14.5px; font-weight: 600; }
        .ap-cat-pct { font-size: 11.5px; font-weight: 600; opacity: 1; color: color-mix(in srgb, var(--text) 68%, var(--bg)); font-variant-numeric: tabular-nums; }
        .ap-cat-bar { height: 5px; background: rgba(var(--text-rgb), 0.1); }
        .ap-cat-amt { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .ap-cat-amt.expense { color: #E53935; }
        .ap-cat-amt.income { color: #43A047; }
        /* ── Nuevo registro (misma estructura que la pantalla de la app, con la estética de la web) ── */
        #gx-modal:has(.nr-box) { padding: 16px; background: rgba(10, 6, 4, 0.55); backdrop-filter: none; }
        .nr-box {
            position: relative; display: flex; flex-direction: column; width: min(460px, 100%); height: min(740px, calc(100vh - 32px));
            border-radius: 20px; border: 1px solid rgba(var(--text-rgb), 0.28); background: color-mix(in srgb, var(--text) 7%, var(--bg));
            color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
            overflow: hidden; animation: nrIn 260ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes nrIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
        .nr-box button { font-family: inherit; }
        .nr-box svg { width: 18px; height: 18px; flex-shrink: 0; }
        .nr-head { padding: 14px 16px 12px; border-bottom: 1px solid rgba(var(--text-rgb), 0.14); }
        .nr-head-row { display: flex; align-items: center; gap: 10px; }
        .nr-title { flex: 1; margin: 0; text-align: center; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 23px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
        .nr-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; flex-shrink: 0; border-radius: 10px; border: 1px solid rgba(var(--text-rgb), 0.14); background: transparent; color: var(--text); cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, opacity 200ms ease; }
        .nr-icon-btn:hover:not(:disabled) { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.28); }
        .nr-icon-btn:disabled { opacity: 0.35; cursor: default; }
        .nr-account-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
        /* Cuenta compartida (Nuevo registro): botón a la derecha de la cuenta, opciones de la vaquita y carpeta */
        .nr-account-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; transition: opacity 200ms ease; }
        .nr-account-main.is-off { opacity: 0.38; }
        .nr-account-main.is-off .nr-dots { cursor: default; }
        .nr-shared-kinds { display: grid; gap: 8px; }
        .nr-kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); }
        .nr-kind { min-height: 38px; padding: 4px 6px; border: 0; border-radius: 9px; background: transparent; color: color-mix(in srgb, var(--text) 68%, var(--bg)); font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .nr-kind:hover { color: var(--text); }
        .nr-kind.on { background: var(--text); color: var(--bg); }
        .nr-kind:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .nr-hint.strong { font-weight: 600; color: var(--text); }
        .nr-linked .nr-folder-btn { display: inline-flex; align-items: center; gap: 5px; width: auto; max-width: 46%; padding: 0 10px; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; }
        .nr-linked .nr-folder-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
        .nr-linked .nr-folder-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
        .nr-linked .nr-folder-btn:disabled { cursor: default; background: transparent; }
        .nr-dots { display: grid; place-items: center; width: 28px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; transition: background-color 200ms ease; }
        .nr-dots:hover { background: rgba(var(--text-rgb), 0.07); }
        .nr-acc-ico { display: grid; place-items: center; flex-shrink: 0; color: #fff; border-radius: 10px; }
        .nr-acc-ico.md { width: 32px; height: 32px; }
        .nr-acc-ico.sm { width: 24px; height: 24px; border-radius: 7px; }
        .nr-acc-ico.lg { width: 38px; height: 38px; border-radius: 11px; }
        .nr-acc-ico.sm svg { width: 13px; height: 13px; }
        .nr-acc-ico.md svg { width: 16px; height: 16px; }
        .nr-account-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .nr-account-code { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .nr-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 16px; padding: 16px 18px 20px; }
        /* Tarjeta principal: tipo, monto y cotización */
        .nr-hero { display: grid; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); }
        .nr-types { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); }
        .nr-type { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: color-mix(in srgb, var(--text) 68%, var(--bg)); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .nr-type svg { width: 15px; height: 15px; }
        .nr-type:hover:not(:disabled) { color: var(--text); }
        .nr-type.on { background: var(--text); color: var(--bg); }
        .nr-type.expense.on svg { color: #E53935; }
        .nr-type.income.on svg { color: #43A047; }
        .nr-type:disabled { cursor: default; }
        .nr-type:disabled:not(.on) { opacity: 0.4; }
        .nr-hint { margin: -2px 0 0; font-size: 12px; line-height: 1.4; text-align: center; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .nr-amount { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 4px 0; cursor: text; }
        .nr-amount-sym { font-size: 22px; font-weight: 600; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .nr-amount-input { width: 1.5ch; min-width: 0; max-width: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); text-align: center; font-family: 'DM Sans', system-ui, sans-serif; font-size: 46px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; caret-color: var(--text); }
        .nr-amount-input::placeholder { color: rgba(var(--text-rgb), 0.25); }
        .nr-calc { min-height: 18px; margin: -4px 0 0; text-align: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--text) 62%, var(--bg)); opacity: 0; transition: opacity 180ms ease; }
        .nr-calc.show { opacity: 1; }
        .nr-transfer { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); }
        .nr-transfer-side { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
        .nr-transfer-side span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .nr-transfer-arrow { width: 16px; height: 16px; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .nr-transfer-x { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: rgba(var(--text-rgb), 0.07); color: var(--text); cursor: pointer; }
        .nr-transfer-x svg { width: 15px; height: 15px; }
        .nr-fx { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(var(--text-rgb), 0.28); background: transparent; color: var(--text); cursor: pointer; text-align: left; transition: border-color 200ms ease; }
        .nr-fx:hover { border-color: rgba(var(--text-rgb), 0.45); }
        .nr-fx-rows { flex: 1; display: grid; gap: 4px; }
        .nr-fx-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
        .nr-fx-row span { color: color-mix(in srgb, var(--text) 62%, var(--bg)); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
        .nr-fx-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
        .nr-fx-pen svg { width: 15px; height: 15px; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        /* Campos */
        .nr-field { display: grid; gap: 7px; }
        .nr-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .nr-label-gap { margin-top: 6px; }
        .nr-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; font-size: 14.5px; font-weight: 500; outline: none; transition: border-color 200ms ease; box-sizing: border-box; }
        .nr-input::placeholder { color: color-mix(in srgb, var(--text) 45%, var(--bg)); }
        .nr-input:focus { border-color: rgba(var(--text-rgb), 0.5); }
        .nr-input:disabled { opacity: 0.45; }
        .nr-select { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 7px 12px 7px 7px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; transition: border-color 200ms ease, opacity 200ms ease; }
        .nr-select:hover:not(:disabled) { border-color: rgba(var(--text-rgb), 0.3); }
        .nr-select:disabled { cursor: default; opacity: 0.6; }
        .nr-select-ico { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: rgba(var(--text-rgb), 0.07); color: color-mix(in srgb, var(--text) 55%, var(--bg)); }
        .nr-select-ico.on { color: var(--text); }
        .nr-select-ico svg { width: 17px; height: 17px; }
        .nr-select-text { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .nr-select-text.muted { font-weight: 500; color: color-mix(in srgb, var(--text) 50%, var(--bg)); }
        .nr-box .nr-select-chev { width: 16px; height: 16px; color: color-mix(in srgb, var(--text) 50%, var(--bg)); }
        .nr-linked { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 6px 6px 14px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.28); background: var(--bg); font-size: 14px; font-weight: 600; }
        .nr-linked > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .nr-linked button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: rgba(var(--text-rgb), 0.07); color: var(--text); cursor: pointer; }
        .nr-linked button svg { width: 15px; height: 15px; }
        .nr-note { margin: -6px 0 0; font-size: 12.5px; line-height: 1.45; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .nr-note.strong { color: #E65100; font-weight: 600; }
        .nr-foot { display: grid; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid rgba(var(--text-rgb), 0.14); }
        /* Sin el estilo del pie de página de la web (margen arriba, corrimiento lateral y línea recortada) */
        .nr-box > .nr-foot { margin: 0; position: static; text-align: initial; transition: none; }
        .nr-box > .nr-foot::before { content: none; }
        .nr-box > .nr-head { margin: 0; }
        .nr-save { display: grid; place-items: center; height: 50px; border: 0; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; transition: opacity 200ms ease, transform 200ms ease; }
        .nr-save:hover:not(:disabled) { opacity: 0.9; }
        .nr-save:active:not(:disabled) { transform: scale(0.99); }
        .nr-save:disabled { opacity: 0.3; cursor: default; }
        .nr-error { margin: 0; font-size: 12.5px; font-weight: 600; line-height: 1.4; text-align: center; color: #E53935; }
        .nr-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: nrSpin 700ms linear infinite; }
        @keyframes nrSpin { to { transform: rotate(360deg); } }
        /* Selectores internos (cuenta, categoría, modo de pago, gestión, fecha y cotización) */
        .nr-layer { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; background: rgba(10, 6, 4, 0.45); animation: nrFade 200ms ease; }
        .nr-layer[hidden] { display: none; }
        @keyframes nrFade { from { opacity: 0; } to { opacity: 1; } }
        .nr-sheet { display: flex; flex-direction: column; width: 100%; max-height: 86%; border-radius: 20px 20px 0 0; border-top: 1px solid rgba(var(--text-rgb), 0.28); background: color-mix(in srgb, var(--text) 7%, var(--bg)); animation: nrUp 260ms cubic-bezier(0.16, 1, 0.3, 1); }
        @keyframes nrUp { from { transform: translateY(24px); } to { transform: none; } }
        /* Vincular gestión y Cuenta / Transferir: alto fijo (75 % del recuadro), con scroll si el contenido es largo */
        .nr-sheet.is-fixed { height: 75%; max-height: 75%; }
        .nr-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; }
        .nr-sheet-head h3 { margin: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
        .nr-sheet-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 8px; padding: 4px 18px 18px; }
        /* Barra de scroll fina como la de los demás recuadros de la web */
        .nr-body::-webkit-scrollbar, .nr-sheet-body::-webkit-scrollbar { width: 4px; }
        .nr-body::-webkit-scrollbar-track, .nr-sheet-body::-webkit-scrollbar-track { background: transparent; }
        .nr-body::-webkit-scrollbar-thumb, .nr-sheet-body::-webkit-scrollbar-thumb { background: rgba(var(--text-rgb), 0.15); border-radius: 10px; }
        .nr-sheet-foot { display: grid; padding: 12px 18px 18px; border-top: 1px solid rgba(var(--text-rgb), 0.14); }
        .nr-sheet-foot.two { grid-template-columns: 1fr 1fr; gap: 10px; }
        .nr-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; margin: 0 18px 12px; padding: 3px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); }
        .nr-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: color-mix(in srgb, var(--text) 68%, var(--bg)); font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .nr-tabs button svg { width: 14px; height: 14px; }
        .nr-tabs button:hover { color: var(--text); }
        .nr-tabs button.on { background: var(--text); color: var(--bg); }
        .nr-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; transition: border-color 200ms ease; }
        .nr-option:hover { border-color: rgba(var(--text-rgb), 0.3); }
        .nr-option.sel { border-color: var(--text); }
        .nr-option:focus-visible, .nr-select:focus-visible, .nr-save:focus-visible, .nr-type:focus-visible, .nr-fx:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .nr-opt-ico { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; background: rgba(var(--text-rgb), 0.07); }
        .nr-opt-ico svg { width: 17px; height: 17px; }
        .nr-option-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
        .nr-option-text b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .nr-option-text small { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .nr-empty { margin: 0; padding: 22px 16px; border-radius: 14px; border: 1px dashed rgba(var(--text-rgb), 0.2); text-align: center; font-size: 13px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .nr-from { display: flex; align-items: center; gap: 10px; margin: 0 18px 4px; font-size: 14px; }
        .nr-from b { font-weight: 600; }
        .nr-from-hint { margin: 2px 18px 8px; font-size: 12.5px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .nr-sheet-body .nr-from-hint { margin: 2px 0 0; }
        .nr-ghost-btn, .nr-primary-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, opacity 200ms ease; }
        .nr-ghost-btn { border: 1px solid rgba(var(--text-rgb), 0.2); background: transparent; color: var(--text); }
        .nr-ghost-btn:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.35); }
        .nr-box .nr-ghost-btn svg { width: 16px; height: 16px; }
        .nr-primary-btn { border: 0; background: var(--text); color: var(--bg); }
        .nr-primary-btn:hover:not(:disabled) { opacity: 0.9; }
        .nr-primary-btn:disabled { opacity: 0.3; cursor: default; }
        /* Calendario */
        .nr-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
        .nr-cal-head b { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 18px; font-weight: 500; }
        .nr-week, .nr-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
        .nr-week span { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: color-mix(in srgb, var(--text) 55%, var(--bg)); padding: 4px 0; }
        .nr-day { height: 38px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
        .nr-day:hover:not(:disabled):not(.sel) { background: rgba(var(--text-rgb), 0.07); }
        .nr-day.today { border-color: rgba(var(--text-rgb), 0.3); }
        .nr-day.sel { background: var(--text); color: var(--bg); font-weight: 700; }
        .nr-day:disabled { opacity: 0.25; cursor: default; }
        .nr-time-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
        .nr-time { width: 130px; text-align: center; color-scheme: light dark; }
        /* Selector de hora propio (horas y minutos) con los colores de la web */
        .nr-time-btn { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color 200ms ease, opacity 200ms ease; }
        .nr-time-btn:hover:not(:disabled), .nr-time-btn.open { border-color: rgba(var(--text-rgb), 0.4); }
        .nr-time-btn:disabled { opacity: 0.45; cursor: default; }
        .nr-box .nr-time-btn svg { width: 16px; height: 16px; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .nr-box .nr-time-btn .nr-time-chev { width: 15px; height: 15px; transition: transform 200ms ease; }
        .nr-time-btn.open .nr-time-chev { transform: rotate(180deg); }
        .nr-time-pick { display: flex; align-items: stretch; justify-content: center; gap: 6px; padding: 8px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); animation: nrFade 180ms ease; }
        .nr-time-pick[hidden] { display: none; }
        .nr-time-col { position: relative; flex: 1; max-width: 120px; height: 164px; overflow-y: auto; display: grid; align-content: start; gap: 2px; padding: 64px 4px; scrollbar-width: none; overscroll-behavior: contain; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); }
        .nr-time-col::-webkit-scrollbar { display: none; }
        .nr-time-col button { height: 34px; flex-shrink: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 160ms ease; }
        .nr-time-col button:hover:not(:disabled):not(.sel) { background: rgba(var(--text-rgb), 0.07); }
        .nr-time-col button.sel { background: var(--text); color: var(--bg); font-weight: 700; }
        .nr-time-col button:disabled { opacity: 0.25; cursor: default; }
        /* Posponer recordatorio (Gestión): mismo calendario y hora que Nuevo Registro */
        #gx-snooze { display: flex; flex-direction: column; gap: 10px; }
        .gx-snooze-title { margin: 0 0 4px; font-weight: 700; }
        .nr-time-sep { align-self: center; font-size: 18px; font-weight: 700; color: color-mix(in srgb, var(--text) 55%, var(--bg)); }
        /* Al redibujar el mismo selector (otro día, otro mes, otra pestaña) no se repite la entrada */
        .nr-layer.still, .nr-layer.still .nr-sheet, .nr-layer.still .nr-confirm { animation: none; }
        /* Campos de texto: solo el cursor al escribir (sin el contorno general de foco de la web) */
        #gx-modal .nr-box .nr-amount-input:focus-visible, #gx-modal .nr-box .nr-input:focus-visible { outline: none; }
        /* Cotización */
        .nr-desc { margin: 0 0 4px; font-size: 13px; line-height: 1.5; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .nr-rate-row { display: flex; align-items: center; gap: 10px; }
        .nr-rate-row b { font-size: 14px; font-weight: 700; white-space: nowrap; }
        .nr-quotes-wrap { display: grid; gap: 8px; }
        .nr-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
        .nr-quotes button { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); text-align: left; cursor: pointer; transition: border-color 200ms ease; }
        .nr-quotes button:hover { border-color: rgba(var(--text-rgb), 0.35); }
        .nr-quotes small { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .nr-quotes b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .nr-loading { display: grid; place-items: center; padding: 10px; }
        /* Aviso de dinero reservado */
        .nr-layer:has(.nr-confirm) { align-items: center; }
        .nr-confirm { width: calc(100% - 36px); margin: 0 18px; padding: 20px; border-radius: 18px; border: 1px solid rgba(var(--text-rgb), 0.28); background: color-mix(in srgb, var(--text) 7%, var(--bg)); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); animation: nrUp 240ms cubic-bezier(0.16, 1, 0.3, 1); }
        .nr-confirm h3 { margin: 0 0 8px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 21px; font-weight: 500; }
        .nr-confirm p { margin: 0; font-size: 13.5px; line-height: 1.5; color: color-mix(in srgb, var(--text) 75%, var(--bg)); }
        .nr-confirm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
        .nr-confirm-btns button { height: 44px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.2); background: transparent; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
        .nr-confirm-btns button.primary { border: 0; background: var(--text); color: var(--bg); }
        @media (max-width: 520px) {
            #gx-modal:has(.nr-box) { padding: 0; align-items: flex-end; }
            .nr-box { width: 100%; height: 94vh; border-radius: 20px 20px 0 0; }
        }
        /* ── Cuentas (js/web-accounts.js): estructura de la app con la estética de Inicio ── */
        .ac-page { display: grid; gap: 22px; padding-bottom: 40px; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); color: var(--text); }
        .ac-page svg { width: 18px; height: 18px; flex-shrink: 0; }
        .ac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid rgba(var(--text-rgb), 0.14); }
        .ac-title { margin: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-weight: 500; font-size: clamp(34px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -0.02em; color: var(--text); }
        .ac-head-actions, .ac-subhead-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
        .ac-subhead { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid rgba(var(--text-rgb), 0.14); }
        .ac-subtitle { flex: 1; min-width: 0; margin: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-weight: 500; font-size: clamp(28px, 2.8vw, 36px); line-height: 1.1; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ac-round, .ac-square { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; flex-shrink: 0; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; color: var(--text); cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, opacity 200ms ease; }
        .ac-round:hover, .ac-square:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.32); }
        .ac-square.ink { background: var(--text); border-color: var(--text); color: var(--bg); }
        .ac-square.ink:hover { opacity: 0.88; background: var(--text); }
        .ac-square.danger { background: #D32F2F; border-color: #D32F2F; color: #fff; }
        .ac-square.danger:hover { opacity: 0.88; background: #D32F2F; }
        .ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.2); background: transparent; color: var(--text); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color 200ms ease, border-color 200ms ease, opacity 200ms ease, transform 200ms ease; }
        .ac-btn svg { width: 16px; height: 16px; }
        .ac-btn:hover:not(:disabled) { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.34); }
        .ac-btn.solid { background: var(--text); border-color: var(--text); color: var(--bg); }
        .ac-btn.solid:hover:not(:disabled) { background: var(--text); opacity: 0.9; }
        .ac-btn.danger { background: #D32F2F; border-color: #D32F2F; color: #fff; }
        .ac-btn.danger:hover:not(:disabled) { background: #D32F2F; opacity: 0.9; }
        .ac-btn:disabled { opacity: 0.4; cursor: default; }
        .ac-btn.is-dim { opacity: 0.45; }
        .ac-btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
        .ac-btn.wide { width: 100%; }
        .ac-btn.lg { height: 52px; font-size: 15px; border-radius: 14px; }
        .ac-btn:focus-visible, .ac-round:focus-visible, .ac-square:focus-visible, .ac-card:focus-visible, .ac-mini:focus-visible, .ac-row:focus-visible, .ac-share:focus-visible, .ac-pat:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .ac-loading { display: grid; place-items: center; padding: 60px 0; }
        .ac-muted-center { margin: 40px 0; text-align: center; font-size: 15px; font-weight: 500; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .ac-section-label { margin: 0 0 -8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .ac-note { margin: 0; font-size: 12px; line-height: 1.45; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        /* Ícono de cuenta (como AccountIcon de la app) */
        .ac-icon { display: inline-grid; place-items: center; flex-shrink: 0; border-style: solid; border-color: #fff; color: #fff; box-sizing: border-box; }
        .ac-page .ac-icon svg, .ac-form .ac-icon svg { width: var(--ico); height: var(--ico); }
        /* Lista */
        .ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
        .ac-grid.wide { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
        .ac-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 12px 14px 18px; border-radius: 18px; border: 1px solid rgba(var(--text-rgb), 0.24); background: transparent; color: var(--text); cursor: pointer; transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease; }
        .ac-card:hover { border-color: rgba(var(--text-rgb), 0.42); }
        .ac-card.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
        .ac-card.is-locked { opacity: 0.75; }
        .ac-card-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
        .ac-card-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 17px; font-weight: 700; }
        .ac-card-name > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ac-page .ac-card-name > svg { width: 17px; height: 17px; }
        .ac-card-cur { font-size: 13px; font-weight: 600; opacity: 0.82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ac-lock { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 2px 7px; border-radius: 7px; background: color-mix(in srgb, currentColor 16%, transparent); font-size: 10.5px; font-weight: 800; }
        .ac-page .ac-lock svg { width: 11px; height: 11px; }
        .ac-card-actions { display: grid; gap: 6px; }
        .ac-mini { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); background: color-mix(in srgb, currentColor 9%, transparent); color: inherit; cursor: pointer; transition: background-color 200ms ease; }
        .ac-mini:hover { background: color-mix(in srgb, currentColor 18%, transparent); }
        .ac-page .ac-mini svg { width: 17px; height: 17px; }
        .ac-empty { align-items: center; gap: 14px; padding: 48px 24px; text-align: center; }
        .ac-empty-ico { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 34px; background: rgba(var(--text-rgb), 0.07); color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .ac-page .ac-empty-ico svg { width: 52px; height: 52px; stroke-width: 1.2; }
        .ac-empty h2 { margin: 6px 0 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 28px; font-weight: 500; }
        .ac-empty p { max-width: 420px; margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        /* Información de cuenta */
        .ac-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
        .ac-col { display: grid; gap: 16px; min-width: 0; }
        .ac-acc-head { flex-direction: row !important; align-items: center; gap: 18px; }
        .ac-acc-head-text { min-width: 0; display: grid; gap: 5px; }
        .ac-acc-head-text h2 { margin: 0 0 2px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 28px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; overflow-wrap: anywhere; }
        .ac-acc-head-text span { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--text) 66%, var(--bg)); }
        .ac-page .ac-acc-head-text span svg { width: 14px; height: 14px; }
        .ac-balance { gap: 10px; }
        .ac-balance .dash-card-title, .ac-block .dash-card-title { margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
        .ac-page .dash-card-title svg { width: 16px; height: 16px; }
        .ac-balance-amount { font-size: clamp(30px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
        .ac-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
        .ac-kv span { color: color-mix(in srgb, var(--text) 70%, var(--bg)); font-weight: 500; }
        .ac-kv b { font-weight: 700; font-variant-numeric: tabular-nums; }
        .ac-flows { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(var(--text-rgb), 0.14); }
        .ac-flows > div { display: grid; gap: 4px; min-width: 0; }
        .ac-flows b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
        .ac-flow-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .ac-page .ac-flow-ico { width: 22px; height: 22px; padding: 4px; border-radius: 7px; color: #fff; stroke-width: 3; box-sizing: border-box; }
        .ac-flow-ico.income { background: #2E7D32; }
        .ac-flow-ico.expense { background: #D32F2F; }
        .ac-warn { display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px; border: 1px solid #D32F2F; background: rgba(211, 47, 47, 0.08); }
        .ac-warn b { font-size: 15px; font-weight: 700; }
        .ac-warn p { margin: 0; font-size: 13.5px; line-height: 1.5; color: color-mix(in srgb, var(--text) 85%, var(--bg)); }
        .ac-warn .ac-btn { justify-self: start; }
        .ac-rows { display: grid; gap: 8px; }
        .ac-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); font-family: inherit; text-align: left; cursor: pointer; transition: border-color 200ms ease; }
        .ac-row:hover { border-color: rgba(var(--text-rgb), 0.32); }
        .ac-row-ico, .ac-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; background: rgba(var(--text-rgb), 0.08); }
        .ac-avatar { border-radius: 50%; }
        .ac-page .ac-row-ico svg, .ac-page .ac-avatar svg { width: 17px; height: 17px; }
        .ac-row-label { flex: 1; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
        .ac-row b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .ac-page .ac-row-chev { width: 16px; height: 16px; color: color-mix(in srgb, var(--text) 50%, var(--bg)); }
        .ac-context { padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); font-size: 14px; font-weight: 500; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
        .ac-context.is-empty { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-style: italic; color: color-mix(in srgb, var(--text) 55%, var(--bg)); }
        .ac-member { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); }
        .ac-member-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ac-badge { padding: 4px 10px; border-radius: 9px; background: rgba(var(--text-rgb), 0.1); font-size: 11px; font-weight: 700; }
        .ac-badge.is-admin { background: var(--text); color: var(--bg); }
        /* Mi patrimonio */
        .ac-pat { align-items: stretch !important; gap: 10px; width: 100%; color: var(--text); font-family: inherit; text-align: left; cursor: pointer; }
        .ac-pat-head { display: flex; align-items: center; gap: 8px; }
        .ac-pat-head b { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ac-pat-head span { font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .ac-page .ac-pat-head svg { width: 17px; height: 17px; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .ac-currency { display: grid; gap: 16px; max-width: 760px; }
        .ac-share-list { display: grid; gap: 6px; }
        .ac-share { display: grid; gap: 8px; width: 100%; padding: 10px 10px 12px; border: 0; border-radius: 14px; background: transparent; color: var(--text); font-family: inherit; text-align: left; cursor: pointer; transition: background-color 200ms ease; }
        .ac-share:hover { background: rgba(var(--text-rgb), 0.05); }
        .ac-share-top { display: flex; align-items: center; gap: 10px; }
        .ac-share-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ac-share-top b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .ac-page .ac-share-top > svg { width: 17px; height: 17px; color: color-mix(in srgb, var(--text) 55%, var(--bg)); }
        .ac-share-bar { display: flex; align-items: center; gap: 10px; padding-left: 46px; }
        .ac-share-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(var(--text-rgb), 0.12); overflow: hidden; }
        .ac-share-track span { display: block; height: 100%; border-radius: 3px; background: var(--text); }
        .ac-share-bar small { width: 38px; text-align: right; font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--text) 68%, var(--bg)); font-variant-numeric: tabular-nums; }
        /* Recuadros (confirmaciones, Ajustar saldo, límites) */
        .ac-dlg { display: grid; gap: 12px; }
        .ac-dlg-text { margin: 0; font-size: 14px; line-height: 1.55; color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
        .ac-dlg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
        .ac-dlg-btns.one { grid-template-columns: 1fr; }
        .ac-adj-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--text-rgb), 0.06); font-size: 13px; font-weight: 600; }
        .ac-adj-current b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .ac-adj-preview { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
        .ac-limit { justify-items: start; }
        .ac-limit-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
        .ac-limit-badge svg { width: 13px; height: 13px; }
        .ac-limit .ac-dlg-btns { width: 100%; }
        .ac-money { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: var(--bg); cursor: text; transition: border-color 200ms ease; }
        .ac-money:focus-within { border-color: rgba(var(--text-rgb), 0.5); }
        .ac-money > span { font-size: 17px; font-weight: 700; color: color-mix(in srgb, var(--text) 65%, var(--bg)); }
        .ac-money-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font-family: inherit; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .ac-money-input:focus-visible { outline: none; }
        /* Crear / Editar cuenta (usa los componentes de Nuevo registro) */
        .modal-overlay:has(> .nr-box) { padding: 16px; background: rgba(10, 6, 4, 0.55); backdrop-filter: none; }
        .nr-box .nr-input:focus-visible, .nr-box .nr-amount-input:focus-visible, .nr-box textarea:focus-visible { outline: none; }
        .ac-form .nr-icon-btn.is-dim { opacity: 0.45; }
        .ac-form .nr-icon-btn.is-ghost { visibility: hidden; }
        .ac-form-preview { display: grid; place-items: center; padding: 6px 0 4px; }
        .ac-form .nr-input.is-error { border-color: #E53935; }
        .ac-field-error { margin: 0; font-size: 12px; font-weight: 600; color: #E53935; }
        .ac-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); }
        .ac-pick-icon { flex-shrink: 0; display: grid; place-items: center; padding: 3px; border-radius: 16px; border: 2px solid transparent; background: transparent; cursor: pointer; transition: border-color 160ms ease; }
        .ac-pick-icon.is-on { border-color: var(--text); }
        .ac-pick-color { flex-shrink: 0; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); transition: transform 160ms ease, border-color 160ms ease; }
        .ac-pick-color:hover { transform: scale(1.06); }
        .ac-pick-color.is-on { border-color: var(--text); }
        .ac-pick-more { flex-shrink: 0; display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border-radius: 15px; border: 2px dashed rgba(var(--text-rgb), 0.35); background: transparent; color: var(--text); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
        .ac-pick-more.round { width: 40px; height: 40px; border-radius: 50%; }
        .ac-pick-more:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.55); }
        .ac-form .ac-sym { font-size: 14px; font-weight: 800; color: var(--text); }
        .ac-switch-row, .ac-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
        .ac-label-row { justify-content: flex-start; }
        .ac-switch { position: relative; width: 46px; height: 26px; padding: 0; flex-shrink: 0; border-radius: 13px; border: 0; background: rgba(var(--text-rgb), 0.2); cursor: pointer; transition: background-color 200ms ease; }
        .ac-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
        .ac-switch.is-on { background: var(--text); }
        .ac-switch.is-on span { transform: translateX(20px); }
        .ac-switch:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .ac-info { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
        .ac-form .ac-info svg { width: 15px; height: 15px; }
        .ac-textarea { height: auto; min-height: 92px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
        .ac-chips { display: grid; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); }
        .ac-chip { display: flex; align-items: center; gap: 9px; padding: 9px 10px 9px 12px; border-radius: 11px; border: 1px solid rgba(var(--text-rgb), 0.14); background: rgba(var(--text-rgb), 0.04); font-size: 14px; font-weight: 600; }
        .ac-chip.is-owner { background: rgba(var(--text-rgb), 0.09); }
        .ac-chip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ac-chip b { padding: 2px 8px; border-radius: 7px; background: var(--text); color: var(--bg); font-size: 10.5px; font-weight: 800; }
        .ac-form .ac-chip > svg { width: 16px; height: 16px; }
        .ac-chip button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #E53935; cursor: pointer; }
        .ac-chip button:hover { background: rgba(229, 57, 53, 0.1); }
        .ac-form .ac-chip button svg { width: 15px; height: 15px; }
        .ac-icon-group { display: grid; gap: 8px; margin-bottom: 10px; }
        .ac-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
        .ac-icon-opt { display: grid; place-items: center; height: 48px; padding: 0; border-radius: 13px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
        .ac-icon-opt:hover { border-color: rgba(var(--text-rgb), 0.35); }
        .ac-icon-opt.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
        .ac-form .ac-icon-opt svg { width: 22px; height: 22px; }
        .ac-color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 12px; justify-items: center; }
        .ac-color-opt { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); transition: transform 160ms ease; }
        .ac-color-opt:hover { transform: scale(1.08); }
        .ac-color-opt.is-on { border-color: var(--text); }
        .ac-search { position: relative; margin: 0 18px 12px; }
        .ac-form .ac-search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: color-mix(in srgb, var(--text) 55%, var(--bg)); pointer-events: none; }
        .ac-search .nr-input { padding-left: 38px; }
        .ac-friend .ac-mail { text-transform: none; letter-spacing: 0; font-weight: 500; }
        .ac-check { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 2px solid rgba(var(--text-rgb), 0.35); color: var(--bg); }
        .ac-check.is-on { background: var(--text); border-color: var(--text); }
        .ac-form .ac-check svg { width: 14px; height: 14px; }
        .ac-no-friends { display: grid; justify-items: center; gap: 8px; padding: 30px 16px; text-align: center; }
        .ac-form .ac-no-friends svg { width: 34px; height: 34px; color: color-mix(in srgb, var(--text) 55%, var(--bg)); }
        .ac-no-friends b { font-size: 14px; font-weight: 700; }
        .ac-no-friends p { margin: 0; font-size: 13px; line-height: 1.5; color: color-mix(in srgb, var(--text) 65%, var(--bg)); }
        .ac-context-info { display: grid; gap: 10px; }
        .ac-context-info p { margin: 0; font-size: 14px; line-height: 1.55; }
        .ac-context-info .ac-example { padding: 10px 12px; border-radius: 12px; background: rgba(var(--text-rgb), 0.06); font-size: 13px; }
        @media (max-width: 1100px) {
            .ac-detail { grid-template-columns: minmax(0, 1fr); }
        }
        @media (max-width: 760px) {
            .ac-grid, .ac-grid.wide { grid-template-columns: minmax(0, 1fr); }
            .ac-head { align-items: flex-start; flex-direction: column; }
        }
        /* ── Ver estadísticas (Mi patrimonio): Inicio con todas las cuentas de una moneda ── */
        .ap-scope-head { display: none; }
        body.home-scoped.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello { display: none !important; }
        body.home-scoped.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-scope-head { display: flex; align-items: center; gap: 14px; min-width: 0; padding-right: 22px; }
        .ap-scope-back { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; flex-shrink: 0; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; color: var(--text); cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease; }
        .ap-scope-back:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.32); }
        .ap-scope-back svg { width: 20px; height: 20px; }
        .ap-scope-text { display: grid; min-width: 0; }
        .ap-scope-title { margin: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 28px; font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ap-scope-sub { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 66%, var(--bg)); }
        body.home-scoped.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-wrap,
        body.home-scoped.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts { display: none !important; }
        /* Solo Evolución, Resumen financiero y Mapa de calor (los bloques de la app), sin importar «Editar inicio» */
        body.home-scoped #view-dashboard .dashboard-grid > * { display: none !important; }
        body.home-scoped #view-dashboard .dashboard-grid > [data-widget=evolution] { display: flex !important; order: 1 !important; grid-column: 1 / -1; }
        body.home-scoped #view-dashboard .dashboard-grid > [data-widget=comparative] { display: flex !important; order: 2 !important; grid-column: span 5; }
        body.home-scoped #view-dashboard .dashboard-grid > [data-widget=heatmap] { display: flex !important; order: 3 !important; grid-column: span 7; }
        /* El Resumen financiero ocupa todo el alto de su tarjeta (al lado del Mapa de calor) */
        body.home-scoped #view-dashboard [data-widget=comparative] .chart-container { flex: 1; height: auto !important; min-height: 220px; margin-top: 12px !important; }
        @media (max-width: 767px) {
            body.home-scoped #view-dashboard .dashboard-grid > [data-widget=comparative],
            body.home-scoped #view-dashboard .dashboard-grid > [data-widget=heatmap] { grid-column: 1 / -1; }
        }
        /* ── Encabezado de página en la barra superior (Cuentas, Historial): opaco y del mismo alto que Inicio ── */
        .ap-page-head, .ap-page-actions { display: none; }
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav { background: var(--ap-canvas); backdrop-filter: none; -webkit-backdrop-filter: none; }
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav::after { display: block; left: 48px; right: 48px; z-index: -1; border-bottom: 1px solid var(--ap-line); }
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .nav-back-btn { display: none !important; }
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-page-head { display: flex; align-items: center; gap: 14px; min-width: 0; padding-right: 22px; }
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-page-title { min-width: 0; }
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-page-actions { display: flex; align-items: center; gap: 10px; }
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { height: 42px; align-items: center !important; }
        body.ap-page-nav .ap-page-actions .ac-btn { height: 40px; }
        body.ap-page-nav .ap-page-actions .ac-btn svg { width: 16px; height: 16px; }
        body.ap-page-nav .ap-page-actions .ac-square svg { width: 18px; height: 18px; }
        /* El encabezado viejo de Historial ya no hace falta: el título subió a la barra */
        body.ap-page-nav #view-historial .dashboard-header,
        body.ap-page-nav #view-historial .dashboard-header + div { display: none; }
        body.ap-page-nav #view-historial, body.ap-page-nav #view-cuentas { padding-top: 0; }
        body.ap-page-nav #view-historial > .container, body.ap-page-nav #view-cuentas > .container { padding-top: 24px; }
        @media (max-width: 1180px) {
            body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-page-head { padding-right: 14px; }
        }
        @media (max-width: 760px) {
            body.ap-page-nav .ap-page-actions .ac-btn { width: 40px; padding: 0; gap: 0; font-size: 0; }
        }
        /* Campos de escritura: nunca un recuadro de foco encima (alcanza con el cursor y el borde propio del campo).
           Vale para todos los campos de la web, también los que se agreguen después. Los botones conservan su contorno. */
        input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=button], [type=submit], [type=reset], [type=image]):focus,
        input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=button], [type=submit], [type=reset], [type=image]):focus-visible,
        textarea:focus, textarea:focus-visible, select:focus, select:focus-visible,
        [contenteditable]:focus, [contenteditable]:focus-visible { outline: none !important; }
        /* Centro de la barra superior de una página (p. ej. las secciones de Gestión), como los controles de Inicio */
        .ap-page-center { display: none; }
        body.ap-page-nav.ap-page-has-center.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .nav-content { grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; column-gap: 0; }
        body.ap-page-nav.ap-page-has-center.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { grid-column: 3; padding-left: 22px; }
        /* Centrado, pero un poco más cerca del título */
        body.ap-page-nav.ap-page-has-center.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-page-center { display: flex; grid-column: 2; justify-self: center; min-width: 0; margin-right: clamp(0px, 7vw, 120px); }
        .ap-seg-nav { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; }
        .ap-seg-nav button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border: 0; border-radius: 11px; background: transparent; color: color-mix(in srgb, var(--text) 72%, var(--bg)); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .ap-seg-nav button:hover { color: var(--text); background: rgba(var(--text-rgb), 0.06); }
        .ap-seg-nav button.active { background: var(--text); color: var(--bg); }
        .ap-seg-nav button svg { width: 16px; height: 16px; flex-shrink: 0; }
        .ap-seg-nav button:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
        .ap-seg-nav .gx-tab-badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 10.5px; font-weight: 800; }
        .ap-seg-nav button.active .gx-tab-badge { background: var(--bg); color: var(--text); }
        /* Menos ancho: las secciones muestran solo el ícono (la elegida conserva su nombre) */
        @media (max-width: 1240px) {
            body.ap-page-nav.ap-page-has-center.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-page-center { margin-right: 0; }
            .ap-seg-nav button:not(.active) .ap-seg-label { display: none; }
            .ap-seg-nav button:not(.active) { padding: 0 11px; }
        }
        @media (max-width: 1020px) {
            .ap-seg-nav button .ap-seg-label { display: none; }
            .ap-seg-nav button { padding: 0 11px; }
            body.ap-page-nav.ap-page-has-center .ap-page-actions .ac-btn { width: 40px; padding: 0; gap: 0; font-size: 0; }
        }
        /* ── Gestión (js/web-gestion.js): estructura de la app con la estética de Inicio ── */
        body.ap-page-nav #view-gestion { padding-top: 0; }
        body.ap-page-nav #view-gestion > .container { padding-top: 24px; }
        #view-gestion .gx-page { font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); color: var(--text); padding-bottom: 40px; }
        #view-gestion .gx-tabs { display: flex; flex-wrap: wrap; gap: 8px; width: auto; margin: 0 0 20px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
        #view-gestion .gx-tabs .gestion-tab-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; color: var(--text); font-family: inherit; font-size: 14px; font-weight: 600; box-shadow: none; cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease; }
        #view-gestion .gx-tabs .gestion-tab-btn:hover { border-color: rgba(var(--text-rgb), 0.36); background: rgba(var(--text-rgb), 0.05); }
        #view-gestion .gx-tabs .gestion-tab-btn.active { background: var(--text); border-color: var(--text); color: var(--bg); }
        #view-gestion .gx-tabs .gestion-tab-btn svg { width: 17px; height: 17px; }
        #view-gestion .gx-tabs .gestion-tab-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        #view-gestion .gx-tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 800; }
        #view-gestion .gestion-tab-btn.active .gx-tab-badge { background: var(--bg); color: var(--text); }
        #view-gestion .gx-tab-badge[hidden] { display: none; }
        .gx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
        .gx-loading { grid-column: 1 / -1; display: grid; place-items: center; padding: 48px 0; }
        /* Tarjetas */
        .gx-card { position: relative; display: grid; gap: 10px; min-width: 0; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--ap-line, rgba(var(--text-rgb), 0.14)); background: var(--ap-surface, color-mix(in srgb, var(--text) 7%, var(--bg))); color: var(--text); cursor: pointer; transition: border-color 200ms ease, opacity 200ms ease; }
        .gx-card:hover, .gx-card.expanded { border-color: var(--ap-line-strong, rgba(var(--text-rgb), 0.28)); }
        .gx-card:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .gx-card.is-muted { opacity: 0.72; }
        .gx-card svg, .gx-pending svg { flex-shrink: 0; }
        .gx-card-head { display: flex; align-items: flex-start; gap: 12px; }
        .gx-card-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
        .gx-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; font-weight: 700; }
        .gx-card-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .gx-card-title svg { width: 18px; height: 18px; }
        .gx-card-tools { display: flex; gap: 6px; }
        .gx-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; border: 1px solid rgba(var(--text-rgb), 0.16); background: transparent; color: var(--text); cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease; }
        .gx-icon-btn:hover { background: rgba(var(--text-rgb), 0.07); border-color: rgba(var(--text-rgb), 0.32); }
        .gx-icon-btn svg { width: 17px; height: 17px; }
        .gx-amount { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
        .gx-amount small { font-size: 14px; font-weight: 500; color: color-mix(in srgb, var(--text) 62%, var(--bg)); white-space: nowrap; }
        .gx-value { font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
        .gx-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: color-mix(in srgb, var(--text) 72%, var(--bg)); }
        .gx-sub svg { width: 13px; height: 13px; }
        .gx-sub-row { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--text) 78%, var(--bg)); }
        .gx-sub-row span { display: inline-flex; align-items: center; gap: 5px; }
        .gx-sub-row svg { width: 14px; height: 14px; }
        .gx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
        /* Monto del recordatorio para registrar, al lado de Vencido: mismo tamaño que la fecha y la hora */
        .gx-chip-amount { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
        .gx-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 8px; border: 1px solid var(--chip); background: color-mix(in srgb, var(--chip) 15%, transparent); color: var(--chip); font-size: 11.5px; font-weight: 700; }
        .gx-repeat { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .gx-repeat svg { width: 12px; height: 12px; }
        .gx-status { justify-self: start; padding: 3px 10px; border-radius: 8px; background: rgba(var(--text-rgb), 0.12); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
        .gx-status.ink { background: var(--text); color: var(--bg); }
        .gx-overdue { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: #B22222; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
        .gx-overdue svg { width: 11px; height: 11px; }
        .gx-bar { height: 6px; border-radius: 3px; background: rgba(var(--text-rgb), 0.12); overflow: hidden; }
        .gx-bar span { display: block; height: 100%; border-radius: 3px; background: var(--text); transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1); }
        .gx-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
        .gx-pct { font-size: 12.5px; font-weight: 700; }
        .gx-meta { font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .gx-note { margin: 0; font-size: 12.5px; font-weight: 600; line-height: 1.4; color: color-mix(in srgb, var(--text) 75%, var(--bg)); }
        .gx-note.center { text-align: center; font-weight: 500; }
        .gx-kv { display: grid; gap: 1px; }
        .gx-kv small { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .gx-kv b { font-size: 12.5px; font-weight: 700; }
        .gx-register { display: flex; align-items: center; gap: 8px; }
        .gx-register > span { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
        .gx-round { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer; transition: transform 160ms ease, opacity 160ms ease; }
        .gx-round:hover { transform: scale(1.06); }
        .gx-round.ok { background: #2E7D32; }
        .gx-round.no { background: #B22222; }
        .gx-round.neutral { background: rgba(var(--text-rgb), 0.14); color: var(--text); }
        .gx-round svg { width: 16px; height: 16px; }
        .gx-prompt { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: rgba(var(--text-rgb), 0.06); font-size: 13.5px; font-weight: 700; }
        .gx-prompt-btns { display: flex; gap: 8px; }
        .gx-expanded { display: none; gap: 9px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--ap-line, rgba(var(--text-rgb), 0.14)); cursor: default; }
        .gx-card.expanded .gx-expanded { display: grid; }
        .gx-expanded-title { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 18px; font-weight: 500; }
        .gx-detail { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.4; color: var(--text); }
        .gx-detail > svg { width: 15px; height: 15px; margin-top: 2px; color: color-mix(in srgb, var(--text) 58%, var(--bg)); }
        .gx-detail b { font-weight: 700; }
        .gx-detail-btn { width: 100%; padding: 0; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
        .gx-detail-btn .gx-detail-edit { margin-left: auto; width: 14px; height: 14px; }
        .gx-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
        .gx-act { display: grid; place-items: center; width: 58px; height: 40px; padding: 0; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.28); background: rgba(var(--text-rgb), 0.06); color: var(--text); cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease; }
        .gx-act:hover { background: rgba(var(--text-rgb), 0.12); }
        .gx-act.danger { border-color: #D32F2F; background: rgba(211, 47, 47, 0.08); color: #D32F2F; }
        .gx-act.danger:hover { background: rgba(211, 47, 47, 0.16); }
        .gx-act svg { width: 18px; height: 18px; }
        .gx-act:focus-visible, .gx-icon-btn:focus-visible, .gx-round:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .gx-card .ac-btn svg, .gx-pending .ac-btn svg { width: 15px; height: 15px; }
        /* Pendientes de confirmar (Recurrentes) */
        .gx-pending-block { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-bottom: 6px; }
        .gx-section-label { grid-column: 1 / -1; margin: 0 0 -2px 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .gx-pending { display: grid; gap: 8px; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--ap-line-strong, rgba(var(--text-rgb), 0.28)); background: transparent; color: var(--text); }
        .gx-pending-btns { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr; gap: 8px; margin-top: 4px; }
        .gx-pending-btns .ac-btn { width: 100%; padding: 0 8px; }
        /* Vacío */
        .gx-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 48px 20px; border-radius: 16px; border: 1px dashed var(--ap-line-strong, rgba(var(--text-rgb), 0.28)); text-align: center; }
        .gx-empty-ico { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; background: rgba(var(--text-rgb), 0.07); color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .gx-empty-ico svg { width: 36px; height: 36px; stroke-width: 1.4; }
        .gx-empty h3 { margin: 4px 0 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 24px; font-weight: 500; }
        .gx-empty p { margin: 0; max-width: 380px; font-size: 14px; line-height: 1.5; color: color-mix(in srgb, var(--text) 66%, var(--bg)); }
        /* Formularios (recuadro con la estructura de Nuevo registro) */
        .nr-icon-btn.is-ghost { visibility: hidden; }
        /* Tamaño fijo (no depende del contenido): si hay mucho, se scrollea el cuerpo; encabezado y pie quedan fijos */
        .gx-box { height: min(700px, calc(100vh - 32px)); max-height: none; width: min(540px, 100%); }
        /* ── Recorrido de bienvenida de Statera Web (js/web-tour.js): como los carteles de Inicio de la app ── */
        .wt { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 24px 16px; opacity: 0; pointer-events: none; transition: opacity 220ms ease; font-family: 'DM Sans', system-ui, sans-serif; color: var(--text); }
        .wt.is-open { opacity: 1; pointer-events: auto; }
        .wt-dim { position: absolute; inset: 0; width: 100%; height: 100%; }
        .wt-dim path { fill: rgba(0, 0, 0, 0.62); }
        .wt-rings span { position: absolute; border: 2px solid var(--text); border-radius: 14px; box-shadow: 0 0 0 4px rgba(var(--text-rgb), 0.12); pointer-events: none; }
        .wt-card {
            position: relative; width: min(440px, 100%); padding: 28px 24px 22px; border-radius: 24px;
            border: 1px solid rgba(var(--text-rgb), 0.28); background: color-mix(in srgb, var(--text) 7%, var(--bg));
            box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45); text-align: center;
            transform: translateY(10px) scale(0.98); transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .wt.is-open .wt-card { transform: none; }
        .wt-body { transition: opacity 140ms ease, transform 140ms ease; }
        .wt-body.is-swapping { opacity: 0; transform: translateY(4px); }
        .wt-ico { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 20px; border: 1px solid rgba(var(--text-rgb), 0.2); background: rgba(var(--text-rgb), 0.08); }
        .wt-ico svg { width: 32px; height: 32px; stroke-width: 1.7; }
        .wt-title { margin: 0 0 10px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 27px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; text-wrap: balance; }
        .wt-text { margin: 0 auto; max-width: 360px; font-size: 15px; line-height: 1.6; color: color-mix(in srgb, var(--text) 78%, var(--bg)); text-wrap: pretty; }
        .wt-dots { display: flex; justify-content: center; gap: 6px; margin: 22px 0 20px; }
        .wt-dots span { width: 8px; height: 8px; border-radius: 4px; background: rgba(var(--text-rgb), 0.25); transition: width 240ms cubic-bezier(0.16, 1, 0.3, 1), background-color 240ms ease; }
        .wt-dots span.is-on { width: 22px; background: var(--text); }
        .wt-btns { display: flex; gap: 10px; }
        .wt-btn { flex: 1; height: 46px; border-radius: 12px; font: 600 14.5px 'DM Sans', system-ui, sans-serif; cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, opacity 200ms ease, transform 160ms ease; }
        .wt-btn[hidden] { display: none; }
        .wt-btn:active { transform: scale(0.97); }
        .wt-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .wt-btn-ghost { border: 1px solid rgba(var(--text-rgb), 0.22); background: transparent; color: var(--text); }
        .wt-btn-primary { border: 0; background: var(--text); color: var(--bg); }
        @media (hover: hover) and (pointer: fine) {
            .wt-btn-ghost:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.36); }
            .wt-btn-primary:hover { opacity: 0.9; }
        }
        @media (prefers-reduced-motion: reduce) { .wt, .wt-card, .wt-body, .wt-dots span { transition: none; } .wt-card { transform: none; } }
        @media (max-width: 520px) { .gx-box { width: 100%; height: 88vh; height: 88dvh; } }
        .gx-body { gap: 16px; }
        .gx-body .form-group { display: grid; gap: 7px; margin: 0; }
        .gx-body .form-group[hidden], .gx-body [hidden] { display: none !important; }
        .gx-body label, .gx-body .form-group > label { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 68%, var(--bg)); }
        .gx-body .form-control { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; font-size: 14.5px; font-weight: 500; box-sizing: border-box; transition: border-color 200ms ease; }
        .gx-body .form-control::placeholder { color: color-mix(in srgb, var(--text) 45%, var(--bg)); }
        .gx-body .form-control:focus { border-color: rgba(var(--text-rgb), 0.5); }
        .gx-body .form-control:disabled { opacity: 0.5; }
        .gx-body textarea.form-control { height: auto; min-height: 92px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
        .gx-body .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
        .gx-stack { display: grid; gap: 16px; }
        .gx-stack[hidden] { display: none; }
        .gx-hint { margin: 0; font-size: 12px; line-height: 1.45; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .gx-hint.strong { font-weight: 600; color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
        .gx-hint:empty { display: none; }
        .gx-modal-head { display: grid; gap: 2px; }
        .gx-modal-head b { font-size: 16px; font-weight: 700; }
        .gx-modal-head span { font-size: 13px; color: color-mix(in srgb, var(--text) 66%, var(--bg)); }
        .gx-modal-desc { margin: 0; font-size: 13.5px; line-height: 1.5; color: color-mix(in srgb, var(--text) 75%, var(--bg)); }
        .gx-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); }
        .gx-seg button { min-height: 38px; padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; color: color-mix(in srgb, var(--text) 70%, var(--bg)); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .gx-seg button:hover:not(:disabled):not(.on) { color: var(--text); }
        .gx-seg button.on { background: var(--text); color: var(--bg); }
        .gx-seg.is-disabled { opacity: 0.55; }
        .gx-seg button:disabled { cursor: default; }
        .gx-inline { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; }
        .gx-toggle-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); }
        .gx-toggle-row > div { flex: 1; display: grid; gap: 3px; }
        .gx-toggle-row b { font-size: 14px; font-weight: 700; }
        .gx-toggle-row small { font-size: 12px; line-height: 1.45; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .gx-toggle-row.is-disabled { opacity: 0.55; }
        .gx-preview { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: rgba(var(--text-rgb), 0.04); }
        .gx-preview-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
        .gx-preview-row span { color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .gx-preview-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
        .gx-foot-btns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
        .gx-foot-btns .ac-btn { height: 50px; border-radius: 14px; }
        .gx-history { display: grid; gap: 10px; }
        .gx-history .txc { background: var(--bg); }
        .gx-empty-text { margin: 20px 0; text-align: center; font-size: 14px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .gx-body button.btn-card-action { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.16) !important; background: var(--bg) !important; color: var(--text) !important; cursor: pointer; }
        .gx-body .btn.btn-secondary { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.2); background: transparent; color: var(--text); font-weight: 600; }
        /* Campos con selector de la web (js/web-fields.js) */
        .gx-field-native { display: none !important; }
        .gx-field { display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color 200ms ease, opacity 200ms ease; }
        .gx-field:hover:not(:disabled) { border-color: rgba(var(--text-rgb), 0.32); }
        .gx-field:disabled { opacity: 0.5; cursor: default; }
        .gx-field.is-empty .gx-field-text { font-weight: 500; color: color-mix(in srgb, var(--text) 50%, var(--bg)); }
        .gx-field-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .gx-field svg { width: 16px; height: 16px; flex-shrink: 0; color: color-mix(in srgb, var(--text) 55%, var(--bg)); }
        .gx-field:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .gx-opt-group { display: block; margin: 8px 0 2px; }
        .gx-time-pick { margin: 4px 0; }
        @media (max-width: 760px) {
            .gx-grid, .gx-pending-block { grid-template-columns: minmax(0, 1fr); }
            .gx-body .form-grid-2 { grid-template-columns: minmax(0, 1fr); }
            .gx-pending-btns { grid-template-columns: 1fr; }
        }
        /* ── Ajustes (como app/settings): lista a la izquierda y la sección elegida a la derecha ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-container.st-layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 0; min-height: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-content { min-width: 0; padding: 32px; border-radius: 20px; border: 1px solid var(--ap-line); background: transparent; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-title { margin: 0 0 24px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 30px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; color: var(--ap-ink); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-title > svg { display: none; }
        .st-menu { display: grid; gap: 22px; min-width: 0; }
        .st-profile { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 28px 20px 24px; border-radius: 20px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); text-align: center; box-sizing: border-box; }
        .st-avatar { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 6px; overflow: hidden; border-radius: 22px; background: var(--ap-ink); color: var(--ap-surface); font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 30px; font-weight: 500; }
        .st-avatar img { width: 100%; height: 100%; object-fit: contain; }
        .st-avatar.has-avatar { background: transparent; border-radius: 0; overflow: visible; }
        .st-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 24px; font-weight: 500; line-height: 1.15; }
        .st-email { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--ap-muted); }
        .st-plan { margin-top: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--ap-line-strong); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; }
        .st-group { display: grid; gap: 10px; }
        .st-group-title { margin: 0; padding-left: 4px; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ap-muted); }
        .st-list { display: grid; overflow: hidden; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); }
        .st-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--ap-line); border-radius: 0; background: transparent; color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color 160ms ease; }
        .st-list .st-item:first-child { border-top: 0; }
        .st-item:hover { background: color-mix(in srgb, var(--ap-ink) 5%, transparent); }
        /* La sección abierta: del color contrario al fondo (como las opciones elegidas de la web) */
        .st-item.active, .st-item.active:hover { background: var(--ap-ink); color: var(--ap-surface); font-weight: 600; }
        .st-item.active .st-item-ico { background: color-mix(in srgb, var(--ap-surface) 16%, transparent); }
        .st-item.active .st-item-arrow { color: var(--ap-surface); }
        .st-list .st-item.active + .st-item { border-top-color: transparent; }
        .st-item-ico { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: color-mix(in srgb, var(--ap-ink) 8%, transparent); }
        .st-item-ico svg { width: 17px; height: 17px; }
        .st-item-label { flex: 1; min-width: 0; line-height: 1.3; }
        .st-item-arrow { width: 16px; height: 16px; flex-shrink: 0; color: var(--ap-muted); }
        .st-logout { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border: 0; border-radius: 14px; background: #D32F2F; color: #fff; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14.5px; font-weight: 700; cursor: pointer; transition: opacity 200ms ease; }
        .st-logout:hover { opacity: 0.9; }
        .st-logout svg { width: 18px; height: 18px; }
        .st-danger { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 11px 14px; border-radius: 16px; border: 1px solid rgba(211, 47, 47, 0.35); background: rgba(211, 47, 47, 0.08); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color 200ms ease; }
        .st-danger:hover { border-color: rgba(211, 47, 47, 0.6); }
        .st-danger-ico { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: #D32F2F; color: #fff; }
        .st-danger-ico svg { width: 17px; height: 17px; }
        .st-version { margin: 0; text-align: center; font-size: 12px; color: var(--ap-muted); }
        .st-risk { display: grid; gap: 12px; }
        .st-risk-intro { margin: 0 0 4px; font-size: 14px; color: var(--ap-muted); }
        .st-risk-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--ap-line); background: transparent; color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); text-align: left; cursor: pointer; transition: border-color 200ms ease; }
        .st-risk-opt:hover { border-color: var(--ap-line-strong); }
        .st-risk-ico { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; color: #111; }
        .st-risk-ico.is-warn { background: #FFCC00; }
        .st-risk-ico.is-danger { background: #FF3B30; }
        .st-risk-ico svg { width: 19px; height: 19px; }
        .st-risk-text { display: grid; gap: 3px; min-width: 0; }
        .st-risk-text b { font-size: 15px; font-weight: 600; }
        .st-risk-text small { font-size: 12.5px; line-height: 1.4; color: var(--ap-muted); }
        /* Ajustes › Perfil */
        .st-form { display: grid; gap: 20px; max-width: 560px; }
        .st-photo { position: relative; justify-self: center; margin-bottom: 4px; }
        .st-photo-avatar { display: grid; place-items: center; width: 150px; height: 150px; overflow: hidden; border-radius: 38px; background: var(--ap-ink); color: var(--ap-surface); font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 58px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); transition: opacity 200ms ease; }
        .st-photo-avatar img { width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 32px; object-fit: cover; }
        /* Avatar en tres capas: el marco toma el color contrario al fondo (--ap-ink), la línea fina de adentro
           el color del fondo que tiene detrás (--ua-bg) y la ilustración va encima */
        .ua { position: relative; display: block; width: 100%; height: 100%; }
        .ua-frame, .ua-line { position: absolute; inset: 0; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
        .ua-frame { background: var(--ua-fg, var(--ap-ink)); -webkit-mask-image: url(/avatars/avatar-frame.png?v=4); mask-image: url(/avatars/avatar-frame.png?v=4); }
        .ua-line { background: var(--ua-bg, var(--ap-canvas)); -webkit-mask-image: url(/avatars/avatar-line.png?v=4); mask-image: url(/avatars/avatar-line.png?v=4); }
        /* Sobre tarjetas y recuadros (tarjeta de Ajustes, elegir avatar, Amigos) el fondo es --ap-surface */
        .st-profile .ua, .ap-sheet .ua, .fr-card .ua { --ua-bg: var(--ap-surface); }
        .ua-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
        .st-photo-avatar.has-avatar { background: transparent; box-shadow: none; overflow: visible; }
        .st-photo-avatar.has-avatar img, #config-section-perfil .st-photo-avatar.has-avatar img { width: 100%; height: 100%; border-radius: 0; object-fit: contain; }
        /* Elegir avatar (como el desplegable de la app): 3 masculinos, 3 femeninos y las iniciales */
        .av-picker { display: grid; gap: 14px; }
        .av-row { display: flex; justify-content: space-evenly; gap: 10px; }
        .av-opt { position: relative; padding: 4px; border: 2px solid transparent; border-radius: 24px; background: none; cursor: pointer; transition: border-color 200ms ease, transform 200ms ease; }
        .av-opt .ua { width: 88px; height: 88px; }
        .av-opt:hover { transform: translateY(-2px); }
        .av-opt.on { border-color: var(--ap-ink); }
        .av-check { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ap-canvas); background: var(--ap-ink); color: var(--ap-canvas); }
        .av-check svg { width: 14px; height: 14px; stroke-width: 3; }
        .av-initials { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 4px; padding: 10px; border: 1.5px solid color-mix(in srgb, var(--ap-ink) 30%, transparent); border-radius: 20px; background: none; color: var(--ap-ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; transition: border-color 200ms ease, background 200ms ease; }
        .av-initials > span:nth-child(2) { flex: 1; }
        .av-initials.on { border-color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 6%, transparent); }
        .av-initials svg { width: 18px; height: 18px; stroke-width: 3; }
        .av-initials-tile { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ap-ink); color: var(--ap-surface); font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 20px; }
        .st-photo-avatar.is-loading { opacity: 0.45; }
        .st-photo-btn { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 3px solid var(--ap-canvas); background: var(--ap-ink); color: var(--ap-surface); cursor: pointer; transition: transform 200ms ease; }
        .st-photo-btn:hover { transform: scale(1.05); }
        .st-photo-btn svg { width: 18px; height: 18px; }
        .st-field { display: grid; gap: 7px; }
        .st-field > label { margin: 0; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-muted); }
        .st-input { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--ap-line); background: var(--ap-surface); transition: border-color 200ms ease; }
        .st-input:focus-within { border-color: var(--ap-line-strong); }
        .st-input > svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ap-muted); }
        .st-input input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 15px; font-weight: 500; }
        .st-input input::placeholder { color: var(--ap-muted); }
        .st-input.is-locked input { color: var(--ap-muted); cursor: default; }
        .st-save { width: 100%; height: 54px; margin-top: 18px; border-radius: 16px; font-size: 16px; }
        .st-photo { margin: 6px 0 10px; }
        /* Perfil a todo el ancho: campos a la izquierda; la foto a la derecha, cuadrada y del alto de los 3 campos;
           Guardar Cambios abajo, de lado a lado */
        #config-section-perfil .st-form { max-width: none; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: repeat(3, auto) auto; column-gap: 36px; row-gap: 22px; align-items: start; }
        #config-section-perfil .st-form > .st-field:nth-child(2) { grid-area: 1 / 1; }
        #config-section-perfil .st-form > .st-field:nth-child(3) { grid-area: 2 / 1; }
        #config-section-perfil .st-form > .st-field:nth-child(4) { grid-area: 3 / 1; }
        #config-section-perfil .st-form > .st-photo { grid-area: 1 / 2 / 4 / 3; align-self: stretch; justify-self: end; height: 100%; aspect-ratio: 1; margin: 0; }
        #config-section-perfil .st-photo-avatar { width: 100%; height: 100%; border-radius: 40px; font-size: clamp(64px, 6vw, 96px); }
        #config-section-perfil .st-photo-avatar img { border-radius: 34px; }
        #config-section-perfil .st-photo-btn { right: -8px; bottom: -8px; width: 48px; height: 48px; }
        @media (max-width: 760px) {
            #config-section-perfil .st-form { grid-template-columns: minmax(0, 1fr); }
            #config-section-perfil .st-form > .st-photo { grid-area: auto; justify-self: center; width: 150px; height: 150px; }
            #config-section-perfil .st-form > .st-field { grid-area: auto; }
        }
        /* Ajustes › Seguridad y contraseña */
        .sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px 28px; align-items: start; }
        .sec-block { display: grid; gap: 12px; min-width: 0; }
        .sec-card { padding: 18px; border-radius: 18px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); }
        .sec-form { display: grid; gap: 16px; }
        .sec-card-title { margin: 0 0 2px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 21px; font-weight: 500; color: var(--ap-ink); }
        .sec-form .st-input { background: var(--ap-canvas); }
        .sec-eye { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; padding: 0; flex-shrink: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ap-muted); cursor: pointer; }
        .sec-eye:hover { color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 7%, transparent); }
        .sec-eye svg { width: 17px; height: 17px; }
        .sec-rules { display: grid; gap: 6px; margin: -4px 0 0; padding: 0 0 0 4px; list-style: none; }
        .sec-rules li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ap-muted); }
        .sec-rules li span { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #FF3B30; }
        .sec-rules li.is-ok span { background: #4CD964; }
        .sec-save { width: 100%; height: 50px; margin-top: 2px; }
        .sec-forgot { justify-self: center; display: grid; place-items: center; min-height: 32px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ap-ink); font-family: inherit; font-size: 13px; font-weight: 600; text-align: center; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
        .sec-forgot:hover:not(:disabled) { background: color-mix(in srgb, var(--ap-ink) 7%, transparent); }
        .sec-oauth { display: flex; align-items: flex-start; gap: 14px; }
        .sec-oauth-ico, .sec-session-ico { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; background: color-mix(in srgb, var(--ap-ink) 10%, transparent); }
        .sec-oauth-ico svg, .sec-session-ico svg { width: 21px; height: 21px; }
        .sec-oauth b { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; }
        .sec-oauth p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ap-muted); }
        .sec-sessions { display: grid; gap: 10px; }
        .sec-session { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
        .sec-session-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
        .sec-session-main b { font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
        .sec-session-main small { font-size: 12.5px; line-height: 1.35; color: var(--ap-muted); }
        .sec-online { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 5px 10px; border-radius: 999px; background: rgba(16, 185, 129, 0.14); color: #10B981; font-size: 11.5px; font-weight: 700; }
        .sec-online i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
        .sec-revoke { flex-shrink: 0; padding: 7px 12px; border: 0; border-radius: 10px; background: rgba(239, 68, 68, 0.1); color: #EF4444; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
        .sec-revoke:hover { background: rgba(239, 68, 68, 0.18); }
        .sec-revoke-all { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; margin-top: 4px; border-radius: 14px; border: 1px solid rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.06); color: #EF4444; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13.5px; font-weight: 700; cursor: pointer; }
        .sec-revoke-all:hover { background: rgba(239, 68, 68, 0.12); }
        .sec-revoke-all svg { width: 16px; height: 16px; }
        .sec-revoke-all-total { background: transparent; }
        .sec-loading { display: grid; justify-items: center; gap: 10px; padding: 28px 18px; }
        .sec-loading p { margin: 0; font-size: 13px; color: var(--ap-muted); }
        /* Ajustes › Planes (como app/settings/plans.tsx) */
        .pl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
        .pl-card { display: grid; align-content: start; gap: 14px; padding: 20px; border-radius: 20px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); cursor: pointer; transition: border-color 200ms ease, box-shadow 200ms ease; }
        .pl-card:hover { border-color: var(--ap-line-strong); }
        .pl-card.is-on { border-color: var(--ap-ink); box-shadow: inset 0 0 0 1px var(--ap-ink); }
        .pl-card-top { display: flex; align-items: center; gap: 8px; }
        .pl-badge { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--ap-line-strong); font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; }
        .pl-card.is-zeus .pl-badge { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-surface); }
        /* «PLAN ACTUAL» como en la app: pestaña que cuelga del borde de arriba, del color contrario al fondo */
        .pl-card { position: relative; }
        .pl-current { position: absolute; top: 0; right: 60px; padding: 5px 12px 6px; border-radius: 0 0 10px 10px; background: var(--ap-ink); color: var(--ap-surface); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; }
        .pl-radio { display: grid; place-items: center; width: 22px; height: 22px; margin-left: auto; border-radius: 50%; border: 1.5px solid var(--ap-line-strong); }
        .pl-card.is-on .pl-radio { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-surface); }
        .pl-radio svg { width: 13px; height: 13px; stroke-width: 3; }
        .pl-head { display: grid; gap: 0; }
        .pl-head small { font-size: 11px; font-weight: 700; letter-spacing: 0.24em; color: var(--ap-muted); }
        .pl-head b { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 40px; font-weight: 500; letter-spacing: 0.06em; line-height: 1.05; }
        .pl-prices { display: grid; gap: 2px; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
        .pl-feats { display: grid; gap: 9px; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--ap-line); list-style: none; }
        .pl-feats li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
        .pl-feats li span { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; background: color-mix(in srgb, var(--ap-ink) 9%, transparent); }
        .pl-feats svg { width: 14px; height: 14px; }
        .pl-until { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(16, 185, 129, 0.1); color: var(--ap-ink); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
        .pl-until svg { width: 15px; height: 15px; flex-shrink: 0; color: #10B981; }
        .pl-actions { display: grid; gap: 10px; justify-items: center; margin-top: 22px; }
        .pl-main { width: 100%; height: 56px; border-radius: 16px; font-size: 14.5px; letter-spacing: 0.06em; }
        /* En el encabezado: compacto, del alto de los botones de la barra */
        .pl-actions { margin-top: 18px; }
        /* Precios a la derecha del nombre y tarjetas más compactas: Planes entra sin desplazar */
        /* Zeus: precio del período elegido y el switch Mensual / Semestral / Anual (como la presentación) */
        .pl-price-now { display: inline-flex; align-items: baseline; gap: 5px; }
        .pl-price-now b { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
        .pl-price-now small { font-size: 12.5px; font-weight: 600; color: var(--ap-muted); }
        .pl-price-eq { font-size: 11.5px; font-weight: 600; color: var(--ap-muted); }
        .pl-period { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 12px; border: 1px solid var(--ap-line-strong); }
        .pl-period button { height: 28px; border: 0; border-radius: 9px; background: transparent; color: var(--ap-muted); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .pl-period button:hover:not(.on) { color: var(--ap-ink); }
        .pl-period button.on { background: var(--ap-ink); color: var(--ap-surface); }
        .pl-period button:focus-visible { outline: 2px solid var(--ap-ink); outline-offset: 1px; }
        .pl-name-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
        .pl-name-row .pl-prices { justify-items: end; text-align: right; gap: 3px; font-size: 13px; padding-bottom: 4px; }
        .pl-card { gap: 12px; padding: 16px 18px 18px; }
        .pl-head b { font-size: 36px; }
        .pl-feats { gap: 7px; margin-top: 0; padding-top: 12px; }
        .pl-feats li { font-size: 13px; }
        .pl-feats li span { width: 24px; height: 24px; }
        .pl-until { padding: 7px 11px; font-size: 12px; }
        .pl-card.is-zeus { gap: 10px; }
        .pl-card.is-zeus .pl-feats { gap: 6px 14px; padding-top: 10px; }
        #config-section-planes .st-sec-body > .pl-root > .st-lead, #pl-root > .st-lead { margin-bottom: 14px; }
        /* Gestionar y los enlaces legales en una sola fila */
        .pl-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; margin-top: 14px; }
        .pl-actions .pl-legal { margin: 0; }
        .pl-actions .pl-link { padding: 4px 8px; font-size: 12.5px; }
        /* Lo que incluye: en dos columnas solo si la tarjeta es ancha (si no, se cortarían las líneas) */
        .pl-card { container-type: inline-size; }
        .pl-feats { grid-template-columns: minmax(0, 1fr); gap: 7px 14px; }
        @container (min-width: 400px) { .pl-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
        .pl-feats li { align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.35; }
        .pl-feats li span { width: 20px; height: 20px; border-radius: 6px; margin-top: -1px; }
        .pl-feats svg { width: 12px; height: 12px; }
        /* Planes termina antes de las burbujas: menos espacio abajo que el resto de Ajustes */
        body.st-fixed #view-configuracion #config-section-planes .st-sec-body { padding-top: 20px; padding-bottom: 16px; }

        .pl-link { padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
        .pl-link:hover { background: color-mix(in srgb, var(--ap-ink) 7%, transparent); }
        .pl-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 4px 0 0; }
        .pl-legal a { font-size: 12px; font-weight: 600; color: var(--ap-muted); text-decoration: underline; text-underline-offset: 3px; }
        .pl-legal a:hover { color: var(--ap-ink); }
        .pl-pay { display: grid; gap: 14px; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); color: var(--ap-ink); }
        .pl-pay > .pl-link { justify-self: center; }
        .pl-offers { display: grid; gap: 10px; }
        .pl-offer { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--ap-line); background: transparent; color: var(--ap-ink); font-family: inherit; text-align: left; cursor: pointer; transition: border-color 200ms ease; }
        .pl-offer:hover { border-color: var(--ap-line-strong); }
        .pl-offer.is-on { border-color: var(--ap-ink); box-shadow: inset 0 0 0 1px var(--ap-ink); }
        .pl-offer > span { display: grid; gap: 3px; flex: 1; }
        .pl-offer b { font-size: 15px; font-weight: 700; }
        .pl-offer small { font-size: 13px; color: var(--ap-muted); }
        .pl-offer em { padding: 4px 9px; border-radius: 999px; background: rgba(16, 185, 129, 0.14); color: #10B981; font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: 0.06em; }
        .pl-offer svg { width: 18px; height: 18px; flex-shrink: 0; }
        .pl-pay-head { display: grid; justify-items: center; gap: 6px; text-align: center; }
        .pl-pay-ico { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 4px; border-radius: 18px; background: var(--ap-ink); color: var(--ap-surface); }
        .pl-pay-ico svg { width: 26px; height: 26px; fill: currentColor; }
        .pl-pay-head b { font-size: 15px; font-weight: 800; letter-spacing: 0.12em; }
        .pl-pay-head > span:last-child { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 26px; }
        .pl-pay-feats { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
        .pl-pay-feats li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
        .pl-pay-feats svg { width: 17px; height: 17px; flex-shrink: 0; }
        .pl-store-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ap-ink) 7%, transparent); font-size: 13px; line-height: 1.5; }
        .pl-store-note svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
        .pl-store-btn { text-decoration: none; }
        .pl-disclosure { margin: 0; font-size: 12px; line-height: 1.55; text-align: center; color: var(--ap-muted); }
        /* Suscripción con Mercado Pago: email del pagador y equivalente en pesos del día */
        .pl-mp-label { margin: 0 0 -8px; font-size: 12px; font-weight: 600; color: var(--ap-muted); }
        .pl-mp-email { width: 100%; }
        .pl-ars { margin: -6px 0 0; min-height: 1.2em; font-size: 12px; font-weight: 600; text-align: center; color: var(--ap-ink); opacity: 0.8; }
        /* Ajustes › Apariencia */
        .st-block { display: grid; gap: 12px; margin-bottom: 26px; }
        .st-block-title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ap-muted); }
        .st-block-title svg { width: 15px; height: 15px; }
        /* Temas: cada tarjeta es una miniatura de Statera con los colores del tema, en el modo que está en uso */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .st-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
        #st-themes .theme-card.st-theme { --pv-bg: var(--th-dark); --pv-ink: var(--th-light); }
        #st-themes[data-mode="light"] .theme-card.st-theme { --pv-bg: var(--th-light); --pv-ink: var(--th-dark); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .theme-card.st-theme { position: relative; display: grid; gap: 0; margin: 0; padding: 8px; border-radius: 18px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); text-align: left; cursor: pointer; transform: none; transition: border-color 200ms ease, box-shadow 200ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .theme-card.st-theme:hover { border-color: var(--ap-line-strong); transform: translateY(-2px); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .theme-card.st-theme:focus-visible { outline: 2px solid var(--ap-ink); outline-offset: 3px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .theme-card.st-theme.active { border-color: var(--ap-ink); box-shadow: inset 0 0 0 1px var(--ap-ink); }
        /* Miniatura: solo el logo de Statera centrado, con los colores del tema (fondo del tema; el logo del color
           contrario y la balanza del color del fondo) */
        /* Degradé del tema: del color oscuro (arriba a la izquierda) al claro (abajo a la derecha), mezclado en oklab
           para que el paso entre los dos colores sea parejo y sin zonas grises */
        .st-theme-preview { display: grid; place-items: center; aspect-ratio: 16 / 11; overflow: hidden; border-radius: 12px;
            background: linear-gradient(135deg, var(--th-dark) 6%, var(--th-light) 94%);
            background: linear-gradient(135deg in oklab, var(--th-dark) 6%, var(--th-light) 94%);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
        /* El logo, en el centro del degradé (donde se cruzan los dos colores): se separa del fondo con un borde fino
           y una sombra suave para que se lea igual en los 6 temas */
        .stp-mark { display: grid; place-items: center; width: 30%; aspect-ratio: 1; border-radius: 26%; background: var(--pv-ink); color: var(--pv-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pv-bg) 35%, transparent), 0 12px 26px -10px rgba(0, 0, 0, 0.5); transition: background-color 300ms ease, color 300ms ease; }
        .stp-mark svg { width: 52%; height: 52%; stroke-width: 2; }
        .st-theme-foot { display: flex; align-items: center; gap: 10px; padding: 12px 6px 4px; }
        .st-theme-name { flex: 1; min-width: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
        .st-theme-check { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--ap-line-strong); transition: background-color 200ms ease, border-color 200ms ease; }
        .st-theme-check svg { width: 13px; height: 13px; fill: none; stroke: var(--ap-surface); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
        .theme-card.st-theme.active .st-theme-check { background: var(--ap-ink); border-color: var(--ap-ink); }
        .theme-card.st-theme.active .st-theme-check svg { opacity: 1; transform: none; }
        @media (max-width: 760px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .st-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }
        @media (prefers-reduced-motion: reduce) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .theme-card.st-theme:hover { transform: none; }
        }
        /* Encabezado con controles al centro (Tema y Modo): título a la izquierda, controles centrados y la cruz */
        body.st-fixed #view-configuracion .st-sec-head.has-center { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .st-sec-head.has-center > .config-title { white-space: nowrap; }
        body.st-fixed #view-configuracion .st-sec-head.has-center > .st-sec-actions { justify-self: end; }
        /* Los 6 temas entran sin desplazar: el ancho de la grilla se ajusta al alto disponible (y nunca pasa de 640 px) */
        /* Los temas ocupan todo el recuadro: la grilla llena el ancho y sus dos filas el alto disponible (los 6 a la
           vista sin desplazar); con muy poco alto, cada fila tiene un mínimo y se desplaza */
        body.st-fixed #config-section-apariencia .st-sec-body { display: flex; flex-direction: column; }
        body.st-fixed #config-section-apariencia .st-sec-body > .st-block { flex: 1 0 auto; min-height: auto; display: grid; grid-template-rows: auto 1fr; margin: 0; }
        body.st-fixed #config-section-apariencia .st-sec-body > .st-block.st-mode-block { flex: none; grid-template-rows: auto auto; margin-top: 22px; }
        .st-mode-block .st-modes { max-width: none; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion #st-themes { grid-auto-rows: minmax(128px, 1fr); }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion #st-themes .theme-card.st-theme { grid-template-rows: minmax(0, 1fr) auto; }
        body.st-fixed #st-themes .st-theme-preview { aspect-ratio: auto; height: 100%; min-height: 0; }
        body.st-fixed #st-themes .stp-mark { width: auto; height: 42%; max-height: 96px; }
        .st-modes { max-width: 460px; }
        .st-modes button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
        .st-modes button svg { width: 16px; height: 16px; }
        .st-row-link { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 420px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; transition: border-color 200ms ease; }
        .st-row-link:hover { border-color: var(--ap-line-strong); }
        /* Ajustes › Idioma y Acerca de Statera */
        .st-lead { margin: -8px 0 18px; font-size: 14px; color: var(--ap-muted); }
        .st-langs { display: grid; gap: 10px; }
        .st-lang { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; transition: border-color 200ms ease; }
        .st-lang:hover { border-color: var(--ap-line-strong); }
        .st-lang.is-on { border-color: var(--ap-ink); box-shadow: inset 0 0 0 1px var(--ap-ink); font-weight: 600; }
        .st-lang small { font-size: 12.5px; font-weight: 500; color: var(--ap-muted); }
        .st-lang-code { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: color-mix(in srgb, var(--ap-ink) 9%, transparent); font-size: 12px; font-weight: 800; letter-spacing: 0.05em; }
        .st-lang-check { width: 18px; height: 18px; flex-shrink: 0; }
        .st-note { display: flex; align-items: center; gap: 7px; max-width: 520px; margin-top: 14px; }
        .st-note svg { width: 14px; height: 14px; flex-shrink: 0; }
        /* Ajustes › Acerca de Statera: todo al ancho del recuadro; el texto en dos columnas si hay lugar */
        #config-section-acerca .st-sec-body { container: sabout / inline-size; }
        .st-about { display: grid; gap: 22px; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); color: var(--ap-ink); }
        .st-about-hero { display: grid; justify-items: center; gap: 6px; padding: 6px 0 4px; text-align: center; }
        .st-about-logo { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 8px; border-radius: 22px; background: var(--ap-ink); color: var(--ap-surface); box-shadow: 0 0 0 9px color-mix(in srgb, var(--ap-ink) 6%, transparent), 0 0 60px color-mix(in srgb, var(--ap-ink) 20%, transparent); }
        .st-about-logo svg { width: 34px; height: 34px; }
        .st-about-title { margin: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 42px; font-weight: 500; letter-spacing: 0.04em; line-height: 1; }
        .st-about-tagline { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ap-muted); }
        .st-about-card { display: grid; gap: 18px; padding: 24px 26px; border-radius: 20px; border: 1px solid var(--ap-line); background: var(--ap-surface); }
        .st-about-text { display: grid; gap: 14px; }
        @container sabout (min-width: 700px) { .st-about-text { grid-template-columns: 1fr 1fr; gap: 32px; } }
        .st-about-text p { margin: 0; font-size: 14.5px; line-height: 1.7; }
        .st-about-quote { margin: 0; padding-top: 16px; border-top: 1px solid var(--ap-line); font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 19px; font-style: italic; line-height: 1.45; text-align: center; color: var(--ap-ink); }
        .st-about-grid { display: grid; gap: 14px; }
        @container sabout (min-width: 620px) { .st-about-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
        .st-about-box { display: grid; align-content: start; gap: 14px; min-width: 0; padding: 20px 22px; border-radius: 20px; border: 1px solid var(--ap-line); }
        .st-about-box .st-block-title { margin: 0; }
        .st-about-author { display: flex; align-items: center; gap: 12px; }
        .st-about-author b { display: block; font-size: 16px; font-weight: 600; }
        .st-about-author small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ap-muted); }
        .st-about-avatar { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: var(--ap-ink); color: var(--ap-surface); font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 18px; }
        .st-about-made { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ap-muted); }
        .st-about-made svg { width: 14px; height: 14px; }
        .st-about-info { display: grid; margin: 0; }
        .st-about-info > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--ap-line); }
        .st-about-info > div:first-child { border-top: 0; padding-top: 0; }
        .st-about-info dt { font-size: 12.5px; font-weight: 600; color: var(--ap-muted); }
        .st-about-info dd { margin: 0; min-width: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
        .st-about-info a { color: var(--ap-ink); text-decoration: underline; text-underline-offset: 3px; }
        .st-about-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
        .st-about-legal a, .st-about-legal button { padding: 2px 0; border: 0; background: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ap-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
        .st-about-legal a:hover, .st-about-legal button:hover { color: var(--ap-ink); }
        .st-about-footer { display: grid; justify-items: center; gap: 7px; padding: 4px 0 8px; text-align: center; }
        .st-about-footer svg { width: 20px; height: 20px; color: #E53935; fill: #E53935; }
        .st-about-footer p { margin: 0; font-size: 14.5px; font-weight: 500; }
        .st-about-footer small { font-size: 12px; color: var(--ap-muted); }
        .st-licenses { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
        .st-licenses li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ap-line); font-size: 13.5px; }
        .st-licenses li span { color: var(--ap-muted); white-space: nowrap; }
        @media (max-width: 480px) { .st-about-info > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
        /* Ajustes › Ajustes de notificaciones */
        .ns-hero { display: grid; justify-items: center; gap: 8px; max-width: 560px; margin: 0 0 22px; padding: 22px 20px; border-radius: 18px; border: 1px solid var(--ap-line); text-align: center; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); }
        .ns-hero > svg { width: 34px; height: 34px; stroke-width: 1.5; color: var(--ap-ink); }
        .ns-hero b { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 22px; font-weight: 500; color: var(--ap-ink); }
        .ns-hero p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ap-muted); }
        .ns-cats { display: grid; gap: 10px; max-width: 560px; }
        /* Centro de Control más bajo (ícono al costado) y todo al ancho del recuadro: las 4 categorías a la vista */
        #config-section-ajustes-notificaciones .ns-hero { grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; column-gap: 16px; row-gap: 3px; max-width: none; margin-bottom: 16px; padding: 14px 18px; text-align: left; }
        #config-section-ajustes-notificaciones .ns-hero > svg { grid-row: 1 / 3; width: 30px; height: 30px; }
        #config-section-ajustes-notificaciones .ns-hero b { font-size: 20px; line-height: 1.15; }
        #config-section-ajustes-notificaciones .ns-hero p { font-size: 13px; line-height: 1.45; }
        @media (min-width: 900px) { #config-section-ajustes-notificaciones .ns-hero p br { display: none; } }
        #config-section-ajustes-notificaciones .ns-cats { max-width: none; }
        .ns-cat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); cursor: pointer; transition: border-color 200ms ease, opacity 200ms ease; }
        .ns-cat:hover { border-color: var(--ap-line-strong); }
        .ns-cat.is-off { cursor: default; }
        .ns-cat.is-off .ns-cat-ico, .ns-cat.is-off .ns-cat-label { opacity: 0.45; }
        .ns-cat-ico { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--ns-accent); color: #111; }
        .ns-cat.is-off .ns-cat-ico { background: color-mix(in srgb, var(--ap-ink) 12%, transparent); color: var(--ap-ink); }
        .ns-cat-ico svg { width: 20px; height: 20px; }
        .ns-cat-label { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; }
        .ns-cat-label svg { width: 16px; height: 16px; color: var(--ap-muted); }
        .ns-info-btn { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ap-muted); cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
        .ns-info-btn:hover { background: color-mix(in srgb, var(--ap-ink) 7%, transparent); color: var(--ap-ink); }
        .ns-info-btn svg { width: 18px; height: 18px; }
        .ns-types { display: grid; gap: 8px; }
        .ns-type { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 14px; border-radius: 14px; border: 1px solid var(--ap-line); color: var(--ap-ink); cursor: pointer; transition: border-color 200ms ease; }
        .ns-type:hover { border-color: var(--ap-line-strong); }
        .ns-type b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
        .ns-type.is-off b { opacity: 0.55; }
        .ns-save { width: 100%; margin-top: 8px; }
        /* «Guardar Cambios» en el pie del recuadro: siempre a la vista mientras se desplaza la lista de tipos */
        .ns-foot { position: sticky; bottom: -20px; z-index: 1; margin: 6px -18px -20px; padding: 14px 18px 18px; border-top: 1px solid var(--ap-line); background: color-mix(in srgb, var(--text) 7%, var(--bg)); }
        .ns-foot .ns-save { margin-top: 0; }
        .ns-desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ap-ink); }
        .ns-cat .ac-switch.is-on, .ns-types .ac-switch.is-on { background: var(--ns-accent); border-color: var(--ns-accent); }
        /* Ajustes › Manual (js/web-manual.js) */
        #mn-head { container: mnhead / inline-size; }
        .cat-head.has-tabs.mn-head { grid-template-columns: minmax(0, 1fr) auto; row-gap: 14px; }
        .mn-head .mn-search { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; }
        @container mnhead (min-width: 720px) {
            .cat-head.has-tabs.mn-head { grid-template-columns: auto minmax(0, 1fr) auto; }
            .mn-head .mn-search { grid-column: auto; grid-row: auto; justify-self: center; width: min(100%, 420px); }
        }
        .mn-search { height: 40px; }
        .mn-search input { min-width: 0; width: 100%; }
        .mn-search input::-webkit-search-cancel-button { display: none; }
        #mn-root { font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); color: var(--ap-ink); }
        .mn-hero { display: grid; justify-items: center; gap: 6px; padding: 6px 0 22px; margin-bottom: 20px; border-bottom: 1px solid var(--ap-line); text-align: center; }
        .mn-hero-ico { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 20px; background: var(--ap-ink); color: var(--ap-surface); box-shadow: 0 0 0 8px color-mix(in srgb, var(--ap-ink) 6%, transparent); }
        .mn-hero-ico svg { width: 30px; height: 30px; }
        .mn-hero-ico.is-small { flex-shrink: 0; width: 52px; height: 52px; margin: 0; border-radius: 16px; box-shadow: none; }
        .mn-hero-ico.is-small svg { width: 24px; height: 24px; }
        .mn-hero h3 { margin: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 30px; font-weight: 500; letter-spacing: -0.01em; }
        .mn-hero p { margin: 0; font-size: 13.5px; color: var(--ap-muted); }
        .mn-label { margin: 0 0 12px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ap-muted); }
        .mn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 24px; }
        .mn-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: inherit; text-align: left; cursor: pointer; transition: border-color 200ms ease, transform 200ms ease; }
        .mn-card:hover { border-color: var(--ap-line-strong); }
        .mn-card:active { transform: scale(0.99); }
        .mn-card-ico { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; background: color-mix(in srgb, var(--ap-ink) 9%, transparent); }
        .mn-card-ico svg { width: 20px; height: 20px; }
        .mn-card-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
        .mn-card-text b { font-size: 15.5px; font-weight: 600; }
        .mn-card-text small { font-size: 12.5px; color: var(--ap-muted); }
        .mn-card-arrow { width: 18px; height: 18px; color: var(--ap-muted); }
        .mn-module-hero { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 22px; border-radius: 18px; border: 1px solid var(--ap-line); }
        .mn-module-hero p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ap-muted); }
        .mn-list { display: grid; gap: 8px; }
        .mn-item { border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); transition: border-color 200ms ease; }
        .mn-item.is-open { border-color: var(--ap-line-strong); }
        .mn-item-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: transparent; color: var(--ap-ink); font-family: inherit; text-align: left; cursor: pointer; }
        .mn-item-head b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; }
        .mn-item-head small { font-size: 12px; color: var(--ap-muted); white-space: nowrap; }
        .mn-item-ico { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; background: color-mix(in srgb, var(--ap-ink) 8%, transparent); }
        .mn-item-ico svg { width: 15px; height: 15px; }
        .mn-chev { width: 18px; height: 18px; flex-shrink: 0; color: var(--ap-muted); transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
        .mn-item.is-open .mn-chev { transform: rotate(180deg); }
        .mn-item-body { display: grid; gap: 16px; padding: 14px 16px 16px; border-top: 1px solid var(--ap-line); }
        .mn-item-body > p { margin: 0; font-size: 14px; line-height: 1.7; }
        .mn-flow { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--ap-ink); color: var(--ap-surface); }
        .mn-flow small { font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; opacity: 0.8; }
        .mn-flow ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
        .mn-flow li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 11px; background: var(--ap-surface); color: var(--ap-ink); font-size: 13px; font-weight: 600; line-height: 1.35; }
        .mn-flow li.mn-arrow { padding: 0; background: transparent; color: var(--ap-surface); }
        .mn-flow li.mn-arrow svg { width: 15px; height: 15px; }
        .mn-step-n { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--ap-ink); color: var(--ap-surface); font-size: 11.5px; font-weight: 700; }
        .mn-flow li svg { width: 14px; height: 14px; vertical-align: -2px; }
        @media (max-width: 480px) { .mn-item-head small { display: none; } .mn-module-hero { align-items: flex-start; } }
        /* Ajustes › Reparto de gastos (js/web-split.js) */
        #sp-head { container: sphead / inline-size; }
        .cat-head.has-tabs.sp-head { grid-template-columns: minmax(0, 1fr) auto; row-gap: 14px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .sp-head .config-title { white-space: nowrap; }
        .sp-head .sp-modes { grid-column: 1 / -1; grid-row: 2; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
        @container sphead (min-width: 720px) {
            .cat-head.has-tabs.sp-head { grid-template-columns: auto minmax(0, 1fr) auto; }
            .sp-head .sp-modes { grid-column: auto; grid-row: auto; justify-self: center; width: 340px; }
        }
        @media (max-width: 640px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .sp-head .config-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: clamp(20px, 5.6vw, 32px); }
        }
        .sp-head .ac-square:disabled { opacity: 0.35; cursor: default; }
        #sp-root { container: sproot / inline-size; }
        #sp-root > .st-lead { margin: 0 0 18px; }
        .sp-grid { display: grid; gap: 22px; align-items: start; }
        @container sproot (min-width: 760px) { .sp-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; } }
        .sp-col { display: grid; gap: 22px; min-width: 0; }
        .sp-sec { display: grid; gap: 12px; min-width: 0; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); color: var(--ap-ink); }
        .sp-sec-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
        .sp-sec-title > span:first-child { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--ap-muted); }
        .sp-sec-title > span:first-child svg { width: 15px; height: 15px; }
        .sp-sec-actions { display: inline-flex; align-items: center; gap: 8px; }
        .ac-btn.sp-small { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13px; }
        .ac-btn.sp-small svg { width: 15px; height: 15px; }
        .ac-btn.sp-small:disabled, .ac-square.sp-sq:disabled { opacity: 0.4; cursor: default; }
        .ac-square.sp-sq { width: 36px; height: 36px; }
        .sp-linked { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--ap-line-strong); background: color-mix(in srgb, var(--ap-ink) 6%, transparent); font-size: 13px; }
        .sp-linked > svg { width: 15px; height: 15px; flex-shrink: 0; }
        .sp-linked b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
        .sp-linked button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ap-ink); cursor: pointer; }
        .sp-linked button:hover { background: color-mix(in srgb, var(--ap-ink) 9%, transparent); }
        .sp-linked button svg { width: 14px; height: 14px; }
        .sp-guest { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
        .sp-guest .st-input { min-width: 0; }
        .sp-guest .st-input input { min-width: 0; width: 100%; }
        .sp-square-btn { display: grid; place-items: center; width: 52px; padding: 0; border: 0; border-radius: 14px; background: var(--ap-ink); color: var(--ap-surface); cursor: pointer; transition: opacity 200ms ease; }
        .sp-square-btn:disabled { opacity: 0.4; cursor: default; }
        .sp-square-btn svg { width: 20px; height: 20px; }
        .sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
        .sp-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 4px; border-radius: 999px; background: var(--ap-ink); color: var(--ap-surface); font-size: 13.5px; }
        .sp-chip b { font-weight: 600; white-space: nowrap; }
        .sp-chip-edit, .sp-chip-x { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ap-surface) 22%, transparent); color: var(--ap-surface); cursor: pointer; }
        .sp-chip-x { width: 22px; height: 22px; background: transparent; }
        .sp-chip-edit svg { width: 13px; height: 13px; }
        .sp-chip-x svg { width: 14px; height: 14px; }
        .sp-chip.is-editing .sp-chip-edit { background: var(--ap-surface); color: var(--ap-ink); }
        .sp-chip-input { width: 120px; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--ap-surface); color: var(--ap-ink); font: inherit; font-weight: 600; outline: none; }
        .sp-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        .sp-yesno button { min-height: 44px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--ap-line-strong); background: transparent; color: var(--ap-ink); font-family: inherit; font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .sp-yesno button em { display: block; font-style: normal; font-weight: 600; font-size: 12px; opacity: 0.75; }
        .sp-yesno button.on { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-surface); }
        .sp-yesno button:disabled { opacity: 0.45; cursor: default; }
        .sp-amount { display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--ap-line-strong); background: var(--ap-surface); color: var(--ap-ink); cursor: text; transition: border-color 200ms ease; }
        .sp-amount:focus-within { border-color: var(--ap-ink); }
        .sp-amount span { font-weight: 700; color: var(--ap-muted); }
        .sp-amount input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; background: transparent; color: inherit; font-family: inherit; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; }
        .sp-amount.is-big { height: 56px; }
        .sp-amount.is-big span { font-size: 19px; }
        .sp-amount.is-big input { font-size: 21px; }
        .sp-amount.is-small { height: 38px; width: 120px; padding: 0 10px; }
        .sp-amount.is-off { opacity: 0.55; cursor: default; }
        .sp-person .sp-amount { width: 150px; height: 40px; }
        .sp-empty { display: grid; justify-items: center; gap: 8px; padding: 22px 16px; border-radius: 16px; border: 1px dashed var(--ap-line-strong); text-align: center; color: var(--ap-muted); }
        .sp-empty svg { width: 26px; height: 26px; }
        .sp-empty p { margin: 0; max-width: 340px; font-size: 13px; line-height: 1.5; }
        .sp-list { display: grid; gap: 8px; }
        .sp-exp { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); }
        .sp-exp-info { display: grid; gap: 4px; flex: 1; min-width: 0; }
        .sp-exp-info b { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; }
        .sp-exp-info b svg { width: 14px; height: 14px; flex-shrink: 0; }
        .sp-exp-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ap-muted); }
        .sp-exp-info em { font-style: normal; font-weight: 700; color: var(--ap-ink); }
        .sp-exp-side { display: grid; justify-items: end; gap: 4px; flex-shrink: 0; }
        .sp-exp-side > b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .sp-exp-side span { display: flex; gap: 2px; }
        .sp-exp-side button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ap-muted); cursor: pointer; }
        .sp-exp-side button:hover { color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 8%, transparent); }
        .sp-exp-side button svg { width: 15px; height: 15px; }
        .sp-person { position: relative; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 10px 8px 6px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); transition: opacity 200ms ease, border-color 200ms ease; }
        .sp-person.is-focus { border-color: var(--ap-ink); }
        .sp-person.is-dim { opacity: 0.45; }
        .sp-dots { display: grid; place-items: center; width: 30px; height: 36px; flex-shrink: 0; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ap-muted); cursor: pointer; }
        .sp-dots:hover:not(:disabled) { color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 8%, transparent); }
        .sp-dots:disabled { opacity: 0.35; cursor: default; }
        .sp-dots svg { width: 17px; height: 17px; }
        .sp-menu { position: absolute; top: calc(100% - 6px); left: 8px; z-index: 5; display: grid; min-width: 190px; padding: 6px; border-radius: 14px; border: 1px solid var(--ap-line-strong); background: var(--ap-canvas); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28); }
        .sp-menu button { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ap-ink); font-family: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
        .sp-menu button:hover { background: color-mix(in srgb, var(--ap-ink) 8%, transparent); }
        .sp-menu button svg { width: 15px; height: 15px; }
        .sp-menu button b { width: 15px; text-align: center; font-weight: 800; }
        .sp-menu button.is-red { color: #D32F2F; }
        .sp-initial { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: color-mix(in srgb, var(--ap-ink) 10%, transparent); font-size: 14px; font-weight: 700; }
        .sp-person-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; }
        .sp-name-input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--ap-ink); background: var(--ap-canvas); color: var(--ap-ink); font: inherit; font-size: 14px; font-weight: 600; outline: none; }
        .sp-math-base { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .sp-person-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
        .sp-op { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--ap-line-strong); border-radius: 11px; background: transparent; color: var(--ap-ink); cursor: pointer; }
        .sp-op.is-solid { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-surface); }
        .sp-op.is-ghost { border-color: transparent; color: var(--ap-muted); }
        .sp-op svg { width: 17px; height: 17px; }
        .sp-op b { font-size: 19px; font-weight: 800; }
        .sp-card { display: grid; gap: 16px; padding: 18px; border-radius: 20px; border: 1px solid var(--ap-line); background: var(--ap-surface); }
        .sp-total { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--ap-line); }
        .sp-total small, .sp-tile small, .sp-breakdown > small, .sp-transfers > small, .sp-surplus > small { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--ap-muted); }
        .sp-total b { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 34px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
        .sp-breakdown { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--ap-line); }
        .sp-table { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.1fr); font-size: 13px; font-variant-numeric: tabular-nums; }
        .sp-table span { padding: 7px 8px; border-bottom: 1px solid var(--ap-line); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .sp-table span:nth-child(3n + 1) { text-align: left; }
        .sp-table .is-head { border-radius: 0; background: color-mix(in srgb, var(--ap-ink) 6%, transparent); font-size: 11.5px; font-weight: 700; color: var(--ap-muted); border-bottom: 0; }
        .sp-table .is-name { font-weight: 700; }
        .sp-table .is-strong { font-weight: 700; }
        .sp-transfers { display: grid; gap: 8px; }
        .sp-transfer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ap-ink) 6%, transparent); font-size: 13px; }
        .sp-transfer > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
        .sp-transfer > b:last-child { text-align: right; }
        .sp-transfer > span { color: var(--ap-muted); white-space: nowrap; }
        .sp-transfer strong { color: var(--ap-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
        .sp-transfer.is-balance { grid-template-columns: minmax(0, 1fr) auto; }
        .sp-transfer.is-balance strong.is-pos { color: #2E7D32; }
        .sp-transfer.is-balance strong.is-neg { color: #D32F2F; }
        .sp-prompt { display: grid; justify-items: center; gap: 8px; padding: 6px 8px; text-align: center; color: var(--ap-muted); }
        .sp-prompt svg { width: 22px; height: 22px; }
        .sp-prompt p { margin: 0; max-width: 340px; font-size: 13px; line-height: 1.5; }
        .sp-surplus { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--ap-line); }
        .sp-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 13px; border: 1px solid var(--ap-line-strong); background: transparent; color: var(--ap-ink); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, opacity 200ms ease; }
        .sp-share:hover:not(:disabled) { background: color-mix(in srgb, var(--ap-ink) 7%, transparent); }
        .sp-share:disabled { opacity: 0.45; cursor: default; }
        .sp-share svg { width: 16px; height: 16px; }
        .sp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        .sp-tile { display: grid; gap: 4px; padding: 13px 14px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); }
        .sp-tile b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        /* Recuadros */
        .sp-dlg { display: grid; gap: 12px; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); color: var(--ap-ink); }
        .sp-dlg .st-input input { min-width: 0; width: 100%; }
        .sp-dlg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
        .sp-dlg-tabs button { height: 38px; border: 0; border-radius: 11px; background: color-mix(in srgb, var(--ap-ink) 8%, transparent); color: var(--ap-ink); font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
        .sp-dlg-tabs button.on { background: var(--ap-ink); color: var(--ap-surface); }
        .sp-dlg-empty { display: grid; justify-items: center; gap: 8px; padding: 26px 12px; text-align: center; color: var(--ap-muted); }
        .sp-dlg-empty svg { width: 34px; height: 34px; }
        .sp-dlg-empty b { font-size: 15px; color: var(--ap-ink); }
        .sp-dlg-empty p { margin: 0; font-size: 13px; line-height: 1.5; }
        .sp-dlg-hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ap-muted); }
        .sp-dlg-hint.is-center { text-align: center; }
        .sp-dlg-foot { position: sticky; bottom: -20px; display: grid; gap: 8px; margin: 4px -18px -20px; padding: 14px 18px 18px; border-top: 1px solid var(--ap-line); background: color-mix(in srgb, var(--text) 7%, var(--bg)); }
        .sp-pick-list { display: grid; gap: 8px; }
        .sp-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--ap-line); background: transparent; color: var(--ap-ink); font-family: inherit; text-align: left; cursor: pointer; transition: border-color 200ms ease, background-color 200ms ease; }
        .sp-pick:hover:not(:disabled) { border-color: var(--ap-line-strong); }
        .sp-pick.is-on { border-color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 7%, transparent); }
        .sp-pick:disabled { opacity: 0.6; cursor: default; }
        .sp-pick > svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--ap-muted); }
        .sp-pick .fr-avatar { width: 36px; height: 36px; }
        .sp-pick-info { display: grid; gap: 2px; flex: 1; min-width: 0; }
        .sp-pick-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
        .sp-pick-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ap-muted); }
        .sp-check { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--ap-line-strong); color: var(--ap-surface); }
        .is-on > .sp-check, .is-on > .sp-import-row > .sp-check { background: var(--ap-ink); border-color: var(--ap-ink); }
        .sp-check svg { width: 13px; height: 13px; stroke-width: 3; }
        .sp-acc-ico { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; border: 2px solid #fff; color: #fff; }
        .sp-acc-ico svg { width: 17px; height: 17px; }
        .sp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
        .sp-pill { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--ap-line-strong); background: transparent; color: var(--ap-ink); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .sp-pill.on { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-surface); }
        .sp-pill svg { width: 13px; height: 13px; }
        .sp-import { border-radius: 14px; border: 1px solid var(--ap-line); transition: border-color 200ms ease; }
        .sp-import.is-on { border-color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 6%, transparent); }
        .sp-import.is-done { opacity: 0.55; }
        .sp-import-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: transparent; color: var(--ap-ink); font-family: inherit; text-align: left; cursor: pointer; }
        .sp-import-row:disabled { cursor: default; }
        .sp-import-row strong { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
        .sp-import-opts { display: grid; gap: 6px; padding: 0 12px 12px; }
        .sp-import-opts small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--ap-muted); }
        .sp-option { display: grid; gap: 4px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ap-line-strong); background: transparent; color: var(--ap-ink); font-family: inherit; text-align: left; cursor: pointer; transition: border-color 200ms ease, background-color 200ms ease; }
        .sp-option:hover { border-color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 5%, transparent); }
        .sp-option-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
        .sp-option-top b { font-size: 15px; font-weight: 700; }
        .sp-option-top em { padding: 3px 8px; border-radius: 8px; font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: 0.06em; }
        .sp-option-top em.is-expense { background: rgba(211, 47, 47, 0.16); color: #E53935; }
        .sp-option-top em.is-income { background: rgba(46, 125, 50, 0.18); color: #43A047; }
        .sp-option small { font-size: 12px; line-height: 1.45; color: var(--ap-muted); }
        .sp-option strong { margin-top: 4px; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .sp-note { display: flex; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--ap-line-strong); background: color-mix(in srgb, var(--ap-ink) 6%, transparent); }
        .sp-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
        .sp-note p { margin: 0; font-size: 12.5px; line-height: 1.5; }
        @media (max-width: 480px) {
            .sp-person .sp-amount { width: 118px; }
            .sp-person-name { font-size: 13.5px; }
            .ac-btn.sp-small { padding: 0 10px; font-size: 12.5px; }
        }
        /* Ajustes › Amigos y contactos (js/web-friends.js) */
        .fr-head .fr-title { display: grid; gap: 3px; min-width: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .fr-head .config-title { white-space: nowrap; }
        .fr-sub { font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 12.5px; color: var(--ap-muted); white-space: nowrap; }
        .fr-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; width: 372px; max-width: 100%; padding: 3px; border-radius: 14px; border: 1px solid var(--ap-line); }
        .fr-tabs button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--ap-muted); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .fr-tabs button:hover:not(.on) { color: var(--ap-ink); }
        .fr-tabs button.on { background: var(--ap-ink); color: var(--ap-surface); }
        .fr-tabs button svg { width: 15px; height: 15px; flex-shrink: 0; }
        .fr-badge { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #D32F2F; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--ap-canvas); }
        .fr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
        .fr-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); }
        .fr-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--ap-ink) 10%, transparent); color: var(--ap-ink); }
        .fr-avatar img { width: 100%; height: 100%; object-fit: contain; }
        .fr-avatar.has-avatar { background: transparent; border-radius: 0; overflow: visible; }
        .fr-avatar svg { width: 20px; height: 20px; }
        .fr-info { display: grid; gap: 2px; flex: 1; min-width: 0; }
        .fr-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
        .fr-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ap-muted); }
        .fr-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
        .fr-round { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer; transition: opacity 200ms ease, transform 160ms ease; }
        .fr-round:hover:not(:disabled) { opacity: 0.88; }
        .fr-round:active:not(:disabled) { transform: scale(0.94); }
        .fr-round:disabled { opacity: 0.6; cursor: default; }
        .fr-round.is-green { background: #2E7D32; }
        .fr-round.is-red { background: #D32F2F; }
        .fr-round svg { width: 16px; height: 16px; }
        .fr-round .nr-spinner, .fr-add .nr-spinner, .fr-search-btn .nr-spinner { width: 16px; height: 16px; border-width: 2px; }
        .fr-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 10px; background: color-mix(in srgb, var(--ap-ink) 10%, transparent); font-size: 12px; font-weight: 700; white-space: nowrap; }
        .fr-chip.is-green { background: #2E7D32; color: #fff; }
        .fr-chip svg { width: 14px; height: 14px; }
        .fr-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 96px; height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ap-ink); color: var(--ap-surface); font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: opacity 200ms ease; }
        .fr-add:hover:not(:disabled) { opacity: 0.88; }
        .fr-add svg { width: 14px; height: 14px; }
        .fr-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 18px; }
        .fr-search .st-input { min-width: 0; }
        .fr-search .st-input input { min-width: 0; width: 100%; }
        .fr-clear { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ap-muted); cursor: pointer; }
        .fr-clear:hover { color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 8%, transparent); }
        .fr-clear svg { width: 15px; height: 15px; }
        .fr-search-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 130px; height: auto; padding: 0 22px; border-radius: 14px; font-size: 14.5px; }
        .fr-search-btn svg { width: 17px; height: 17px; }
        #fr-root > .st-lead { margin: 0 0 16px; }
        .fr-hint { margin: 28px auto 0; max-width: 360px; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13.5px; line-height: 1.55; text-align: center; color: var(--ap-muted); }
        .fr-empty { min-height: 300px; }
        .fr-empty-ico { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ap-ink) 8%, transparent); color: var(--ap-muted); }
        .fr-empty-ico svg { width: 28px; height: 28px; }
        .fr-empty-ico .nr-spinner { width: 26px; height: 26px; }
        .fr-empty-btn { margin-top: 12px; min-width: 210px; height: 46px; border-radius: 14px; }
        .fr-empty-btn svg { width: 17px; height: 17px; }
        /* Las pestañas van al centro del encabezado si entran; si no, en una segunda fila a todo el ancho */
        #fr-head { container: frhead / inline-size; }
        .cat-head.has-tabs.fr-head { grid-template-columns: minmax(0, 1fr) auto; row-gap: 14px; }
        .fr-head .fr-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; }
        @container frhead (min-width: 760px) {
            .cat-head.has-tabs.fr-head { grid-template-columns: auto minmax(0, 1fr) auto; }
            .fr-head .fr-tabs { grid-column: auto; grid-row: auto; justify-self: center; width: 400px; }
        }
        @media (max-width: 640px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .fr-head .config-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: clamp(20px, 5.6vw, 32px); }
        }
        @media (max-width: 480px) {
            .fr-tabs button { gap: 5px; padding: 0 6px; font-size: 12.5px; }
            .fr-tabs button svg { display: none; }
            .fr-search { grid-template-columns: minmax(0, 1fr); }
            .fr-search-btn { height: 46px; }
            .fr-list { grid-template-columns: minmax(0, 1fr); }
        }
        /* Ajustes › Categorías (js/web-categories.js) */
        .cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
        /* Con Gastos / Ingresos en el encabezado: título a la izquierda, el selector centrado y los botones a la derecha */
        .cat-head.has-tabs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
        .cat-head.has-tabs > .st-sec-actions { justify-self: end; }
        .cat-head.has-tabs .cat-types { width: 300px; }
        #cat-root > .cat-subhead:first-child { margin-top: 0; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .cat-head .config-title { flex: 1; margin: 0; }
        .cat-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 420px; padding: 4px; border-radius: 14px; border: 1px solid var(--ap-line); }
        .cat-types button { height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ap-muted); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
        .cat-types button:hover { color: var(--ap-ink); }
        .cat-types button.on.is-expense { background: #E53935; color: #fff; }
        .cat-types button.on.is-income { background: #43A047; color: #fff; }
        .cat-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
        .cat-link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13px; font-weight: 600; cursor: pointer; }
        .cat-link:hover { background: color-mix(in srgb, var(--ap-ink) 7%, transparent); }
        .cat-link svg { width: 15px; height: 15px; }
        .cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
        .cat-card { position: relative; display: grid; align-content: start; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); cursor: pointer; transition: border-color 200ms ease, opacity 200ms ease; }
        .cat-card:hover { border-color: var(--ap-line-strong); }
        .cat-card.is-hidden { opacity: 0.55; }
        .cat-card.is-locked { opacity: 0.6; }
        .cat-ico { display: grid; place-items: center; flex-shrink: 0; border-radius: 12px; background: color-mix(in srgb, var(--ap-ink) 10%, transparent); color: var(--ap-ink); }
        .cat-ico.sm { width: 32px; height: 32px; border-radius: 10px; }
        .cat-ico.md { width: 42px; height: 42px; }
        .cat-ico.lg { width: 60px; height: 60px; border-radius: 16px; }
        .cat-ico svg { width: 50%; height: 50%; }
        .cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; }
        .cat-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 26px; }
        .cat-badge { padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ap-ink) 9%, transparent); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
        .cat-badge.is-expense { background: rgba(229, 57, 53, 0.16); color: #E53935; }
        .cat-badge.is-income { background: rgba(67, 160, 71, 0.18); color: #43A047; }
        .cat-lock { width: 14px; height: 14px; color: var(--ap-muted); }
        .cat-del { display: grid; place-items: center; width: 28px; height: 28px; margin-left: auto; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #E53935; cursor: pointer; }
        .cat-del:hover { background: rgba(229, 57, 53, 0.12); }
        .cat-del svg { width: 15px; height: 15px; }
        .cat-system { position: absolute; top: 14px; right: 14px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ap-muted); }
        .cat-form, .cat-edit { display: grid; gap: 18px; max-width: 560px; }
        .cat-icon-row, .cat-icon-grid { display: flex; flex-wrap: wrap; gap: 8px; }
        .cat-icon-opt { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 12px; border: 1px solid var(--ap-line); background: transparent; color: var(--ap-ink); cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
        .cat-icon-opt:hover { border-color: var(--ap-line-strong); }
        .cat-icon-opt.is-on { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-surface); }
        .cat-icon-opt.is-more { border-style: dashed; }
        .cat-icon-opt svg { width: 19px; height: 19px; }
        .cat-icon-groups { display: grid; gap: 18px; }
        .cat-icon-group { display: grid; gap: 10px; }
        .cat-colors { display: flex; flex-wrap: wrap; gap: 9px; }
        .cat-colors.is-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 9px; }
        .cat-color { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); cursor: pointer; transition: transform 160ms ease; }
        .cat-colors.is-all .cat-color { width: 34px; height: 34px; }
        .cat-color:hover { transform: scale(1.08); }
        .cat-color.is-on { border-color: var(--ap-ink); box-shadow: 0 0 0 2px var(--ap-canvas) inset; }
        .cat-color.is-more, .cat-color.is-none { background: transparent; border-color: var(--ap-line-strong); color: var(--ap-muted); box-shadow: none; }
        .cat-color.is-more.is-on, .cat-color.is-none.is-on { border-color: var(--ap-ink); color: var(--ap-ink); }
        .cat-color svg { width: 15px; height: 15px; }
        .cat-preview, .cat-edit-preview { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); }
        .cat-preview b, .cat-edit-preview b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
        .nr-save.is-dim { opacity: 0.45; }
        /* Crear Categoría: campos del mismo ancho a la izquierda y la vista previa grande a la derecha */
        .cat-head.is-create .config-title { white-space: nowrap; }
        /* En pantallas angostas el título se achica para que entre al lado de la cruz */
        @media (max-width: 640px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .cat-head.is-create .config-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: clamp(24px, 7.4vw, 32px); }
        }
        .cat-form.is-split { container-type: inline-size; display: block; max-width: none; }
        .cat-split { display: grid; gap: 22px; }
        .cat-split > * { min-width: 0; }
        .cat-form-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
        .cat-form-fields .cat-types { max-width: none; }
        .cat-form-fields .st-input { min-width: 0; }
        .cat-form-fields .st-input input { min-width: 0; width: 100%; }
        .cat-form-fields .cat-icon-row { display: grid; grid-template-columns: repeat(var(--n, 11), minmax(0, 52px)); justify-content: space-between; gap: 6px; }
        .cat-form-fields .cat-icon-opt { width: 100%; height: auto; aspect-ratio: 1; }
        .cat-form-fields .cat-colors { display: grid; grid-template-columns: repeat(10, minmax(0, 34px)); justify-content: space-between; gap: 9px 6px; }
        .cat-form-fields .cat-color { width: 100%; height: auto; aspect-ratio: 1; }
        @container (min-width: 480px) {
            .cat-split { grid-template-columns: minmax(0, 1fr) clamp(180px, 38%, 300px); gap: clamp(20px, 5cqw, 32px); align-items: start; }
        }
        .cat-preview-xl { display: grid; justify-items: center; align-content: center; gap: 12px; padding: 28px 20px; border-radius: 20px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); text-align: center; }
        .cat-ico.xl { width: min(100%, 200px); height: auto; aspect-ratio: 1; border-radius: 44px; }
        .cat-ico.xl svg { width: 44%; height: 44%; stroke-width: 1.6; }
        .cat-preview-xl b { max-width: 100%; margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 28px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; }
        .cat-system-hint { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ap-ink) 7%, transparent); font-size: 12.5px; font-weight: 600; color: var(--ap-ink); }
        .cat-system-hint svg { width: 14px; height: 14px; flex-shrink: 0; }
        .cat-visibility { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 12px; border: 1px solid var(--ap-line); font-size: 14px; font-weight: 500; color: var(--ap-ink); cursor: pointer; }
        .cat-order { display: grid; gap: 8px; }
        .cat-order-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--ap-line); color: var(--ap-ink); }
        .cat-order-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
        .cat-order-row .hx-mini { width: 34px; height: 34px; border-radius: 10px; }
        /* Ajustes › Planes: solo estética (contenido y pagos sin cambios; la rama zeus-usd-web toca precios) */
        #config-section-planes .st-sec-body > p { margin: -8px 0 18px !important; font-size: 14px !important; opacity: 1 !important; color: var(--ap-muted) !important; }
        #config-section-planes .config-group { margin: 0; padding-top: 14px !important; }
        #config-section-planes .pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: none; }
        #config-section-planes .plan-card { min-width: 0; max-width: none; padding: 30px 22px 22px !important; border-radius: 20px !important; border: 1px solid var(--ap-line) !important; background: var(--ap-surface) !important; box-shadow: none !important; transform: none !important; color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); }
        #config-section-planes .plan-card:hover { transform: none !important; border-color: var(--ap-line-strong) !important; }
        #config-section-planes .plan-card + .plan-card { border-color: var(--ap-ink) !important; box-shadow: inset 0 0 0 1px var(--ap-ink) !important; }
        #config-section-planes .plan-badge { padding: 5px 14px !important; border-radius: 999px !important; border: 1px solid var(--ap-line-strong); background: var(--ap-canvas) !important; color: var(--ap-ink) !important; box-shadow: none !important; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 10.5px !important; font-weight: 700 !important; letter-spacing: 0.14em !important; }
        #config-section-planes .plan-card + .plan-card .plan-badge { background: var(--ap-ink) !important; border-color: var(--ap-ink); color: var(--ap-surface) !important; }
        #config-section-planes .plan-name { font-family: 'DM Sans', system-ui, -apple-system, sans-serif !important; font-size: 42px !important; font-weight: 500 !important; letter-spacing: 0.06em !important; text-shadow: none !important; color: var(--ap-ink) !important; }
        #config-section-planes .plan-card > p { color: var(--ap-muted) !important; opacity: 1 !important; font-size: 14px !important; margin: 14px 0 22px !important; }
        #config-section-planes .plan-features li { gap: 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.45; color: var(--ap-ink); }
        #config-section-planes .plan-features li svg { width: 17px !important; height: 17px !important; color: var(--ap-ink) !important; opacity: 0.85 !important; }
        #config-section-planes .btn { height: auto; min-height: 48px; padding: 14px 16px !important; border-radius: 14px !important; border: 1px solid var(--ap-line-strong) !important; box-shadow: none !important; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13px !important; font-weight: 700 !important; letter-spacing: 0.04em !important; transform: none !important; }
        #config-section-planes .btn-primary { background: var(--ap-ink) !important; border-color: var(--ap-ink) !important; color: var(--ap-surface) !important; }
        #config-section-planes .btn-secondary { background: transparent !important; color: var(--ap-ink) !important; }
        #config-section-planes #settings-planes-zeus-btn-container { gap: 10px !important; }
        #config-section-planes #settings-planes-zeus-btn-container > div { color: var(--ap-ink) !important; }
        #config-section-planes #settings-planes-zeus-promo-text { color: var(--ap-ink) !important; letter-spacing: 0.08em !important; }
        #config-section-planes .plan-card a:not(.btn) { color: var(--ap-muted) !important; }
        /* ── Ajustes en pantalla fija: la página no se mueve; la lista y el recuadro se desplazan cada uno por su
           cuenta (y al llegar al final no arrastran la página). Solo mientras Ajustes está abierto. ── */
        html:has(body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode)) { overflow: hidden; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) > footer, body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) footer { display: none; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion.active { height: calc(100vh - 76px); height: calc(100dvh - 76px); min-height: 0; padding-bottom: 0; overflow: hidden; box-sizing: border-box; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion > .container { display: flex; flex-direction: column; height: 100%; padding-bottom: 24px; box-sizing: border-box; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-container.st-layout { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
        /* La lista va en un recuadro como el de la derecha, del alto de la columna; adentro se desplazan las tarjetas */
        body.st-fixed #view-configuracion .st-menu { align-content: start; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; border-radius: 20px; border: 1px solid var(--ap-line); background: transparent; box-sizing: border-box; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-content { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
        /* La sección: encabezado fijo (título, línea y botones) y debajo el contenido, que es lo único que se
           desplaza; así la barra empieza debajo de la línea del encabezado */
        body.st-fixed #view-configuracion .config-section.active { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; padding: 0; }
        body.st-fixed #view-configuracion .st-sec-head { flex: none; padding: 26px 32px 18px; border-bottom: 1px solid var(--ap-line); }
        body.st-fixed #view-configuracion .st-sec-head:empty { display: none; }
        /* Pie de la sección (Perfil, Planes, Crear Categoría): del mismo alto que el encabezado, con el botón
           principal siempre a la vista; el contenido se desplaza entre los dos */
        .st-sec-foot { display: flex; align-items: center; justify-content: center; }
        body.st-fixed #view-configuracion .st-sec-foot { flex: none; box-sizing: border-box; height: 85px; padding: 0 32px; border-top: 1px solid var(--ap-line); }
        body.st-fixed #view-configuracion .st-sec-foot:empty { display: none; }
        body.st-fixed #view-configuracion .config-section:has(> .st-sec-foot:not(:empty)) > .st-sec-body { padding-bottom: 20px; }
        .st-foot-btn { width: min(100%, 320px); height: 46px; padding: 0 24px; border-radius: 14px; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
        body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .st-sec-head .config-title { margin: 0; }
        body.st-fixed #view-configuracion .st-sec-head .cat-head { margin: 0; }
        body.st-fixed #view-configuracion .st-sec-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 32px 96px; }
        body.st-fixed #view-configuracion #config-section-acerca .st-sec-body { padding-top: 28px; }
        body.st-fixed #view-configuracion .st-sec-body > p:first-child { margin-top: 0 !important; }
        body.st-fixed #view-configuracion .st-menu::-webkit-scrollbar, body.st-fixed #view-configuracion .st-sec-body::-webkit-scrollbar { width: 4px; }
        body.st-fixed #view-configuracion .st-menu::-webkit-scrollbar-track, body.st-fixed #view-configuracion .st-sec-body::-webkit-scrollbar-track { background: transparent; }
        /* La barra no llega a las esquinas redondeadas ni toca la línea del encabezado */
        body.st-fixed #view-configuracion .st-menu::-webkit-scrollbar-track { margin-block: 18px; }
        body.st-fixed #view-configuracion .st-sec-body::-webkit-scrollbar-track { margin-block: 8px 18px; }
        body.st-fixed #view-configuracion .st-menu::-webkit-scrollbar-button, body.st-fixed #view-configuracion .st-sec-body::-webkit-scrollbar-button { display: none; height: 0; }
        /* Chrome y Edge usan el estilo de arriba (fino, del color del tema y con margen); Firefox, su barra fina */
        @supports not selector(::-webkit-scrollbar) {
            body.st-fixed #view-configuracion .st-menu, body.st-fixed #view-configuracion .st-sec-body { scrollbar-width: thin; scrollbar-color: rgba(var(--text-rgb), 0.15) transparent; }
        }
        body.st-fixed #view-configuracion .st-menu::-webkit-scrollbar-thumb, body.st-fixed #view-configuracion .st-sec-body::-webkit-scrollbar-thumb { background: rgba(var(--text-rgb), 0.15); border-radius: 10px; }
        @media (max-width: 1020px) {
            body.st-fixed #view-configuracion .st-sec-head { padding: 22px 24px 16px; }
            body.st-fixed #view-configuracion .st-sec-body { padding: 20px 24px 96px; }
            body.st-fixed #view-configuracion .st-sec-foot { height: 79px; padding: 0 24px; }
            /* Lo último de la lista no queda debajo de las burbujas de Stratos y + */
            body.st-fixed #view-configuracion[data-st-view="menu"] .st-menu { margin: 0 auto; padding: 18px 18px 96px; }
            body.st-fixed.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion[data-st-view="menu"] .config-content { display: none; }
        }
        /* Celular: con pie, las burbujas de + y Stratos suben arriba del pie para no tapar su botón */
        @media (max-width: 700px) {
            body.st-fixed.st-section-view:has(#view-configuracion.active .config-section.active > .st-sec-foot:not(:empty)) #quick-add-fab,
            body.st-fixed.st-section-view:has(#view-configuracion.active .config-section.active > .st-sec-foot:not(:empty)) #stratos-fab { bottom: 120px; }
            body.st-fixed #view-configuracion .config-section:has(> .st-sec-foot:not(:empty)) > .st-sec-body, body.st-fixed #view-configuracion #config-section-planes .st-sec-body { padding-bottom: 96px; }
        }
        /* Ajustes sin página abierta: el recuadro muestra solo la marca; con una página, su encabezado lleva la cruz */
        .st-empty { display: none; }
        body.st-fixed #view-configuracion[data-st-view="menu"] .config-section { display: none !important; }
        body.st-fixed #view-configuracion[data-st-view="menu"] .st-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 0; padding: 32px; text-align: center; animation: fadeIn 0.3s ease; }
        .st-empty .st-empty-logo { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 14px; border-radius: 22px; background: var(--ap-ink); color: var(--ap-canvas); box-shadow: 0 0 0 10px color-mix(in srgb, var(--ap-ink) 6%, transparent); }
        .st-empty .st-empty-logo svg { width: 38px; height: 38px; }
        .st-empty-title { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 34px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; color: var(--ap-ink); }
        .st-empty-sub { font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ap-muted); }
        body.st-fixed #view-configuracion .st-sec-head { display: flex; align-items: center; gap: 12px; }
        body.st-fixed #view-configuracion .st-sec-head > .config-title { flex: 1; min-width: 0; }
        .st-sec-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
        .st-close svg { width: 18px; height: 18px; }
        body.st-fixed #view-configuracion .st-sec-head .cat-head { flex: 1; min-width: 0; }
        body.ap-page-nav #view-configuracion { padding-top: 0; }
        body.ap-page-nav #view-configuracion > .container { padding-top: 24px; }
        @media (min-width: 1021px) {
            body.st-section-view.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-page-head .ap-scope-back { display: none; }
        }
        @media (max-width: 1020px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-container.st-layout { grid-template-columns: minmax(0, 1fr); }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-configuracion .config-content { padding: 24px; }
            #view-configuracion[data-st-view="menu"] .config-content { display: none; }
            #view-configuracion[data-st-view="section"] .st-menu { display: none; }
            #view-configuracion[data-st-view="menu"] .st-menu { max-width: 640px; width: 100%; margin: 0 auto; }
        }
        /* ── Historial (como app/history): período, búsqueda, lista y edición ── */
        body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-page-sub { min-width: 0; padding-left: 14px; border-left: 1px solid var(--ap-line-strong, rgba(var(--text-rgb), 0.2)); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14px; font-weight: 600; line-height: 22px; color: color-mix(in srgb, var(--text) 66%, var(--bg)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ap-seg-nav button .ap-seg-label.is-always { display: inline !important; }
        .ap-seg-nav button:has(.ap-seg-label.is-always) { padding: 0 15px !important; }
        .hx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
        .hx-period-bar { display: flex; align-items: center; gap: 8px; min-width: 0; }
        .hx-period { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 15px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; color: var(--text); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease; }
        .hx-period:hover { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.32); }
        .hx-period svg { width: 16px; height: 16px; flex-shrink: 0; }
        .hx-period-tools { display: flex; align-items: center; gap: 6px; }
        .hx-mini { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; color: var(--text); cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, opacity 200ms ease; }
        .hx-mini:hover:not(:disabled) { background: rgba(var(--text-rgb), 0.06); border-color: rgba(var(--text-rgb), 0.32); }
        .hx-mini:disabled { opacity: 0.3; cursor: default; }
        .hx-mini svg { width: 17px; height: 17px; }
        .hx-search { position: relative; display: flex; align-items: center; width: min(320px, 100%); margin: 0; }
        .hx-search svg { position: absolute; left: 13px; width: 16px; height: 16px; color: color-mix(in srgb, var(--text) 55%, var(--bg)); pointer-events: none; }
        .hx-search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; color: var(--text); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 14px; font-weight: 500; transition: border-color 200ms ease; }
        .hx-search input::placeholder { color: color-mix(in srgb, var(--text) 50%, var(--bg)); }
        .hx-search input:focus { border-color: rgba(var(--text-rgb), 0.45); }
        .hx-list { margin-top: 0 !important; }
        .hx-empty { display: grid; justify-items: center; gap: 12px; padding: 72px 16px; text-align: center; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .hx-empty svg { width: 30px; height: 30px; opacity: 0.7; }
        .hx-empty p { margin: 0; font-size: 14px; font-weight: 500; }
        .hx-opts { display: grid; gap: 8px; }
        .hx-opt.is-on { border-color: var(--text); }
        .hx-opt-check { width: 18px; height: 18px; margin-left: auto; flex-shrink: 0; }
        .hx-cal { display: grid; gap: 12px; }
        .nr-day.hx-in { background: rgba(var(--text-rgb), 0.1); }
        .hx-cal-preview { margin: 4px 0 0; text-align: center; font-size: 13px; font-weight: 500; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .gx-edit-note { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(var(--text-rgb), 0.06); color: var(--text); }
        .gx-edit-note > svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
        .gx-edit-note > div { display: grid; gap: 3px; min-width: 0; }
        .gx-edit-note b { font-size: 13px; font-weight: 700; }
        .gx-edit-note small { font-size: 12px; font-weight: 500; line-height: 1.45; color: color-mix(in srgb, var(--text) 66%, var(--bg)); }
        .gx-field-hint { display: block; margin-top: 7px; font-size: 12px; font-weight: 500; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .gx-field-hint:empty { display: none; }
        @media (max-width: 1020px) {
            body.ap-page-nav.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-page-sub { display: none; }
            .hx-search { width: 100%; }
        }
        /* ── Notificaciones (campana) e Historial de notificaciones, como la app ── */
        .nf-list { display: grid; gap: 10px; }
        .nf-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
        .nf-toolbar::-webkit-scrollbar { display: none; }
        .nf-filters { flex-shrink: 0; }
        .nf-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-ink); cursor: pointer; transition: border-color 200ms ease, background-color 200ms ease; }
        .nf-card:hover { border-color: var(--ap-line-strong); }
        .nf-card.is-sel { border-color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 6%, var(--ap-surface)); }
        .nf-ico { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; background: var(--nf-accent); color: #111; }
        .nf-ico svg { width: 21px; height: 21px; }
        .nf-ico.is-lg { width: 60px; height: 60px; border-radius: 16px; }
        .nf-ico.is-lg svg { width: 28px; height: 28px; }
        .nf-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
        .nf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
        .nf-top b { min-width: 0; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .nf-time { flex-shrink: 0; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 12px; font-weight: 500; color: var(--ap-muted); white-space: nowrap; }
        .nf-main p { margin: 0; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13.5px; line-height: 1.45; color: var(--ap-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .nf-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--ap-ink); }
        /* Grupo de avisos parecidos («y N más»), como la app */
        .nf-main p.nf-more { margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--ap-muted); opacity: .85; }
        .nf-end { height: 1px; }
        .nf-check { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--ap-line-strong); }
        .nf-check.is-on { background: var(--ap-ink); border-color: var(--ap-ink); color: var(--ap-surface); }
        .nf-check svg { width: 13px; height: 13px; stroke-width: 3; }
        .nf-card.is-compact { gap: 12px; padding: 11px 12px; border-radius: 14px; }
        .nf-card.is-compact .nf-ico { width: 38px; height: 38px; border-radius: 11px; }
        .nf-card.is-compact .nf-ico svg { width: 18px; height: 18px; }
        .nf-card.is-compact .nf-top b { font-size: 13.5px; }
        .nf-card.is-compact .nf-main p { font-size: 12.5px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #notif-list { gap: 8px; }
        .nf-empty { display: grid; justify-items: center; align-content: center; gap: 8px; flex: 1; padding: 32px 16px; text-align: center; color: var(--ap-muted); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); }
        .nf-empty > svg { width: 28px; height: 28px; opacity: 0.6; }
        .nf-empty b { font-size: 15px; font-weight: 600; color: var(--ap-ink); }
        .nf-empty p { margin: 0; max-width: 340px; font-size: 13px; line-height: 1.5; }
        .nf-empty.is-page { padding: 80px 16px; }
        .nf-clear-btn { padding: 6px 8px; border: none; border-radius: 8px; background: none; color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; }
        .nf-clear-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--ap-ink) 8%, transparent); }
        .nf-clear-btn:disabled { opacity: 0.35; cursor: default; }
        .nf-select-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 12px 10px 16px; border-radius: 16px; border: 1px solid var(--ap-line); }
        .nf-select-bar[hidden] { display: none; }
        .nf-select-count { font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13.5px; font-weight: 500; color: var(--ap-muted); }
        .nf-select-btns { display: flex; gap: 8px; flex-wrap: wrap; }
        .nf-select-btns .ac-btn { height: 38px; }
        .nf-select-btns .ac-btn svg { width: 16px; height: 16px; }
        .nf-settings-btn { position: relative; text-decoration: none; }
        body.ap-page-nav .ap-page-actions .nf-settings-btn .nf-settings-badge { position: absolute; right: 6px; bottom: 6px; width: 12px; height: 12px; padding: 1px; border-radius: 4px; background: var(--ap-canvas); stroke-width: 2.6; }
        .nf-detail { display: grid; gap: 14px; }
        .nf-detail-head { display: flex; align-items: center; gap: 14px; }
        .nf-detail-head h4 { margin: 0; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; color: var(--ap-ink); }
        .nf-detail-time { margin: 0; font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 13px; font-weight: 500; color: var(--ap-muted); }
        .nf-detail-body { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--nf-accent); color: var(--ap-ink); font-family: var(--ap-sans, 'DM Sans', system-ui, sans-serif); font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
        body.ap-page-nav #view-notificaciones { padding-top: 0; }
        body.ap-page-nav #view-notificaciones > .container { padding-top: 24px; }
        /* Cuentas, Gestión, Historial y Notificaciones: el pie de página nunca sube; aparece recién al desplazar (la página ocupa al menos
           toda la altura visible debajo de la barra superior, sin importar cuánto contenido tenga) */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-notificaciones.active,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-historial.active,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-cuentas.active,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-gestion.active { min-height: calc(100vh - 76px); box-sizing: border-box; }
        /* Sin logo en la barra superior: el logo está arriba de la barra lateral */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-wordmark { display: none !important; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .nav-content { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { grid-column: 2; justify-self: end; }

        /* ── Encabezado de Inicio compacto ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .ap-home-top { padding: 4px 0 16px; margin-bottom: 24px; display: grid; gap: 14px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hello { display: flex; align-items: center; gap: 14px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-avatar {
            display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; padding: 0; border-radius: 13px; overflow: hidden; cursor: pointer;
            background: var(--ap-ink); color: var(--ap-canvas); border: 1.5px solid var(--ap-line-strong);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-avatar > * { width: 100% !important; height: 100% !important; display: grid !important; place-items: center; border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 0 !important; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-avatar span { font-family: var(--ap-sans) !important; font-size: 16px !important; font-weight: 700 !important; color: var(--ap-canvas) !important; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-avatar img { object-fit: cover; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-greeting { font-size: clamp(30px, 3.2vw, 40px); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-home-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-wrap { position: relative; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-chip { height: 40px; padding: 4px 10px 4px 5px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-menu { left: 0; right: auto; width: 260px; max-height: 340px; overflow-y: auto; padding: 6px; background: var(--ap-surface); border-color: var(--ap-line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-menu .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ap-ink); font: 600 14px var(--ap-sans); cursor: pointer; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-acc-menu .dropdown-item:hover { background: rgba(var(--text-rgb), 0.08); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-period-bar { padding: 0; justify-content: flex-start; gap: 8px; flex: 0 1 auto; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-period-actions { gap: 8px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-menu, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #custom-date-picker-menu { left: 0; right: auto; }

        /* ── Bloques (encabezado con título y ⋮, como la app) ── */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-block-title { margin: 0; font-family: var(--ap-sans); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ap-ink); }
        /* Inicio: los títulos de cada recuadro (Balance, Evolución, Distribución, Resumen…) con el mismo formato que
           Mapa de Calor y Movimientos Recientes, como en la app: formato título, 18 px y sin ícono */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .dash-card-title { font-family: var(--ap-sans); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--ap-ink); }
        /* Los KPI de arriba (Balance, Ingresos, Gastos, Tasa de Ahorro) conservan su ícono a la izquierda */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .dash-card-title:not(.kpis-wrapper .dash-card-title) > i,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .dash-card-title:not(.kpis-wrapper .dash-card-title) > svg { display: none; }
        /* Distribución: la leyenda (título y recuadro) un poco más arriba, sin mover la torta ni el resto */
        @media (min-width: 761px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #dash-donut-cats-card .ap-legend-col { position: relative; top: -14px; }
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .sh-total-title { margin-bottom: 8px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kebab { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ap-ink); cursor: pointer; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kebab:hover { background: rgba(var(--text-rgb), 0.08); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kebab svg { width: 20px; height: 20px; }
        /* Tres puntos de Distribución y del Mapa de calor: con la línea de perímetro de los botones (como la campana) */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-kebab { box-sizing: border-box; border: 1.5px solid var(--ap-line-strong); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-widget-off { display: none !important; }

        /* ── Atajos en el encabezado de Inicio: 3 × 3 a la izquierda de la campana ── */
        .ap-hdr-shortcuts { display: none; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts { display: flex; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { position: relative; }
        /* En Inicio: campana a la altura del saludo, después los atajos y a la derecha los ⋮ */
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-actions { align-items: flex-start !important; height: 40px; gap: 14px !important; }
        body.on-dashboard.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #notif-container { order: 1; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts { order: 2; position: relative; margin-top: -6px; align-items: flex-start; gap: 6px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-toggle { display: none; }
        /* Atajos apagados: ícono + ⋮; el ícono despliega la grilla */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed { margin-top: 0; align-items: center; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-hdr-toggle {
            display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 12px; cursor: pointer;
            border: 1.5px solid var(--ap-line-strong); background: transparent; color: var(--ap-ink); transition: background-color 200ms var(--ap-ease);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-hdr-toggle svg { width: 19px; height: 19px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-hdr-toggle:hover, body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed.open .ap-hdr-toggle { background: rgba(var(--text-rgb), 0.08); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-hdr-kebab { height: 40px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-shortcuts-grid {
            display: none; position: absolute; top: 48px; right: 0; padding: 8px; border-radius: 14px;
            background: var(--ap-surface); border: 1px solid var(--ap-line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed.open .ap-shortcuts-grid:not([hidden]) { display: grid; animation: apPop 200ms var(--ap-ease); }
        /* El menú desplegable siempre muestra los nombres (también en tablet) */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-shortcuts-grid { grid-template-columns: repeat(3, 130px); gap: 6px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-shortcut { justify-content: flex-start; width: auto; padding: 0 9px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed .ap-shortcut span { display: inline; }
        @keyframes apPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-kebab {
            display: grid; place-items: center; width: 26px; height: 28px; padding: 0; border: 0; border-radius: 8px;
            background: transparent; color: var(--ap-muted); cursor: pointer; transition: background-color 200ms var(--ap-ease), color 200ms var(--ap-ease);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-kebab:hover { background: rgba(var(--text-rgb), 0.08); color: var(--ap-ink); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-kebab svg { width: 18px; height: 18px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcuts-grid { display: grid; grid-template-columns: repeat(3, 130px); gap: 6px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcuts-grid[hidden] { display: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcut {
            display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 9px; min-width: 0;
            border: 0; border-radius: 8px; cursor: pointer; background: var(--ap-ink); color: var(--ap-canvas); font-family: var(--ap-sans);
            transition: transform 160ms var(--ap-ease), opacity 200ms var(--ap-ease);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcut svg { width: 14px; height: 14px; flex-shrink: 0; stroke-width: 2.2; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcut span { font-size: 9.5px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcut:active { transform: scale(0.96); }
        @media (hover: hover) and (pointer: fine) { body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcut:hover { opacity: 0.86; } }
        /* Pantallas medianas (tablet): solo íconos, para no chocar con el saludo */
        @media (max-width: 1180px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcuts-grid { grid-template-columns: repeat(3, 30px); gap: 5px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcut { justify-content: center; width: 30px; height: 28px; padding: 0; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-shortcut span { display: none; }
        }

        /* ── Panel de ajustes (hoja) ── */
        .ap-sheet-overlay {
            position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px;
            background: rgba(10, 6, 4, 0.55); opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 220ms;
        }
        .ap-sheet-overlay.open { opacity: 1; visibility: visible; }
        .ap-sheet {
            display: flex; flex-direction: column; width: min(440px, 100%); max-height: min(640px, 88vh);
            border-radius: 20px; border: 1px solid rgba(var(--text-rgb), 0.28); background: color-mix(in srgb, var(--text) 7%, var(--bg));
            color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
            transform: translateY(12px) scale(0.98); transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .ap-sheet-overlay.open .ap-sheet { transform: none; }
        .ap-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid rgba(var(--text-rgb), 0.14); }
        .ap-sheet-head h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.04em; }
        .ap-sheet-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(var(--text-rgb), 0.08); color: var(--text); cursor: pointer; }
        .ap-sheet-close svg { width: 18px; height: 18px; }
        .ap-sheet-list { display: grid; gap: 8px; padding: 14px 16px; overflow-y: auto; }
        .ap-sheet-master { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 6px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.28); }
        .ap-sheet-master-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
        .ap-sheet-master-text b { font-size: 14px; font-weight: 700; }
        .ap-sheet-master-text small { font-size: 12px; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .ap-sheet-master .ap-switch span { background: rgba(var(--text-rgb), 0.25); }
        .ap-sheet-master .ap-switch span::after { background: var(--bg); }
        .ap-sheet-master .ap-switch input:checked + span { background: var(--text); }
        .ap-sheet-items { display: grid; gap: 8px; transition: opacity 200ms ease; }
        .ap-sheet-items.is-dimmed { opacity: 0.4; pointer-events: none; }
        .ap-sheet-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--text); color: var(--bg); }
        .ap-sheet-item.is-fixed { opacity: 0.75; }
        .ap-sheet-move { display: grid; gap: 2px; }
        .ap-sheet-move button { display: grid; place-items: center; width: 26px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: rgba(var(--bg-rgb), 0.12); color: var(--bg); cursor: pointer; }
        .ap-sheet-move button:disabled { opacity: 0.25; cursor: default; }
        .ap-sheet-move svg { width: 15px; height: 15px; }
        .ap-sheet-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(var(--bg-rgb), 0.12); }
        .ap-sheet-ico svg { width: 17px; height: 17px; }
        .ap-sheet-label { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ap-switch { position: relative; flex-shrink: 0; width: 42px; height: 24px; cursor: pointer; }
        .ap-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
        .ap-switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(var(--bg-rgb), 0.25); transition: background-color 200ms ease; pointer-events: none; }
        .ap-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
        .ap-switch input:checked + span { background: var(--bg); }
        .ap-switch input:checked + span::after { transform: translateX(18px); }
        .ap-switch input:focus-visible + span { outline: 2px solid var(--bg); outline-offset: 2px; }
        .ap-switch.is-disabled { opacity: 0.6; cursor: default; }
        .ap-sheet-foot { padding: 14px 16px 16px; border-top: 1px solid rgba(var(--text-rgb), 0.14); }
        .ap-sheet-apply { width: 100%; height: 46px; border: 0; border-radius: 14px; background: var(--text); color: var(--bg); font: 800 13px 'DM Sans', sans-serif; letter-spacing: 0.04em; cursor: pointer; }
        .ap-sheet-apply:disabled { opacity: 0.4; cursor: default; }

        /* ── Aviso breve ── */
        .ap-toast {
            position: fixed; left: 50%; bottom: 28px; z-index: 3100; max-width: min(420px, calc(100% - 32px));
            padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg);
            font: 600 14px 'DM Sans', sans-serif; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
            opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity 220ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .ap-toast.show { opacity: 1; transform: translate(-50%, 0); }
        /* Sin conexión: aviso fijo y discreto abajo al centro (lo registrado se guarda y se envía solo al volver internet) */
        .ap-offline {
            position: fixed; left: 50%; bottom: 22px; z-index: 3050; display: none; align-items: center; gap: 8px;
            max-width: min(520px, calc(100% - 32px)); padding: 8px 14px; border-radius: 12px;
            border: 1px solid rgba(var(--text-rgb), 0.22); background: var(--bg); color: var(--text);
            font: 600 12.5px/1.35 'DM Sans', sans-serif; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22); transform: translateX(-50%);
        }
        .ap-offline svg { width: 15px; height: 15px; flex-shrink: 0; }
        body.is-logged.is-offline:not(.lp-mode, .auth-mode, .legal-mode) .ap-offline { display: flex; }

        @media (max-width: 640px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-avatar { width: 40px; height: 40px; border-radius: 12px; }
        }
        @media (max-width: 640px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #view-dashboard .ap-home-top { margin-bottom: 18px; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .home-period-label { min-width: 0; font-size: 14px; }
            /* En el teléfono, la barra superior muestra solo el ícono de Statera */
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .nav-wordmark span:not(.lp-brand-mark) { display: none; }
        }
    

        /* ═══ Plan Arché en Statera Web (js/web-plan.js): ver sus datos, sin registrar ni crear ═══ */
        /* Zeus: abajo de la barra lateral solo la línea y el botón de abrir/cerrar (sin el nombre del plan) */
        #promo-zeus { display: none !important; }
        /* Arché: barra lateral siempre abierta y sin el botón; el anuncio llega hasta abajo */
        body.web-arche #btn-collapse-sidebar { display: none !important; }
        body.web-arche #promo-adsense { margin-bottom: 16px !important; }
        body.web-arche .is-arche-hidden { display: none !important; }
        /* Cartel de Zeus */
        .zg { display: grid; justify-items: center; gap: 12px; padding: 6px 4px 2px; text-align: center; }
        .zg-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: rgba(var(--text-rgb), 0.08); border: 1px solid rgba(var(--text-rgb), 0.2); }
        .zg-ico svg { width: 28px; height: 28px; stroke-width: 1.8; }
        .zg-lead { margin: 4px 0 0; max-width: 380px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 21px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
        .zg-sub { margin: 0; max-width: 380px; font-size: 14px; line-height: 1.5; color: color-mix(in srgb, var(--text) 72%, var(--bg)); }
        .zg-perks { display: grid; gap: 8px; width: 100%; margin: 6px 0 0; padding: 14px 16px; list-style: none; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.14); background: var(--bg); text-align: left; }
        .zg-perks li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
        .zg-perks svg { width: 17px; height: 17px; flex-shrink: 0; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
        .zg-app { margin: 2px 0 0; font-size: 13px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .zg-cta { width: 100%; margin-top: 14px; }
        /* Arché sin cuentas: aviso en Inicio */
        .arche-empty { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 4px 0 22px; padding: 20px 22px; border-radius: 16px; border: 1px solid var(--ap-line-strong, rgba(var(--text-rgb), 0.28)); background: var(--ap-surface, color-mix(in srgb, var(--text) 7%, var(--bg))); }
        .arche-empty[hidden] { display: none; }
        .arche-empty-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(var(--text-rgb), 0.08); border: 1px solid rgba(var(--text-rgb), 0.18); }
        .arche-empty-ico svg { width: 24px; height: 24px; stroke-width: 1.8; }
        .arche-empty-text h2 { margin: 0 0 4px; font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 23px; font-weight: 500; letter-spacing: -0.01em; }
        .arche-empty-text p { margin: 0; max-width: 620px; font-size: 14px; line-height: 1.55; color: color-mix(in srgb, var(--text) 72%, var(--bg)); }
        .arche-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
        .arche-empty-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.22); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color 200ms ease, opacity 200ms ease; }
        .arche-empty-btn svg { width: 16px; height: 16px; }
        .arche-empty-btn.is-primary { border-color: transparent; background: var(--text); color: var(--bg); }
        @media (hover: hover) and (pointer: fine) { .arche-empty-btn:hover { background: rgba(var(--text-rgb), 0.06); } .arche-empty-btn.is-primary:hover { background: var(--text); opacity: 0.9; } }
        @media (max-width: 1100px) { .arche-empty { grid-template-columns: auto minmax(0, 1fr); } .arche-empty-actions { grid-column: 1 / -1; justify-content: flex-start; } }
        .ac-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

        /* ═══ Inicio de una cuenta compartida (js/web-shared-home.js; app: SharedAccountHome.tsx) ═══ */
        .sh-home { display: none; }
        body.home-shared .sh-home { display: grid; gap: 14px; }
        /* El orden de Total gastado, Reparto, Mapa de calor y Movimientos sale de Editar inicio › Compartida */
        .sh-split-host { display: none; }
        body.home-shared .sh-split-host { display: block; }
        body.home-shared .dashboard-grid > :not(#sh-home):not(#sh-split):not([data-widget="heatmap"]):not([data-widget="recent"]) { display: none !important; }
        body.home-shared #home-export-btn { display: none; }
        /* Compartida: período con su calendario (sin descargar registros) y, a la derecha de la línea, el evento */
        .ap-shared-folder { display: none; }
        body.on-dashboard.home-shared:not(.home-scoped) .ap-shared-folder:not(:empty) { display: flex; align-items: center; min-width: 0; position: relative; margin-left: 12px; padding-left: 22px; }
        /* La misma línea vertical fina de la barra, entre el período y el evento */
        body.on-dashboard.home-shared:not(.home-scoped) .ap-shared-folder::before {
            content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 40px; transform: translateY(-50%);
            background: linear-gradient(to bottom, transparent, var(--ap-line-strong) 25%, var(--ap-line-strong) 75%, transparent);
        }
        /* El nombre del evento se acorta (con «…») cuando la barra superior se queda sin lugar */
        /* Botones de cuenta y evento con ancho fijo: el nombre no lo agranda; si no entra, marquesina */
        .ap-mq { display: block; overflow: hidden; white-space: nowrap; text-overflow: clip !important; }
        .ap-mq > .ap-mq-in { display: inline-block; white-space: nowrap; overflow: visible !important; }
        .ap-mq.run > .ap-mq-in { animation: ap-mq var(--ap-mq-t, 4s) ease-in-out 0.8s infinite alternate; }
        @keyframes ap-mq { from { transform: translateX(0); } to { transform: translateX(var(--ap-mq, 0)); } }
        /* Saludo de Inicio («Hola, nombre»): espacio máximo; si el nombre no entra, marquesina */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello .ap-greeting.ap-mq { display: block; max-width: 250px; }
        @media (max-width: 1180px) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello .ap-greeting.ap-mq { max-width: 160px; }
            /* La barra de una compartida es más ancha (período + evento) */
            body.is-logged.home-shared:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello .ap-greeting.ap-mq { max-width: 152px; }
        }
        @media (max-width: 1000px) { body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) nav .ap-hello .ap-greeting.ap-mq { max-width: 140px; } }
        @media (prefers-reduced-motion: reduce) { .ap-mq.run > .ap-mq-in { animation: none; } }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-acc-name { width: 130px; max-width: none; flex: none; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-acc-cur { min-width: 30px; text-align: center; flex: none; }
        body.home-shared .ap-shared-folder .sh-folder-chip { max-width: none; }
        body.home-shared .ap-shared-folder .sh-folder-chip > .ap-mq { width: 130px; flex: none; }
        @media (max-width: 1400px) {
            body.home-shared .ap-shared-folder .sh-folder-chip > .ap-mq { width: 100px; }
            body.home-shared .ap-shared-folder .sh-folder-bar > .home-period-sq { display: none; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-acc-name { width: 104px; }
        }
        /* Pantallas más chicas: el evento queda como botón con su ícono (el nombre se ve en el desplegable)
           y «Nuevo evento» se usa desde ese desplegable */
        @media (max-width: 1240px) {
            body.on-dashboard.home-shared:not(.home-scoped) .ap-shared-folder:not(:empty) { margin-left: 6px; padding-left: 14px; }
            body.home-shared .ap-shared-folder .sh-folder-chip { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
            body.home-shared .ap-shared-folder .sh-folder-chip span, body.home-shared .ap-shared-folder .sh-folder-chip .sh-folder-chev { display: none; }
            body.home-shared .ap-shared-folder .sh-folder-bar > .home-period-sq { display: none; }
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-nav-center .ap-acc-name { width: 84px; max-width: none; }
        }
        .sh-folder-bar { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
        .sh-folder-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: 240px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(var(--text-rgb), 0.22); background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color 200ms ease, background-color 200ms ease; }
        .sh-folder-chip:hover { border-color: rgba(var(--text-rgb), 0.45); }
        .sh-folder-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .sh-folder-chip svg { width: 16px; height: 16px; flex-shrink: 0; }
        .sh-folder-chip .sh-folder-chev { width: 14px; height: 14px; opacity: 0.7; }
        .sh-folder-list { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
        .sh-folder-row { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 6px 0 0; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.22); }
        .sh-folder-row.sel { background: var(--text); border-color: var(--text); color: var(--bg); }
        .sh-folder-row.closed:not(.sel) .sh-folder-pick { opacity: 0.6; }
        .sh-folder-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 0 0 14px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; }
        .sh-folder-pick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .sh-folder-pick svg { width: 17px; height: 17px; flex-shrink: 0; }
        .sh-folder-more { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
        .sh-folder-more:hover { background: rgba(var(--text-rgb), 0.1); }
        .sh-folder-row.sel .sh-folder-more:hover { background: rgba(var(--bg-rgb, 0, 0, 0), 0.15); }
        .sh-folder-more svg { width: 17px; height: 17px; }
        .sh-split:focus-visible, .sh-opt:focus-visible, .sh-icon:focus-visible,
        .sh-folder-pick:focus-visible, .sh-folder-more:focus-visible, .sh-folder-chip:focus-visible, .sh-month:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
        .sh-opt.new { border-style: dashed; margin-bottom: 4px; }
        .sh-heat-nav { display: none; }
        body.home-shared .sh-heat-nav { display: none; }
        /* Total gastado del período: «· Nov 2026» al lado del título y «Todo el evento: $X» abajo */
        body.home-shared .sh-total-period::before { content: ' · '; }
        body.home-shared .sh-total-event { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; opacity: 0.7; }
        /* Reparto: «Saldos de todo el evento» debajo del título */
        body.home-shared .shs-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
        body.home-shared .shs-scope { font-size: 12px; font-weight: 700; opacity: 0.6; }
        .sh-heat-label { flex: 1; text-align: center; font-size: 15px; font-weight: 700; }
        .sh-year { display: flex; align-items: center; gap: 10px; }
        .sh-year b { flex: 1; text-align: center; font-size: 15px; }
        .sh-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
        .sh-month { height: 42px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.22); background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
        .sh-month:hover:not(:disabled) { border-color: rgba(var(--text-rgb), 0.45); }
        .sh-month.sel { background: var(--text); border-color: var(--text); color: var(--bg); }
        .sh-month:disabled { opacity: 0.3; cursor: default; }
        .sh-day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
        .sh-day-head b { font-size: 14px; font-weight: 700; }
        .sh-empty { display: grid; justify-items: center; gap: 10px; text-align: center; }
        .sh-empty b { font-size: 16px; font-weight: 700; }
        .sh-empty p { margin: 0; max-width: 46ch; font-size: 13.5px; line-height: 1.5; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .sh-note { margin: -6px 2px 0; font-size: 12.5px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .sh-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; align-items: start; }
        .sh-total { display: grid; gap: 8px; }
        .sh-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .sh-amount { font-size: clamp(30px, 4vw, 42px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
        .sh-fund { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
        .sh-fund i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--text) 50%, var(--bg)); }
        .sh-rule { width: 100%; height: 1px; margin: 8px 0; border: 0; background: rgba(var(--text-rgb), 0.14); }
        .sh-people { display: grid; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
        .sh-person { display: flex; align-items: center; gap: 12px; }
        .sh-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; background: rgba(var(--text-rgb), 0.08); font-size: 12px; font-weight: 700; }
        .sh-person-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .sh-person-nums { display: grid; justify-items: end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
        .sh-person-nums b { font-size: 13.5px; font-weight: 700; }
        .sh-person-nums small { font-size: 12px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .dash-card.sh-split { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: border-color 200ms ease, transform 200ms ease; }
        .sh-split:hover { border-color: rgba(var(--text-rgb), 0.35); }
        .sh-split-ico { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; background: rgba(var(--text-rgb), 0.08); }
        .sh-split-ico svg { width: 20px; height: 20px; }
        .sh-split-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
        .sh-split-text b { font-size: 15px; font-weight: 700; }
        .sh-split-text small { font-size: 12.5px; line-height: 1.4; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .sh-split-chev { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; }
        .sh-recent { display: grid; gap: 4px; }
        .sh-payer { margin: 0 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .sh-icons { display: flex; flex-wrap: wrap; gap: 8px; }
        .sh-icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.18); background: transparent; color: var(--text); cursor: pointer; }
        .sh-icon svg { width: 18px; height: 18px; }
        .sh-icon.on { background: var(--text); border-color: var(--text); color: var(--bg); }
        .sh-save { margin-top: 4px; }
        .sh-opts { display: grid; gap: 10px; }
        .sh-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.22); background: transparent; color: var(--text); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
        .sh-opt:hover { border-color: rgba(var(--text-rgb), 0.45); }
        .sh-opt svg { width: 18px; height: 18px; }
        .sh-opt.danger { color: #E53935; border-color: rgba(229, 57, 53, 0.45); }
        .sh-confirm-text { margin: 0; font-size: 14px; line-height: 1.5; }
        .nr-primary-btn.danger { background: #E53935; border-color: #E53935; color: #fff; }
        @media (max-width: 760px) {
            .sh-grid { grid-template-columns: minmax(0, 1fr); }
        }

/* ── Tipo de cuenta (Individual / Compartida), como components/AccountTypeDialog.tsx de la app ── */
.ac-type { display: grid; gap: 10px; }
.ac-type-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(var(--text-rgb), 0.22); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ac-type-opt:hover { border-color: rgba(var(--text-rgb), 0.45); }
.ac-type-opt.is-dim { opacity: 0.45; }
.ac-type-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(var(--text-rgb), 0.08); }
.ac-type-ico svg { width: 20px; height: 20px; }
.ac-type-text { display: grid; gap: 3px; min-width: 0; }
.ac-type-text b { font-size: 15.5px; font-weight: 800; }
.ac-type-text small { font-size: 12.5px; font-weight: 500; opacity: 0.72; line-height: 1.35; }
.ac-type-note { margin: 2px 2px 0; font-size: 11.5px; opacity: 0.6; line-height: 1.4; }
.ac-chip.is-add { justify-content: center; border-style: dashed; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ac-chip.is-add span { flex: none; }

        /* ═══ Reparto de gastos del evento (js/web-shared-home.js; app: SharedSplitCard.tsx) ═══ */
        .home-period-sq.is-dim, .sh-opt.is-dim { opacity: 0.45; }
        .sh-folder-list.is-fixed { height: min(320px, 50vh); max-height: none; align-content: start; }
        .shs-card { display: grid; gap: 10px; }
        .shs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
        .shs-title { font-size: 16px; font-weight: 700; }
        .shs-muted, .shs-desc { margin: 0; font-size: 13px; line-height: 1.5; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .shs-status { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .shs-status.is-zero { color: color-mix(in srgb, var(--text) 55%, var(--bg)); font-weight: 600; }
        .shs-transfers { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
        .shs-transfer { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 6px 6px 14px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.18); }
        .shs-transfer-text { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
        .shs-names { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
        .shs-names svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }
        .shs-transfer-text b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .shs-btn { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--text); color: var(--bg); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
        .shs-btn:hover { opacity: 0.88; }
        .shs-pending { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; border: 1px dashed rgba(var(--text-rgb), 0.35); font-size: 13.5px; font-weight: 600; }
        .shs-open { margin-top: 4px; }
        .shs-open:disabled { opacity: 0.4; cursor: default; }
        .shs-pick-list { display: grid; gap: 8px; height: min(380px, 52vh); overflow-y: auto; align-content: start; }
        .shs-pick-row { display: grid; gap: 8px; padding: 8px 12px; border-radius: 14px; border: 1px solid rgba(var(--text-rgb), 0.18); }
        .shs-pick-row.is-out .shs-pick-text, .shs-pick-row.is-out .shs-pick-amount { opacity: 0.45; }
        .shs-pick-main { display: flex; align-items: center; gap: 10px; }
        .shs-check { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; padding: 0; border-radius: 7px; border: 1.5px solid rgba(var(--text-rgb), 0.45); background: transparent; color: var(--bg); cursor: pointer; }
        .shs-check.on { background: var(--text); border-color: var(--text); }
        .shs-check:disabled { cursor: default; }
        .shs-check svg { width: 14px; height: 14px; }
        .shs-check:not(.on) svg { color: var(--text); }
        .shs-pick-text { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
        .shs-pick-text:disabled { cursor: default; }
        .shs-pick-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .shs-pick-text small { font-size: 12px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .shs-pick-amount { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .shs-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 34px; }
        .shs-note { width: 100%; font-size: 12px; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .shs-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(var(--text-rgb), 0.25); background: transparent; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
        .shs-chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
        .shs-apply { width: 100%; margin-top: 10px; }
        .shs-apply:disabled { opacity: 0.4; cursor: default; }
        .shs-money { margin-bottom: 6px; }
        .shs-check:focus-visible, .shs-chip:focus-visible, .shs-btn:focus-visible, .shs-pick-text:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

        /* Editar inicio: Individual / Compartida y el lápiz de Total gastado (app/settings/dashboard.tsx) */
        .ap-type-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
        .ap-type-btn { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(var(--text-rgb), 0.22); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
        .ap-type-btn b { font-size: 14px; font-weight: 700; }
        .ap-type-btn small { font-size: 11.5px; line-height: 1.35; color: color-mix(in srgb, var(--text) 62%, var(--bg)); }
        .ap-type-btn.on { background: var(--text); border-color: var(--text); color: var(--bg); }
        .ap-type-btn.on small { color: color-mix(in srgb, var(--bg) 72%, var(--text)); }
        .ap-sheet-edit { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; }
        .ap-sheet-edit:hover { background: rgba(var(--text-rgb), 0.08); }
        .ap-sheet-edit svg { width: 16px; height: 16px; }
        .ap-total-opts { display: grid; gap: 8px; }

        /* Nuevo registro: botones de vincular apagados (sin gestiones / sin cuentas compartidas) */
        .nr-head .nr-icon-btn.is-dim { opacity: 0.35; }
        .nr-empty-desc { margin: 0; font-size: 14px; line-height: 1.55; color: color-mix(in srgb, var(--text) 85%, var(--bg)); }
        .nr-sheet-foot .nr-primary-btn { width: 100%; }

        /* Mi patrimonio: cuentas compartidas aparte (no suman) */
        .ac-pat-shared { display: grid; gap: 4px; }
        .ac-pat-shared-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 4px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
        .ac-pat-shared-row:hover { background: rgba(var(--text-rgb), 0.05); }
        .ac-pat-shared-row .ac-share-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .ac-pat-fund { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
        .ac-pat-fund small { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; color: color-mix(in srgb, var(--text) 60%, var(--bg)); }
        .ac-pat-fund b { font-size: 14px; }

        /* ═══ Stratos: preguntas con botones, Pago/Gestión/Compartida y cuenta compartida (app: chat.tsx) ═══ */
        .sx-q-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
        .sx-q-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--sx-ink); color: var(--sx-canvas); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity 200ms ease; }
        .sx-q-btn:hover:not(:disabled) { opacity: 0.88; }
        .sx-q-btn.is-dim { opacity: 0.5; }
        .sx-q-btn:disabled { cursor: default; }
        .sx-q-btn .sx-spinner { width: 13px; height: 13px; }
        .sx-q-answer { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
        .sx-q-answer svg { width: 14px; height: 14px; stroke-width: 3; }
        .sx-opt-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
        .sx-opt-btn { display: grid; place-items: center; min-width: 0; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--sx-line); background: transparent; color: color-mix(in srgb, var(--sx-ink) 62%, transparent); font: inherit; cursor: pointer; overflow: hidden; transition: border-color 160ms ease, background-color 160ms ease; }
        .sx-opt-btn:hover { border-color: color-mix(in srgb, var(--sx-ink) 40%, transparent); }
        .sx-opt-btn svg { width: 17px; height: 17px; }
        .sx-opt-btn.on { background: var(--sx-ink); border-color: var(--sx-ink); color: var(--sx-canvas); }
        .sx-opt-btn.is-blocked { opacity: 0.4; }
        .sx-opt-btn:focus-visible, .sx-q-btn:focus-visible { outline: 2px solid var(--sx-ink); outline-offset: 2px; }
        .sx-marquee { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; }
        .sx-marquee > span { display: inline-block; font-size: 12.5px; font-weight: 800; }
        .sx-marquee:not(.run) > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
        .sx-marquee.run > span { animation: sx-mq var(--sx-mq-t, 4s) ease-in-out 0.8s infinite alternate; }
        @keyframes sx-mq { from { transform: translateX(0); } to { transform: translateX(var(--sx-mq, 0)); } }
        @media (prefers-reduced-motion: reduce) { .sx-marquee.run > span { animation: none; } }
        .sx-sheet-label { margin: 16px 2px 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: color-mix(in srgb, var(--sx-ink) 55%, transparent); }
        .sx-sheet-loading { display: grid; place-items: center; min-height: 56px; }
        .sx-opt-text { display: grid; gap: 2px; min-width: 0; }
        .sx-opt-text small { font-size: 11.5px; font-weight: 500; color: color-mix(in srgb, var(--sx-ink) 58%, transparent); }

        /* Reparto al lado de Total gastado: mismo alto, el contenido se desplaza dentro del recuadro */
        body.home-shared #sh-split.is-pair { min-height: 0; }
        #sh-split.is-pair > .shs-card { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; min-height: 0; }
        #sh-split.is-pair .shs-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 10px; align-content: start; margin-right: -6px; padding-right: 6px; }
        .shs-body { display: grid; gap: 10px; }
        #sh-split.is-pair .shs-open { flex-shrink: 0; }
        body.home-shared #view-dashboard .dashboard-grid > #sh-home.col-span-7, body.home-shared #view-dashboard .dashboard-grid > #sh-split.is-pair { align-self: start; }

        /* Nuevo evento: «+» para elegir entre todos los íconos (como en la app) */
        .sh-icon.is-more { border-style: dashed; border-color: rgba(var(--text-rgb), 0.38); }
        .sh-icon.is-more:hover { border-color: rgba(var(--text-rgb), 0.6); }

        /* Gestión: columnas independientes (al abrir una tarjeta solo baja la de abajo, no toda la fila) */
        .gx-grid.is-cols { display: block; }
        .gx-grid.is-cols > .gx-pending-block { margin-bottom: 20px; }
        .gx-cols { display: grid; grid-template-columns: repeat(var(--gx-cols, 1), minmax(0, 1fr)); gap: 14px; align-items: start; }
        .gx-col { display: grid; gap: 14px; align-content: start; min-width: 0; }

        /* Distribución por categoría: la leyenda en su propio recuadro, con su desplazamiento adentro
           (antes, al desplazarla, la parte de abajo salía del recuadro general) */
        .ap-legend-col { display: flex; flex-direction: column; gap: 10px; height: 230px; min-height: 0; }
        .ap-legend-box { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 12px 14px; border: 1px solid rgba(var(--text-rgb), 0.14); border-radius: 14px; }
        .ap-legend-box::-webkit-scrollbar-track { margin-block: 10px; }

        /* Desplegables de Notificaciones y de Atajos: oscurecen el fondo como los demás recuadros y la página no se mueve */
        .ap-menu-dim { position: fixed; inset: 0; z-index: 3003; background: rgba(10, 6, 4, 0.55); opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 220ms; }
        body.ap-menu-open .ap-menu-dim { opacity: 1; visibility: visible; }
        body.ap-menu-open nav { z-index: 3004; }
        /* El desplazamiento queda adentro (no pasa a la página al llegar al final) */
        .notification-list, .ap-legend-box { overscroll-behavior: contain; }

        /* Gestión: con el alto igualado, el contenido de cada tarjeta queda arriba (el espacio que sobra, abajo) */
        .gx-col > .gx-card { align-content: start; }

        /* Ajustes de notificaciones: a dónde llega cada aviso, horario de descanso y prueba al celular */
        .ns-type-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
        .ns-reach { font-size: 12px; font-weight: 500; opacity: 0.7; }
        .ns-type.is-off .ns-reach { opacity: 0.45; }
        .ns-extra { cursor: default; }
        .ns-extra-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1; }
        .ns-extra-text small { font-size: 12px; font-weight: 500; line-height: 1.4; opacity: 0.75; white-space: normal; }
        .ns-quiet { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: -4px 0 10px; }
        .ns-quiet label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; opacity: 0.85; }

        /* ═══════════════════════════════════════════════════════════════════════════
           SISTEMA DE EFECTOS — el mismo de la app (STATERA-APP/constants/Motion.ts)
           Nada rebota: entra con desaceleración y sale un poco más rápido. Un efecto por tipo de elemento:
            · Páginas principales (Inicio, Cuentas, Gestión, Ajustes): fundido con leve acercamiento (98,5 % → 100 %).
            · Subpáginas (Historial, secciones de Ajustes): entran desde la derecha.
            · Paneles (Historial de notificaciones, Stratos): suben apenas con fundido.
            · Nuevo registro: fundido y leve subida (16 px).
            · Recuadros: fundido con acercamiento 96 % → 100 % (200 ms); al cerrar, 150 ms.
            · Desplegables de abajo: suben desde abajo (280 ms).
            · Menús: 150 ms.
           Con «Reducir movimiento» en el sistema, solo quedan los fundidos.
           ═══════════════════════════════════════════════════════════════════════════ */
        :root {
            --m-ease-out: cubic-bezier(0.2, 0, 0, 1);
            --m-ease-in: cubic-bezier(0.3, 0, 1, 1);
            --m-tab: 200ms; --m-rise: 250ms; --m-stack: 300ms; --m-panel: 280ms;
            --m-sheet-in: 280ms; --m-sheet-out: 200ms; --m-dialog-in: 200ms; --m-dialog-out: 150ms;
            --m-menu: 150ms;
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) { --ap-ease: var(--m-ease-out); }
        #stratos-chat-panel.sx-panel { --sx-ease: var(--m-ease-out); }

        @keyframes mTabIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
        @keyframes mStackIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
        @keyframes mPanelIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
        @keyframes mRiseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
        @keyframes mDialogIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
        @keyframes mSheetIn { from { transform: translateY(100%); } to { transform: none; } }
        @keyframes mMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
        @keyframes mMenuUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
        @keyframes mFade { from { opacity: 0; } to { opacity: 1; } }

        /* Páginas (el tipo lo pone el navegador interno: data-enter) */
        main { overflow-x: clip; }
        .view.active[data-enter="tab"] { animation: mTabIn var(--m-tab) var(--m-ease-out); transform-origin: 50% 0; }
        .view.active[data-enter="stack"] { animation: mStackIn var(--m-stack) var(--m-ease-out); }
        .view.active[data-enter="panel"] { animation: mPanelIn var(--m-panel) var(--m-ease-out); }

        /* Recuadros con capa (análisis, cuentas, ajustes): abren 200 ms, cierran 150 ms */
        .ap-sheet-overlay { transition: opacity var(--m-dialog-out) var(--m-ease-in), visibility 0s linear var(--m-dialog-out); }
        .ap-sheet-overlay.open { transition: opacity var(--m-dialog-in) var(--m-ease-out), visibility 0s; }
        .ap-sheet { opacity: 0; transform: scale(0.96); transition: transform var(--m-dialog-out) var(--m-ease-in), opacity var(--m-dialog-out) var(--m-ease-in); }
        .ap-sheet-overlay.open .ap-sheet { opacity: 1; transform: none; transition: transform var(--m-dialog-in) var(--m-ease-out), opacity var(--m-dialog-in) var(--m-ease-out); }
        .modal-overlay.open { animation: mFade var(--m-dialog-in) var(--m-ease-out); }
        .modal-box, .nr-box.ac-form, .nr-box.gx-box, .nr-confirm, .stratos-modal-content { animation: mDialogIn var(--m-dialog-in) var(--m-ease-out); }
        /* Nuevo registro: como en la app, sube apenas */
        .nr-box:not(.ac-form):not(.gx-box) { animation: mRiseIn var(--m-rise) var(--m-ease-out); }
        /* Desplegables dentro de un recuadro: suben desde abajo */
        .nr-layer { animation: mFade var(--m-dialog-in) var(--m-ease-out); }
        .nr-sheet { animation: mSheetIn var(--m-sheet-in) var(--m-ease-out); }
        .nr-time-pick { animation: mFade var(--m-menu) var(--m-ease-out); }

        /* Stratos */
        #stratos-chat-panel.sx-panel { animation: mPanelIn var(--m-panel) var(--m-ease-out); }
        .sx-dialog, .sx-avatar-big { animation: mDialogIn var(--m-dialog-in) var(--m-ease-out); }
        .sx-sheet { animation: mSheetIn var(--m-sheet-in) var(--m-ease-out); }
        .sx-menu, .sx-lock, .sx-notice { animation: mMenuUp var(--m-menu) var(--m-ease-out); }

        /* Menús */
        .notification-dropdown { animation: mMenuIn var(--m-menu) var(--m-ease-out); }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) .ap-hdr-shortcuts.is-collapsed.open .ap-shortcuts-grid:not([hidden]) { animation: mMenuIn var(--m-menu) var(--m-ease-out); }

        /* Barras de los informes: crecen sin pasarse */
        .rpt-bar-fill { transition: height 600ms var(--m-ease-out); }
        .rpt-cat-bar-fill { transition: width 600ms var(--m-ease-out); }

        /* Reducir movimiento: solo fundidos */
        @media (prefers-reduced-motion: reduce) {
            .view.active[data-enter], .modal-box, .nr-box, .nr-confirm, .nr-sheet, .stratos-modal-content,
            #stratos-chat-panel.sx-panel, .sx-dialog, .sx-avatar-big, .sx-sheet, .sx-menu, .sx-lock, .sx-notice,
            .notification-dropdown, body.is-logged .ap-hdr-shortcuts.is-collapsed.open .ap-shortcuts-grid:not([hidden]) { animation-name: mFade !important; }
            .ap-sheet, .ap-sheet-overlay.open .ap-sheet { transform: none !important; }
            .rpt-bar-fill, .rpt-cat-bar-fill { transition: none !important; }
        }

        /* Inicio: Filtrar por período y Descargar registros con el mismo formato que la campana de notificaciones
           (40 px, esquinas de 12 px, línea de 1,5 px, fondo transparente, ícono de 19 px) */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-btn,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-export-btn {
            width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--ap-line-strong);
            background: transparent; color: var(--ap-ink); transition: background-color 200ms var(--ap-ease);
        }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-btn svg,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-export-btn svg { width: 19px; height: 19px; }
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-btn:hover,
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-export-btn:hover { background: transparent; }
        /* Sin la transparencia al pasar el mouse de antes (solo cuando el botón está habilitado) */
        body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-btn:hover,
        body.is-logged.is-premium:not(.lp-mode, .auth-mode, .legal-mode) #home-export-btn:hover { opacity: 1; }
        @media (hover: hover) and (pointer: fine) {
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-period-btn:hover,
            body.is-logged:not(.lp-mode, .auth-mode, .legal-mode) #home-export-btn:hover { background: rgba(var(--text-rgb), 0.08); }
        }

        /* Marquesina automática (runAutoMarquees en statera-app.js): textos que se cortarían con «…» se deslizan */
        .ap-amq { text-overflow: clip !important; }
        .ap-amq > .ap-amq-in { display: inline-block; white-space: nowrap; vertical-align: top; }
        .ap-amq.run > .ap-amq-in { animation: ap-mq var(--ap-mq-t, 4s) ease-in-out 0.8s infinite alternate; }
        @media (prefers-reduced-motion: reduce) { .ap-amq.run > .ap-amq-in { animation: none; } .ap-amq { text-overflow: ellipsis !important; } }
