/* Auth Page Styles */
.auth-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Override auth page header styles */
.auth-page .top-header {
    background: #0F172A;
    color: white;
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.auth-page .top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-page .top-header .contact-text {
    color: #cbd5e1;
}

.auth-page .top-header .phone-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
}

.auth-page .top-header .phone-icon {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

/* Navigation for auth pages */
.auth-page .navbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.auth-page .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-page .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #0F172A;
    font-weight: 700;
    font-size: 1.5rem;
}

.auth-page .logo-shape {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    border-radius: 0.5rem;
    position: relative;
}

.auth-page .logo-shape::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    background: white;
    border-radius: 0.25rem;
}

.auth-page .nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.auth-page .nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-page .nav-link:hover {
    color: #2563EB;
}

.auth-page .dropdown-icon {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

.auth-page .nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-page .btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
}

.auth-page .btn-ghost {
    color: #64748b;
    background: transparent;
    border-color: #e2e8f0;
}

.auth-page .btn-ghost:hover {
    background: #f8fafc;
    color: #0F172A;
}

.auth-page .btn-primary {
    background: #2563EB;
    color: white;
}

.auth-page .btn-primary:hover {
    background: #1E40AF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.auth-page .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.auth-page .mobile-menu-toggle span {
    width: 1.5rem;
    height: 2px;
    background: #64748b;
    border-radius: 1px;
    transition: all 0.2s;
}

/* Dropdown Menu */
.auth-page .dropdown {
    position: relative;
}

.auth-page .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    min-width: 600px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}

.auth-page .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-page .services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.auth-page .service-card {
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #0F172A;
    transition: all 0.2s;
    border: 1px solid #f1f5f9;
}

.auth-page .service-card:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-page .service-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.auth-page .service-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.auth-page .service-icon.blue-dark {
    background: #DBEAFE;
    color: #2563EB;
}

.auth-page .service-icon.orange {
    background: #fed7aa;
    color: #ea580c;
}

.auth-page .service-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2;
}

.auth-page .service-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.auth-page .service-card p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    padding: 2rem 1rem;
}

.auth-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.language-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.dropdown-arrow {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

/* Auth Form */
.auth-form {
    margin-top: 2rem;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.5rem;
    text-align: left;
}

.auth-subtitle {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.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;
    gap: 0.5rem;
    min-width: 0;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Select Dropdown */
.select-container {
    position: relative;
}

.form-select {
    appearance: none;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
    color: #64748b;
    pointer-events: none;
}

/* Phone Input */
.phone-input-container {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.phone-input-container:focus-within {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.country-code {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-right: 1px solid #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.country-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.phone-input {
    border: none;
    flex: 1;
    min-width: 0;
    padding: 0.75rem;
}

.phone-input:focus {
    box-shadow: none;
    outline: none;
}

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

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

.password-toggle:hover {
    color: #475569;
}

.eye-icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2;
}

/* Forgot Password */
.forgot-password {
    text-align: right;
    margin-top: -0.5rem;
}

.forgot-link {
    font-size: 0.875rem;
    color: #2563EB;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #1E40AF;
}

/* Auth Button */
.auth-btn {
    background: #2563EB;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    width: 100%;
}

.auth-btn:hover {
    background: #1E40AF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.auth-link {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #1E40AF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-page .top-header .container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .auth-page .navbar .nav-menu {
        display: none;
    }

    .auth-page .mobile-menu-toggle {
        display: flex;
    }

    .auth-card {
        padding: 2rem;
        margin: 1rem;
        border-radius: 0.75rem;
        max-width: 100%;
    }

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

    .auth-title {
        font-size: 1.5rem;
    }

    .language-selector {
        position: static;
        margin-bottom: 1rem;
        display: flex;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        max-width: calc(100vw - 2rem);
    }

    .phone-input-container {
        flex-direction: column;
    }

    .country-code {
        border-right: none;
        border-bottom: 1px solid #cbd5e1;
        justify-content: center;
    }
}

/* Loading State */
.auth-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.auth-btn.loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Form Validation */
.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Success State */
.form-input.success {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.success-message {
    color: #2563EB;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
