/*
 * Portal VeriFact-u - Estilos CSS
 * Archivo centralizado de estilos para toda la aplicación
 */

/* =====================================
   VARIABLES CSS GLOBALES
   ===================================== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

/* =====================================
   ESTILOS GENERALES
   ===================================== */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =====================================
   NAVEGACIÓN
   ===================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

/* =====================================
   BOTONES
   ===================================== */
.btn-primary {
    background: var(--secondary-color);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* =====================================
   PÁGINAS DE INICIO Y LANDING
   ===================================== */
.hero-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    color: white;
    text-align: center;
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.stats-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    color: white;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.pricing-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border: 3px solid var(--secondary-color);
    transform: scale(1.05);
}

.pricing-card.featured::before {
    content: 'RECOMENDADO';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.price-period {
    font-size: 1rem;
    color: #666;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* =====================================
   PÁGINAS DE AUTENTICACIÓN
   ===================================== */
.login-container {
    max-width: 400px;
    margin: 5% auto;
    padding: 0 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    color: #666;
    margin-bottom: 0;
}

.register-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.register-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.register-header {
    text-align: center;
    margin-bottom: 2rem;
}

.register-header h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.register-header p {
    color: var(--gray-600);
    margin-bottom: 0;
}

.success-card {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.success-card h3 {
    color: #155724;
}

.success-card p {
    color: #155724;
}

.credentials-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.credential-item {
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.credential-label {
    font-weight: 600;
    color: #495057;
}

.credential-value {
    color: #007bff;
    word-break: break-all;
}

.form-control {
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #ddd;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 600;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
}

.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: #667eea;
    text-decoration: none;
}

.links a:hover {
    color: #764ba2;
}

.alert {
    border-radius: 10px;
    margin-bottom: 20px;
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px 0 0 10px;
}

.input-group .form-control {
    border-radius: 0 10px 10px 0;
}

/* =====================================
   VERIFICACIÓN DE EMAIL
   ===================================== */
.verification-container {
    max-width: 600px;
    margin: 5rem auto;
    padding: 2rem;
}

.verification-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.error-icon {
    font-size: 5rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

/* =====================================
   DASHBOARD Y PÁGINAS INTERNAS
   ===================================== */
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.dashboard-icon.text-primary {
    color: var(--secondary-color) !important;
}

.dashboard-icon.text-success {
    color: var(--success-color) !important;
}

.dashboard-icon.text-warning {
    color: var(--warning-color) !important;
}

.dashboard-icon.text-danger {
    color: var(--danger-color) !important;
}

.dashboard-icon.text-info {
    color: var(--info-color) !important;
}

.main-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.content-header {
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.content-header h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* =====================================
   FORMULARIOS
   ===================================== */
.form-section {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.required-field::after {
    content: ' *';
    color: var(--danger-color);
}

/* =====================================
   TABLAS
   ===================================== */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.table th {
    background-color: var(--gray-100);
    border-bottom: 2px solid var(--gray-300);
    color: var(--gray-700);
    font-weight: 600;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.02);
}

/* =====================================
   BADGES Y ESTADOS
   ===================================== */
.badge-pendiente {
    background-color: var(--warning-color);
    color: white;
}

.badge-enviada {
    background-color: var(--success-color);
    color: white;
}

.badge-error {
    background-color: var(--danger-color);
    color: white;
}

.badge-borrador {
    background-color: var(--gray-500);
    color: white;
}

/* =====================================
   ALERTAS PERSONALIZADAS
   ===================================== */
.alert-custom {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-custom.alert-info {
    background: linear-gradient(45deg, rgba(23, 162, 184, 0.1), rgba(23, 162, 184, 0.05));
    border-left: 4px solid var(--info-color);
}

.alert-custom.alert-warning {
    background: linear-gradient(45deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
    border-left: 4px solid var(--warning-color);
}

.alert-custom.alert-success {
    background: linear-gradient(45deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    border-left: 4px solid var(--success-color);
}

.alert-custom.alert-danger {
    background: linear-gradient(45deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    border-left: 4px solid var(--danger-color);
}

/* =====================================
   CERTIFICADOS Y CONFIGURACIÓN
   ===================================== */
.config-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.config-section h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.cert-upload-area {
    border: 2px dashed var(--gray-400);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.cert-upload-area:hover {
    border-color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.cert-upload-area.dragover {
    border-color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

/* =====================================
   FACTURAS
   ===================================== */
.invoice-header {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 2rem;
    margin-bottom: 0;
}

.invoice-body {
    background: white;
    border-radius: 0 0 15px 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.invoice-summary {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.invoice-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* =====================================
   FOOTER
   ===================================== */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

/* =====================================
   ESTILOS PARA EMAILS
   ===================================== */
.email-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.email-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 10px 10px 0 0;
}

.email-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 0 0 10px 10px;
}

.email-btn {
    display: inline-block;
    background: #667eea !important;
    color: white !important;
    padding: 15px 30px;
    text-decoration: none !important;
    border-radius: 5px;
    margin: 20px 0;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.email-btn-reset {
    background: #dc3545 !important;
}

.email-footer {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 20px;
}

.email-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.email-icon {
    font-size: 3rem; 
    color: #667eea;
}

/* === EMAIL TEMPLATE INLINE STYLES === */
.email-center {
    text-align: center; 
    margin: 30px 0;
}

.email-link {
    word-break: break-all; 
    background: #e9ecef; 
    padding: 10px; 
    border-radius: 5px;
}

.qr-url {
    word-break: break-all; 
    font-size: 10px;
}

/* =====================================
   RESPONSIVE
   ===================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }
    
    .feature-card,
    .dashboard-card,
    .main-content {
        margin: 1rem 0;
        padding: 1.5rem;
    }
    
    .login-container,
    .register-container,
    .verification-container {
        margin: 2rem auto;
        padding: 0 15px;
    }
    
    .login-card,
    .register-card,
    .verification-card {
        padding: 2rem 1.5rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .price {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 1.5rem 1rem;
    }
    
    .btn-primary,
    .btn-outline-light {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .feature-icon,
    .dashboard-icon {
        font-size: 2.5rem;
    }
    
    .success-icon,
    .error-icon {
        font-size: 4rem;
    }
}

/* =====================================
   UTILIDADES
   ===================================== */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
    background-color: var(--secondary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.border-secondary-custom {
    border-color: var(--secondary-color) !important;
}

.shadow-custom {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg-custom {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.rounded-custom {
    border-radius: 15px !important;
}

.rounded-lg-custom {
    border-radius: 20px !important;
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

.bounce-on-hover:hover {
    animation: bounce 1s ease;
}

/* =====================================
   DARK MODE (preparado para futuro)
   ===================================== */
@media (prefers-color-scheme: dark) {
    /* Estilos para modo oscuro si se implementa en el futuro */
}

/* =====================================
   PRINT STYLES
   ===================================== */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-content,
    .invoice-body {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* =====================================
   RECUPERACIÓN DE CONTRASEÑA - ESTILOS ESPECÍFICOS
   ===================================== */
.forgot-container {
    max-width: 500px;
    margin: 5rem auto;
    padding: 2rem;
}

.forgot-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.forgot-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.forgot-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.forgot-header h1 {
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.forgot-header p {
    color: #666;
    margin-bottom: 0;
}

.forgot-form {
    margin-top: 1rem;
}

.forgot-form .form-control {
    margin-bottom: 1rem;
}

.forgot-form .btn-primary {
    width: 100%;
    padding: 12px;
    font-weight: 600;
}

.forgot-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
}

.forgot-success h3 {
    color: #155724;
}

.forgot-success p {
    color: #155724;
}

.forgot-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
}

.forgot-error h3 {
    color: #721c24;
}

.forgot-error p {
    color: #721c24;
}

/* === RESET PASSWORD STYLES === */
.reset-container {
    max-width: 500px;
    margin: 5rem auto;
    padding: 2rem;
}

.reset-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.password-requirements {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.requirement {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 0.9em;
}

.requirement.valid {
    color: #28a745;
}

.requirement.invalid {
    color: #dc3545;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.error-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

/* === RESEND VERIFICATION STYLES === */
.resend-container {
    max-width: 500px;
    margin: 5rem auto;
    padding: 2rem;
}

.resend-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.person-icon {
    font-size: 3rem; 
    color: #667eea;
}

.shield-lock-icon {
    font-size: 3rem; 
    color: #667eea;
}

.shield-check-icon {
    font-size: 15rem; 
    opacity: 0.3;
}

.index-container {
    margin-top: 100px;
}
