.ts-ui { font-family: var(--ts-font); color: var(--ts-text); font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.ts-ui *, .ts-ui *::before, .ts-ui *::after { box-sizing: border-box; letter-spacing: 0; font-family: inherit; }
.ts-ui h1, .ts-ui h2, .ts-ui h3, .ts-ui p { margin: 0; }
.ts-ui h1 { font-size: 28px; line-height: 1.25; font-weight: 650; }
.ts-ui h2 { font-size: 17px; line-height: 1.4; font-weight: 650; }
.ts-ui h3 { font-size: 14px; font-weight: 650; }
.ts-ui button, .ts-ui input, .ts-ui select { font: inherit; }
.ts-ui button { cursor: pointer; }
.ts-ui button:disabled { cursor: default; opacity: .5; }
.ts-ui :focus-visible, .ts2 .sidebar :focus-visible { outline: 2px solid var(--ts-focus); outline-offset: 3px; }
.ts-ui [hidden] { display: none !important; }
.ts-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--ts-border); border-radius: var(--ts-radius); background: var(--ts-surface); color: var(--ts-text); font-weight: 600 !important; box-shadow: none; text-decoration: none; }
.ts-button:hover { background: var(--ts-subtle); }
.ts-button-primary { background: var(--ts-brand); border-color: var(--ts-brand); color: #fff; }
.ts-button-primary:hover { background: var(--ts-brand-hover); color: #fff; }
.ts-icon-button { width: 40px; min-width: 40px; height: 40px; padding: 0; }
.ts-button svg, .ts-ui svg { width: 18px; height: 18px; stroke-width: 1.75; flex-shrink: 0; }
.ts-muted { color: var(--ts-muted); }
.ts-page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 0 28px; }
.ts-page-header p { margin-top: 8px; color: var(--ts-muted); }
.ts-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ts-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; }
.ts-section { padding: 28px 0; border-top: 1px solid var(--ts-border); }
.ts-status { display: inline-flex; align-items: center; gap: 6px; color: var(--ts-info); background: var(--ts-info-tint); font-size: 12px; line-height: 1.35; font-weight: 600; padding: 4px 8px; border-radius: var(--ts-radius-sm); }
.ts-status-success { color: var(--ts-success); background: var(--ts-success-tint); }
.ts-status-warning { color: var(--ts-warning); background: var(--ts-warning-tint); }
.ts-status-danger { color: var(--ts-danger); background: var(--ts-danger-tint); }
.ts-empty { padding: 32px 16px; display: grid; justify-items: center; text-align: center; gap: 8px; color: var(--ts-muted); }
.ts-empty strong { color: var(--ts-text); font-weight: 600; }
.ts-empty > svg { width: 28px; height: 28px; margin-bottom: 8px; }
.ts-skeleton { display: block; height: 18px; background: var(--ts-subtle); border-radius: 4px; animation: ts-pulse 1s ease-in-out infinite alternate; }
.ts-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; margin: auto; color: var(--ts-text); border: 1px solid var(--ts-border); border-radius: var(--ts-radius-panel); box-shadow: var(--ts-shadow-overlay); }
.ts-dialog::backdrop { background: #20242b66; }
.ts-dialog-head, .ts-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; background: var(--ts-surface); }
.ts-dialog-head { border-bottom: 1px solid var(--ts-border); }
.ts-dialog-foot { border-top: 1px solid var(--ts-border); position: sticky; bottom: 0; }
.ts-dialog-body { padding: 24px; overflow-y: auto; max-height: calc(100dvh - 220px); overscroll-behavior: contain; }
@keyframes ts-pulse { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ts-ui *, .ts-ui *::before { animation: none !important; transition: none !important; } }
@media (max-width: 767px) {
  .ts-ui h1 { font-size: 24px; }
  .ts-page-header { align-items: flex-start; gap: 12px; padding-bottom: 24px; }
  .ts-button { min-height: 44px; }
  .ts-icon-button { width: 44px; min-width: 44px; height: 44px; }
  .ts-dialog { width: 100%; max-width: none; margin: auto 0 0; max-height: 92dvh; border-radius: 8px 8px 0 0; border-bottom: 0; }
  .ts-dialog-body { max-height: calc(92dvh - 164px - env(safe-area-inset-bottom)); }
  .ts-dialog-head, .ts-dialog-foot { padding: 12px 16px; }
  .ts-dialog-foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
