/* ========================================
   Auth Pages - Modern Glassmorphism Design
   ======================================== */

:root {
    --auth-primary: #074620;
    --auth-secondary: #297947;
    --auth-accent: #4CAF50;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #074620 0%, #0a6630 50%, #297947 100%);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    animation: authBgRotate 30s linear infinite;
}

@keyframes authBgRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Floating shapes */
.auth-container::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 480px;
    padding: 48px 40px;
    position: relative;
    z-index: 1;
    animation: authCardFadeIn 0.6s ease-out;
}

@keyframes authCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 16px;
    }
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo img {
    height: 70px;
    object-fit: contain;
}

.auth-logo h2 {
    color: var(--auth-primary);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-top: 16px;
}

/* Title */
.auth-title {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: #333;
    margin-bottom: 8px;
}

.auth-title p {
    color: #666;
    font-size: var(--text-base);
}

/* Form Group */
.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: #333;
    margin-bottom: 8px;
}

.auth-form-label span {
    color: #e53935;
}

.auth-form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: var(--text-base);
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    background: #fff;
}

.auth-form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(7, 70, 32, 0.1);
}

.auth-form-input::placeholder {
    color: #aaa;
}

.auth-form-input.is-invalid {
    border-color: #e53935;
}

/* Input with icon */
.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper .auth-form-input {
    padding-right: 48px;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

/* RTL Support */
[dir="rtl"] .auth-input-wrapper .auth-form-input {
    padding-right: 16px;
    padding-left: 48px;
}

[dir="rtl"] .auth-input-icon {
    left: auto;
    right: 16px;
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
}

[dir="rtl"] .auth-password-toggle {
    left: auto;
    right: 16px;
}

/* Remember & Forgot */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-remember input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
}

.auth-remember span {
    font-size: var(--text-sm);
    color: #666;
}

.auth-forgot {
    font-size: var(--text-sm);
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-forgot:hover {
    color: var(--auth-secondary);
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(7, 70, 32, 0.3);
}

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

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    padding: 0 16px;
    color: #999;
    font-size: var(--text-sm);
}

/* Social Login */
.auth-social {
    display: flex;
    gap: 12px;
}

.auth-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-social-btn:hover {
    border-color: var(--auth-primary);
    background: rgba(7, 70, 32, 0.05);
}

.auth-social-btn img {
    width: 20px;
    height: 20px;
}

/* Footer Link */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    color: #666;
    font-size: var(--text-base);
}

.auth-footer a {
    color: var(--auth-primary);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Error Messages */
.auth-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #c62828;
    font-size: var(--text-sm);
}

.auth-field-error {
    color: #e53935;
    font-size: var(--text-xs);
    margin-top: 6px;
}

/* Success Message */
.auth-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #2e7d32;
    font-size: var(--text-sm);
}

/* Two Column Layout for Register */
.auth-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 576px) {
    .auth-form-row {
        grid-template-columns: 1fr;
    }
}

/* Phone Input */
.auth-phone-wrapper {
    display: flex;
    gap: 8px;
}

.auth-phone-code {
    width: 80px;
    padding: 14px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: var(--text-base);
    text-align: center;
    background: #f5f5f5;
}

.auth-phone-input {
    flex: 1;
}

/* Loading Spinner */
.auth-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: authSpin 1s linear infinite;
    margin-left: 8px;
}

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