/* Responsive fix para Register y Login: mobile y tablet */
@media (max-width: 768px) {
    .auth-responsive-page {
        align-items: flex-start !important;
        min-height: auto !important;
        justify-content: center;
        display: flex;
    }
    .auth-responsive-page .auth-card {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        padding: 6vw 4vw 4vw 4vw;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .auth-responsive-page .auth-footer {
        position: static !important;
        margin-top: 24px;
        margin-bottom: 12px;
        width: 100vw;
        border-radius: 0;
        box-shadow: none;
        font-size: 3.5vw;
        padding-top: 3vw;
    }
}
/* Samsung Galaxy S25 Authentication Styles */

/* Common Auth Container */
.samsung-auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideInUp 0.6s ease-out;
    /* Remover max-height y overflow para eliminar scroll interno */
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Styles */
.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo {
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.auth-header h1 {
    color: #1565C0;
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-subtitle {
    color: #666;
    font-size: 14px;
    margin: 5px 0 0 0;
    font-weight: 500;
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.samsung-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.samsung-input:focus {
    outline: none;
    border-color: #1565C0;
    background: white;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
    transform: translateY(-1px);
}

.form-group-checkbox {
    margin: 20px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

/* Button Styles */
.samsung-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #1565C0, #1976D2);
    color: white;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(21, 101, 192, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: #1565C0;
    border: 2px solid #1565C0;
}

.btn-secondary:hover {
    background: #1565C0;
    color: white;
    transform: translateY(-1px);
}

/* Loading Spinner */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.error-banner {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    border-left: 4px solid #c62828;
}

.validation-error {
    color: #c62828;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.link-primary {
    color: #1565C0;
    text-decoration: none;
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

.enterprise-note {
    font-size: 12px !important;
    color: #999 !important;
}

/* Redirect Loading Styles */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-content {
    text-align: center;
    color: white;
}

.samsung-loading {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading-container .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem auto;
}

.samsung-loading p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .samsung-auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
        max-height: 92vh;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .samsung-auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 25px 20px;
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .auth-header h1 {
        font-size: 22px;
    }
    
    .samsung-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .samsung-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .auth-card {
        background: #ffffff;
        border: 2px solid #1565C0;
    }
    
    .samsung-input {
        border-width: 2px;
    }
    
    .link-primary {
        text-decoration: underline;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }
    
    .samsung-btn, .samsung-input {
        transition: none;
    }
    
    .samsung-btn:hover, .samsung-input:focus {
        transform: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(30, 30, 30, 0.95);
        color: #ffffff;
    }
    
    .auth-header h1 {
        color: #64B5F6;
    }
    
    .auth-subtitle, .form-label, .auth-footer p {
        color: #B0BEC5;
    }
    
    .samsung-input {
        background: #424242;
        border-color: #666666;
        color: #ffffff;
    }
    
    .samsung-input:focus {
        background: #303030;
        border-color: #64B5F6;
    }
    
    .auth-footer {
        border-top-color: #666666;
    }
    
    .link-primary {
        color: #64B5F6;
    }
}

/* Enhanced Validation Styles */
.validation-summary {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #d32f2f;
    font-size: 14px;
    line-height: 1.4;
}

.validation-summary ul {
    margin: 0;
    padding-left: 16px;
}

.validation-summary li {
    margin-bottom: 4px;
}

.validation-error {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    animation: fadeInError 0.3s ease-out;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input validation states */
.samsung-input.input-validation-error {
    border-color: #f44336 !important;
    background: rgba(244, 67, 54, 0.05);
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.samsung-input.input-validation-error:focus {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.2);
}

.samsung-input.valid {
    border-color: #4caf50 !important;
    background: rgba(76, 175, 80, 0.05);
}

.samsung-input.valid:focus {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Success feedback */
.success-banner {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #2e7d32;
    font-size: 14px;
    display: flex;
    align-items: center;
    animation: slideInDown 0.3s ease-out;
}

.success-icon {
    margin-right: 8px;
    font-size: 16px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-weak {
    color: #f44336;
}

.strength-medium {
    color: #ff9800;
}

.strength-strong {
    color: #4caf50;
}

/* Loading states */
.form-loading {
    pointer-events: none;
    opacity: 0.7;
}

.form-loading .samsung-input {
    background: #f5f5f5;
    color: #999;
}

/* Professional tooltips */
.field-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 4px;
    color: #666;
    cursor: help;
}

.field-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.field-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .samsung-input {
    padding-right: 50px; /* Espacio para el bot�n del ojo */
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle:active {
    background: rgba(0, 0, 0, 0.1);
}

.password-icon {
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.password-toggle:hover .password-icon {
    opacity: 0.8;
}

/* Password Hint */
.password-hint {
    margin-top: 4px;
}

.password-hint small {
    color: #666;
    font-size: 11px;
    line-height: 1.3;
}
