/* ==========================================
   ESTILOS DE AUTENTICACIÓN - TherapyLab
   ========================================== */

/* Reset básico */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #fafaf9;
    min-height: 100vh;
}

/* Container principal */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
}

/* Card de autenticación */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 2px solid #e7e5e4;
    overflow: hidden;
}

/* Header del card */
.auth-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f5f5f4;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.auth-logo-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.auth-logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1c1917;
    letter-spacing: -0.025em;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1c1917;
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #78716c;
    margin: 0;
}

/* Body del card */
.auth-body {
    padding: 1.5rem 2rem 2rem;
}

/* Formulario */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Grupos de input */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #44403c;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e7e5e4;
    border-radius: 10px;
    background: white;
    color: #1c1917;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.form-input::placeholder {
    color: #a8a29e;
}

.form-input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Input con icono */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a8a29e;
}

.input-wrapper .form-input {
    padding-left: 2.75rem;
}

/* Toggle password */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #78716c;
    cursor: pointer;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: #44403c;
}

/* Checkbox */
.form-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d6d3d1;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.form-checkbox:checked {
    background-color: #ea580c;
    border-color: #ea580c;
}

.form-checkbox-label {
    font-size: 0.875rem;
    color: #57534e;
    line-height: 1.5;
}

.form-checkbox-label a {
    color: #ea580c;
    text-decoration: none;
    font-weight: 600;
}

.form-checkbox-label a:hover {
    text-decoration: underline;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}

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

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

.btn-secondary {
    background: white;
    color: #44403c;
    border: 2px solid #e7e5e4;
}

.btn-secondary:hover {
    background: #fafaf9;
    border-color: #d6d3d1;
}

.btn-google {
    background: white;
    color: #1c1917;
    border: 2px solid #e7e5e4;
}

.btn-google:hover {
    background: #fafaf9;
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.btn-full {
    width: 100%;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e7e5e4;
}

.auth-divider span {
    font-size: 0.75rem;
    color: #a8a29e;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Links */
.auth-link {
    color: #ea580c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.auth-link:hover {
    text-decoration: underline;
}

.forgot-password {
    text-align: right;
    margin-top: -0.5rem;
}

/* Footer del card */
.auth-footer {
    padding: 1.25rem 2rem;
    text-align: center;
    background: #fafaf9;
    border-top: 1px solid #f5f5f4;
}

.auth-footer p {
    margin: 0;
    font-size: 0.875rem;
    color: #78716c;
}

/* Mensajes de error/éxito */
.alert {
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert.hidden {
    display: none;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Form error message */
.form-error {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    
    .auth-header,
    .auth-body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .auth-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* ==========================================
   ESTILOS ADICIONALES PARA DASHBOARD
   ========================================== */

.dashboard-nav {
    background: white;
    border-bottom: 2px solid #e7e5e4;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: #1c1917;
    text-decoration: none;
}

.nav-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #1c1917;
    font-size: 0.875rem;
}

.user-email {
    font-size: 0.75rem;
    color: #78716c;
}

.btn-logout {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Dashboard content */
.dashboard-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-card {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.welcome-subtitle {
    opacity: 0.9;
    margin: 0;
}
