/* Public Pages Common Styles - EasyChatBot */
/* Para páginas no logueadas: login, register, home, etc. */

/* CSS Variables - EasyChatBot Color Palette */
:root {
    /* Colores Primarios */
    --primary-blue: #0077CC;        /* Azul principal - botones, íconos, encabezados */
    --pure-white: #FFFFFF;          /* Blanco puro - fondo principal */
    --solar-yellow: #FFC93C;       /* Amarillo solar - acentos, hover effects */
    
    /* Colores Secundarios */
    --deep-blue: #004C8C;          /* Azul profundo - fondos oscuros, headers */
    --light-gray: #F4F4F4;         /* Gris claro - fondos de secciones, cards */
    --dark-gray: #333333;          /* Gris oscuro - texto principal */
    --soft-blue: #E6F4FF;          /* Celeste suave - fondos suaves, bloques informativos */
    
    /* Variables de compatibilidad */
    --primary-color: var(--primary-blue);
    --secondary-color: var(--deep-blue);
    --accent-color: var(--solar-yellow);
    --text-dark: var(--dark-gray);
    --text-light: #6b7280;
    --bg-light: var(--light-gray);
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: var(--solar-yellow);
    --error-color: #ef4444;
    
    /* Alert Colors */
    --success-bg: #f0f9ff;
    --success-primary: #10b981;
    --success-hover: #059669;
    --danger-bg: #fef2f2;
    --danger-primary: #ef4444;
    --danger-hover: #dc2626;
    --info-bg: #f0f9ff;
    --info-primary: #3b82f6;
    --info-hover: #2563eb;
    --warning-bg: #fffbeb;
    --warning-primary: #f59e0b;
    --warning-hover: #d97706;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #0077CC 0%, #004C8C 100%);
    min-height: 100vh;
}

/* Auth Pages Styles */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background: var(--pure-white);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 119, 204, 0.15);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(0, 119, 204, 0.1);
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--deep-blue));
    color: var(--pure-white);
    padding: 2rem;
    text-align: center;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-header p {
    opacity: 0.9;
    margin: 0;
}

.auth-form {
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    border: 2px solid rgba(0, 119, 204, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--pure-white);
    color: var(--text-dark);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-control:focus::placeholder {
    color: #6b7280;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--deep-blue));
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pure-white);
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 119, 204, 0.3);
    color: var(--pure-white);
}

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

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: var(--pure-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 119, 204, 0.2);
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-hover);
    border: 1px solid var(--danger-primary);
    border-left: 4px solid var(--danger-primary);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-hover);
    border: 1px solid var(--success-primary);
    border-left: 4px solid var(--success-primary);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-hover);
    border: 1px solid var(--info-primary);
    border-left: 4px solid var(--info-primary);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-hover);
    border: 1px solid var(--warning-primary);
    border-left: 4px solid var(--warning-primary);
}

/* Links */
.back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-link a:hover {
    text-decoration: underline;
    color: var(--deep-blue);
}

/* Loading States */
.loading {
    display: none;
}

.loading.show {
    display: inline-block;
}

/* Dividers */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 119, 204, 0.1);
}

.divider span {
    background: var(--pure-white);
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Demo Info */
.demo-info {
    background: var(--soft-blue);
    border: 1px solid rgba(0, 119, 204, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.demo-info h6 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.demo-info p {
    color: var(--dark-gray);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Card Styles */
.card {
    background: var(--pure-white);
    border: 1px solid rgba(0, 119, 204, 0.1);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 119, 204, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 119, 204, 0.1);
    transform: translateY(-2px);
}

.card-header {
    background: var(--soft-blue);
    border-bottom: 1px solid rgba(0, 119, 204, 0.1);
    color: var(--dark-gray);
    font-weight: 600;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-success {
    color: #16a34a !important;
}

.text-muted {
    color: var(--text-light) !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.me-3 {
    margin-right: 0.75rem !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-wrapper {
        min-height: 100vh;
        padding: 10px;
    }
    
    .auth-container {
        margin: 0;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 576px) {
    .auth-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 4px;
    }
    
    .auth-header h1 img {
        width: 40px;
        height: 40px;
    }
}
