/* Auth Pages Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.auth-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.auth-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.auth-divider {
    height: 1px;
    background-color: #e5e5e5;
}

/* Main Content */
.auth-main {
    flex: 1;
    padding: 24px 20px;
    overflow-y: auto;
}

.auth-intro {
    margin-bottom: 28px;
}

.auth-intro h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-intro p {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

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

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

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 52px;
    background-color: #f5f5f5;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #111;
    background-color: #fff;
}

.input-icon {
    color: #999;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.input-wrapper input,
.input-wrapper select {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #111;
    outline: none;
    height: 100%;
}

.input-wrapper input::placeholder {
    color: #999;
}

.input-wrapper select {
    cursor: pointer;
    appearance: none;
    padding-right: 30px;
}

.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 16px;
    color: #666;
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Phone Input */
.phone-input {
    gap: 0;
}

.phone-input .input-icon {
    margin-right: 12px;
}

.country-code {
    font-size: 15px;
    color: #111;
    font-weight: 500;
    padding-right: 12px;
}

.code-divider {
    width: 1px;
    height: 24px;
    background-color: #ddd;
    margin-right: 12px;
}

.phone-input input {
    padding-left: 0;
}

/* Password Toggle */
.toggle-password {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

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

/* Input Hint */
.input-hint {
    font-size: 13px;
    color: #888;
}

/* Forgot Password */
.forgot-password {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    align-self: flex-start;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: #f8f8f8;
    border-radius: 12px;
    margin-top: 8px;
}

.info-icon {
    color: #888;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* Login Toggle */
.login-toggle {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background-color: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* OTP Inputs */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.otp-digit {
    width: 48px;
    height: 56px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    background-color: #f5f5f5;
    transition: all 0.2s ease;
}

.otp-digit:focus {
    border-color: #111;
    background-color: #fff;
    outline: none;
}

.otp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.otp-timer {
    font-size: 14px;
    color: #666;
}

.resend-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #0066cc;
    font-weight: 500;
    cursor: pointer;
}

.resend-btn:hover {
    text-decoration: underline;
}

/* Footer */
.auth-footer {
    padding: 16px 20px 32px;
    background: #fff;
    position: sticky;
    bottom: 0;
}

.auth-footer .auth-divider {
    margin-bottom: 16px;
}

.btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #111;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #333;
}

.btn-primary:active {
    transform: scale(0.98);
}


.use-different {
    text-align: center;
    margin-top: 15px;
}


.auth-form {
    width: 100%;
}

.otp-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.otp-input {
    width: 50px;
    height: 55px;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 8px rgba(108, 99, 255, 0.2);
}

.otp-input::placeholder {
    color: #bbb;
}

@media (max-width: 480px) {
    .otp-container {
        gap: 8px;
    }

    .otp-input {
        width: 42px;
        height: 48px;
        font-size: 18px;
    }
}


.btn-link {
    background: none;
    border: none;
    color: #007bff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: #0056b3;
    text-decoration: none;
}



.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    font-size: 15px;
    color: #666;
    margin-top: 16px;
}

.auth-switch a {
    color: #111;
    font-weight: 600;
    text-decoration: underline;
}

.auth-switch a:hover {
    color: #0066cc;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Success/Error States */
.input-wrapper.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.input-wrapper.success {
    border-color: #28a745;
}

.error-message {
    font-size: 13px;
    color: #dc3545;
    margin-top: 4px;
}

/* Loading State */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 14px 24px;
    background-color: #111;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transition: transform 0.3s ease;
    max-width: calc(100% - 40px);
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

/* Responsive */
@media (min-width: 481px) {
    body {
        padding: 24px;
        align-items: center;
    }

    .auth-container {
        min-height: auto;
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        overflow: hidden;
    }

    .auth-header {
        position: relative;
    }

    .auth-footer {
        position: relative;
    }
}

@media (max-width: 360px) {
    .otp-digit {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }
}