/* ==================================== */
/* TOOLBAR ROW (Undo, Redo, etc.)       */
/* ==================================== */
.toolbar-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.btn-sym,
.btn-tool {
  height: 38px;
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-pill);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-sym {
  flex: 1;
  gap: 6px;
  padding: 0 12px;
  position: relative;
  overflow: hidden;
}

.btn-sym .sym-icon {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.btn-sym .sym-text {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
  text-align: left;
}

.btn-sym .sym-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  background: var(--border-medium);
}

.btn-tool {
  width: 38px;
  font-size: 16px;
  color: var(--text-secondary);
}

.btn-sym:hover,
.btn-tool:hover:not(:disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-sym:hover .sym-icon {
  transform: scale(1.1);
}

.btn-sym.active {
  background: linear-gradient(135deg, var(--accent-success) 0%, #4D7A56 100%);
  border-color: var(--accent-success);
  color: white;
}

.btn-sym.active .sym-status-dot {
  background: white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.btn-sym.active:hover {
  background: linear-gradient(135deg, var(--accent-success-hover) 0%, #3D6A46 100%);
  box-shadow: 0 4px 12px rgba(93, 138, 102, 0.3);
}

.btn-sym.broken {
  background: linear-gradient(135deg, var(--accent-danger) 0%, #A84C4C 100%);
  border-color: var(--accent-danger);
  color: white;
  animation: shake 0.5s ease-in-out;
}

.btn-sym.broken .sym-status-dot {
  background: white;
}

.btn-sym.broken:hover {
  background: linear-gradient(135deg, var(--accent-danger-hover) 0%, #983C3C 100%);
  box-shadow: 0 4px 12px rgba(196, 92, 92, 0.3);
}

.btn-tool:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ==================================== */
/* PILL-SHAPED BUTTONS                  */
/* ==================================== */
.btn-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius-pill);
  background: var(--accent-primary);
  color: white;
  transition: all var(--transition-fast);
  margin-bottom: 16px;
}

.btn-pill:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.25);
}

.btn-pill:active {
  transform: translateY(0);
}

.btn-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary pill button */
.btn-pill.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-pill.btn-secondary:hover {
  background: rgba(217, 119, 87, 0.1);
  box-shadow: 0 2px 8px rgba(217, 119, 87, 0.15);
}

.btn-pill.btn-secondary:disabled {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-medium);
}

/* Primary button */
.btn-primary {
  width: 100%;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius-pill);
  background: var(--accent-primary);
  color: white;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.25);
}

/* Secondary button */
.btn-secondary {
  width: 100%;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-pill);
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  margin-top: 8px;
}

.btn-secondary:hover {
  background: var(--bg-sidebar-hover);
  border-color: var(--accent-secondary);
}

/* Filter buttons */
.btn-filter {
  flex: 1;
  min-width: calc(50% - 3px);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-pill);
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-filter:hover {
  background: var(--bg-sidebar-hover);
  border-color: var(--accent-primary);
}

.btn-filter.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* ==================================== */
/* CONTROL GROUPS                       */
/* ==================================== */
.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.control-group label .label-icon {
  font-size: 14px;
  color: var(--accent-secondary);
}

/* Pill-shaped select */
.control-group select {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235C5C5C' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.control-group select:hover {
  border-color: var(--accent-primary);
}

.control-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15);
}

/* Range slider */
.control-group input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-medium);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 8px 0;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-fast);
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(217, 119, 87, 0.3);
}

.control-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Control hints and values */
.control-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.control-value {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  background: var(--accent-primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  margin-top: 0;
}

/* Label row - label and value on same line */
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.label-row label {
  margin-bottom: 0;
}

.label-row .control-value {
  margin-top: 0;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  margin: 0;
  text-transform: none;
  font-weight: 500;
}

/* ==================================== */
/* SECTION CARDS                        */
/* ==================================== */
.anatomy-card,
.section-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 10px;
  margin: 0 0 12px 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.anatomy-card legend,
.section-card legend {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 0 8px;
  margin-left: -4px;
}

.anatomy-card .control-group {
  margin-bottom: 12px;
}

.anatomy-card .control-group:last-child {
  margin-bottom: 0;
}

.anatomy-card .control-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: stretch;
}

.anatomy-card .control-row:last-child {
  margin-bottom: 0;
}

.anatomy-card .control-row .control-group {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.anatomy-card .control-row .control-group label {
  min-height: 20px;
  display: flex;
  align-items: center;
}

.anatomy-card .control-row .control-group select {
  flex: 1;
}

.section-card {
  position: relative;
  overflow: visible;
}

/* Corner add button (+) */
.btn-add-corner {
  position: absolute;
  top: -12px;
  right: -6px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--accent-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-add-corner:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  transform: scale(1.1);
}

.btn-add-corner.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* ==================================== */
/* COLOR PICKER POPUP                   */
/* ==================================== */
.color-picker-popup {
  background: var(--bg-canvas);
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-md);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: popup-in 0.2s ease;
}

@keyframes popup-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.color-picker-popup .color-swatch {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  outline: none;
}

.color-picker-popup .color-swatch:hover {
  transform: scale(1.05);
  border-color: var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-picker-popup .color-swatch.selected {
  border-color: var(--accent-primary);
  border-width: 3px;
  box-shadow: 0 0 0 2px rgba(217, 119, 87, 0.2);
}

.color-picker-popup .color-swatch:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15);
}

/* ==================================== */
/* ACCORDION ITEM (Generic)             */
/* ==================================== */

/* Generic list container */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Accordion item base */
.accordion-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  margin: 0;
  overflow: visible;
  transition: all var(--transition-fast);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.accordion-item:hover {
  border-color: var(--border-medium);
  background: var(--bg-sidebar-hover);
}

.accordion-item.expanded {
  border-color: var(--accent-primary);
  background: rgba(217, 119, 87, 0.08);
}

/* Accordion header */
.accordion-item-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  cursor: pointer;
  background: inherit;
  border-radius: inherit;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}

.accordion-item.expanded .accordion-item-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.accordion-item-header:hover {
  background: inherit;
}

.accordion-item.expanded .accordion-item-header {
  background: inherit;
}

/* Color dot (for accordion items) */
.item-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.item-color-dot:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Item number */
.accordion-item-number {
  font-size: 11px;
  font-weight: 600;
  min-width: 22px;
  flex-shrink: 0;
}

/* Item label/type (flex to fill space) */
.accordion-item-label {
  flex: 1;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Item badge */
.accordion-item-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-sidebar-hover);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Chevron */
.accordion-item-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.accordion-item.expanded .accordion-item-chevron {
  transform: rotate(90deg);
}

/* Accordion content */
.accordion-item-content {
  display: none;
  padding: 12px;
  border-top: 1px solid var(--border-light);
  border-bottom-left-radius: calc(var(--border-radius-md) - 1px);
  border-bottom-right-radius: calc(var(--border-radius-md) - 1px);
  background: var(--bg-input);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

/* Align multi-select toggle font with other edit-row controls */
.accordion-item-content .multi-select-dropdown-toggle {
  font-size: 11px;
  padding: 6px 10px;
}

.accordion-item.expanded .accordion-item-content {
  display: block;
}

/* Accordion content fieldsets */
.accordion-item-content fieldset {
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  margin: 8px 0;
  padding: 6px 8px;
  background: var(--bg-input);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
}

.accordion-item-content legend {
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 0 8px;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Delete button in accordion */
.accordion-item-content .btn-delete {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--accent-danger);
  border-radius: var(--border-radius-md);
  color: var(--accent-danger);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.accordion-item-content .btn-delete:hover {
  background: var(--accent-danger);
  color: white;
}

/* ==================================== */
/* DELETE BUTTON VARIANTS               */
/* ==================================== */

/* Pill-shaped delete button (inline) */
.btn-delete-pill {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--accent-danger);
  border-radius: var(--border-radius-pill);
  background: transparent;
  color: var(--accent-danger);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-delete-pill:hover {
  background: var(--accent-danger);
  color: white;
}

/* Full-width delete button (pill-shaped) */
.btn-delete-full {
  width: 100%;
  padding: 8px 16px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--accent-danger);
  border-radius: var(--border-radius-pill);
  background: transparent;
  color: var(--accent-danger);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-delete-full:hover {
  background: var(--accent-danger);
  color: white;
}

/* Circular icon delete button */
.btn-delete-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.btn-delete-icon:hover {
  background: var(--accent-danger);
  color: white;
}

/* Empty list message */
.empty-list-message {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ==================================== */
/* VALIDATION TOAST                     */
/* ==================================== */
.validation-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-danger);
  color: white;
  padding: 12px 24px;
  border-radius: var(--border-radius-pill);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(196, 92, 92, 0.3);
  animation: toast-in 0.3s ease;
}

.validation-toast.is-success {
  background: var(--accent-success);
  box-shadow: 0 4px 12px rgba(93, 138, 102, 0.3);
}

.validation-toast.is-info {
  background: var(--accent-secondary);
  box-shadow: 0 4px 12px rgba(124, 108, 92, 0.3);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

/* ==================================== */
/* HELP SECTION                         */
/* ==================================== */
.help-section {
  position: relative;
  margin: auto 0 12px 0;
}

.help-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  opacity: 0.6;
}

.help-btn:hover {
  opacity: 1;
  color: var(--text-secondary);
}

.help-content {
  padding: 12px;
  font-size: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  margin-top: 8px;
}

.help-content h4 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 13px;
}

.help-content h4:not(:first-child) {
  margin-top: 16px;
}

.quadrant-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.quadrant-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.q-badge {
  background: var(--accent-primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 10px;
  min-width: 32px;
  text-align: center;
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shortcuts-list div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcuts-list kbd {
  background: var(--bg-main);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 11px;
  min-width: 24px;
  text-align: center;
}

/* ==================================== */
/* RESOURCES SECTION                    */
/* ==================================== */
.resources-section {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  margin-top: 8px;
  justify-content: center;
}

.resource-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.resource-btn:hover {
  background: var(--bg-sidebar-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.resource-btn svg {
  width: 20px;
  height: 20px;
}

/* Visibility in collapsed mode */
.sidebar.collapsed .resources-section {
  flex-direction: column;
  padding: 8px 0;
}

/* ==================================== */
/* VIEW TOGGLE (MOBILE)                 */
/* ==================================== */
.view-toggle {
  display: none;
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  gap: 4px;
  background: var(--bg-canvas);
  border-radius: var(--border-radius-pill);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-toggle {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius-pill);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-toggle.active {
  background: var(--accent-primary);
  color: white;
}

.btn-toggle:hover:not(.active) {
  background: var(--bg-sidebar-hover);
}

/* ==================================== */
/* TOUCH OPTIMIZATION                   */
/* ==================================== */
@media (pointer: coarse) {
  .btn-pill {
    min-height: 48px;
  }

  .btn-primary {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  /* Larger touch targets */
  .btn-pill {
    padding: 14px 20px;
    min-height: 48px;
  }

  .btn-primary {
    min-height: 44px;
  }

  /* Show view toggle on mobile */
  .view-toggle {
    display: flex;
  }
}

/* ==================================== */
/* CHRONO TABLE                         */
/* ==================================== */
.table-responsive {
  overflow: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  background: #fff;
}

.chrono-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.chrono-table th,
.chrono-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.chrono-table th {
  background: var(--bg-sidebar);
  font-weight: 600;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
}

.chrono-table tr:hover {
  background: var(--bg-hover);
}

.chrono-table tr.is-highlight {
  background: rgba(217, 119, 87, 0.12);
}

.table-input,
.table-select {
  width: 100%;
  min-width: 70px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  font-size: 11px;
  box-sizing: border-box;
}

.table-input.is-invalid,
.table-select.is-invalid {
  border-color: var(--accent-danger);
  box-shadow: 0 0 0 2px rgba(196, 92, 92, 0.15);
}

/* ==================================== */
/* DROPDOWN MENU                        */
/* ==================================== */
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dropdown-toggle:hover {
  background: var(--border-light);
  border-color: var(--border-dark);
}

.dropdown-toggle-icon {
  font-size: 14px;
}

.dropdown-toggle-arrow {
  font-size: 10px;
  color: var(--text-secondary);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 280px;
  max-height: 320px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

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

.dropdown-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.1s ease;
  border-bottom: 1px solid var(--border-light);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--bg-sidebar);
}

.dropdown-item.is-current {
  background: rgba(217, 119, 87, 0.08);
  cursor: default;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.dropdown-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item-date {
  font-size: 11px;
  color: var(--text-secondary);
}

.dropdown-item-delete {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, color 0.1s ease;
  flex-shrink: 0;
}

.dropdown-item-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
