/**
 * Panel Optimiza - Estilos de Autenticación
 * Sistema de Cotizaciones y Hospedaje
 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
}

/* ===== GENERAL AUTH STYLES ===== */
body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    width: 100%;
    max-width: 480px;
    min-width: 340px;
    padding: 32px 0;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(80,80,160,0.13);
    padding: 56px 48px 48px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.2s, transform 0.2s;
}

@media (min-width: 768px) {
    .auth-container {
        max-width: 540px;
        padding: 32px 0;
    }
    .auth-card {
        padding: 64px 56px 56px 56px;
        border-radius: 28px;
        min-width: 420px;
        max-width: 480px;
        font-size: 1.08rem;
    }
}

@media (min-width: 1200px) {
    .auth-container {
        max-width: 600px;
    }
    .auth-card {
        min-width: 480px;
        max-width: 520px;
        font-size: 1.13rem;
        box-shadow: 0 16px 64px rgba(80,80,160,0.16);
    }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* ===== AUTH HEADER ===== */
.auth-header {
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    display: inline-block;
}

.auth-title {
    color: #333;
    font-weight: 300;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
    background: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: #999;
}

.input-group {
    position: relative;
    display: flex;
}

.input-group-text {
    border: 2px solid #eee;
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: #f8f9fa;
    color: #666;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 12px 12px 0;
    flex: 1;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
}

/* ===== BUTTONS ===== */
.btn-auth {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-auth:active {
    transform: translateY(0);
}

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

/* ===== LOADING STATE ===== */
.btn-auth.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
    position: relative;
    font-size: 0.9rem;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffd93d 0%, #ffc107 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #74c0fc 0%, #17a2b8 100%);
    color: white;
}

/* ===== AUTH FOOTER ===== */
.auth-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.85rem;
}

.auth-footer p {
    margin-bottom: 10px;
}

.auth-footer small {
    color: #999;
    font-size: 0.75rem;
}

/* ===== FLOATING SHAPES BACKGROUND ===== */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 80%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 5%;
    animation-delay: 4s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.shape:nth-child(5) {
    width: 70px;
    height: 70px;
    bottom: 20%;
    left: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* ===== SETUP SPECIFIC STYLES ===== */
.setup-card {
    max-width: 600px;
    width: 100%;
}

.form-section {
    margin-bottom: 30px;
    text-align: left;
}

.form-section h5 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.form-section h5 i {
    margin-right: 10px;
    color: var(--primary-color);
}

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

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

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

.setup-header i {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
        margin: 20px;
        border-radius: 15px;
    }
    
    .auth-logo {
        font-size: 2.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .input-group-text {
        padding: 12px;
        min-width: 45px;
    }
    
    .btn-auth {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .setup-card {
        padding: 25px 15px;
    }
    
    .form-section h5 {
        font-size: 1rem;
    }
}

@media (max-width: 320px) {
    .auth-card {
        padding: 25px 15px;
    }
    
    .auth-logo {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.3rem;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.text-primary { color: var(--primary-color); }
.text-muted { color: #6c757d; }
.text-white { color: white; }
.text-dark { color: #333; }