/* ========================================
   VARIABLES & DESIGN SYSTEM
======================================== */
:root {
    /* Colors - Mejorados */
    --primary: #0066CC;
    --primary-dark: #004C99;
    --primary-light: #3385D6;
    --secondary: #00B894;
    --accent: #FF6B6B;
    --warning: #F39C12;
    --success: #27AE60;
    --danger: #E74C3C;
    --gold: #FFD93D;
    
    /* Neutrals */
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    /* Shadows - Mejorados */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 102, 204, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-900);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   PAGE LOADER
======================================== */
.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 99999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-loader p {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

/* ========================================
   SCREENS
======================================== */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   LOGIN SCREEN
======================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    top: -450px;
    right: -450px;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    bottom: -350px;
    left: -350px;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, 30px);
    }
}

.login-container {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: var(--radius-2xl);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-2xl);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-lg), var(--shadow-glow);
    }
    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-xl), 0 0 30px rgba(0, 102, 204, 0.4);
    }
}

.brand-logo svg {
    width: 40px;
    height: 40px;
    color: white;
}

.login-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header h1 span {
    color: var(--primary);
}

.tagline {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
}

/* ========================================
   FORMS
======================================== */
.login-form,
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: 0.3px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.1rem;
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
    transition: color var(--transition-base);
}

.input-container input,
.input-container select {
    width: 100%;
    padding: 1rem 1.1rem 1rem 3.2rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-900);
    background: white;
    transition: all var(--transition-base);
    font-weight: 500;
}

.input-container input:focus,
.input-container select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    transform: translateY(-1px);
}

.input-container input:focus ~ .input-icon {
    color: var(--primary);
}

.input-help {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: -0.25rem;
    font-weight: 500;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: all var(--transition-base);
    border-radius: var(--radius-sm);
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(0, 102, 204, 0.05);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.eye-closed {
    display: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-top: -0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    color: var(--gray-700);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.checkbox-label:hover {
    color: var(--primary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    transform: scale(1.1);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::before {
    content: '✓';
    color: white;
    font-size: 15px;
    font-weight: 800;
}

.link-recovery {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.link-recovery:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ========================================
   BUTTONS
======================================== */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.1rem 1.8rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.1rem 1.8rem;
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.register-link {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.register-link a:hover {
    text-decoration: underline;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--gray-200);
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0.8;
    transition: all var(--transition-base);
}

.badge:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.badge svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.badge span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ========================================
   DASHBOARD HEADER
======================================== */
.main-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.brand-mini {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.brand-mini:hover {
    transform: rotate(5deg) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.brand-mini svg {
    width: 26px;
    height: 26px;
    color: white;
}

.brand-text h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.points-display {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.2) 0%, rgba(255, 193, 7, 0.2) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 217, 61, 0.4);
    transition: all var(--transition-base);
}

.points-display:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.points-display svg {
    width: 24px;
    height: 24px;
    color: var(--gold);
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
}

.points-display span {
    font-size: 1.2rem;
    font-weight: 800;
    color: #D4AF37;
    font-family: var(--font-display);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.user-info:hover {
    background: var(--gray-50);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.user-info:hover .user-avatar {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.user-dni {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.4rem;
    background: transparent;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-logout:hover {
    background: linear-gradient(135deg, var(--danger) 0%, #C0392B 100%);
    border-color: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-logout svg {
    width: 19px;
    height: 19px;
}

/* ========================================
   SECTION TABS
======================================== */
.section-tabs {
    background: white;
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 82px;
    z-index: 99;
    box-shadow: var(--shadow-xs);
}

.tabs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 2.2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.tab-btn::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(0, 102, 204, 0.05);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::before {
    transform: scaleX(1);
}

.tab-btn svg {
    width: 22px;
    height: 22px;
}

/* ========================================
   MAIN CONTENT
======================================== */
.main-content {
    min-height: calc(100vh - 150px);
    padding: 3rem 2rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gray-900);
    margin-bottom: 0.6rem;
    letter-spacing: -1px;
}

.page-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
    font-weight: 500;
}

.points-banner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.15) 0%, rgba(255, 193, 7, 0.15) 100%);
    border-radius: var(--radius-xl);
    border: 2px solid rgba(255, 217, 61, 0.4);
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.points-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.points-banner svg {
    width: 36px;
    height: 36px;
    color: var(--gold);
    flex-shrink: 0;
}

.points-banner strong {
    display: block;
    font-size: 1.1rem;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
}

.points-banner p {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin: 0;
}

.highlight {
    color: #D4AF37;
    font-weight: 800;
    font-size: 1.15em;
}

/* ========================================
   SERVICES SECTION
======================================== */
.category-block {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 2.5rem;
    transition: all var(--transition-base);
}

.category-block:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.8rem;
    border-bottom: 2px solid var(--gray-200);
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.category-block:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.category-icon.phone { background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%); }
.category-icon.transport { background: linear-gradient(135deg, #FF6B35 0%, #F7931A 100%); }
.category-icon.tv { background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%); }
.category-icon.electricity { background: linear-gradient(135deg, #F39C12 0%, #E67E22 100%); }
.category-icon.gas { background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%); }
.category-icon.water { background: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%); }

.category-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.category-title h3 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
}

.category-title p {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin: 0;
    font-weight: 500;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-bounce);
    text-align: left;
}

.service-item:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-logo {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.75rem;
    color: white;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.service-item:hover .service-logo {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.claro-logo { background: linear-gradient(135deg, #E30613 0%, #B0050F 100%); }
.personal-logo { background: linear-gradient(135deg, #1B1464 0%, #0F0B3D 100%); }
.movistar-logo { background: linear-gradient(135deg, #5CB500 0%, #3D7700 100%); }
.tuenti-logo { background: linear-gradient(135deg, #00B2E3 0%, #0084A8 100%); }
.sube-logo { background: linear-gradient(135deg, #FF6B35 0%, #CC5529 100%); }
.directv-logo { background: linear-gradient(135deg, #0033A0 0%, #002266 100%); }
.flow-logo { background: linear-gradient(135deg, #7B2CBF 0%, #5A1F8C 100%); }
.edenor-logo { background: linear-gradient(135deg, #0066CC 0%, #004C99 100%); }
.edesur-logo { background: linear-gradient(135deg, #00A859 0%, #008744 100%); }
.edelap-logo { background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%); }
.metrogas-logo { background: linear-gradient(135deg, #FF6B35 0%, #E55A2B 100%); }
.naturgy-logo { background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%); }
.camuzzi-logo { background: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%); }
.aysa-logo { background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%); }
.absa-logo { background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%); }

.service-info {
    flex: 1;
}

.service-info h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
}

.service-info p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.4;
    margin: 0;
    font-weight: 500;
}

.arrow-icon {
    width: 22px;
    height: 22px;
    color: var(--gray-400);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.service-item:hover .arrow-icon {
    color: var(--primary);
    transform: translateX(6px);
}

/* ========================================
   MODALS
======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-2xl);
    padding: 3rem;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-wide {
    max-width: 720px;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 10;
}

.modal-close:hover {
    background: var(--danger);
    transform: rotate(90deg) scale(1.1);
}

.modal-close:hover svg {
    color: white;
}

.modal-close svg {
    width: 22px;
    height: 22px;
    color: var(--gray-600);
}

.modal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.modal-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    color: white;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-lg);
}

.status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.status-icon.success {
    background: linear-gradient(135deg, var(--success) 0%, #229954 100%);
}

.status-icon svg {
    width: 36px;
    height: 36px;
    color: white;
    stroke-width: 3;
}

.lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.lock-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.6rem;
}

.modal-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
}

/* ========================================
   AMOUNT GRID
======================================== */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.amount-btn {
    padding: 1.2rem;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gray-900);
    cursor: pointer;
    transition: all var(--transition-base);
}

.amount-btn:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.amount-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   INFO BOXES
======================================== */
.points-info-box {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.15) 0%, rgba(255, 193, 7, 0.15) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 217, 61, 0.4);
    box-shadow: var(--shadow-sm);
}

.points-info-box svg {
    width: 32px;
    height: 32px;
    color: var(--gold);
    flex-shrink: 0;
}

.points-info-box strong {
    display: block;
    font-size: 1.05rem;
    color: var(--gray-900);
}

.points-info-box span {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.resumen-box {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: 1.8rem;
    border: 2px solid var(--gray-200);
}

.resumen-row {
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.resumen-row:last-child {
    border-bottom: none;
}

.resumen-row span {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 600;
}

.resumen-row strong {
    color: var(--gray-900);
    font-weight: 700;
}

.resumen-row.total {
    margin-top: 0.6rem;
    padding-top: 1.2rem;
    border-top: 2px solid var(--gray-300);
}

.resumen-row.total span {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gray-900);
}

.resumen-row.total strong {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    font-family: var(--font-display);
}

.points-highlight {
    color: #D4AF37 !important;
    font-weight: 800;
}

/* ========================================
   DEUDA INFO
======================================== */
.deuda-info {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.info-card {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: 1.8rem;
    border: 2px solid var(--gray-200);
}

.info-card h4 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gray-700);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span {
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 600;
}

.info-row strong {
    color: var(--gray-900);
    font-weight: 700;
}

.facturas-pendientes h4 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gray-700);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.factura-item {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    transition: all var(--transition-base);
}

.factura-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.factura-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.factura-periodo {
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.05rem;
}

.factura-estado {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.factura-estado.vencida {
    background: linear-gradient(135deg, #FEE 0%, #FDD 100%);
    color: var(--danger);
}

.factura-estado.proxima {
    background: linear-gradient(135deg, #FFA50220 0%, #FFA50230 100%);
    color: var(--warning);
}

.factura-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 600;
}

.factura-monto {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    margin-top: 0.6rem;
    font-family: var(--font-display);
}

.total-deuda {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.total-label {
    font-size: 1.15rem;
    font-weight: 700;
}

.total-amount {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--font-display);
}

.modal-actions {
    display: flex;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
}

.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 1.2rem;
    background: rgba(0, 185, 148, 0.1);
    border-radius: var(--radius-lg);
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 1.8rem;
    border: 2px solid rgba(0, 185, 148, 0.2);
}

.security-notice svg {
    width: 22px;
    height: 22px;
}

/* ========================================
   TOAST
======================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gray-900);
    color: white;
    padding: 1.2rem 1.8rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    font-weight: 700;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(100px);
    transition: all var(--transition-slow);
    z-index: 10000;
    max-width: 450px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, var(--success) 0%, #229954 100%);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger) 0%, #C0392B 100%);
}

.toast.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #D68910 100%);
}

.toast.info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* ========================================
   ERROR MESSAGES
======================================== */
.error-message-box {
    display: flex;
    gap: 1.2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #FEE 0%, #FDD 100%);
    border: 2px solid var(--danger);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    animation: shakeError 0.5s ease-in-out;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.error-icon svg {
    width: 28px;
    height: 28px;
}

.error-content {
    flex: 1;
}

.error-content h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--danger);
    margin-bottom: 0.6rem;
    font-family: var(--font-display);
}

.error-content p {
    color: #C0392B;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.error-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-content ul li {
    color: #C0392B;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 500;
}

.error-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--danger);
    font-weight: 800;
}

/* Input con error */
.input-container.input-error {
    position: relative;
}

.input-container.input-error input {
    border-color: var(--danger);
    background: rgba(231, 76, 60, 0.05);
    animation: shakeInput 0.3s ease-in-out;
}

.input-container.input-error input:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

.input-error {
    border-color: var(--danger) !important;
    background: rgba(231, 76, 60, 0.05) !important;
}

@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ========================================
   SCROLLBAR
======================================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .login-container {
        padding: 2.5rem 2rem;
    }
    
    .header-container {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
    }
    
    .user-details {
        display: none;
    }
    
    .btn-logout span {
        display: none;
    }
    
    .main-content {
        padding: 2rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
    
    .category-title {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
        max-height: 85vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .tabs-container {
        padding: 0 1rem;
    }
    
    .tab-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .category-block {
        padding: 1.5rem;
    }
    
    .service-item {
        padding: 1rem;
    }
    
    .total-amount {
        font-size: 2rem;
    }
    
    .amount-grid {
        grid-template-columns: 1fr;
    }
}