/* --- Auth Modal --- */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal-overlay.visible {
    display: flex;
}

.auth-modal-card {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: authSlideUp 0.3s ease-out;
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Header & Tabs --- */
.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.auth-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-grey, #f0f0f0);
    border-radius: 100px;
    padding: 3px;
}

.auth-tab {
    padding: 8px 20px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: var(--primary-green);
    color: #fff;
}

.auth-modal-header .btn-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-grey, #f0f0f0);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

/* --- Forms --- */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* .form-group styles moved to molecules/inputs.css */

.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-green);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.btn-auth-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- Footer --- */
.auth-footer {
    padding: 0 24px 24px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-grey, #e0e0e0);
}

.auth-divider span {
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

.btn-guest {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1.5px solid var(--border-grey, #e0e0e0);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-guest:hover {
    border-color: var(--text-dark);
}

/* --- Header Username --- */
.header-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.header-username {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-black);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Dark Mode --- */
.dark-mode .auth-modal-card {
    background: var(--dark-bg, #1a1a1a);
}

.dark-mode .form-group input {
    background: var(--dark-surface, #2a2a2a);
    border-color: var(--dark-border, #3a3a3a);
    color: #fff;
}

.dark-mode .auth-tab {
    color: #ccc;
}

.dark-mode .auth-tabs {
    background: var(--dark-surface, #2a2a2a);
}

.dark-mode .auth-modal-header .btn-close {
    background: var(--dark-surface, #2a2a2a);
    color: #ccc;
}

.dark-mode .btn-guest {
    border-color: var(--dark-border, #3a3a3a);
    color: #ccc;
}
