/* === AUTH MODAL === */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.auth-modal-overlay.open .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-light);
    transition: all 0.2s ease;
    z-index: 10;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.auth-modal-header {
    padding: 40px 40px 24px;
    text-align: center;
}

.auth-modal-logo {
    width: 48px;
    height: 48px;
    background: var(--bg-dark-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.auth-modal-logo i {
    font-size: 24px;
    color: var(--accent-color);
}

.auth-modal-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--bg-dark-1);
    margin-bottom: 8px;
}

.auth-modal-subtitle {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.5;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    padding: 0 40px;
    gap: 8px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: var(--text-dark);
}

.auth-tab.active {
    color: var(--bg-dark-1);
    border-bottom-color: var(--bg-dark-1);
}

/* Auth Forms */
.auth-forms {
    padding: 24px 40px 40px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-field {
    margin-bottom: 20px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    background: #f5f5f7;
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--bg-dark-1);
}

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

.auth-input-icon {
    position: relative;
}

.auth-input-icon .auth-input {
    padding-left: 48px;
}

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

/* Checkbox */
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--bg-dark-1);
    cursor: pointer;
}

.auth-checkbox label {
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

.auth-checkbox a {
    color: var(--bg-dark-1);
    text-decoration: none;
    font-weight: 500;
}

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

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: 16px 24px;
    background: var(--bg-dark-1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.auth-divider span {
    font-size: 13px;
    color: var(--text-light);
}

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

.auth-social-btn {
    width: 100%;
    padding: 14px 20px;
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.auth-social-btn:hover {
    background: #eee;
    border-color: rgba(0, 0, 0, 0.15);
}

.auth-social-btn i {
    font-size: 18px;
}

.auth-social-btn.google i {
    color: #4285f4;
}

.auth-social-btn.apple i {
    color: #000;
}

/* Error Message */
.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.auth-error.visible {
    display: block;
}

/* Success Message */
.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.auth-success.visible {
    display: block;
}

/* === USER NAV BUTTON === */
.nav-user {
    display: none;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-dark-1);
    color: #fff;
    border: none;
    border-radius: 9999px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-user-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-user-btn i {
    font-size: 14px;
}

.nav-user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark-1);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 254, 0, 0.3);
}

/* User Dropdown */
.nav-user-dropdown {
    position: relative;
}

.nav-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-user-dropdown.open .nav-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.15s ease;
}

.nav-user-menu-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-user-menu-item i {
    width: 18px;
    text-align: center;
    color: var(--text-light);
}

.nav-user-menu-item.danger {
    color: #dc2626;
}

.nav-user-menu-item.danger i {
    color: #dc2626;
}

.nav-user-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 8px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
    }

    .auth-modal-header,
    .auth-forms,
    .auth-tabs {
        padding-left: 24px;
        padding-right: 24px;
    }

    .nav-user-btn span {
        display: none;
    }

    .nav-user-btn {
        padding: 10px;
        border-radius: 50%;
    }
}
