:root {
    color-scheme: dark;
    accent-color: var(--primary);
    scrollbar-color: rgba(148, 163, 184, 0.55) rgba(15, 23, 42, 0.4);
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --secondary-hover: #059669;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #38BDF8;
    --bg-color: #0F172A;
    --surface: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --glass-blur: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 25%);
    overflow: hidden;
}

h1, h2 {
    text-wrap: balance;
}
.cochinito-speech-bubble p {
    text-wrap: pretty;
}

.visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.skip-link:focus-visible {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000000;
    padding: 10px 16px;
    border-radius: 10px;
    background: #0F172A;
    color: #FFFFFF;
    border: 2px solid #38BDF8;
    font-weight: 700;
    text-decoration: none;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2.5px solid #38BDF8;
    outline-offset: 2px;
}

/* Typography & Utils */
.hidden { display: none !important; }
.gradient-text {
    background: linear-gradient(135deg, #818CF8, #C084FC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.error-text { color: var(--danger); font-size: 0.875rem; margin-top: 0.5rem; }
.success-text { color: var(--secondary); font-size: 0.875rem; margin-top: 0.5rem; }

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
}
.glass-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.97));
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* Buttons & Inputs */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-secondary {
    background: var(--secondary);
    color: white;
}
.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: rgba(79, 70, 229, 0.1);
}
.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-xs { padding: 3px 8px; font-size: 0.75rem; border-radius: 6px; }
.btn-block { width: 100%; padding: 12px; }

.input-group {
    position: relative;
    margin-bottom: 16px;
}
.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 1.05rem;
    transition: color 0.25s ease;
}
.input-group input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    border-radius: 12px;
    border: 1.2px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.75);
    color: #FFFFFF;
    font-size: 0.96rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.input-group input::placeholder {
    color: #94A3B8;
    opacity: 1;
    font-size: 0.92rem;
}
.input-group input:focus {
    outline: none;
    border-color: #818CF8;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.28);
}
.input-group:focus-within i {
    color: #818CF8;
}

/* Auth View */
#auth-view {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    border: 1.2px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    animation: slideUp 0.5s ease-out;
    margin: auto;
}
.auth-header {
    text-align: center;
    margin-bottom: 24px;
}
.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #818CF8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}
.logo-icon.small {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin: 0;
}

/* Layout */
#main-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    padding: 24px 0;
    animation: slideRight 0.4s ease-out;
}
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 24px;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 24px;
}
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.user-info p { font-weight: 600; font-size: 0.95rem; }
.badge { font-size: 0.7rem; background: rgba(79, 70, 229, 0.2); color: #818CF8; padding: 2px 6px; border-radius: 4px; }
.badge.admin { background: rgba(245, 158, 11, 0.2); color: #F59E0B; }
.badge.user { background: rgba(59, 130, 246, 0.2); color: #38BDF8; }
.badge.success { background: rgba(16, 185, 129, 0.2); color: #10B981; }

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
    overflow-y: auto;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.16s ease, background-color 0.16s ease;
    font-weight: 500;
}
.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}
.nav-item.active {
    color: white;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.25), transparent);
    border-left: 3px solid var(--primary);
}
.nav-item.danger:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-footer { padding: 0 12px; }

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    border-radius: 0;
    border-top: none;
    border-right: none;
    border-left: none;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.household-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 40px;
}
@supports not (scrollbar-color: auto) {
    .scrollable-content::-webkit-scrollbar { width: 8px; }
    .scrollable-content::-webkit-scrollbar-thumb { background: var(--surface-border); border-radius: 4px; }
}

/* Dashboard Content */
.dashboard-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.balance-card h1 { font-size: 2.2rem; margin: 10px 0 4px; }
.tasa-info { font-size: 0.85rem; color: var(--text-secondary); }

.unassigned-card {
    border-color: rgba(16, 185, 129, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.unassigned-card h2 { color: var(--secondary); margin: 10px 0; font-size: 1.8rem; }

.wallets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.wallet-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 3px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wallet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.wallet-card h4 { color: var(--text-secondary); font-weight: 500; }
.wallet-balance { font-size: 1.4rem; font-weight: 600; }
.wallet-sub { font-size: 0.85rem; color: var(--text-secondary); }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.recent-transactions { padding: 24px; }
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--surface-border);
    transition: background 0.2s;
}
.transaction-item:hover { background: rgba(255,255,255,0.02); }
.transaction-item:last-child { border-bottom: none; }
.tx-info { display: flex; align-items: center; gap: 14px; }
.tx-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.tx-icon.income { color: var(--secondary); background: rgba(16, 185, 129, 0.1); }
.tx-icon.expense { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.tx-icon.loan { color: #F59E0B; background: rgba(245, 158, 11, 0.1); }
.tx-details h4 { font-weight: 500; margin-bottom: 4px; font-size: 0.95rem; }
.tx-details p { font-size: 0.8rem; color: var(--text-secondary); }
.tx-amount { font-weight: 600; text-align: right; }
.tx-amount.positive { color: var(--secondary); }
.tx-amount.negative { color: var(--text-primary); }

/* Animations */
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 6, 23, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    overflow-y: auto;
}
.modal-content {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    position: relative;
}
dialog.native-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: calc(100vw - 24px);
    max-width: 520px;
    max-height: 90dvh;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    overflow: visible;
    opacity: 0;
    transition-property: opacity, transform, display, overlay;
    transition-duration: 0.25s;
    transition-timing-function: ease-out;
    transition-behavior: allow-discrete;
}
@media (prefers-reduced-motion: no-preference) {
    dialog.native-dialog {
        transform: scale(0.95);
    }
}
dialog.native-dialog#cochinito-voice-modal { max-width: 580px; }
dialog.native-dialog#rate-calculator-modal { max-width: 440px; }
dialog.native-dialog#cashea-purchase-modal { max-width: 480px; }
dialog.native-dialog#cashea-pay-modal { max-width: 460px; }
dialog.native-dialog[open] {
    display: block;
}
dialog.native-dialog[open]:where(:not([data-closing])) {
    opacity: 1;
    @starting-style {
        opacity: 0;
    }
    @media (prefers-reduced-motion: no-preference) {
        transform: scale(1);
        @starting-style {
            transform: scale(0.95);
        }
    }
}
dialog.native-dialog:modal {
    overscroll-behavior: contain;
}
dialog.native-dialog::backdrop {
    overflow: hidden;
    overscroll-behavior: contain;
    background: rgba(2, 6, 23, 0);
    transition-property: background-color, display, overlay;
    transition-duration: 0.25s;
    transition-timing-function: ease-out;
    transition-behavior: allow-discrete;
}
dialog.native-dialog[open]:where(:not([data-closing]))::backdrop {
    background: rgba(2, 6, 23, 0.78);
    @starting-style {
        background: rgba(2, 6, 23, 0);
    }
}
dialog.native-dialog > .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    max-height: 90dvh;
    overflow-y: auto;
    animation: none;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.close-modal, .close-modal-btn { 
    background: none; 
    border: none; 
    color: var(--text-secondary); 
    font-size: 1.2rem; 
    cursor: pointer; 
    transition: color 0.2s;
}
.close-modal:hover, .close-modal-btn:hover { color: white; }

/* Forms */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--surface-border);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.28);
}
:is(.form-control, input, select, textarea):not([type="range"]):is(:user-invalid, .user-invalid-fallback) {
    border-color: #EF4444;
    background-color: rgba(239, 68, 68, 0.09);
}
:is(.form-control, input, select, textarea):not([type="range"]):user-valid {
    border-color: rgba(16, 185, 129, 0.65);
}
.field-error-msg {
    display: none;
    color: #FCA5A5;
    font-size: 0.82rem;
    margin-top: 4px;
}
:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) ~ .field-error-msg {
    display: block;
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394A3B8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 12px auto;
}
select.form-control option {
    background: #1e293b;
    color: white;
}

/* Grids and Lists */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.list-container {
    margin-top: 16px;
}
.exchange-cards {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}
.exchange-cards > div {
    flex: 1;
}
.exchange-cards h3 {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Loader */
.loader-spinner {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary);
}

/* Category Chips & Filter Bars */
.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 12px;
    margin-bottom: 12px;
}
@supports not (scrollbar-color: auto) {
    .category-chips::-webkit-scrollbar { height: 6px; }
    .category-chips::-webkit-scrollbar-thumb { background: var(--surface-border); border-radius: 4px; }
}

.cat-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cat-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
.cat-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--surface-border);
    margin-bottom: 16px;
}
.filter-bar .search-input {
    flex: 2;
    min-width: 180px;
}
.filter-bar .select-filter {
    flex: 1;
    min-width: 130px;
}

/* Debts & Contact Styles */
.debt-hero-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(16, 185, 129, 0.1));
    border-color: rgba(79, 70, 229, 0.3);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.debt-hero-rates {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.rate-pill {
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.contact-card {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.contact-card:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.04);
}
.contact-card.positive { border-left-color: var(--secondary); }
.contact-card.negative { border-left-color: var(--danger); }

/* Toast Notifications (Top Layer Popover + Legacy Fallback) */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(360px, calc(100vw - 24px));
    width: 100%;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    transform: translateX(120%);
    opacity: 0;
    transition-property: transform, opacity, display, overlay;
    transition-duration: 0.28s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-behavior: allow-discrete;
}
.toast[popover] {
    inset: auto;
    position: fixed;
    top: calc(20px + var(--toast-index, 0) * 68px);
    right: 20px;
    margin: 0;
    width: min(360px, calc(100vw - 24px));
}
.toast:is(.show, :popover-open, .\:popover-open):where(:not([data-closing])) {
    transform: translateX(0);
    opacity: 1;
    @starting-style {
        opacity: 0;
        transform: translateX(24px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .toast {
        transform: none;
        transition-duration: 0.1s;
    }
}
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-message { font-size: 0.9rem; flex: 1; line-height: 1.3; }
.toast-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 2px; }
.toast-close:hover { color: white; }

.toast-success { border-left: 4px solid var(--secondary); }
.toast-success .toast-icon { color: var(--secondary); }
.toast-error, .toast-danger { border-left: 4px solid var(--danger); }
.toast-error .toast-icon, .toast-danger .toast-icon { color: var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-info .toast-icon { color: var(--info); }

/* Inventory Tabs (Mis Productos / Catálogo Global) */
.inventory-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 12px;
}
.inv-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.16s ease, background-color 0.16s ease;
}
.inv-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.inv-tab-btn.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}
.inv-tab-btn .badge-pill {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}
.inv-tab-btn.active .badge-pill {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Category Header Banner (Matching Flutter) */
.inv-cat-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #4338CA 0%, #312E81 100%);
    padding: 10px 16px;
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(49, 46, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.inv-cat-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.inv-cat-banner-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}
.inv-cat-banner-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.8px;
    color: white;
    text-transform: uppercase;
}
.inv-cat-banner-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #FCD34D;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Enhanced Item Card */
.inv-item-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.inv-item-card:hover {
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.inv-item-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.inv-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.inv-item-info {
    flex: 1;
}
.inv-item-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}
.inv-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.inv-unit-pill {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}
.inv-price-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.inv-price-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}
.inv-price-ves {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.inv-iva-pill {
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: #C084FC;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
}
.inv-item-actions {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    justify-content: flex-end;
}

/* High Fidelity Printable PDF Invoice (Matching Flutter) */
.invoice-printable {
    background: #FFFFFF;
    color: #1E293B;
    padding: 32px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    line-height: 1.5;
}
.invoice-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 2px solid #C7D2FE;
    margin-bottom: 20px;
}
.invoice-brand h2 {
    font-size: 22px;
    font-weight: 800;
    color: #312E81;
    margin: 0;
}
.invoice-brand p {
    font-size: 12px;
    color: #64748B;
    margin: 2px 0 0 0;
}
.invoice-meta {
    text-align: right;
}
.invoice-meta .invoice-num {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
}
.invoice-meta .invoice-date {
    font-size: 11px;
    color: #64748B;
}
.invoice-meta .invoice-status {
    font-size: 11px;
    font-weight: 700;
    color: #15803D;
    text-transform: uppercase;
}
.invoice-summary-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.invoice-sum-col {
    display: flex;
    flex-direction: column;
}
.invoice-sum-col .sum-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
}
.invoice-sum-col .sum-val-usd {
    font-size: 18px;
    font-weight: 800;
    color: #15803D;
}
.invoice-sum-col .sum-val-ves {
    font-size: 18px;
    font-weight: 800;
    color: #1D4ED8;
}
.invoice-sum-col .sum-val-rate {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.invoice-cat-heading {
    font-size: 12px;
    font-weight: 800;
    color: #312E81;
    border-bottom: 1.5px solid #A5B4FC;
    padding-bottom: 4px;
    margin: 20px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 11.5px;
}
.invoice-table th {
    background: #3730A3;
    color: #FFFFFF;
    font-weight: 700;
    text-align: left;
    padding: 6px 10px;
    border: 1px solid #E2E8F0;
}
.invoice-table td {
    padding: 6px 10px;
    border: 1px solid #E2E8F0;
    color: #1E293B;
}
.invoice-table tr:nth-child(even) td {
    background: #F8FAFC;
}
.invoice-footer {
    border-top: 1px solid #CBD5E1;
    padding-top: 10px;
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748B;
}

@media print {
    /* Reset body and page */
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        overflow: visible !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #app-container, .sidebar, .topbar, .toast-container, .modal:not(#invoice-modal) {
        display: none !important;
    }

    #invoice-modal {
        display: block !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    #invoice-modal .modal-content {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    #invoice-modal .modal-header,
    #invoice-modal .close-modal,
    #btn-print-invoice {
        display: none !important;
    }

    #invoice-printable-container {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .invoice-printable {
        display: block !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        border: none !important;
        font-size: 11pt !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    .invoice-top {
        border-bottom: 2px solid #3730A3 !important;
    }

    .invoice-brand h2 {
        color: #312E81 !important;
    }

    .invoice-table {
        width: 100% !important;
        page-break-inside: auto;
    }

    .invoice-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .invoice-table th {
        background-color: #3730A3 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .invoice-cat-heading {
        color: #312E81 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-after: avoid;
    }

    .invoice-summary-box {
        background-color: #F8FAFC !important;
        border: 1px solid #CBD5E1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-inside: avoid;
    }
}


/* Responsive Mobile & PWA Design */
@media (max-width: 768px) {
    body {
        overflow-y: auto !important;
    }
    
    #auth-view {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        padding: 20px 12px 40px;
    }
    
    .auth-card {
        padding: 22px 16px;
    }

    #main-layout {
        flex-direction: column;
    }
    
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .topbar-right .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .scrollable-content {
        padding: 16px 16px 85px;
    }

    .sidebar {
        width: 100%;
        height: 64px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 1000;
        background: rgba(15, 23, 42, 0.98);
        border-top: 1px solid var(--surface-border);
        border-right: none;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        animation: none !important;
        transform: none !important;
    }

    .sidebar-header, .user-profile, .sidebar > div:not(.sidebar-footer) {
        display: none !important;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        width: max-content;
        margin: 0;
        padding: 0;
        height: 100%;
    }

    .sidebar-footer {
        display: flex;
        flex-direction: row;
        margin: 0;
        padding: 0;
        height: 100%;
    }

    .nav-item {
        padding: 4px 10px;
        border-radius: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        min-width: 62px;
        height: 100%;
        font-size: 0.68rem;
        gap: 3px;
    }
    
    .nav-item i {
        font-size: 1.1rem;
        margin-right: 0;
    }
    
    .nav-item.active {
        background: transparent;
        color: var(--primary);
        border-left: none;
        border-top: 2px solid var(--primary);
    }

    .dashboard-header {
        grid-template-columns: 1fr;
    }

    .exchange-cards {
        flex-direction: column;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .modal-content {
        width: 100%;
        margin: 8px;
        padding: 16px;
    }

    .glass-card {
        padding: 16px;
    }
}

/* =========================================================
   BULK PRICE TRACKER & SCRAPER STYLES
   ========================================================= */
.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.badge-diff-up {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-diff-down {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-diff-equal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.15);
    color: #94A3B8;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-diff-error {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    font-size: 0.75rem;
    font-weight: 600;
}

.scrape-preview-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.25s ease-in-out;
}

.scrape-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 6px;
}

.scrape-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
}

/* ========================================================= */
/* SAVINGS GOAL & DUAL METRICS SIMULATOR (WEB)               */
/* ========================================================= */

.savings-goal-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.savings-goal-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
}

.goal-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.goal-icon-badge {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(79, 70, 229, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.goal-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin: 12px 0;
    position: relative;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4F46E5, #06B6D4, #10B981);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.goal-stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 10px 14px;
}
.goal-stat-box .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.goal-stat-box .stat-val {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 2px;
}

.dual-metrics-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.metric-pill i {
    color: var(--info);
}

/* Emoji Picker */
.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.emoji-choice-btn {
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.emoji-choice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}
.emoji-choice-btn.active {
    background: rgba(79, 70, 229, 0.2);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Category Badges */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: #E2E8F0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.category-badge.cat-food { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border-color: rgba(245, 158, 11, 0.3); }
.category-badge.cat-pet { background: rgba(16, 185, 129, 0.15); color: #34D399; border-color: rgba(16, 185, 129, 0.3); }
.category-badge.cat-health { background: rgba(239, 68, 68, 0.15); color: #F87171; border-color: rgba(239, 68, 68, 0.3); }
.category-badge.cat-fun { background: rgba(168, 85, 247, 0.15); color: #C084FC; border-color: rgba(168, 85, 247, 0.3); }
.category-badge.cat-transport { background: rgba(6, 182, 212, 0.15); color: #22D3EE; border-color: rgba(6, 182, 212, 0.3); }
.category-badge.cat-services { background: rgba(59, 130, 246, 0.15); color: #60A5FA; border-color: rgba(59, 130, 246, 0.3); }
.category-badge.cat-fashion { background: rgba(236, 72, 153, 0.15); color: #F472B6; border-color: rgba(236, 72, 153, 0.3); }
.category-badge.cat-supermarket { background: rgba(249, 115, 22, 0.15); color: #FB923C; border-color: rgba(249, 115, 22, 0.3); }
.category-badge.cat-education { background: rgba(99, 102, 241, 0.15); color: #818CF8; border-color: rgba(99, 102, 241, 0.3); }
.category-badge.cat-maintenance { background: rgba(148, 163, 184, 0.15); color: #CBD5E1; border-color: rgba(148, 163, 184, 0.3); }
.category-badge.cat-salary { background: rgba(16, 185, 129, 0.15); color: #34D399; border-color: rgba(16, 185, 129, 0.3); }
.category-badge.cat-business { background: rgba(20, 184, 166, 0.15); color: #2DD4BF; border-color: rgba(20, 184, 166, 0.3); }
.category-badge.cat-gift { background: rgba(244, 63, 94, 0.15); color: #FB7185; border-color: rgba(244, 63, 94, 0.3); }
.category-badge.cat-savings { background: rgba(234, 179, 8, 0.15); color: #FACC15; border-color: rgba(234, 179, 8, 0.3); }
.category-badge.cat-invest { background: rgba(139, 92, 246, 0.15); color: #A78BFA; border-color: rgba(139, 92, 246, 0.3); }
.category-badge.cat-debt { background: rgba(59, 130, 246, 0.15); color: #93C5FD; border-color: rgba(59, 130, 246, 0.3); }
.category-badge.cat-loan { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border-color: rgba(245, 158, 11, 0.3); }
.category-badge.cat-emergency { background: rgba(239, 68, 68, 0.18); color: #FCA5A5; border-color: rgba(239, 68, 68, 0.35); }
.category-badge.cat-transfer { background: rgba(99, 102, 241, 0.15); color: #A5B4FC; border-color: rgba(99, 102, 241, 0.3); }
.category-badge.cat-installment { background: rgba(217, 119, 6, 0.15); color: #F59E0B; border-color: rgba(217, 119, 6, 0.3); }
.category-badge.cat-other { background: rgba(255, 255, 255, 0.08); color: #E2E8F0; border-color: rgba(255, 255, 255, 0.16); }

/* Quick Category Chips in Modal */
.quick-category-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px 8px;
}
.btn-category-chip {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-category-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-category-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Transaction Detail Item clickable hover */
.transaction-item {
    cursor: pointer;
}
.transaction-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Quick Date Presets Bar */
.date-presets-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.preset-date-btn {
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}
.preset-date-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* ========================================================= */
/* ESTILOS HERO DASHBOARD Y MASCOTA 3D (MOBILE APP ALIGNMENT) */
/* ========================================================= */

#dashboard-content {
    max-width: 940px;
    margin: 0 auto;
}

.dashboard-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #1d4ed8 100%);
    border-radius: 26px;
    padding: 22px 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Ambient light bubbles */
.hero-bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.hero-bubble-1 {
    width: 140px;
    height: 140px;
    top: -40px;
    right: -20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}
.hero-bubble-2 {
    width: 110px;
    height: 110px;
    bottom: -30px;
    left: 40px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

.dash-hero-header,
.dash-hero-balance-row,
.dash-symmetric-cards-grid,
.dash-stat-pills-row,
#savings-goal-card-container {
    position: relative;
    z-index: 1;
}

/* Fila 1: Header Bar */
.dash-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.dash-greeting-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
}
.dash-greeting-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2px 0 0;
    letter-spacing: -0.3px;
}
.dash-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dash-household-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.dash-household-pill:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-1px);
}
.dash-cycle-icon {
    font-size: 0.75rem;
    opacity: 0.8;
}
.dash-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    font-size: 0.88rem;
}
.dash-icon-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px) scale(1.06);
}
#dash-btn-refresh-rates:hover {
    transform: rotate(180deg);
}
.dash-btn-nuevo,
.btn-pill-white {
    background: white !important;
    color: #1e3a8a !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    padding: 6px 16px !important;
    font-size: 0.86rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.dash-btn-nuevo:hover,
.btn-pill-white:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22) !important;
}

/* Fila 2: Saldo Total y Mascota */
.dash-hero-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.dash-saldo-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    font-weight: 500;
}
.dash-saldo-total {
    font-size: 2.7rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-top: 2px;
}

/* Cochinito Medallion Widget */
.cochinito-mascot-container {
    cursor: pointer;
}
.cochinito-medallion-wrap {
    position: relative;
    width: 76px;
    height: 76px;
    transition: transform 0.2s ease;
}
.cochinito-medallion-wrap:hover {
    transform: scale(1.06);
}
.cochinito-aura {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}
.cochinito-medallion {
    position: relative;
    z-index: 1;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: white;
    border: 2.5px solid white;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    @media (prefers-reduced-motion: no-preference) {
        animation: cochinitoFloat 2.4s ease-in-out infinite alternate;
    }
}
.cochinito-avatar-img {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    object-fit: contain;
}
.cochinito-mini-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    line-height: 1;
}

@keyframes cochinitoFloat {
    0% { transform: translateY(-3px); }
    100% { transform: translateY(3px); }
}

/* Fila 3: Cuadros Simétricos (Saldo en Bs y Tasas de Cambio) */
.dash-symmetric-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.dash-symmetric-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.11) 100%);
    border: 1.2px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.dash-sym-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.dash-sym-primary {
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    margin: 4px 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-sym-approx {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}
.dash-sym-sub-breakdown {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.dash-rates-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.9);
}
.dash-rate-item.highlight {
    font-weight: 700;
    color: #fff;
}

/* Fila 5: Píldoras de Estadísticas Rápidas */
.dash-stat-pills-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}
.dash-stat-pill {
    background: rgba(255, 255, 255, 0.18);
    border: 1.1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.dash-stat-pill:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.dash-pill-icon-box {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.pill-savings-icon { background: rgba(74, 222, 128, 0.22); color: #4ADE80; }
.pill-expenses-icon { background: rgba(248, 113, 113, 0.22); color: #F87171; }
.pill-loans-icon { background: rgba(251, 191, 36, 0.22); color: #FBBF24; }
.dash-pill-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.78);
    display: block;
    line-height: 1.2;
}
.dash-pill-amount {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    display: block;
    line-height: 1.2;
}

/* Acceso Rápido: Servicios del Mes */
.dash-services-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    margin-bottom: 16px;
}
.dash-services-card:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}
.dash-services-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-services-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.15);
    color: #38BDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.dash-services-text h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}
.dash-services-text p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.dash-services-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-services-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}
.dash-services-arrow {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Barra de Búsqueda Rápida en Dashboard */
.dash-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}
.dash-search-bar {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    padding: 4px 16px;
    transition: border-color 0.2s;
}
.dash-search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.25);
}
.dash-search-icon {
    color: var(--text-secondary);
    margin-right: 10px;
    font-size: 0.9rem;
}
.dash-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 0.92rem;
    padding: 8px 0;
}
.dash-filter-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: #818CF8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    font-size: 0.95rem;
}
.dash-filter-btn:hover {
    background: rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

/* Modal de Diagnóstico de El Cochinito */
.cochinito-modal-content {
    max-width: 480px;
    border-radius: 26px;
    padding: 22px;
    text-align: center;
}
.cochinito-modal-emoji {
    font-size: 1.8rem;
    line-height: 1;
}
.cochinito-modal-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}
.cochinito-3d-wrapper {
    position: relative;
    padding: 6px;
}
.cochinito-3d-img {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    border: 3.5px solid white;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cochinito-3d-img.wiggle-active {
    animation: cochinitoWiggle 0.45s ease-in-out;
}

@keyframes cochinitoWiggle {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-8deg); }
    50% { transform: scale(1.1) rotate(8deg); }
    75% { transform: scale(1.05) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.cochinito-speech-bubble {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #f1f5f9;
    text-align: left;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.cochinito-speech-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent rgba(255, 255, 255, 0.16) transparent;
}

.cochinito-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}
.cochinito-metric-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 10px 12px;
    text-align: left;
}
.cochinito-metric-card .metric-label {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}
.cochinito-metric-card .metric-val {
    font-size: 1.05rem;
    font-weight: 800;
    display: block;
}

.cochinito-tip-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #fde68a;
    text-align: left;
}

/* Modal Tabs */
.modal-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.modal-tab-btn.active {
    background: var(--primary);
    color: white;
}

/* Modern Mobile-Style Transaction Cards */
.modern-tx-card {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 12px 16px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.modern-tx-card:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.16) !important;
}
.tx-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.tx-avatar-income {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1.5px solid #86efac !important;
}
.tx-avatar-expense {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1.5px solid #fca5a5 !important;
}
.tx-avatar-loan {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1.5px solid #fde68a !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-hero {
        padding: 18px 16px;
        border-radius: 20px;
    }
    .dash-saldo-total {
        font-size: 2.1rem;
    }
    .dash-symmetric-cards-grid {
        grid-template-columns: 1fr;
    }
    .dash-stat-pills-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================================= */
/* HOUSEHOLD COLOR CUSTOMIZATION & LIVE PREVIEW (MATCHING FLUTTER) */
/* ========================================================= */
.household-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 6px 2px;
}

.color-swatch-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.color-swatch-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.color-swatch-btn.selected {
    border-color: #ffffff !important;
    transform: scale(1.12);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.65);
}

.color-swatch-btn i {
    pointer-events: none;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.color-swatch-btn.selected i {
    opacity: 1;
    transform: scale(1);
}

/* Mini Live Preview Card */
.household-preview-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(30, 136, 229, 0.08);
    border: 1.5px solid #1E88E5;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.eh-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1E88E5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: background-color 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.eh-preview-info {
    flex: 1;
    min-width: 0;
}

.eh-preview-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eh-preview-sub {
    font-size: 0.78rem;
    color: var(--text-secondary, #94a3b8);
    margin-top: 2px;
}

.eh-preview-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #cbd5e1);
    font-weight: 600;
}

/* ==========================================================================
   Brand Logo & Animated Startup Splash Screen Overlay (Web)
   ========================================================================== */
.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.auth-header .logo-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    padding: 2px;
    background: white;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.sidebar-header .logo-icon.small {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 1.5px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.splash-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #172554 0%, #0b132b 55%, #050a17 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    opacity: 1;
    visibility: visible;
}

.splash-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-overlay.fade-out * {
    animation: none !important;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 380px;
    padding: 24px;
}

.splash-mascot-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.splash-ambient-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(37, 99, 235, 0.15) 50%, transparent 70%);
    pointer-events: none;
    @media (prefers-reduced-motion: no-preference) {
        animation: splashPulse 2s ease-in-out infinite alternate;
    }
}

.splash-orbital-ring {
    position: absolute;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 2px dashed rgba(56, 189, 248, 0.45);
    border-top-color: #38bdf8;
    border-right-color: #60a5fa;
    pointer-events: none;
    @media (prefers-reduced-motion: no-preference) {
        animation: ringSpin 6s linear infinite;
    }
}

.splash-mascot-circle {
    position: relative;
    width: 142px;
    height: 142px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.45), 0 0 20px rgba(37, 99, 235, 0.3);
    @media (prefers-reduced-motion: no-preference) {
        animation: splashBreathing 2.2s ease-in-out infinite alternate;
    }
}

.splash-mascot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.splash-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #bae6fd 60%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 6px;
}

.splash-subtitle {
    font-size: 0.9rem;
    color: #93c5fd;
    margin: 0 0 26px;
    opacity: 0.9;
}

.splash-progress-track {
    width: 190px;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.splash-progress-bar {
    height: 100%;
    width: 40%;
    border-radius: 10px;
    background: linear-gradient(90deg, #38bdf8, #2563eb, #60a5fa);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
    animation: splashProgressIndeterminate 1.8s ease-in-out infinite;
}

.splash-status {
    font-size: 0.8rem;
    color: #94a3b8;
    letter-spacing: 0.2px;
    margin: 0;
}

@keyframes splashPulse {
    0% { transform: scale(0.9); opacity: 0.55; }
    100% { transform: scale(1.15); opacity: 0.95; }
}

@keyframes splashBreathing {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.03); }
}

@keyframes ringSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes splashProgressIndeterminate {
    0% { transform: translateX(-100%); width: 30%; }
    50% { width: 60%; }
    100% { transform: translateX(200%); width: 30%; }
}

/* Interactive Rates Card, Cochinito Voice Chat & Cashea Web Parity */
.dash-symmetric-card-interactive {
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.dash-symmetric-card-interactive:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.voice-draft-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.voice-draft-card.is-saved {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.08);
}
.voice-mic-listening {
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
    color: #fff !important;
    border-color: transparent !important;
    @media (prefers-reduced-motion: no-preference) {
        animation: voiceMicPulse 1.2s ease-in-out infinite;
    }
}
@keyframes voiceMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.cashea-purchase-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 16px;
}
.cashea-progress-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin: 10px 0 12px;
}
.cashea-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #F59E0B, #10B981);
    transition: width 0.3s ease;
}
.cashea-installment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 9px 12px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.cashea-installment-row.is-paid {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.06);
}
.cashea-installment-row.is-partial {
    border-color: rgba(56, 189, 248, 0.32);
}

.cochinito-hero-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.cochinito-mic-hero-btn,
.cochinito-mic-circle-btn {
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.38);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cochinito-mic-hero-btn {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    flex-shrink: 0;
}
.cochinito-mic-circle-btn {
    position: absolute;
    right: -8px;
    bottom: 4px;
    width: 42px;
    height: 42px;
    border: 2.5px solid #fff;
    font-size: 1.05rem;
}
.cochinito-mic-hero-btn:hover,
.cochinito-mic-circle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.52);
}

/* Responsive Tables & Container Queries */
.table-container {
    container-type: inline-size;
    overflow: auto;
    max-inline-size: 100%;
}
.table-container table {
    border-collapse: separate;
    border-spacing: 0;
}
.table-container thead {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
}
#current-view-title {
    width: fit-content;
}

@media (prefers-reduced-motion: reduce) {
    dialog.native-dialog,
    dialog.native-dialog::backdrop {
        transition-duration: 0.1s;
    }
    .splash-progress-bar {
        animation-duration: 12s;
    }
}
