/* ============================================================
   Drug Schedules — flat master-detail list, same shape as Brands.
   Reuses generic patterns; only the row meta line differs.
   ============================================================ */

.ds-list { list-style: none; padding: 0; margin: 0; }

.ds-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  transition: background 100ms ease;
}
.ds-list > li:last-child .ds-row { border-bottom: none; }
.ds-row:hover { background: var(--bg-hover); }

.ds-row.is-selected { background: var(--bg-hover); }
.ds-row.is-selected::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 2.5px;
  background: var(--accent);
}

.ds-row-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.ds-row-link::before {
  content: '';
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.ds-row-toggle { position: relative; z-index: 1; }

/* Code tile — short mono code, fixed width. */
.ds-tile {
  min-width: 48px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ds-tile-lg {
  min-width: 56px;
  height: 48px;
  border-radius: 10px;
  font-size: 14px;
}

.ds-row-body { flex: 1; min-width: 0; line-height: 1.3; }
.ds-row-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-row-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-row-meta .sep { margin-inline: 6px; }

.ds-row-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

/* Status toggle — same shape as brand-row-toggle. */
.ds-row-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  padding: 0;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.ds-row-toggle:hover { border-color: var(--accent); }
.ds-row-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.ds-row-toggle:disabled { opacity: 0.6; cursor: progress; }
.ds-row-toggle-thumb {
  display: block;
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--text-tertiary);
  transition: transform 140ms cubic-bezier(.4,0,.2,1), background 120ms ease;
}
.ds-row-toggle.is-on {
  background: var(--accent);
  border-color: var(--accent);
}
.ds-row-toggle.is-on .ds-row-toggle-thumb {
  background: #fff;
  transform: translateX(16px);
}
[dir="rtl"] .ds-row-toggle.is-on .ds-row-toggle-thumb {
  transform: translateX(-16px);
}

.ds-row.is-inactive .ds-row-name,
.ds-row.is-inactive .ds-row-meta {
  opacity: 0.55;
}

/* ── List empty state ────────────────────────────────────── */
.ds-empty { padding: 48px 24px; text-align: center; }
.ds-empty-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.ds-empty-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ds-empty-sub {
  font-size: 12px; color: var(--text-tertiary);
  margin-top: 6px; max-width: 280px; margin-inline: auto; line-height: 1.5;
}

/* ── Right-column editor ─────────────────────────────────── */
.ds-editor { position: sticky; top: 16px; }
.ds-editor-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.ds-editor-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ds-editor-id   { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.ds-editor-id .mono { font-family: var(--font-mono); }

.ds-editor-empty { padding: 40px 24px; text-align: center; }
.ds-editor-empty-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.ds-editor-empty-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ds-editor-empty-sub   { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

.ds-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
