.user-menu-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    font-family: 'Noto Sans SC', sans-serif;
}

.user-name-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    background: white;
    border: 1px solid #dee2e6;
    transition: background 0.2s;
    user-select: none;
}

.user-name-wrapper:hover {
    background: #f8f9fa;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    fill: #6c757d;
    transition: transform 0.2s;
}
.dropdown-icon.rotated {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 8px;
    z-index: 100;
    min-width: 140px;
    display: none;
    flex-direction: column;
    gap: 4px;
}
.dropdown-menu.show {
    display: flex;
}

.menu-item-btn {
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #212529;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}
.menu-item-btn:hover {
    background: #f1f5f9;
}
.menu-item-btn.primary-text {
    color: #0d6efd;
}
.menu-item-btn.primary-text:hover {
    background: #eff6ff;
}
.menu-item-btn.warning-text {
    color: #dc3545;
}
.menu-item-btn.warning-text:hover {
    background: #fef2f2;
}

.menu-divider {
    height: 1px;
    background: #dee2e6;
    margin: 4px 0;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}
.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid rgba(255,255,255,0.3);
    text-align: left;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-header h2 {
    margin: 0 0 24px 0;
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}
.form-group input {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.form-group input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}
.form-group input:disabled {
    background-color: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.flex-row {
    display: flex;
    gap: 8px;
}
.flex-row input {
    flex: 1;
}
.inline-btn {
    padding: 0 16px;
    border: 1px solid #0d6efd;
    background: transparent;
    color: #0d6efd;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.inline-btn:hover {
    background: rgba(13, 110, 253, 0.08);
}
.inline-btn.solid {
    background: #0d6efd;
    color: white;
}
.inline-btn.solid:hover {
    opacity: 0.9;
}

.submit-btn {
    margin-top: 8px;
    padding: 12px;
    border: none;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-mode {
    margin-top: 16px;
    text-align: center;
}
.toggle-mode a {
    font-size: 0.875rem;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}
.toggle-mode a:hover {
    text-decoration: underline;
}

.error-banner {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 16px;
}
.info-banner {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 16px;
    word-break: break-all;
}
