/* ===== Auth Pages ===== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Animated background blobs */
.auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: blobFloat 8s ease-in-out infinite alternate;
}

.auth-blob-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.auth-blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -4s;
}

@keyframes blobFloat {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.05); }
}

/* Container */
.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.auth-logo {
    text-align: center;
}

.auth-logo-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.auth-logo-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.auth-logo-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* Card */
.auth-card {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.auth-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.auth-card-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
    background: rgba(108, 99, 255, 0.05);
}

.form-input.input-error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.15);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.input-password-wrap .form-input {
    padding-right: 3rem;
}

.toggle-password,
.toggle-password-confirm {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.toggle-password:hover,
.toggle-password-confirm:hover {
    opacity: 1;
}

.eye-icon {
    font-size: 1rem;
}

/* Error message */
.form-error {
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
    text-align: center;
}

/* Submit button */
.btn-auth {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Switch link */
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--accent-primary);
    font-weight: 600;
    transition: color var(--transition);
}

.auth-link:hover {
    color: var(--accent-secondary);
}

/* Password strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: -0.25rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

/* ===== Sidebar User Block ===== */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin: 0 0.5rem 0.5rem;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    color: #fff;
}

.user-info {
    min-width: 0;
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logout button inside sidebar */
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: calc(100% - 1rem);
    margin: 0 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
    cursor: pointer;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
}

.sidebar-logout:hover {
    color: var(--error);
    background: rgba(255, 82, 82, 0.08);
}

/* Profile page - account section */
.account-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.account-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.account-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.account-info-row:last-child {
    border-bottom: none;
}

.account-info-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.account-info-value {
    font-weight: 600;
}

/* Inline form for password change */
.inline-form {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.inline-form.open {
    display: flex;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
}
