/* Authentication Pages Styles */

/* Active state for auth buttons */
.auth-btn.active {
    background: #1d4ed8;
    color: white;
    border-color: #1d4ed8;
}

/* Auth Section */
.auth-section {
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #1e293b;
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #64748b;
    font-size: 1rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Phone Input */
.phone-input {
    display: flex;
    gap: 0.5rem;
}

.phone-input select {
    flex: 0 0 140px;
}

.phone-input input {
    flex: 1;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #1e40af;
}

/* Verification Input */
.verification-group {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.verification-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.verification-input input {
    flex: 1;
}

.send-code-btn,
.resend-code-btn {
    background: #1e40af;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.send-code-btn:hover,
.resend-code-btn:hover {
    background: #1d4ed8;
}

.resend-code-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Password Requirements */
.password-requirements {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.password-requirements p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.password-requirements li::before {
    content: '✗';
    color: #ef4444;
    font-weight: bold;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #10b981;
}

.password-requirements li.valid {
    color: #10b981;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: #1e40af;
    border-color: #1e40af;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #1e40af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #1d4ed8;
}

/* Submit Button */
.auth-submit-btn {
    background: #1e40af;
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.auth-submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.auth-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

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

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.auth-footer a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    color: #1d4ed8;
}

.auth-note {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #92400e;
    font-size: 0.85rem;
}

.auth-note i {
    color: #f59e0b;
}

/* Approval Notice */
.approval-notice {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.approval-notice i {
    color: #3b82f6;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.approval-notice h4 {
    color: #1e40af;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.approval-notice p {
    color: #1e40af;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* Error and Success Messages */
.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.success-message {
    color: #10b981;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header i {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.modal-header h2 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.approval-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

.step i {
    color: #3b82f6;
    font-size: 1.25rem;
}

.step span {
    color: #374151;
    font-weight: 500;
}

.modal-body ul {
    color: #6b7280;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.modal-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.modal-btn:hover {
    background: #e5e7eb;
}

.modal-btn.primary {
    background: #1e40af;
    color: white;
    border: 1px solid #1e40af;
}

.modal-btn.primary:hover {
    background: #1d4ed8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
    font-size: 2rem;
    color: #1e40af;
    margin-bottom: 1rem;
}

.loading-spinner p {
    color: #374151;
    font-weight: 500;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .phone-input {
        flex-direction: column;
    }
    
    .phone-input select {
        flex: none;
    }
    
    .verification-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-card {
        padding: 1rem;
    }
    
    .approval-notice {
        flex-direction: column;
        text-align: center;
    }
}
