/* Authentication Pages Styles - Mobile First */

.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    margin: 1rem 0;
    max-width: 100%;
    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: 2rem;
}

.logo-container {
    margin-bottom: 1.5rem;
}

.logo-container .logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo-container h1 {
    color: #4a6bff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.auth-header h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-form {
    margin-bottom: 1.5rem;
}

/* Login Toggle Buttons */
.login-toggle .btn-check:checked + .btn {
    background-color: #4a6bff;
    border-color: #4a6bff;
    color: white;
}

.login-toggle .btn-outline-primary {
    border: 2px solid #e9ecef;
    color: #6c757d;
    transition: all 0.3s ease;
}

.login-toggle .btn-outline-primary:hover {
    background-color: #f8f9fa;
    border-color: #4a6bff;
    color: #4a6bff;
}

/* Form Controls - UPDATED to maintain consistent appearance */
.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

/* UPDATED: Keep same appearance on focus */
.form-control:focus {
    border-color: #e9ecef; /* Keep same border color */
    box-shadow: 0 0 0 0.2rem rgba(233, 236, 239, 0.25); /* Subtle shadow with same color */
    background-color: #f8f9fa; /* Keep same background */
    outline: none; /* Remove default outline */
}

/* Input group styling */
.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #6c757d;
}

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

/* UPDATED: Consistent focus state for input groups */
.input-group .form-control:focus {
    border-color: #e9ecef; /* Keep same border color */
    box-shadow: none; /* Remove blue shadow */
    background-color: #f8f9fa; /* Keep same background */
}

.input-group .form-control:focus + .input-group-text {
    border-color: #e9ecef; /* Keep same border color */
    background-color: #f8f9fa; /* Keep same background */
}

.input-group-text + .form-control:focus {
    border-color: #e9ecef; /* Keep same border color */
}

/* Special styling for validation icons */
.validation-icon {
    min-width: 40px;
    transition: all 0.3s ease;
    border-left: none;
    background-color: #f8f9fa; /* Consistent with other input-group-text */
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: #6c757d;
}

.validation-message {
    margin-top: 0.25rem;
    min-height: 20px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #4a6bff, #667eea);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 107, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 107, 255, 0.4);
    background: linear-gradient(45deg, #3d5bff, #5a72e7);
}

.btn-outline-secondary {
    border: 2px solid #e9ecef;
    color: #6c757d;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #6c757d;
}

/* Form Check */
.form-check-input:checked {
    background-color: #4a6bff;
    border-color: #4a6bff;
}

/* UPDATED: Consistent focus state for checkboxes */
.form-check-input:focus {
    border-color: #e9ecef;
    box-shadow: 0 0 0 0.2rem rgba(233, 236, 239, 0.25);
}

.form-check-label {
    color: #666;
    font-size: 14px;
}

/* Auth Footer */
.auth-footer {
    margin-top: 2rem;
}

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

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 14px;
}

.guest-access {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.guest-access p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* OTP Input Styles - UPDATED for consistency */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 2rem 0;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

/* UPDATED: Consistent OTP input focus state */
.otp-input:focus {
    border-color: #e9ecef; /* Keep same border color */
    background-color: #f8f9fa; /* Keep same background */
    box-shadow: 0 0 0 0.2rem rgba(233, 236, 239, 0.25); /* Subtle shadow */
    outline: none;
}

.otp-input.filled {
    background-color: #4a6bff;
    color: #cc9e58;
    border-color: #4a6bff;
}

.otp-input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Package Cards */
.package-cards {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.package-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    border-color: #4a6bff;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 107, 255, 0.15);
}

.package-card.selected {
    border-color: #4a6bff;
    background: linear-gradient(45deg, #f8f9ff, #f0f4ff);
}

.package-card.recommended::before {
    content: 'Recommended';
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(45deg, #4a6bff, #667eea);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 12px;
    font-weight: 600;
    border-radius: 0 0 0 12px;
}

.package-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 2rem;
    font-weight: 800;
    color: #4a6bff;
    margin-bottom: 0.5rem;
}

.package-price .currency {
    font-size: 1.2rem;
    vertical-align: top;
}

.package-price .period {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.package-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 1rem;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.package-features li {
    padding: 0.25rem 0;
    font-size: 14px;
    color: #555;
}

.package-features li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Select dropdown styling - UPDATED */
select.form-control {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

select.form-control:focus {
    border-color: #e9ecef; /* Keep same border color */
    background-color: #f8f9fa; /* Keep same background */
    box-shadow: 0 0 0 0.2rem rgba(233, 236, 239, 0.25); /* Subtle shadow */
    outline: none;
}

/* Date input styling - UPDATED */
input[type="date"].form-control {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="date"].form-control:focus {
    border-color: #e9ecef; /* Keep same border color */
    background-color: #f8f9fa; /* Keep same background */
    box-shadow: 0 0 0 0.2rem rgba(233, 236, 239, 0.25); /* Subtle shadow */
    outline: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: 16px;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .logo-container .logo {
        width: 50px;
        height: 50px;
    }
    
    .logo-container h1 {
        font-size: 1.5rem;
    }
    
    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .package-cards {
        gap: 1rem;
    }
    
    .package-card {
        padding: 1.25rem;
    }
    
    .package-price {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 10px 0;
    }
    
    .auth-card {
        padding: 1.25rem;
        margin: 0.25rem;
    }
    
    .login-toggle .btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .otp-container {
        gap: 8px;
    }
    
    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Success/Error States */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert i {
    margin-right: 0.5rem;
}