/* Appointment Design System — components.css
 * Quiet premium minimalism components on top of Bootstrap + tokens.
 */

/* ============================================================
 * Layout primitives (8pt)
 * ============================================================ */
.ds-stack { display: flex; flex-direction: column; gap: var(--ds-space-4); }
.ds-stack-sm { gap: var(--ds-space-3); }
.ds-stack-lg { gap: var(--ds-space-6); }
.ds-row { display: flex; align-items: center; gap: var(--ds-space-3); }
.ds-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); }

/* ============================================================
 * Buttons
 * ============================================================ */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: 44px;
  padding: 10px 20px;
  border: var(--ds-border-hairline) solid transparent;
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-font-md);
  font-weight: var(--ds-weight-semibold);
  line-height: var(--ds-lh-base);
  color: var(--ds-text);
  background: var(--ds-surface);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--ds-motion-fast) var(--ds-ease-in),
    border-color var(--ds-motion-fast) var(--ds-ease-in),
    color var(--ds-motion-fast) var(--ds-ease-in),
    box-shadow var(--ds-motion-fast) var(--ds-ease-in);
}
.ds-btn:hover { background: var(--ds-surface-2); text-decoration: none; }
.ds-btn:active { transform: translateY(0); }
.ds-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.ds-btn:focus-visible { outline: var(--ds-focus-width) solid var(--ds-accent); outline-offset: var(--ds-focus-offset); }

.ds-btn-primary { background: var(--ds-accent); color: var(--ds-on-accent); }
.ds-btn-primary:hover { background: var(--ds-accent-hover); color: var(--ds-on-accent); }

.ds-btn-outline { border-color: var(--ds-border-strong); background: transparent; }
.ds-btn-outline:hover { border-color: var(--ds-accent-400); color: var(--ds-accent-500); background: transparent; }

.ds-btn-ghost { background: transparent; color: var(--ds-accent-500); }
.ds-btn-ghost:hover { background: var(--ds-accent-050); color: var(--ds-accent-600); }

.ds-btn-danger { background: var(--ds-danger-050); color: var(--ds-danger-500); }
.ds-btn-danger:hover { background: var(--ds-danger-500); color: #FFF; }

.ds-btn-success { background: var(--ds-success-050); color: var(--ds-success-500); }
.ds-btn-success:hover { background: var(--ds-success-500); color: #FFF; }

.ds-btn-sm { min-height: 36px; padding: 6px 14px; font-size: var(--ds-font-sm); }
.ds-btn-icon { width: 44px; padding: 10px; }

/* Loading: content swaps to a quiet dot pulse, layout does not move */
.ds-btn .ds-btn-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ds-spin 600ms linear infinite; }
.ds-btn.ds-loading .ds-btn-label { visibility: hidden; }
.ds-btn.ds-loading .ds-btn-spinner { display: inline-block; }
.ds-btn.ds-loading { pointer-events: none; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ============================================================
 * Chips (selectable pills)
 * ============================================================ */
.ds-chip-group { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  min-height: 36px;
  padding: 6px 16px;
  border: var(--ds-border-hairline) solid var(--ds-border-strong);
  border-radius: var(--ds-radius-full);
  background: var(--ds-surface);
  color: var(--ds-text);
  font-size: var(--ds-font-sm);
  font-weight: var(--ds-weight-medium);
  cursor: pointer;
  transition: background-color var(--ds-motion-fast) var(--ds-ease-in),
    border-color var(--ds-motion-fast) var(--ds-ease-in),
    color var(--ds-motion-fast) var(--ds-ease-in);
}
.ds-chip:hover { border-color: var(--ds-accent-400); color: var(--ds-accent-500); }
.ds-chip[aria-pressed="true"] {
  background: var(--ds-accent);
  border-color: var(--ds-accent);
  color: var(--ds-on-accent);
}
.ds-chip[aria-pressed="true"]:hover { background: var(--ds-accent-hover); color: var(--ds-on-accent); }
.ds-chip:focus-visible { outline: var(--ds-focus-width) solid var(--ds-accent); outline-offset: var(--ds-focus-offset); }

/* ============================================================
 * Skeleton (mimics real layout)
 * ============================================================ */
.ds-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--ds-surface-2);
  border-radius: var(--ds-radius-sm);
}
.ds-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: ds-shimmer 1.4s infinite;
}
@keyframes ds-shimmer { 100% { transform: translateX(100%); } }
.ds-skeleton-text { height: 14px; margin-bottom: var(--ds-space-2); }
.ds-skeleton-title { height: 22px; margin-bottom: var(--ds-space-3); }
.ds-skeleton-circle { border-radius: 50%; }
.ds-skeleton-card { height: 160px; border-radius: var(--ds-radius-lg); }
.ds-skeleton-table-row { height: 48px; }

/* ============================================================
 * Stepper
 * ============================================================ */
.ds-stepper { display: flex; align-items: center; gap: var(--ds-space-2); }
.ds-step { display: inline-flex; align-items: center; gap: var(--ds-space-2); min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; }
.ds-step:disabled { cursor: default; }
.ds-step .ds-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: var(--ds-border-hairline) solid var(--ds-border-strong);
  color: var(--ds-muted);
  font-size: var(--ds-font-sm);
  font-weight: var(--ds-weight-semibold);
  transition: background-color var(--ds-motion-fast) var(--ds-ease-in), border-color var(--ds-motion-fast) var(--ds-ease-in), color var(--ds-motion-fast) var(--ds-ease-in);
}
.ds-step .ds-step-label { color: var(--ds-muted); font-size: var(--ds-font-sm); font-weight: var(--ds-weight-medium); white-space: nowrap; }
.ds-step.ds-active .ds-step-num { background: var(--ds-accent); border-color: var(--ds-accent); color: var(--ds-on-accent); }
.ds-step.ds-active .ds-step-label { color: var(--ds-text); font-weight: var(--ds-weight-semibold); }
.ds-step.ds-done .ds-step-num { background: var(--ds-accent-050); border-color: var(--ds-accent-400); color: var(--ds-accent-600); }
.ds-step.ds-done .ds-step-label { color: var(--ds-accent-600); }
.ds-step:focus-visible { outline: var(--ds-focus-width) solid var(--ds-accent); outline-offset: var(--ds-focus-offset); border-radius: var(--ds-radius-md); }
.ds-step-line { flex: 1 1 auto; height: var(--ds-border-hairline); background: var(--ds-border); max-width: 48px; }

/* ============================================================
 * Sticky summary bar (bottom)
 * ============================================================ */
.ds-sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-5);
  background: var(--ds-surface);
  border-top: var(--ds-border-hairline) solid var(--ds-border);
  box-shadow: var(--ds-shadow-1);
}
.ds-sticky-bar .ds-total { font-size: var(--ds-font-xl); font-weight: var(--ds-weight-bold); color: var(--ds-heading); }

/* ============================================================
 * Toasts (+ undo)
 * ============================================================ */
.ds-toast-stack {
  position: fixed;
  right: var(--ds-space-5);
  bottom: var(--ds-space-5);
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  max-width: 360px;
}
.ds-toast {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) var(--ds-space-4);
  background: var(--ds-neutral-8);
  color: #F2F0ED;
  border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-2);
  font-size: var(--ds-font-sm);
  line-height: var(--ds-lh-base);
  animation: ds-toast-in var(--ds-motion-base) var(--ds-ease-in);
}
.ds-toast .ds-toast-icon { flex: 0 0 auto; display: inline-flex; }
.ds-toast-success .ds-toast-icon { color: #9ED6AB; }
.ds-toast-error .ds-toast-icon { color: #F3B3A5; }
.ds-toast-warning .ds-toast-icon { color: #F2C98A; }
.ds-toast-undo {
  margin-left: auto;
  background: none;
  border: 0;
  color: #A9E0BC;
  font-weight: var(--ds-weight-semibold);
  font-size: var(--ds-font-sm);
  cursor: pointer;
  padding: var(--ds-space-1) var(--ds-space-2);
}
.ds-toast-undo:hover { text-decoration: underline; }
.ds-toast-undo:focus-visible { outline: var(--ds-focus-width) solid #A9E0BC; outline-offset: 2px; border-radius: var(--ds-radius-sm); }
@keyframes ds-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ds-toast.ds-leaving { animation: ds-toast-out var(--ds-motion-base) var(--ds-ease-out) forwards; }
@keyframes ds-toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ============================================================
 * Empty states (line-art accent)
 * ============================================================ */
.ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-7) var(--ds-space-5);
  color: var(--ds-muted);
}
.ds-empty-icon { color: var(--ds-accent-400); opacity: 0.85; }
.ds-empty-title { font-size: var(--ds-font-lg); font-weight: var(--ds-weight-semibold); color: var(--ds-heading); margin: 0; }
.ds-empty-desc { max-width: 360px; font-size: var(--ds-font-sm); line-height: var(--ds-lh-base); }

/* ============================================================
 * Command palette (Ctrl+K)
 * ============================================================ */
.ds-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(28, 27, 25, 0.45);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
}
.ds-palette {
  width: min(560px, calc(100vw - 32px));
  background: var(--ds-surface);
  border: var(--ds-border-hairline) solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-2);
  overflow: hidden;
  animation: ds-palette-in var(--ds-motion-base) var(--ds-ease-in);
}
@keyframes ds-palette-in { from { opacity: 0; transform: translateY(-8px) scale(0.99); } to { opacity: 1; transform: none; } }
.ds-palette-input {
  width: 100%;
  border: 0;
  border-bottom: var(--ds-border-hairline) solid var(--ds-border);
  background: transparent;
  color: var(--ds-text);
  font-size: var(--ds-font-lg);
  padding: var(--ds-space-4);
  outline: none;
}
.ds-palette-list { max-height: 320px; overflow-y: auto; padding: var(--ds-space-2); }
.ds-palette-item {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) var(--ds-space-4);
  border-radius: var(--ds-radius-sm);
  color: var(--ds-text);
  font-size: var(--ds-font-md);
  cursor: pointer;
}
.ds-palette-item .ds-palette-icon { color: var(--ds-muted); }
.ds-palette-item.ds-active { background: var(--ds-accent-050); color: var(--ds-accent-600); }
.ds-palette-item.ds-active .ds-palette-icon { color: var(--ds-accent-500); }
.ds-palette-empty { padding: var(--ds-space-6); text-align: center; color: var(--ds-muted); font-size: var(--ds-font-sm); }

/* ============================================================
 * Progress line
 * ============================================================ */
.ds-progress { height: 4px; border-radius: var(--ds-radius-full); background: var(--ds-surface-2); overflow: hidden; }
.ds-progress-bar { height: 100%; background: var(--ds-accent); border-radius: var(--ds-radius-full); transition: width var(--ds-motion-slow) var(--ds-ease-in); }

/* ============================================================
 * Toggle switch
 * ============================================================ */
.ds-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-3);
  min-height: 44px;
  cursor: pointer;
}
.ds-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ds-toggle .ds-toggle-track {
  width: 44px;
  height: 24px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-border-strong);
  transition: background-color var(--ds-motion-fast) var(--ds-ease-in);
}
.ds-toggle .ds-toggle-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFF;
  box-shadow: var(--ds-shadow-1);
  transition: transform var(--ds-motion-base) var(--ds-ease-in);
}
.ds-toggle input:checked + .ds-toggle-track { background: var(--ds-accent); }
.ds-toggle input:checked + .ds-toggle-track::after { transform: translateX(20px); }
.ds-toggle input:focus-visible + .ds-toggle-track { outline: var(--ds-focus-width) solid var(--ds-accent); outline-offset: var(--ds-focus-offset); }
.ds-toggle .ds-toggle-label { font-size: var(--ds-font-sm); font-weight: var(--ds-weight-medium); color: var(--ds-text); }

/* ============================================================
 * Field feedback + inline edit
 * ============================================================ */
.ds-field-error { color: var(--ds-danger-500); font-size: var(--ds-font-xs); margin-top: var(--ds-space-1); }
.ds-inline-edit {
  background: transparent;
  border: var(--ds-border-hairline) solid transparent;
  border-radius: var(--ds-radius-sm);
  padding: 4px 6px;
  color: var(--ds-text);
  font: inherit;
  width: 100%;
  transition: border-color var(--ds-motion-fast) var(--ds-ease-in), background-color var(--ds-motion-fast) var(--ds-ease-in);
}
.ds-inline-edit:hover { border-color: var(--ds-border); background: var(--ds-surface); }
.ds-inline-edit:focus { border-color: var(--ds-accent-400); background: var(--ds-surface); outline: none; }

/* ============================================================
 * Table row actions (appear on hover / focus-within)
 * ============================================================ */
.ds-row-actions {
  opacity: 0;
  transform: translateX(4px);
  transition: opacity var(--ds-motion-fast) var(--ds-ease-in), transform var(--ds-motion-fast) var(--ds-ease-in);
}
tr:hover .ds-row-actions, tr:focus-within .ds-row-actions { opacity: 1; transform: none; }

/* ============================================================
 * Cards hover (color/shadow only, no geometry)
 * ============================================================ */
.ds-card-clickable { transition: box-shadow var(--ds-motion-base) var(--ds-ease-in), border-color var(--ds-motion-base) var(--ds-ease-in); cursor: pointer; }
.ds-card-clickable:hover { box-shadow: var(--ds-shadow-1); border-color: var(--ds-accent-400); }
.ds-card-clickable:focus-visible { outline: var(--ds-focus-width) solid var(--ds-accent); outline-offset: var(--ds-focus-offset); }

/* ============================================================
 * Motion guards
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ds-skeleton::after { animation: none; }
  .ds-btn .ds-btn-spinner { animation: none; }
  .ds-toast, .ds-palette { animation: none; }
}

/* ============================================================
 * Stat cards (dashboard)
 * ============================================================ */
.ds-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--ds-space-4); }
.ds-stat {
  position: relative;
  padding: var(--ds-space-5);
  background: var(--ds-surface);
  border: var(--ds-border-hairline) solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
}
.ds-stat-label { font-size: var(--ds-font-sm); font-weight: var(--ds-weight-medium); color: var(--ds-muted); margin: 0 0 var(--ds-space-2); }
.ds-stat-value { font-size: var(--ds-font-xxl); font-weight: var(--ds-weight-bold); color: var(--ds-heading); line-height: var(--ds-lh-tight); font-variant-numeric: tabular-nums; }
.ds-stat-hint { font-size: var(--ds-font-xs); color: var(--ds-faint); margin-top: var(--ds-space-1); }
.ds-stat::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ds-accent);
  border-radius: var(--ds-radius-full) var(--ds-radius-full) 0 0;
}
.ds-stat.ds-stat-success::after { background: var(--ds-success); }
.ds-stat.ds-stat-warning::after { background: var(--ds-warning); }
.ds-stat.ds-stat-info::after { background: var(--ds-info); }

/* ============================================================
 * Quiet list (timeline / upcoming)
 * ============================================================ */
.ds-list { display: flex; flex-direction: column; }
.ds-list-item {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: var(--ds-border-hairline) solid var(--ds-border);
}
.ds-list-item:last-child { border-bottom: 0; }
.ds-list-item:hover { background: var(--ds-surface-2); }
.ds-time-chip {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 4px 12px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-accent-050);
  color: var(--ds-accent-600);
  font-size: var(--ds-font-sm);
  font-weight: var(--ds-weight-semibold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ds-list-main { flex: 1 1 auto; min-width: 0; }
.ds-list-title { font-weight: var(--ds-weight-semibold); color: var(--ds-text); margin: 0; }
.ds-list-sub { font-size: var(--ds-font-xs); color: var(--ds-muted); margin-top: 2px; }
.ds-list-price { flex: 0 0 auto; font-weight: var(--ds-weight-semibold); color: var(--ds-heading); font-variant-numeric: tabular-nums; }

/* ============================================================
 * Status badges (DS)
 * ============================================================ */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--ds-radius-full);
  font-size: var(--ds-font-xs);
  font-weight: var(--ds-weight-semibold);
  line-height: 1.4;
  white-space: nowrap;
}
.ds-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ds-badge-success { background: var(--ds-success-050); color: var(--ds-success-500); }
.ds-badge-warning { background: var(--ds-warning-050); color: var(--ds-warning-500); }
.ds-badge-danger { background: var(--ds-danger-050); color: var(--ds-danger-500); }
.ds-badge-info { background: var(--ds-info-050); color: var(--ds-info-500); }
.ds-badge-muted { background: var(--ds-surface-2); color: var(--ds-muted); }
.ds-badge-accent { background: var(--ds-accent-050); color: var(--ds-accent-600); }

/* ============================================================
 * Calendar (month grid)
 * ============================================================ */
.ds-cal { background: var(--ds-surface); border: var(--ds-border-hairline) solid var(--ds-border); border-radius: var(--ds-radius-lg); overflow: hidden; }
.ds-cal-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: var(--ds-border-hairline) solid var(--ds-border); }
.ds-cal-dow { padding: var(--ds-space-2); text-align: center; font-size: var(--ds-font-xs); font-weight: var(--ds-weight-semibold); color: var(--ds-muted); }
.ds-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.ds-cal-cell {
  position: relative;
  min-height: 96px;
  padding: var(--ds-space-2);
  border-right: var(--ds-border-hairline) solid var(--ds-border);
  border-bottom: var(--ds-border-hairline) solid var(--ds-border);
  color: var(--ds-text);
}
.ds-cal-cell:nth-child(7n) { border-right: 0; }
.ds-cal-cell.ds-other { background: var(--ds-surface-2); color: var(--ds-faint); }
.ds-cal-cell.ds-today { box-shadow: inset 0 0 0 2px var(--ds-accent); }
.ds-cal-num { font-size: var(--ds-font-sm); font-weight: var(--ds-weight-semibold); margin-bottom: var(--ds-space-2); }
.ds-cal-cell.ds-today .ds-cal-num { color: var(--ds-accent-600); }
.ds-cal-badges { display: flex; flex-direction: column; gap: 3px; }
.ds-cal-badge {
  display: block;
  padding: 2px 8px;
  border-radius: var(--ds-radius-sm);
  font-size: 11px;
  font-weight: var(--ds-weight-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-cal-badge-success { background: var(--ds-success-050); color: var(--ds-success-500); }
.ds-cal-badge-warning { background: var(--ds-warning-050); color: var(--ds-warning-500); }
.ds-cal-badge-info { background: var(--ds-info-050); color: var(--ds-info-500); }
.ds-cal-badge-muted { background: var(--ds-surface-2); color: var(--ds-muted); }
.ds-cal-more { font-size: 11px; color: var(--ds-faint); padding: 2px 8px; }
.ds-cal-empty { grid-column: 1 / -1; padding: var(--ds-space-6); text-align: center; color: var(--ds-muted); font-size: var(--ds-font-sm); }

/* ============================================================
 * Page header row
 * ============================================================ */
.ds-page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); flex-wrap: wrap; margin-bottom: var(--ds-space-5); }
.ds-page-title { margin: 0; font-size: var(--ds-font-xl); font-weight: var(--ds-weight-bold); color: var(--ds-heading); letter-spacing: var(--ds-track-title); }
.ds-page-sub { margin: 2px 0 0; font-size: var(--ds-font-sm); color: var(--ds-muted); }

/* ============================================================
 * Two-pane content
 * ============================================================ */
.ds-panes { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--ds-space-4); align-items: start; }
@media (max-width: 992px) { .ds-panes { grid-template-columns: 1fr; } }
.ds-pane { display: flex; flex-direction: column; gap: var(--ds-space-4); min-width: 0; }
.ds-panel { background: var(--ds-surface); border: var(--ds-border-hairline) solid var(--ds-border); border-radius: var(--ds-radius-lg); overflow: hidden; }
.ds-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding: var(--ds-space-3) var(--ds-space-4); border-bottom: var(--ds-border-hairline) solid var(--ds-border); }
/* Alias, используемый вьюхами кабинета: заголовок блока с отбивкой и разделителем */
.ds-panel-header { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); margin: 0; padding: var(--ds-space-3) var(--ds-space-4); border-bottom: var(--ds-border-hairline) solid var(--ds-border); font-size: var(--ds-font-md); font-weight: var(--ds-weight-semibold); color: var(--ds-heading); }
.ds-panel-title { margin: 0; font-size: var(--ds-font-md); font-weight: var(--ds-weight-semibold); color: var(--ds-heading); }
.ds-panel-body { padding: var(--ds-space-4); }
.ds-panel-body.ds-flush { padding: 0; }

/* Флеш-сообщения кабинета */
.ds-flash {
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3) var(--ds-space-4);
  margin-bottom: var(--ds-space-4);
  font-size: var(--ds-font-sm);
  border: var(--ds-border-hairline) solid transparent;
}
.ds-flash-success { background: var(--ds-success-050); color: var(--ds-success-500); border-color: var(--ds-success-500); }
.ds-flash-error { background: var(--ds-danger-050); color: var(--ds-danger-500); border-color: var(--ds-danger-500); }
.ds-flash-info { background: var(--ds-info-050); color: var(--ds-info-500); border-color: var(--ds-info-500); }
.ds-flash-warning { background: var(--ds-warning-050); color: var(--ds-warning-500); border-color: var(--ds-warning-500); }

/* Круглый знак вопроса с подсказкой при наведении (чистый CSS, обе темы) */
.ds-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  border: var(--ds-border-hairline) solid var(--ds-border-strong);
  color: var(--ds-muted); background: transparent;
  font-size: 11px; font-weight: var(--ds-weight-bold); line-height: 1;
  cursor: help; position: relative; vertical-align: middle; margin-left: 6px;
}
.ds-hint:hover, .ds-hint:focus-visible { color: var(--ds-accent); border-color: var(--ds-accent); outline: none; }
.ds-hint::after {
  content: attr(data-hint);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) scale(.98);
  min-width: 200px; max-width: 280px;
  background: var(--ds-heading); color: var(--ds-bg);
  font-size: var(--ds-font-xs); font-weight: var(--ds-weight-regular); line-height: 1.5;
  text-align: left; white-space: normal;
  padding: var(--ds-space-2) var(--ds-space-3);
  border-radius: var(--ds-radius-sm);
  box-shadow: var(--ds-shadow-2);
  opacity: 0; pointer-events: none; transition: opacity var(--ds-motion-fast) var(--ds-ease-in);
  z-index: 200;
}
.ds-hint:hover::after, .ds-hint:focus-visible::after { opacity: 1; }

/* ============================================================
 * Wizard (multi-step setup)
 * ============================================================ */
.ds-wizard { max-width: 720px; }
.ds-wizard .ds-step-body { min-height: 220px; }
.ds-wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); margin-top: var(--ds-space-5); }

/* ============================================================
 * Motion guards (reduced)
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ds-cal-badge, .ds-list-item, .ds-stat { transition: none; }
}