:root {
    /* Brand Colors Tecnoblen (Dark Mode Specs) */
    --color-primary: #1C2060; /* Azul Marino Tecnoblen */
    --color-accent: #E31E24;  /* Rojo Tecnoblen */
    
    /* Dark Mode Colors */
    --color-bg-app: #0d1037;   /* Fondo profundo */
    --color-bg-card: #1e2547;  /* Fondo de las cards */
    --sidebar-bg: #080e28;     /* Superficie Sidebar */
    
    /* Text Colors */
    --color-text-main: #FFFFFF;
    --color-text-muted: #94a3b8;
    --color-border: rgba(255, 255, 255, 0.1);
    
    /* Status Colors */
    --color-success: #10B981;
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-warning: #F59E0B;
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-danger: #EF4444;
    --color-danger-bg: rgba(239, 68, 68, 0.15);
    --color-info: #3B82F6;
    --color-info-bg: rgba(59, 130, 246, 0.15);

    
    /* Shadows & Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-app);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    box-shadow: 4px 0 24px rgba(22, 22, 63, 0.15);
    z-index: 10;
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo-text-blue {
    color: white; /* En el sidebar oscuro, "Tecno" es blanco */
}

.logo-text-red {
    color: var(--color-accent); /* La "c" o "blen" en rojo */
}

.logo-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 24px 16px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item i {
    margin-right: 12px;
    font-size: 20px;
}

.nav-item:hover {
    color: white;
    background-color: rgba(255,255,255,0.05);
    transform: translateX(4px);
}

.nav-item.active {
    color: white;
    background-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(225, 19, 28, 0.3);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    margin-right: 12px;
    border: 2px solid var(--color-accent);
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.built-by {
    margin-top: 12px;
    font-size: 10px;
    color: rgba(255,255,255,0.2);
    text-align: center;
    letter-spacing: 0.3px;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

/* --- Top Header --- */
.top-header {
    height: 80px;
    background-color: var(--color-bg-app);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(10px);
    background-color: rgba(13, 16, 55, 0.8);
}

.header-search {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: var(--radius-full);
    width: 350px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease;
}

.header-search:focus-within {
    box-shadow: 0 0 0 2px rgba(22, 22, 63, 0.1);
    border-color: var(--color-primary);
}

.header-search i {
    color: var(--color-text-muted);
    margin-right: 10px;
}

.header-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    color: var(--color-text-main);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-main);
    position: relative;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--color-bg-app);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--color-accent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #0F0F2D;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-accent:hover {
    background-color: #C10F17;
    box-shadow: 0 4px 12px rgba(225, 19, 28, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: var(--color-bg-app);
    border-color: var(--color-text-muted);
}

/* --- Content Area --- */
.content-wrapper {
    padding: 32px 40px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--color-text-muted);
}

/* --- Cards --- */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.card {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Glassmorphism subtle effect for cards */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.pending {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.stat-icon.urgent {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

.stat-icon.paid {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.stat-details h3 {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-details .amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.trend {
    font-size: 13px;
    font-weight: 500;
}

.trend.positive { color: var(--color-success); }
.trend.negative { color: var(--color-danger); }
.trend.neutral { color: var(--color-text-muted); }

/* --- Table --- */
.table-card {
    padding: 0;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    color: var(--color-text-main);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.provider-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--color-info-bg);
    color: var(--color-info);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.provider-name {
    font-weight: 600;
    color: var(--color-text-main);
}

.invoice-id {
    font-size: 12px;
    color: var(--color-text-muted);
}

.amount-text {
    font-weight: 700;
    color: var(--color-text-main);
}

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge.pending {
    background-color: var(--color-warning-bg);
    color: #B45309;
}

.status-badge.urgent {
    background-color: var(--color-danger-bg);
    color: #B91C1C;
    animation: pulse 2s infinite;
}

.status-badge.processing {
    background-color: var(--color-info-bg);
    color: #1D4ED8;
}

.status-badge.paid {
    background-color: var(--color-success-bg);
    color: #047857;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- Utilities --- */
.hidden { display: none !important; }

/* --- Coming Soon --- */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--color-text-muted);
    text-align: center;
    gap: 12px;
}
.coming-soon i { font-size: 56px; opacity: 0.3; }
.coming-soon h2 { font-size: 22px; color: var(--color-text-main); }
.coming-soon p { font-size: 14px; }

/* --- Banks Section --- */
.banks-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.security-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 13px;
    color: #93c5fd;
    flex: 1;
    margin-right: 16px;
}
.security-notice i { font-size: 18px; flex-shrink: 0; }

.bank-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Tarjeta banco estilo credit card */
.bank-card {
    background: linear-gradient(135deg, #1e2547 0%, #0d1037 100%);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}
.bank-card.is-default {
    border-color: rgba(227,30,36,0.4);
    box-shadow: 0 0 0 1px rgba(227,30,36,0.2);
}
.bank-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.02);
    border-radius: 50%;
}
.bank-card::after {
    content: '';
    position: absolute;
    bottom: -30px; right: 20px;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.02);
    border-radius: 50%;
}

.bank-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}
.bank-name-label {
    font-size: 18px;
    font-weight: 700;
    color: white;
}
.bank-type-label {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
}
.bank-chip {
    width: 36px; height: 28px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 5px;
    opacity: 0.8;
}

.bank-number {
    font-size: 18px;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    font-family: monospace;
}

.bank-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.bank-alias {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bank-alias strong {
    display: block;
    font-size: 13px;
    color: white;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    margin-top: 2px;
}
.bank-currency-badge {
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
}

.bank-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.bank-action-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-family);
    transition: all 0.2s;
}
.bank-action-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}
.bank-action-btn.danger:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #f87171;
}
.default-badge {
    background: rgba(227,30,36,0.2);
    border: 1px solid rgba(227,30,36,0.4);
    color: #fca5a5;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-banks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--color-text-muted);
    text-align: center;
    gap: 10px;
}
.empty-banks i { font-size: 48px; opacity: 0.2; }
.empty-banks p { font-size: 16px; color: var(--color-text-main); }
.empty-banks span { font-size: 13px; }

/* Checkbox custom */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-main);
}
.checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--color-accent);
}

/* --- Charts --- */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.chart-card .card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.chart-wrapper {
    padding: 20px 24px 24px;
    position: relative;
    height: 260px;
}

/* --- Form --- */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: var(--color-bg-app);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--color-text-main);
    font-family: var(--font-family);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--color-accent);
}

.form-input option {
    background: var(--color-bg-card);
    color: var(--color-text-main);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(22, 22, 63, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    color: var(--color-text-main);
}

.modal-header button {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.auth-details {
    background-color: var(--color-bg-app);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.auth-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.auth-row:last-child {
    margin-bottom: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--color-border);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-text-main);
}

.auth-label { color: var(--color-text-muted); }
.auth-value { font-weight: 600; }

.auth-security {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background-color: var(--color-info-bg);
    border-radius: var(--radius-md);
    color: #1E3A8A;
    font-size: 13px;
}

.auth-security i {
    font-size: 20px;
    color: var(--color-info);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* ============================================
   RESPONSIVE — BASE FIXES (todos los tamaños)
   ============================================ */

/* Evitar overflow horizontal global */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
.dashboard-container {
    overflow-x: hidden;
    max-width: 100%;
}

/* Mobile header — oculto en desktop */
.mobile-header {
    display: none;
}

/* Bottom nav — oculto en desktop */
.bottom-nav {
    display: none;
}

/* Sidebar backdrop — oculto por defecto */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 199;
    backdrop-filter: blur(4px);
}
.sidebar-backdrop.active { display: block; }

/* Sidebar toggle (hamburguesa) — oculto en desktop */
.sidebar-toggle {
    display: none;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.12); }

/* ============================================
   BREAKPOINT TABLET/MOBILE ≤ 900px
   ============================================ */
@media (max-width: 900px) {

    /* ---- Sidebar: overlay deslizante ---- */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
    }
    .sidebar.open { transform: translateX(0); }

    /* ---- Layout principal: sin margen de sidebar ---- */
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* ---- Header desktop: oculto en mobile ---- */
    .top-header { display: none; }

    /* ---- Header mobile: visible ---- */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        height: 60px;
        background-color: rgba(8, 14, 40, 0.95);
        position: sticky;
        top: 0;
        z-index: 10;
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--color-border);
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .mobile-logo {
        font-size: 24px;
        font-weight: 800;
        letter-spacing: -0.5px;
        display: flex;
    }
    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* ---- Bottom nav: visible en mobile ---- */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background-color: var(--sidebar-bg);
        border-top: 1px solid var(--color-border);
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: rgba(255,255,255,0.45);
        text-decoration: none;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.3px;
        transition: color 0.2s;
        padding: 8px 4px;
    }
    .bottom-nav-item i {
        font-size: 22px;
        transition: color 0.2s;
    }
    .bottom-nav-item.active {
        color: var(--color-accent);
    }
    .bottom-nav-item:active {
        background: rgba(255,255,255,0.04);
    }

    /* ---- Contenido: padding inferior para bottom nav ---- */
    .content-wrapper {
        padding: 20px 14px 88px;
        width: 100%;
        box-sizing: border-box;
    }

    /* ---- Page header ---- */
    .page-header {
        margin-bottom: 20px;
    }
    .page-header h1 { font-size: 21px; }
    .page-header p { font-size: 13px; }

    /* ---- Summary cards: 1 columna ---- */
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }
    .stat-card { padding: 16px; }
    .stat-icon { width: 48px; height: 48px; font-size: 22px; flex-shrink: 0; }
    .stat-details .amount { font-size: 24px; }

    /* ---- Charts: 1 columna ---- */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }
    .chart-wrapper { height: 220px; padding: 16px; }

    /* ---- Tables ---- */
    .data-table th,
    .data-table td {
        padding: 11px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* ---- Bank cards ---- */
    .bank-cards-grid { grid-template-columns: 1fr; }
    .banks-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .security-notice { margin-right: 0; }

    /* ---- Formularios ---- */
    .form-row { grid-template-columns: 1fr; }

    /* ---- Modals: bottom sheet ---- */
    .modal-overlay { align-items: flex-end; }
    .modal-content {
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 92dvh;
        overflow-y: auto;
    }
    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
    .modal-body { padding: 18px; }
    .modal-header { padding: 16px 18px; }
    .modal-footer { padding: 14px 18px; }

    /* ---- Config cards ---- */
    .card[style*="max-width:500px"] { max-width: 100% !important; }
}
