/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    color: #333;
}

.nav-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 4px;
    font-size: 0.9rem;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-item.active {
    background-color: rgba(255,255,255,0.2);
}

/* Login Screen Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #001641;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 500px;
    text-align: center;
}


.login-logo-icon {
    width: 120px;
    height: 120px;
    /*background-image: url('/public/imagen.png');*/
    /*background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);*/
    /*border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    /*color: white;*/
    /*font-size: 2.5rem;*/
    /*font-weight: bold;*/
    margin: 0 auto 2rem;
}
.login-logo {
    margin-bottom: 3rem;
}

.logo-icon {
    width: 180px !important;  /* Agrandado */
    height: 180px !important; /* Agrandado */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.login-title {
    font-size: 2rem;
    color: #001641;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00D9C5;
    box-shadow: 0 0 0 3px rgba(0, 217, 197, 0.1);
}

.login-button {
    width: 100%;
    background: #00D9C5;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 217, 197, 0.4);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.demo-credentials {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #004987;
    border: 1px solid #bfdbfe;
}

.demo-credentials strong {
    color: #374151;
}

/* Main Application Styles */
.app-container {
    display: none;
}

.app-container.active {
    display: block;
}

/* Header Navigation Styles - ACTUALIZADO */
.header {
    background: #002D5A;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Logo - se mantiene en el lado izquierdo */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Nav wrapper - se posiciona cerca del logo */
.nav-wrapper {
    display: flex;
    align-items: center;
    margin-left: 2rem; /* MÃ¡s cerca del logo en desktop */
    flex-grow: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
}

/* User info - se mantiene en el lado derecho */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    margin-left: auto; /* Empuja al extremo derecho */
}

.logo-icon {
    width: 40px;
    height: 40px;
    /*background: #00D9C5;*/
    /*border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 1.8rem;
    letter-spacing: 2px;
    font-weight: bold;
}

.logo-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
   /*  margin-top: 0.2rem; */
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #00D9C5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.hero-section {
    background: #004987;
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Content Sections */
.content-section {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content-section.active {
    display: block;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-color: #00D9C5;
}

.service-card.active {
    background: #004987;
    color: white;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #00D9C5;
    color: white;
}

.service-card.active .service-icon {
    background: rgba(255,255,255,0.2);
}

.service-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.5rem;
}

.service-card.active .service-title {
    color: white;
}

/* Step Progress */
.step-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-number.inactive {
    background: #e5e7eb;
    color: #9ca3af;
}

.step-number.active {
    background: #004987;
    color: white;
}

.step-number.completed {
    background: #BFE41A;
    color: white;
}

.step-line {
    position: absolute;
    top: 30px;
    left: 60px;
    width: 2rem;
    height: 2px;
    background: #e5e7eb;
}

.step-line.completed {
    background: #BFE41A;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.btn-primary {
    background: #00D9C5;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 197, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #BFE41A;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.data-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background: #f9fafb;
    cursor: pointer;
}

/* Form Styles */
.form-select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: all 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    z-index: 3000;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success { background: #BFE41A; }
.notification.error { background: #ef4444; }
.notification.warning { background: #f59e0b; }
.notification.info { background: #00D9C5; }

/* Loading */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes modalPop {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Success Message */
.success-message {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

/* QR Code */
.qr-container {
    text-align: center;
    padding: 3rem;
}

.qr-code {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    background: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.qr-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, white 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, white 2px, transparent 2px),
        radial-gradient(circle at 20% 80%, white 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, white 2px, transparent 2px),
        linear-gradient(90deg, white 1px, transparent 1px),
        linear-gradient(180deg, white 1px, transparent 1px);
    background-size: 
        20px 20px,
        20px 20px,
        20px 20px,
        20px 20px,
        10px 10px,
        10px 10px;
    opacity: 0.8;
}

.qr-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: black;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.payment-method {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #00D9C5;
    background: #f0fdff;
}

.payment-method.selected {
    border-color: #00D9C5;
    background: #ecfeff;
}

/* Card Form */
.card-form {
    max-width: 500px;
    margin: 0 auto;
}

.card-form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* Vista Desktop (mayor a 768px) */
@media (min-width: 769px) {
    .header {
        display: flex;
        justify-content: flex-start; /* Cambiado de space-between */
        align-items: center;
        gap: 0;
    }
    
    .logo {
        order: 1;
    }
    
    .nav-wrapper {
        order: 2;
        margin-left: 2rem;
    }
    
    .user-info {
        order: 3;
        margin-left: auto; /* Esto empuja el dropdown al extremo derecho */
    }
}

/************************************** Responsive ********************************************/
@media (max-width: 768px) {

    /* Vista Mobile (768px y menor) */
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        flex-wrap: nowrap;
        position: relative;
        min-height: 30px;
    }

    /* LOGO - posiciÃ³n izquierda */
    .logo {
        margin-left: 0 !important;
        margin-right: auto !important;
        position: relative !important;
        left: 0 !important;
        transform: none !important;

    } 

    /* BOTÃ"N - posiciÃ³n central */
    .nav-wrapper {
        order: 2;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        flex-grow: 0;
        z-index: 1;
    }

    /* DROPDOWN - posiciÃ³n derecha */
    .user-info {
        order: 3;
        margin-left: 0;
        flex-shrink: 0;
        flex-basis: auto;
        position: relative;
        z-index: 2;
    }

    /* Estilos del botÃ³n en mobile */
    .nav-menu {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-item {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        background-color: rgba(255,255,255,0.1);
        border-radius: 6px;
    }

    .hero-title { 
        font-size: 2rem; 
    }
    
    .main-content { 
        padding: 0 1rem; 
    }
    
    .login-card { 
        padding: 2rem; 
        margin: 1rem; 
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .step-progress {
        gap: 1rem;
    }

    .step-line {
        width: 1rem;
        left: 50px;
    }
    
    .card-form-row {
        grid-template-columns: 1fr;
    }
    
    .logo-main {
        font-size: 1.5rem;
    }
    
    .logout-btn {
        margin-left: 0;
    }

    .table-responsive {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .table-responsive .data-table {
            min-width: 600px;
            width: 100%;
        }


    .data-table th,
    .data-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
        white-space: nowrap;

    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.75rem;
    }
    
    .logo {
        gap: 0.5rem;
    }
    
    .login-logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .nav-item {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .login-logo {
        margin-bottom: 1rem;
    }
    
    .login-logo-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .qr-code {
        width: 250px;
        height: 250px;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* User Dropdown Styles */
.user-dropdown-container {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.user-dropdown-avatar {
    width: 50px;
    height: 50px;
    background: #00D9C5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-dropdown-info {
    flex: 1;
}

.user-dropdown-name {
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.25rem;
}

.user-dropdown-email {
    color: #6b7280;
    font-size: 0.875rem;
}

.user-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.user-dropdown-menu {
    padding: 0.5rem 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.user-dropdown-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.user-dropdown-item.logout {
    color: #dc2626;
}

.user-dropdown-item.logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.user-dropdown-icon {
    font-size: 1.1rem;
    width: 20px;
    display: flex;
    justify-content: center;
}

/* Remove old logout button styles */
.logout-btn {
    display: none;
}

/* User Info Modal Styles */
.user-info-content {
    padding: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    font-weight: 600;
    color: #374151;
    min-width: 140px;
}

.info-row span {
    color: #6b7280;
    text-align: right;
}

.user-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-badge.admin {
    background: #00D9C5;
    color: white;
}

.status-badge {
    padding