body {
    margin: 0;
    padding: 0;
}

#map {
    height: 100dvh;
    width: 100%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background: transparent;
}

select {
    padding: 5px;
    font-size: 14px;
}

.logout-btn {
    margin-left: 10px;
    padding: 5px 12px;
    background: var(--c-danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}

.logout-btn:hover {
    background: var(--c-danger-hover);
}

.selector-group {
    margin: 5px 0;
    padding: 5px;
}

.selector-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 12px;
}

.hall-selector,
.orchestra-selector {
    width: 100%;
    padding: 3px;
    font-size: 12px;
}

.tree-divider {
    margin: 5px 0;
    border: 0;
    border-top: 1px solid var(--c-border);
}

/* Custom Select Styles */
.custom-select {
    position: relative;
    width: 100%;
    font-size: 12px;
}

.custom-select-trigger {
    padding: 4px 8px;
    border: 1px solid var(--c-border);
    background: white;
    cursor: pointer;
    user-select: none;
    border-radius: var(--radius-sm);
    transition: border-color 0.15s;
}

.custom-select-trigger:hover {
    border-color: var(--c-secondary);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--c-border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.custom-select-dropdown.active {
    display: block;
}

.custom-select-option {
    padding: 6px 8px;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

.custom-select-option:hover {
    background: rgba(102, 126, 234, 0.08);
}

.custom-select-option.selected {
    background: rgba(102, 126, 234, 0.15);
    font-weight: 600;
}

.custom-select-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.custom-select-disabled .custom-select-trigger {
  cursor: not-allowed;
  background: var(--c-bg-subtle);
}

.custom-select-disabled .custom-select-trigger:hover {
  border-color: var(--c-border);
}

/* Musician Markers */
.musician-marker {
  background: transparent;
  border: none;
}

.musician-icon {
  background: #2196F3;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  border: 2px solid white;
}

.musician-popup h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.musician-popup p {
  margin: 4px 0;
  font-size: 12px;
}

.musician-popup.anonymous {
  background: #f5f5f5;
}

/* Seat Markers */
.seat-marker {
  background: transparent;
  border: none;
}

.seat-icon {
  font-size: 20px;
  text-align: center;
  line-height: 30px;
}

.seat-popup h4 {
  margin: 0;
  font-size: 14px;
}

/* Context Menu Icon Styling */
.context-menu-icon {
  display: inline-block;
  width: 20px;
  margin-right: 8px;
  text-align: center;
}

/* Create Popup Styles */
.row-create-popup .leaflet-popup-content-wrapper {
  border-left: 4px solid var(--c-success);
}

.row-create-popup h4 {
  color: var(--c-success);
  margin: 0 0 12px 0;
}

/* ── Selector row action buttons (shared by hall and orchestra) ── */
.btn-selector-add,
.btn-selector-edit,
.btn-selector-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  min-height: auto;
  min-width: auto;
  flex-shrink: 0;
  opacity: 0.6;
  line-height: 1;
}
.btn-selector-add                          { color: var(--c-success, #22c55e); }
.btn-selector-add:hover                    { opacity: 1; color: var(--c-success-hover, #16a34a); }
.btn-selector-edit                         { color: var(--c-primary, #667eea); }
.btn-selector-edit:hover                   { opacity: 1; color: var(--c-primary-hover, #5468d4); }
.btn-selector-delete                       { color: var(--c-danger, #ef4444); }
.btn-selector-delete:hover                 { opacity: 1; color: var(--c-danger-hover, #dc2626); }
.btn-selector-edit:disabled,
.btn-selector-delete:disabled              { opacity: .3; cursor: not-allowed; }
a.btn-selector-add,
a.btn-selector-edit,
a.btn-selector-delete                      { text-decoration: none; line-height: 1; }

/* ── Map context menu ─────────────────────────── */
.map-ctx-menu {
  position: fixed;
  z-index: 10001;
  background: #fff;
  border-radius: var(--radius, 8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
  min-width: 180px;
  padding: 4px 0;
  font-size: 14px;
}

.map-ctx-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--c-text, #1e293b);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: inherit;
  min-height: 44px;
  transition: background 0.1s;
}

.map-ctx-menu-item:hover { background: rgba(102, 126, 234, 0.06); }

.map-ctx-menu-item--danger { color: var(--c-danger, #ef4444); }
.map-ctx-menu-item--danger:hover { background: rgba(239, 68, 68, 0.06); }

.map-ctx-menu-info {
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border, #dee2e6);
}
.map-ctx-menu-info-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text, #1e293b);
}
.map-ctx-menu-info-detail {
  font-size: 12px;
  color: var(--c-text-muted, #64748b);
  margin-top: 2px;
}
.map-ctx-menu-info-desc {
  font-size: 12px;
  color: var(--c-text-muted, #64748b);
  font-style: italic;
  margin-top: 4px;
}

.map-ctx-menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

/* ── Modal Overlay ────────────────────────────── */
.hall-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hall-modal-overlay.active { opacity: 1; }

/* ── Modal Box ────────────────────────────────── */
.hall-modal {
  background: #fff;
  border-radius: var(--radius, 8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
  width: 420px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  transform: translateY(-20px);
  transition: transform 0.25s ease;
}
.hall-modal-overlay.active .hall-modal { transform: translateY(0); }

.hall-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  touch-action: manipulation;
  flex-shrink: 0;
}
.hall-modal-header h4 { margin: 0; font-size: 1rem; font-weight: 600; }

.hall-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--c-text-muted, #64748b);
  padding: 0 4px;
  transition: color 0.15s;
}
.hall-modal-close:hover { color: var(--c-text, #1e293b); }

.hall-modal-body {
  padding: 16px;
  overflow-y: auto;
}

.hall-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

/* Flex wrapper for select + action button */
.selector-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

/* Override width: 100% so the button has room */
.selector-input-row .custom-select {
    flex: 1;
    min-width: 0;   /* allows flex child to shrink below its content size */
    width: auto;    /* override the 100% from .custom-select */
}

/* ── Section popup (wide modal) ──────────────────────────────────────────── */

.orch-modal {
  width: 88vw;
  max-width: 88vw;
  height: 82vh;
  max-height: 82vh;
}

/* Tabs */
.orch-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--c-border);
  padding: 0 16px;
  gap: 2px;
}
.orch-tab {
  background: none;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--c-text-muted);
  margin-bottom: -1px;
  transition: color 0.15s, background 0.15s;
}
.orch-tab:hover:not(:disabled)  { color: var(--c-text); background: var(--c-bg-subtle); }
.orch-tab.active                 { color: var(--c-text); background: #fff; border-color: var(--c-border); }
.orch-tab:disabled               { opacity: .45; cursor: not-allowed; }

/* Tab panes */
.orch-modal-tabs { flex-shrink: 0; }
.orch-modal-body { flex: 1; min-height: 0; overflow-y: hidden; display: flex; flex-direction: column; }
.orch-tab-pane   { display: none; }
.orch-tab-pane.active { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
#secp-pane-seating.active { overflow-y: hidden; }

/* Two-panel layout inside Seating tab */
.disp-musicians-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 10px;
}

.disp-musicians-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.disp-musicians-left .orch-members-msg { flex-shrink: 0; }

.secp-msg { font-size: 12px; min-height: 16px; flex-shrink: 0; }

.secp-assign-list {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.secp-stats {
  font-size: 12px;
  color: var(--c-text-muted);
  padding: 6px;
  background: var(--c-bg-subtle);
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}

.disp-musicians-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
}

.disp-right-section-title { font-size: 12px; font-weight: 600; margin-bottom: 6px; flex-shrink: 0; }

.secp-filter {
  margin-bottom: 6px;
  flex-shrink: 0;
}

.secp-pool {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Phone seating-pane tab bar (hidden on tablet/desktop) */
.secp-pane-tabs {
  display: none;
}

.secp-pane-tabs button {
  flex: 1;
  padding: 8px;
  border: none;
  background: #f1f3f5;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s;
}

.secp-pane-tabs button.active {
  color: var(--c-text);
  background: #fff;
  border-bottom-color: var(--c-primary);
}

.disp-unassigned-pool {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Unassigned member cards */
.disp-member-card {
  padding: 5px 8px;
  margin-bottom: 4px;
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: grab;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.disp-member-card:hover { background: #e9ecef; border-color: var(--c-secondary); }
.disp-member-card.dragging { opacity: 0.4; }

/* Drop zone highlight */
.disp-drop-zone.drag-over td { background: #bbdefb !important; }
.disp-drop-hint { font-size: 10px; color: #90a4ae; margin-left: 6px; font-weight: normal; font-style: italic; }

/* Named musician row being dragged */
tr.dragging td { opacity: 0.4; }

/* Unassigned pool highlight when a named musician is dragged over it */
.disp-unassigned-pool.drag-over-pool {
  outline: 2px dashed #ef9a9a;
  border-radius: 4px;
  background: #ffebee;
}

/* Add-member row */
.orch-add-row {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  align-items: center;
}
.orch-add-row input,
.orch-add-row select { flex: 1; min-width: 0; }

/* Members table */
.orch-members-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.orch-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.orch-members-table th,
.orch-members-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.orch-members-table th {
  background: var(--c-bg-subtle);
  font-weight: 600;
  position: sticky;
  top: 0;
}
.orch-members-table tr:last-child td { border-bottom: none; }
.orch-members-table tr.orch-editing  { background: #fffbe6; }
.orch-member-actions { white-space: nowrap; text-align: right; width: 1%; }


/* CSV textarea */
.orch-csv-input {
  font-family: monospace;
  font-size: 12px;
  height: 220px;
  resize: vertical;
}

/* Named-musician instrument resolution panel */
#disp-resolve-list { max-height: 340px; overflow-y: auto; }
.disp-resolve-item { font-size: 12px; }
.disp-resolve-item .resolve-create-section input,
.disp-resolve-item .resolve-create-section select { font-size: 12px; }

/* Icon theme — instrument list */
.ith-instr-list { border-top: 1px solid var(--c-border); margin-top: 8px; }
.ith-instr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.ith-icon-cell { width: 36px; flex-shrink: 0; text-align: center; }
.ith-icon-thumb {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: var(--c-bg-subtle);
}
.ith-icon-placeholder {
  width: 32px;
  height: 32px;
  background: #eee;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  display: inline-block;
}
.ith-instr-info { flex: 1; min-width: 0; }
.ith-instr-name { font-weight: 600; }
.ith-instr-abbr { color: var(--c-text-muted); font-size: 11px; }
.ith-instr-desc { color: var(--c-text-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ith-instr-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* Icon theme — add instrument section */
.ith-add-section {
  margin-top: 12px;
  padding: 10px;
  background: var(--c-bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
}
.ith-add-section label { font-size: 12px; font-weight: bold; display: block; margin-bottom: 4px; }
.ith-add-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.ith-add-row input, .ith-add-row select { font-size: 12px; padding: 3px 6px; flex: 1; min-width: 80px; }

/* Orchestra and hall selector buttons re-use .btn-selector-* above */

/* ── Section popup — seating tab ─────────────────────────────────────────── */

/* Assignment item */
.secp-assign-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  cursor: grab;
  flex-shrink: 0;
  transition: background 0.15s;
}

.secp-pos-label {
  font-weight: bold;
  color: var(--c-text-muted);
  min-width: 34px;
  cursor: pointer;
  font-size: 12px;
}

.secp-pos-input {
  display: none;
  width: 52px;
  padding: 1px 4px;
  font-size: 12px;
}

.secp-assign-name { flex: 1; font-size: 13px; }
.secp-assign-instr { font-size: 11px; color: var(--c-text-muted); white-space: nowrap; }

.secp-assign-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  position: relative;
  flex-shrink: 0;
}
.secp-assign-icon .secp-icon-base { width: 28px; height: 28px; object-fit: contain; }
.secp-assign-icon .secp-icon-fallback {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e0e0e0; border: 1px solid #bbb; display: inline-block;
}
.secp-assign-icon .secp-icon-badge-tl {
  width: 12px; height: 12px; position: absolute; top: 0; left: 0;
}
.secp-assign-icon .secp-icon-badge-br {
  width: 12px; height: 12px; position: absolute; bottom: 0; right: 0;
}

.secp-remove-btn {
  flex-shrink: 0;
  background: #e5e7eb;
  color: var(--c-text-muted);
  border: none;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.secp-remove-btn:hover {
  background: var(--c-danger);
  color: #fff;
}

.secp-empty-msg {
  color: var(--c-text-muted);
  font-style: italic;
  text-align: center;
  padding-top: 20px;
}

/* Insert zone: thin invisible line between assignment items */
.secp-insert-zone {
  height: 6px;
  border-radius: 3px;
  flex-shrink: 0;
  transition: height 0.1s, background 0.1s, border 0.1s;
}
.secp-insert-zone.active {
  height: 22px;
  background: rgba(102, 126, 234, 0.12);
  border: 2px dashed var(--c-primary);
}

/* Bottom filler — fills remaining list height, also a drop target */
.secp-list-end {
  flex: 1;
  min-height: 60px;
  border-radius: var(--radius-sm);
  transition: background 0.1s, border 0.1s;
}
.secp-list-end.active {
  background: rgba(102, 126, 234, 0.12);
  border: 2px dashed var(--c-primary);
}

/* Assignment item being dragged */
.secp-assign-item.dragging { opacity: 0.35; }

/* Pool drop highlight (assignment dragged back to pool) */
.secp-pool.secp-pool-drop-active {
  outline: 2px dashed #ef9a9a;
  background: #ffebee;
}

/* Pool items */
.secp-pool-group { margin-bottom: 8px; }
.secp-pool-group-header { background: #f0f0f0; padding: 4px 8px; font-weight: 600; font-size: 12px; border-radius: var(--radius-sm); }
.secp-pool-voice-header { padding: 2px 12px; font-style: italic; color: var(--c-text-muted); font-size: 11px; }

.secp-pool-item-badge {
  font-size: 10px;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  font-weight: 500;
}
.secp-pool-item-badge-planned { background: rgba(34, 197, 94, 0.12); color: var(--c-success-hover); }
.secp-pool-item-badge-named { background: rgba(102, 126, 234, 0.12); color: var(--c-primary); }
.secp-pool-item-avail { font-size: 10px; color: var(--c-text-muted); margin-left: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   Disposition Musicians page — two-panel hierarchy
   ═══════════════════════════════════════════════════════════════════════════════ */

.dm-two-panel {
  display: flex;
  gap: 0;
  height: calc(100dvh - 140px);
  min-height: 300px;
}

.dm-left-panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 0 12px 12px 0;
  border-right: 1px solid var(--c-border);
}

.dm-right-panel {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  overflow-y: auto;
}

/* Instrument group */
.dm-instrument-group {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: #fff;
}

.dm-instrument-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--c-bg-subtle);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  user-select: none;
}

.dm-instrument-group.collapsed .dm-instrument-body { display: none; }
.dm-instrument-group.collapsed .dm-instrument-header {
  border-bottom: none;
  border-radius: var(--radius-sm);
}

.dm-instr-name { font-weight: 600; font-size: 14px; }
.dm-counts { font-size: 11px; color: var(--c-text-muted); flex: 1; min-width: 0; }
.dm-counts-over { color: var(--c-danger); font-weight: 600; }
.dm-instr-qty { width: 60px; }
.dm-instr-label { width: 80px; }
.dm-caret { font-size: 12px; color: var(--c-text-muted); flex-shrink: 0; width: 12px; text-align: center; }
.dm-qty-label { font-size: 11px; color: var(--c-text-muted); flex-shrink: 0; }
.dm-delete-row {
  border: none;
  background: none;
  color: var(--c-danger);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  min-height: auto;
  min-width: auto;
  opacity: 0.5;
}
.dm-delete-row:hover { opacity: 1; }

/* Edit toggle button */
.dm-edit-toggle {
  border: none;
  background: none;
  color: var(--c-primary);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  min-height: auto;
  min-width: auto;
  opacity: 0.6;
  line-height: 1;
}
.dm-edit-toggle:hover,
.dm-edit-toggle.active { opacity: 1; color: var(--c-primary-hover); }

/* Instrument label badge (in header) */
.dm-instr-label-badge {
  font-size: 11px;
  color: var(--c-primary);
  background: rgba(102, 126, 234, 0.1);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* Edit row inside instrument body */
.dm-instr-edit {
  padding: 6px 12px 8px 40px;
  border-bottom: 1px solid #f0f0f0;
  background: rgba(102, 126, 234, 0.04);
}
.dm-edit-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--c-text-muted);
}
.dm-edit-field input { width: 120px; }

/* Add voice row inside instrument body */
.dm-add-voice-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 12px 6px 40px;
  flex-wrap: wrap;
}
.dm-new-voice-name { width: 120px; }
.dm-new-voice-text { width: 100px; }
.dm-add-voice-btn { white-space: nowrap; min-height: 0; min-width: 0; padding: 2px 8px; font-size: 13px; }

/* Voice row */
.dm-voice-section {
  border-bottom: 1px solid #f0f0f0;
}
.dm-voice-section:last-child { border-bottom: none; }

.dm-voice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 40px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.dm-voice-name { min-width: 50px; font-size: 13px; }
.dm-voice-qty { width: 50px; }
.dm-voice-summary { font-size: 11px; color: var(--c-text-muted); font-style: italic; }

/* Assigned musicians under a voice */
.dm-voice-assigned {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 12px 8px 64px;
}

.dm-voice-assigned.collapsed { display: none; }
.dm-direct-assigned { padding-left: 40px; }

.dm-assigned-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8f4fd;
  border-radius: 12px;
  padding: 2px 8px 2px 4px;
  font-size: 12px;
  cursor: grab;
  touch-action: manipulation;
}
.dm-assigned-chip.dragging { opacity: 0.4; }

.dm-assigned-chip img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.dm-remove-assigned {
  border: none;
  background: none;
  color: var(--c-danger);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.dm-remove-assigned:hover { opacity: 1; }

/* Drop target highlight */
.dm-drop-hover {
  outline: 2px dashed var(--c-primary);
  outline-offset: -2px;
  background: rgba(102, 126, 234, 0.05);
}

/* Fulfilled state (named == planned) */
.dm-voice-section.dm-fulfilled > .dm-voice-row {
  background: rgba(34, 197, 94, 0.08);
}
.dm-instrument-group.dm-fulfilled > .dm-instrument-header {
  background: rgba(34, 197, 94, 0.10);
}

/* Voice warning (not all voices filled) */
.dm-voice-warning {
  font-size: 11px;
  color: #b45309;
  flex-shrink: 0;
}

/* Quantity warning */
.dm-qty-warning {
  color: #b45309;
  font-size: 13px;
  flex-shrink: 0;
}

/* Right panel */
.dm-right-header { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.dm-right-filter {
  width: 100%;
  margin-bottom: 8px;
  padding: 6px 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border-color 0.15s;
}

.dm-right-filter:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.dm-unassigned-pool { flex: 1; min-height: 0; overflow-y: auto; }

.dm-member-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  background: #fff;
  cursor: grab;
  touch-action: manipulation;
  transition: background 0.15s, border-color 0.15s;
}
.dm-member-card:hover { background: var(--c-bg-subtle); border-color: var(--c-secondary); }
.dm-member-card.dragging { opacity: 0.4; }
.dm-member-card img { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.dm-member-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dm-member-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-member-instr {
  font-size: 11px;
  color: rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-member-handle { color: rgba(0,0,0,0.3); font-size: 14px; flex-shrink: 0; }

/* CSV section */
.dm-csv-details { margin-top: 16px; }
.dm-csv-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 0;
}

/* Custom add row */
.dm-custom-add { padding-left: 0; }