/* Auth Modal Styles */
.auth-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.auth-overlay.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.auth-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px 32px;
    width: 90%;
    max-width: 420px;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-modal-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
}
.auth-modal-close:hover { color: #333; }

.auth-modal h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    color: #3d2c2c;
    margin: 0 0 8px;
    text-align: center;
}

.auth-modal p.subtitle {
    text-align: center;
    color: #998;
    font-size: 14px;
    margin: 0 0 24px;
}

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

.auth-form label {
    display: block;
    font-size: 13px;
    color: #665;
    margin-bottom: 5px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fafaf8;
}

.auth-form input:focus {
    outline: none;
    border-color: #b08968;
    background: #fff;
}

.auth-form .btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #b08968, #9c6f4a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
}
.auth-form .btn-auth:hover {
    background: linear-gradient(135deg, #9c6f4a, #85573a);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(176,137,104,0.35);
}
.auth-form .btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-error {
    background: #fef2f2;
    color: #c53030;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}
.auth-error.show { display: block; }

.auth-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}
.auth-success.show { display: block; }

.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #887;
}
.auth-switch a {
    color: #b08968;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* User menu when logged in */
.user-menu-wrap {
    position: relative;
    display: inline-block;
}
.user-menu-btn {
    background: none;
    border: 1.5px solid #b08968;
    border-radius: 10px;
    padding: 8px 16px;
    color: #b08968;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.user-menu-btn:hover {
    background: #b08968;
    color: #fff;
}
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 180px;
    z-index: 1000;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
    display: block;
    padding: 10px 18px;
    color: #3d2c2c;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.user-dropdown a:hover { background: #f7f3ef; }
.user-dropdown a.logout-link { color: #c53030; }

/* Nav auth buttons */
.nav-auth-buttons { display: flex; gap: 10px; align-items: center; }
.btn-nav-login,
.btn-nav-register {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
}
.btn-nav-login {
    background: transparent;
    color: #b08968;
    border: 1.5px solid #b08968;
}
.btn-nav-login:hover {
    background: #b08968;
    color: #fff;
}
.btn-nav-register {
    background: linear-gradient(135deg, #b08968, #9c6f4a);
    color: #fff;
}
.btn-nav-register:hover {
    background: linear-gradient(135deg, #9c6f4a, #85573a);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .auth-modal {
        padding: 30px 24px 24px;
        margin: 16px;
    }
    .auth-modal h2 { font-size: 24px; }
}
