/* Reset and Base Styles */
:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-light: #d1fae5;
    --secondary-color: #3b82f6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Helper Classes */
.hidden {
    display: none !important;
}

/* Header */
.top-bar {
    height: 60px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.brand-name .highlight {
    color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--danger-color);
    background-color: #fee2e2;
}

/* Plan Badges & Header Shortcut */
.plan-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

.plan-badge.free {
    background-color: #e2e8f0;
    color: #475569;
}

.plan-badge.premium {
    background-color: #fef3c7;
    color: #d97706;
}

.plan-badge.pro {
    background-color: #d1fae5;
    color: #047857;
}

.btn-share-header {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.3);
    transition: transform 0.2s;
}

.btn-share-header:hover {
    transform: scale(1.03);
}

.btn-plans-shortcut {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* Plan Preview Selector Buttons on Auth Screen */
.btn-plan-select {
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background-color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-plan-select.active {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: #065f46;
}

/* Live Plan Quota & Consumption Panel */
.plan-quota-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.quota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.quota-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.quota-title .title-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.btn-quota-upgrade {
    background-color: var(--primary-light);
    color: var(--primary-hover);
    border: 1px solid var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quota-upgrade:hover {
    background-color: var(--primary-color);
    color: white;
}

.quota-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quota-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quota-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.73rem;
    color: var(--text-secondary);
}

.quota-info span i {
    color: var(--primary-color);
    margin-right: 4px;
}

.quota-info strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 800;
}

.progress-bar-bg.sm {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill.warning {
    background-color: #f59e0b;
}

.progress-bar-fill.info {
    background-color: #3b82f6;
}

.progress-bar-fill.purple {
    background-color: #8b5cf6;
}

.quota-pill {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary-hover);
    background-color: var(--primary-light);
    padding: 2px 6px;
    border-radius: 6px;
    width: fit-content;
    margin-top: 2px;
}

/* Red Sinpe Limit Notification & Low Balance Banners */
.sinpe-red-alert-banner, .sinpe-low-balance-banner {
    background-color: #fef2f2;
    border: 1.5px solid #ef4444;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1);
    flex-wrap: wrap;
}

.sinpe-red-alert-banner .alert-icon, .sinpe-low-balance-banner .alert-icon {
    font-size: 1.4rem;
    color: #ef4444;
}

.sinpe-red-alert-banner .alert-content strong, .sinpe-low-balance-banner .alert-content strong {
    display: block;
    font-size: 0.85rem;
    color: #991b1b;
    margin-bottom: 2px;
}

.sinpe-red-alert-banner .alert-content p, .sinpe-low-balance-banner .alert-content p {
    font-size: 0.78rem;
    color: #7f1d1d;
    line-height: 1.35;
}

.btn-alert-action {
    background: var(--danger-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-alert-action:hover {
    background: #dc2626;
}

/* SINPEPAY BADGE & BANNER CARD */
.sinpepay-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

.sinpepay-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.sinpepay-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.sinpepay-banner-card {
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 20px;
}

.sinpepay-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.sinpepay-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-info-sm {
    background: transparent;
    border: none;
    color: #047857;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.sinpepay-desc {
    font-size: 0.85rem;
    color: #047857;
    margin: 0;
}

/* GREEN CHECKBOXES FOR SYSTEM PREFERENCES */
.green-checkbox, input[type="checkbox"] {
    accent-color: var(--primary-color) !important;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* FORM ROW & CARDS LIST GRID */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 480px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

.cards-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.card-item-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.card-item-chip .card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-item-chip .btn-delete-card {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
}

/* FLOATING 30-DAY COUNTDOWN TIMER & DISCOUNT WELCOME BANNER */
.floating-timer-bar {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    padding: 10px 16px;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.3s ease;
}

.timer-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timer-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.timer-text {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
}

.timer-text strong {
    font-size: 0.85rem;
    color: #ffffff;
}

.timer-text span {
    color: #94a3b8;
}

.timer-progress-bar {
    width: 100%;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.timer-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* BANNER PRIMERA VEZ: SUBIR FACTURAS DE LOS ÚLTIMOS 3 DÍAS */
.first-time-sync-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1.5px solid #3b82f6;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 20px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    animation: fadeIn 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.first-time-sync-card .sync-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.first-time-sync-card .sync-card-info strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.first-time-sync-card .sync-card-info p {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
}

.btn-sync-3days {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    border: none;
    padding: 13px 18px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
}

.btn-sync-3days:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

.sync-loader-wrap {
    background: rgba(15, 23, 42, 0.7);
    border: 1px dashed #60a5fa;
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.82rem;
    color: #93c5fd;
    font-weight: 600;
}

.sync-loader-wrap i {
    font-size: 1.1rem;
    color: #3b82f6;
}

.discount-welcome-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 2px solid #f59e0b;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 99;
    animation: fadeIn 0.3s ease;
}

.banner-gift-icon {
    font-size: 1.5rem;
    color: #d97706;
}

.banner-text {
    flex: 1;
}

.banner-text strong {
    display: block;
    font-size: 0.85rem;
    color: #92400e;
}

.banner-text p {
    font-size: 0.75rem;
    color: #78350f;
    margin: 0;
}

.btn-close-banner {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #92400e;
    cursor: pointer;
}

/* REFERRAL FULL-SCREEN CENTERED MODAL STYLES */
.referral-modal-card {
    max-width: 420px;
    padding: 30px 24px;
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
    border: 2px solid #a7f3d0;
    box-shadow: var(--shadow-lg);
}

.referral-hero-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.applied-coupon-pill {
    background: #d1fae5;
    color: #065f46;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

/* SHARE QR BOX & COUPONS BADGE */
.share-coupons-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.coupons-counter-pill {
    background: #fce7f3;
    color: #be185d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.qr-share-box {
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    margin-top: 10px;
}

.qr-img-frame {
    width: 150px;
    height: 150px;
    margin: 0 auto 10px;
    background: white;
    padding: 8px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.qr-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-link-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
    word-break: break-all;
    font-family: monospace;
}

/* GROUP PLANS & SLOTS WITH STATUS TRACKER ✓ $ ✓ STYLES */
.joined-group-banner {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 14px;
}

.joined-banner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #065f46;
}

.group-slots-container {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.active-plan-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.active-plan-status-header h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.active-plan-timer-pill {
    background: #fef3c7;
    color: #d97706;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
}

.slots-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slot-item-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slot-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-number-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.status-tracker-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.tracker-step {
    font-size: 0.85rem;
    font-weight: 800;
    color: #cbd5e1; /* Grey by default */
    transition: color 0.3s ease;
}

.tracker-step.active {
    color: #10b981; /* Green when active */
}

.slot-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 480px) {
    .slot-inputs-row {
        grid-template-columns: 1fr;
    }
}

.slot-actions-row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* GROUP PLANS CARD STYLES */
.group-plan-card {
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
}

.group-plan-card.amigos {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.group-plan-card.familia {
    border-color: #fde68a;
    background: #fffbeb;
}

.gplan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.gplan-header h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.gplan-tag {
    font-size: 0.68rem;
    font-weight: 800;
    background: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 10px;
}

.gplan-tag.gold {
    background: #fef3c7;
    color: #b45309;
}

.gplan-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 10px;
}

.btn-primary.gold-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-primary.gold-btn:hover {
    background: #d97706;
}

/* ACCORDION STYLES FOR SECTIONS IN MI CUENTA */
.accordion-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-chevron {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.accordion-card.collapsed .accordion-chevron {
    transform: rotate(-90deg);
}

.accordion-body {
    transition: all 0.3s ease;
    overflow: hidden;
}

.accordion-card.collapsed .accordion-body {
    display: none !important;
}

/* GOOGLE WORKSPACE SHORTCUTS (DRIVE & SHEETS) */
.google-workspace-shortcuts-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.shortcuts-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-workspace-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
}

.btn-workspace-link.drive {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.btn-workspace-link.drive i.fa-google-drive {
    color: #10b981;
    font-size: 1.6rem;
}

.btn-workspace-link.sheets {
    border-color: #bae6fd;
    background: #f0f9ff;
}

.btn-workspace-link.sheets i.fa-table-cells {
    color: #0284c7;
    font-size: 1.6rem;
}

.btn-workspace-link .link-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.btn-workspace-link .link-info strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-workspace-link .link-info span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-workspace-link .external-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-workspace-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Account & Settings Tab Styles */
.account-profile-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.account-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.account-user-details h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.account-user-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.settings-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.settings-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 16px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.85rem;
    border-bottom: 1px dashed var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

/* Subscription Plans Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    padding: 20px;
    animation: popIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.plans-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-card {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    position: relative;
    background-color: var(--bg-color);
}

.plan-card.premium {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.plan-card.pro {
    border-color: var(--primary-color);
    background-color: #ecfdf5;
}

.plan-badge-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 10px;
    background-color: #cbd5e1;
    color: var(--text-primary);
}

.plan-badge-tag.premium-tag {
    background-color: #f59e0b;
    color: white;
}

.plan-badge-tag.pro-tag {
    background-color: var(--primary-color);
    color: white;
}

.plan-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.plan-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.plan-price span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.plan-features li {
    font-size: 0.8rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.btn-select-modal-plan {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: white;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-select-modal-plan.primary {
    background-color: #f59e0b;
    color: white;
    border: none;
}

.btn-select-modal-plan.pro-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 90px;
}

.view-section {
    display: none;
    height: 100%;
}

.view-section.active {
    display: flex;
    flex-direction: column;
}

/* Auth Section */
#authSection {
    justify-content: center;
    padding: 30px 20px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}

.hero-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #059669);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.hero-logo i {
    font-size: 2.5rem;
    color: white;
}

.auth-hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.auth-hero p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: white;
    border: 1.5px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-google:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.google-icon {
    width: 22px;
    height: 22px;
}

.auth-notice {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Tab Sections */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary-color);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.metric-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 6px 0 4px;
}

.metric-sub {
    font-size: 0.65rem;
    color: var(--text-secondary);
    display: block;
}

/* Expenses List */
.expenses-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.filter-bar h3 {
    font-size: 1rem;
    font-weight: 700;
}

.select-input {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
}

.expenses-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.expense-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
}

.expense-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.expense-details {
    flex: 1;
    margin: 0 12px;
}

.expense-issuer {
    font-weight: 700;
    font-size: 0.95rem;
}

.expense-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.expense-amount {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Datáfono Virtual & Payments */
.sinpe-limit-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.limit-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.limit-note {
    font-size: 0.75rem;
    color: #94a3b8;
}

.payment-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.payment-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.scan-options {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-secondary {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background-color: #f1f5f9;
    color: var(--text-primary);
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-secondary.outline {
    background-color: transparent;
    border: 1px dashed #cbd5e1;
}

.qr-container {
    margin-bottom: 16px;
    background-color: black;
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 10px;
    text-align: center;
}

#qrReader {
    width: 100%;
    max-height: 250px;
}

.btn-danger {
    background-color: #fee2e2;
    color: var(--danger-color);
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-top: 8px;
    cursor: pointer;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s;
}

.input-with-icon input:focus, .input-group input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Container & Transition for Bank Selection and Payment Status Swap */
.bank-and-status-container {
    position: relative;
    width: 100%;
}

.bank-selection-step {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Payment Status Check Verde */
.payment-status-card {
    margin-top: 0;
    padding: 20px;
    background-color: var(--primary-light);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--primary-color);
    text-align: center;
    position: relative;
    animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-header-bar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.btn-change-bank {
    background: none;
    border: none;
    color: var(--primary-hover);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.btn-change-bank:hover {
    background-color: rgba(16, 185, 129, 0.15);
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.status-icon.success {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.payment-status-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #065f46;
}

.payment-status-card p {
    font-size: 0.9rem;
    color: #047857;
    margin: 6px 0 16px;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-action.sms {
    background-color: #0284c7;
    color: white;
}

.btn-action.bank {
    background-color: var(--card-bg);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
}

/* Bank Selection Grid Styles */
.bank-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.bank-select-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.bank-select-btn i {
    font-size: 1rem;
    color: var(--primary-color);
}

.bank-select-btn.active {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: #065f46;
}

/* Warranties Module */
.warranty-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.warranty-card .description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.4;
}

.warranty-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-color);
    position: relative;
    transition: border 0.2s;
}

.upload-area:hover {
    border-color: var(--primary-color);
}

.upload-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.upload-area p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-name {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.warranties-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.warranty-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.warranty-item .info h5 {
    font-size: 0.9rem;
    font-weight: 700;
}

.warranty-item .info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    width: 33.3%;
    padding: 8px 0;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.3rem;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Toast */
.toast {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: opacity 0.3s;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
