/* ============================================
   GLOBAL & BASE STYLES
   ============================================ */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   1. AUTH PAGE LAYOUT
   ============================================ */
.auth-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Auth Navigation */
.auth-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    padding: 1rem 0;
    z-index: 100;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-back:hover {
    background: #f3f4f6;
    color: #2563eb;
}

/* ============================================
   2. AUTH CONTAINER & WRAPPER
   ============================================ */
.auth-container {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 700px;
}

/* ============================================
   3. AUTH BRANDING SECTION
   ============================================ */
.auth-branding {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 3rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    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="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1.5" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.8" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: float 20s infinite linear;
}

.branding-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-large {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.brand-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.brand-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Brand Stats */
.brand-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Testimonial */
.testimonial {
    margin-top: 2rem;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.testimonial-content i {
    font-size: 1.5rem;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.testimonial-content p {
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    display: block;
}

.author-location {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ============================================
   4. AUTH FORMS SECTION
   ============================================ */
.auth-forms {
    padding: 3rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-container {
    display: none;
    animation: fadeInUp 0.5s ease-out;
    width: 100%;
}

.form-container.active {
    display: block;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #64748b;
    font-size: 1rem;
}

/* ============================================
   5. ACCOUNT TYPE SELECTOR
   ============================================ */
.account-type-selector {
    margin-bottom: 2rem;
}

.account-type-selector h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.type-option {
    position: relative;
}

.type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-card {
    display: block;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8fafc;
    cursor: pointer;
    width: 100%;
}

.type-option input[type="radio"]:checked + .option-card {
    border-color: #2563eb;
    background: #eff6ff;
}

.option-card i {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.75rem;
}

.option-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.option-card p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

/* ============================================
   6. AUTH FORM INPUTS
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    position: relative;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 2;
    transition: color 0.3s ease;
    pointer-events: none;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 16px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form input:focus ~ .input-icon {
    color: #2563eb;
}

.auth-form label {
    position: absolute;
    left: 48px;
    top: 16px;
    color: #9ca3af;
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    z-index: 2;
    padding: 0 4px;
}

.auth-form input:focus + label,
.auth-form input:not(:placeholder-shown) + label,
.auth-form input:valid + label {
    top: -12px;
    left: 44px;
    font-size: 0.75rem;
    color: #2563eb;
    font-weight: 500;
}

/* Error States */
.form-group.error input {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.auth-form input:invalid {
    box-shadow: none;
}

.auth-form input:focus:invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ============================================
   7. PHONE INPUT WITH COUNTRY SELECTOR
   ============================================ */
.phone-input-combined {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    position: relative;
}

/* Country Selector */
.country-selector {
    position: relative;
    flex-shrink: 0;
    z-index: 10;
}

.country-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    min-width: 120px;
    height: 54px;
    box-sizing: border-box;
}

.country-select-btn:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.country-select-btn:focus,
.country-select-btn.active {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.country-select-btn.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.country-select-btn.loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Flag and Code */
.country-flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.country-code {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    flex: 1;
    text-align: left;
}

.country-select-btn i.fa-chevron-down {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.country-select-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
    color: #2563eb;
}

/* Country Dropdown */
.country-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 340px;
    max-width: 90vw;
    max-height: 400px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.country-dropdown.active {
    display: flex;
    animation: dropdownSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Country List */
.country-list {
    overflow-y: auto;
    max-height: 320px;
    -webkit-overflow-scrolling: touch;
    background: white;
}

.country-list::-webkit-scrollbar {
    width: 8px;
}

.country-list::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 4px;
}

.country-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.country-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Country Item */
.country-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
    background: white;
}

.country-item:last-child {
    border-bottom: none;
}

.country-item:hover {
    background: #f8fafc;
}

.country-item:active {
    background: #eff6ff;
    transform: scale(0.98);
}

.country-item img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.country-name {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-dial-code {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

/* No Results */
.country-item.no-results {
    grid-template-columns: 1fr;
    padding: 32px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
    cursor: default;
    justify-items: center;
}

.country-item.no-results:hover {
    background: white;
    transform: none;
}

.country-item.no-results i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #cbd5e1;
    display: block;
}

/* Phone Number Wrapper */
.phone-number-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.phone-number-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 2;
    transition: color 0.3s ease;
    pointer-events: none;
}

.phone-number-wrapper input[type="tel"] {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
    height: 54px;
}

.phone-number-wrapper input[type="tel"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.phone-number-wrapper input[type="tel"]:focus ~ .input-icon {
    color: #2563eb;
}

.phone-number-wrapper label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: white;
    padding: 0 4px;
    z-index: 2;
}

.phone-number-wrapper input:focus + label,
.phone-number-wrapper input:not(:placeholder-shown) + label {
    top: -2px;
    left: 44px;
    font-size: 0.75rem;
    color: #2563eb;
    font-weight: 600;
}

.phone-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.phone-hint i {
    color: #3b82f6;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ============================================
   8. PASSWORD FIELD & STRENGTH
   ============================================ */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: #2563eb;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    background: #ef4444;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak { width: 25%; background: #ef4444; }
.strength-fill.fair { width: 50%; background: #f59e0b; }
.strength-fill.good { width: 75%; background: #3b82f6; }
.strength-fill.strong { width: 100%; background: #10b981; }

.strength-text {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ============================================
   9. CHECKBOXES & AGREEMENTS
   ============================================ */
.checkbox-wrapper {
    display: flex;
    align-items: center !important;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    user-select: none;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 18px !important;
    height: 18px !important;
    z-index: 10 !important;
    margin: 2px 0 0 0;
    left: 0;
    top: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 0 !important;
    cursor: pointer;
    z-index: 1;
    pointer-events: none;
}

.checkbox-wrapper:hover .checkmark {
    border-color: #2563eb;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Agreement Section */
.agreement-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.agreement {
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

.agreement .checkmark {
    margin-top: 3px;
    flex-shrink: 0;
}

.agreement-text {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    line-height: 1.6;
    font-size: 0.875rem;
}

.agreement-text .link,
.link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.agreement-text .link:hover,
.link:hover {
    text-decoration: underline;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.forgot-password {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ============================================
   10. BUTTONS
   ============================================ */
.btn-auth {
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-auth:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6;
}

/* Social Login Buttons */
.social-login {
    margin-top: 1.5rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.btn-google:hover {
    border-color: #db4437;
    background: #fef2f2;
}

.btn-social i {
    font-size: 1.1rem;
}

.btn-text {
    background: transparent;
    border: none;
    color: #2563eb;
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-text:hover {
    background: #f0f9ff;
}

.btn-text:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   11. FORM SWITCH
   ============================================ */
.form-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.form-switch a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.25rem;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* ============================================
   12. MODALS
   ============================================ */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

.modal-overlay.active {
    display: flex !important;
}

/* Modal Content */
.modal-content,
.success-modal,
.account-type-modal {
    background: white !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    text-align: center !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
    position: relative !important;
    z-index: 1000000 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Account Type Modal */
.account-type-modal {
    max-width: 500px !important;
    width: 90% !important;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #64748b;
    font-size: 1rem;
}

.account-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.account-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.account-type-btn:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-2px);
}

.account-type-btn.processing {
    pointer-events: none;
    opacity: 0.7;
}

.account-type-btn i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.account-type-btn h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.account-type-btn p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

/* Processing Overlay */
.account-type-btn .processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.processing-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

.processing-text {
    font-size: 0.875rem;
    color: #2563eb;
    font-weight: 500;
}

/* Success Modal */
.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.success-modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.success-modal p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   13. PHONE VERIFICATION MODAL
   ============================================ */
.phone-verification-modal {
    max-width: 450px;
    width: 90%;
    padding: 2.5rem 2rem;
    text-align: center;
}

.phone-verification-modal .modal-close {
    background: #f1f5f9;
}

.phone-verification-modal .modal-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.phone-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: phoneIconPulse 2s ease-in-out infinite;
}

.phone-icon i {
    font-size: 2.5rem;
    color: white;
}

.phone-verification-modal h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.phone-verification-modal p {
    color: #64748b;
    margin-bottom: 0.5rem;
}

/* Verification Code Input */
.verification-code-input {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem 0 1.5rem;
}

.code-digit {
    width: 50px;
    height: 60px;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #1e293b;
}

.code-digit:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: scale(1.05);
}

.code-digit:not(:placeholder-shown) {
    background: #f0f9ff;
    border-color: #2563eb;
}

#verifyCodeBtn {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.875rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#verifyCodeBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.verification-hint {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.verification-hint i {
    color: #f59e0b;
}

.verification-error {
    z-index: 10 !important;
    position: relative !important;
}

.verification-error button {
    transition: all 0.2s ease;
}

.verification-error button:hover {
    background: #b91c1c !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* ============================================
   14. LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999998 !important;
}

.loading-overlay.active {
    display: flex !important;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    min-width: 200px;
    max-width: 90vw;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0% { transform: translateX(-100px) translateY(-100px); }
    100% { transform: translateX(100px) translateY(100px); }
}

@keyframes phoneIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets (≤968px) */
@media (max-width: 968px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .auth-branding {
        order: 2;
        padding: 2rem;
        min-height: 300px;
    }

    .auth-forms {
        order: 1;
        padding: 2rem;
    }

    .brand-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .type-options {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .account-type-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Mobile (≤640px) */
@media (max-width: 640px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-wrapper {
        border-radius: 16px;
    }

    .auth-branding,
    .auth-forms {
        padding: 1.5rem;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .brand-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .nav-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .agreement-text {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .agreement {
        gap: 0.75rem;
    }

    /* Mobile Modal Adjustments */
    .modal-content,
    .account-type-modal,
    .success-modal {
        padding: 1.5rem !important;
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100vh - 2rem) !important;
    }

    .account-type-btn {
        padding: 1.5rem 1rem;
    }

    .account-type-btn i {
        font-size: 2rem;
    }

    /* Country Dropdown Mobile */
    .country-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
    }

    .country-dropdown.active {
        animation: slideUpMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .phone-input-combined {
        flex-direction: row;
        gap: 0.5rem;
    }

    .country-select-btn {
        min-width: 110px;
    }

    .country-item {
        padding: 14px 16px;
        gap: 14px;
    }

    .country-item img {
        width: 32px;
        height: 24px;
    }

    .country-name {
        font-size: 0.95rem;
    }

    .country-dial-code {
        font-size: 0.9rem;
    }
}

@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .modal-content,
    .account-type-modal,
    .success-modal {
        padding: 1rem !important;
        border-radius: 12px !important;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .account-type-btn {
        padding: 1rem;
    }

    .checkbox-wrapper {
        padding: 0.5rem;
        margin: -0.5rem;
        border-radius: 4px;
        transition: background 0.2s ease;
    }

    .checkbox-wrapper:active {
        background: rgba(37, 99, 235, 0.1);
    }

    .checkbox-wrapper input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
    }

    .checkmark {
        width: 24px;
        height: 24px;
    }

    /* Phone Verification Mobile */
    .verification-code-input {
        gap: 0.5rem;
    }

    .code-digit {
        width: 42px;
        height: 52px;
        font-size: 1.25rem;
    }

    .phone-verification-modal {
        padding: 2rem 1.5rem;
    }

    .verification-error {
        font-size: 0.85rem !important;
        padding: 1rem !important;
    }

    .verification-error strong {
        font-size: 0.95rem !important;
    }

    /* Country Selector Mobile */
    .country-select-btn {
        min-width: 100px;
        padding: 12px 10px;
        gap: 0.4rem;
    }

    .country-flag {
        width: 24px;
        height: 18px;
    }

    .country-code {
        font-size: 0.875rem;
    }

    .phone-number-wrapper input[type="tel"] {
        padding-left: 42px;
        font-size: 0.95rem;
    }

    .phone-number-wrapper label {
        left: 42px;
        font-size: 0.95rem;
    }
}

/* Prevent iOS Safari zoom on input focus */
@media screen and (max-width: 768px) {
    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="tel"],
    .auth-form input[type="password"] {
        font-size: 16px !important;
    }
}

/* ============================================
   ACCESSIBILITY FEATURES
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .auth-form input {
        border-width: 3px;
    }

    .btn-primary {
        border: 3px solid #1d4ed8;
    }

    .country-select-btn,
    .phone-number-wrapper input[type="tel"] {
        border-width: 3px;
    }

    .country-item {
        border-bottom-width: 2px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .checkbox-wrapper {
        min-height: 44px;
        align-items: center;
    }

    .btn-social,
    .account-type-btn,
    .btn-auth {
        min-height: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .country-select-btn,
    .country-item {
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }

    .country-item:active {
        background: #dbeafe;
    }
}

/* Hover Effects (Desktop Only) */
@media (hover: hover) and (pointer: fine) {
    .country-item:hover .country-name {
        color: #2563eb;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .country-dropdown {
        background: #1e293b;
        border-color: #334155;
    }

    .country-list {
        background: #1e293b;
    }

    .country-item {
        border-color: #334155;
        background: #1e293b;
    }

    .country-item:hover {
        background: #334155;
    }

    .country-name {
        color: #e2e8f0;
    }

    .country-dial-code {
        color: #94a3b8;
    }
}