/* ===== AUTH PAGES ===== */

html {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
}

body.auth-page {
    padding: 40px 16px;
    position: relative;
    background: #f9fafb;
    overflow: visible !important;
    height: auto !important;
    min-height: 100vh;
}

.auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(160deg, #ffffff 0%, #eff6ff 60%, #dbeafe 100%);
}

.auth-bg .orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #2563eb, transparent 70%);
    top: -150px;
    right: -100px;
    filter: blur(80px);
    opacity: 0.2;
    position: absolute;
}

.auth-bg .orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #3b82f6, transparent 70%);
    bottom: -100px;
    left: -100px;
    filter: blur(80px);
    opacity: 0.15;
    position: absolute;
}

.auth-wrapper {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.auth-card {
    padding: 40px;
    background: #fff;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #111827;
    padding: 28px 40px;
    border-radius: 24px 24px 0 0;
}

.auth-logo img {
    height: 133px;
    width: auto;
    display: block;
}

.auth-logo i {
    color: #2563eb;
}

.auth-logo span {
    color: #2563eb;
}

.auth-card h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #111827;
}

.auth-subtitle {
    font-size: 0.9rem;
    margin-bottom: 28px;
    color: #6b7280;
}

/* Alert */

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.alert-success {
    background: rgba(22, 163, 74, 0.06);
    border: 1px solid rgba(22, 163, 74, 0.2);
    color: #16a34a;
}

/* Form */

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon>i:first-child {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}

.input-icon input,
.input-icon select {
    width: 100%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px 12px 40px;
    color: #111827;
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.25s;
    -webkit-appearance: none;
}

.input-icon input:focus,
.input-icon select:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
}

.input-icon input::placeholder {
    color: #d1d5db;
}

.input-icon select option {
    background: #fff;
    color: #111827;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
}

.toggle-pw:hover {
    color: #2563eb;
}

.forgot-link {
    font-size: 0.78rem;
    font-weight: 400;
    color: #2563eb;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}

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

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

/* Password strength */

.pw-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.pw-bar {
    flex: 1;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    transition: background 0.3s;
}

/* Checkbox */

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: 20px;
    line-height: 1.5;
}

.checkbox-label input {
    margin-top: 2px;
    accent-color: #2563eb;
    cursor: pointer;
}

.checkbox-label a {
    color: #2563eb;
    text-decoration: none;
}

/* Auth button */

.btn-auth {
    padding: 14px;
    font-size: 0.95rem;
    position: relative;
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

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

.auth-switch {
    text-align: center;
    font-size: 0.88rem;
    color: #9ca3af;
    margin-top: 20px;
}

.auth-switch a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 768px) {
    .auth-wrapper {
        max-width: 100%;
    }
    .auth-logo img {
        height: 80px !important;
        max-width: 90%;
    }
}

@media (max-width: 540px) {
    .auth-page {
        padding: 0;
        background: #fff;
    }
    .auth-wrapper {
        max-width: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    .auth-logo {
        border-radius: 0;
    }
    .auth-card {
        padding: 28px 16px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .auth-logo img {
        height: 60px !important;
        max-width: 85%;
    }
}