/* Authentication Page Styles */
.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #001A2B 0%, #003A5C 50%, #001A2B 100%);
    padding: 2rem 1rem;
    position: relative;
}

.auth-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.08"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.08"/><circle cx="90" cy="30" r="0.3" fill="cyan" opacity="0.03"/><circle cx="20" cy="90" r="0.3" fill="cyan" opacity="0.03"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.auth-logo i {
    font-size: 3rem;
    color: #4A9EFF;
    background: linear-gradient(135deg, #4A9EFF, #66B2FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    background: linear-gradient(135deg, #2d3748, #4A9EFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #718096;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* Alert Styles */
.auth-alert {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert.success {
    background: rgba(72, 187, 120, 0.1);
    color: #38a169;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.auth-alert.error {
    background: rgba(245, 101, 101, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

.auth-alert.warning {
    background: rgba(237, 137, 54, 0.1);
    color: #dd6b20;
    border: 1px solid rgba(237, 137, 54, 0.2);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-label i {
    color: #4A9EFF;
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    color: #2d3748;
}

.form-input:focus {
    outline: none;
    border-color: #4A9EFF;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
    background: rgba(255, 255, 255, 1);
}

.form-input::placeholder {
    color: #a0aec0;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #4A9EFF;
}

.form-error {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-error.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Checkbox Styles */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.8);
}

.checkbox-wrapper:hover .checkmark {
    border-color: #4A9EFF;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #4A9EFF;
    border-color: #4A9EFF;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #4A9EFF;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #001A2B;
    text-decoration: underline;
}

/* Button Styles */
.auth-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.auth-btn:last-child {
    margin-bottom: 0;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #001A2B 0%, #003A5C 50%, #4A9EFF 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 26, 43, 0.4);
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 26, 43, 0.5);
}

.auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.auth-btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #4A9EFF;
    color: #4A9EFF;
    transform: translateY(-1px);
}

.btn-loader {
    position: absolute;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: rgba(255, 255, 255, 0.95);
    color: #718096;
    padding: 0 1rem;
    font-size: 0.85rem;
    position: relative;
}

/* Auth Footer */
.auth-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
    margin-top: 2rem;
}

.quick-access {
    margin-bottom: 1.5rem;
}

.quick-access h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    text-align: center;
}

.quick-access-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.quick-btn {
    padding: 0.75rem 1rem;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 8px;
    color: #4A9EFF;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.quick-btn:hover {
    background: rgba(74, 158, 255, 0.15);
    border-color: rgba(74, 158, 255, 0.3);
    transform: translateY(-1px);
}

.quick-btn i {
    font-size: 1.1rem;
}

.auth-links {
    text-align: center;
}

.back-home {
    color: #718096;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-home:hover {
    color: #4A9EFF;
}

/* OTP-Specific Styles */
.auth-step {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.otp-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 16px;
    border: 1px solid rgba(66, 178, 255, 0.1);
}

.otp-icon {
    margin-bottom: 1rem;
}

.otp-icon i {
    font-size: 2.5rem;
    color: #4A9EFF;
    background: linear-gradient(135deg, #4A9EFF, #66B2FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.otp-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.otp-sent-message {
    color: #718096;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.otp-sent-message strong {
    color: #4A9EFF;
    font-weight: 600;
}

.otp-input-container {
    position: relative;
}

.otp-input {
    text-align: center;
    letter-spacing: 0.2em;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(74, 158, 255, 0.05);
    border: 2px solid rgba(74, 158, 255, 0.2);
}

.otp-input:focus {
    border-color: #4A9EFF;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
    background: rgba(74, 158, 255, 0.08);
}

.otp-help {
    margin-top: 0.5rem;
    text-align: center;
}

.otp-help .text-muted {
    color: #718096;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.otp-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(74, 158, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(74, 158, 255, 0.1);
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-weight: 600;
    font-size: 1rem;
}

.timer-display i {
    color: #4A9EFF;
}

.resend-btn {
    background: none;
    border: none;
    color: #4A9EFF;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.resend-btn:hover {
    background: rgba(74, 158, 255, 0.1);
    color: #3182ce;
}

.resend-btn:active {
    transform: translateY(1px);
}

.form-help {
    margin-top: 0.5rem;
}

.form-help .text-muted {
    color: #718096;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-switch {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-switch p {
    margin: 0 0 0.5rem 0;
    color: #718096;
    font-size: 0.95rem;
}

.auth-link {
    color: #4A9EFF;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #3182ce;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 640px) {
    .auth-main {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0;
        border-radius: 16px;
    }
    
    .auth-logo h1 {
        font-size: 1.75rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .quick-access-buttons {
        grid-template-columns: 1fr;
    }
    
    .otp-info {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .otp-icon i {
        font-size: 2rem;
    }
    
    .otp-info h3 {
        font-size: 1.1rem;
    }
    
    .otp-sent-message {
        font-size: 0.9rem;
    }
    
    .otp-input {
        font-size: 1rem;
        letter-spacing: 0.15em;
    }
    
    .otp-timer {
        padding: 0.75rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-logo i {
        font-size: 2.5rem;
    }
    
    .auth-logo h1 {
        font-size: 1.5rem;
    }
    
    .otp-input {
        font-size: 0.95rem;
        letter-spacing: 0.1em;
    }
    
    .timer-display {
        font-size: 0.9rem;
    }
    
    .resend-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}
