.user-switcher {
  position: relative;
}

.user-chip {
  cursor: pointer;
  user-select: none;
}

.user-dropdown-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  color: #374151;
}

.user-dropdown-toggle:hover {
  background: #f3f4f6;
}

.dropdown-icon {
  font-size: 12px;
  line-height: 1;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  z-index: 50;
}

.user-dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.user-dropdown-header h3 {
  margin: 0;
  font-size: 14px;
  color: #111827;
}

.user-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.user-item:hover {
  background: #f3f4f6;
}

.user-item.active {
  background: #eef4ff;
}

.user-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.user-item-name {
  flex: 1;
  font-size: 14px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-item-check {
  color: #2563eb;
  font-weight: 800;
}

.user-dropdown-footer {
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
}

.add-user-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  color: #111827;
}

.add-user-btn:hover {
  background: #f9fafb;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.form-group input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.form-group select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #fff;
}

.form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #e5e7eb;
  color: #1f2937;
}

.modal-overlay.hidden {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#loginModal {
  z-index: 120;
}

.modal-content {
  width: min(520px, calc(100vw - 32px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.modal-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0 6px;
  color: #374151;
}

.modal-body {
  padding: 14px 16px 16px;
}
