/* st-modal, st-sheet, st-toast, st-banner, st-table. */
.st-dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--fg); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.st-dialog::backdrop { background: rgb(5 9 18 / 0.6); }
.st-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space) var(--space) var(--space) calc(var(--space) * 2); border-bottom: 1px solid var(--line); }
.st-dialog-title { font-size: 1.1em; margin: 0; }
.st-dialog-x, .st-banner-x { width: var(--tap); height: var(--tap); border: 0; background: transparent; color: var(--fg); font-size: 24px; cursor: pointer; border-radius: 50%; }
.st-dialog-body { padding: calc(var(--space) * 2); }
@media (max-width: 600px) {
  .st-dialog--sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--radius) var(--radius) 0 0; }
}

.st-toasts { position: fixed; z-index: 50; bottom: calc(var(--space) * 2); left: 50%; transform: translateX(-50%); display: grid; gap: var(--space); width: min(420px, calc(100vw - 32px)); }
st-toast { display: block; padding: calc(var(--space) * 1.5) calc(var(--space) * 2); border-radius: var(--radius); background: var(--raised); color: var(--fg); box-shadow: var(--shadow); border-left: 6px solid var(--ok); }
st-toast[tone="warn"] { border-left-color: var(--warn); } st-toast[tone="danger"] { border-left-color: var(--danger); } st-toast[tone="info"] { border-left-color: var(--sky); }

st-banner { display: flex; align-items: center; gap: var(--space); padding: var(--space) var(--space) var(--space) calc(var(--space) * 2); border-radius: var(--radius-sm); background: var(--raised); border-left: 6px solid var(--sky); }
st-banner[tone="warn"] { border-left-color: var(--warn); } st-banner[tone="danger"] { border-left-color: var(--danger); } st-banner[tone="ok"] { border-left-color: var(--ok); }
.st-banner-text { flex: 1; }
.st-banner-text a { color: var(--fg); font-weight: 700; }

st-table { display: block; overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; }
.st-table th, .st-table td { text-align: left; padding: var(--space) calc(var(--space) * 1.5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.st-table th { color: var(--fg-dim); font-weight: 600; font-size: 0.9em; }
.st-num { text-align: right; font-variant-numeric: tabular-nums; }
.st-td-sel { width: 48px; }
.st-sort { background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; min-height: 36px; padding: 0; }
th[aria-sort="ascending"] .st-sort::after { content: " ▲"; } th[aria-sort="descending"] .st-sort::after { content: " ▼"; }
tr.is-selected td { background: var(--raised); }
.st-bulk { display: flex; align-items: center; gap: var(--space); padding: var(--space) calc(var(--space) * 1.5); background: var(--raised); border-radius: var(--radius-sm); margin-bottom: var(--space); font-weight: 700; }
@media (max-width: 600px) {
  .st-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .st-table, .st-table tbody, .st-table tr, .st-table td { display: block; width: 100%; }
  .st-table tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--space); padding: var(--space); background: var(--panel); }
  .st-table td { border: 0; display: flex; justify-content: space-between; gap: var(--space); padding: 4px 0; }
  .st-table td[data-label]::before { content: attr(data-label); color: var(--fg-dim); font-weight: 600; }
}
