.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-surface-elevated);
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.button { padding: 0 15px; }
.button:hover, .icon-button:hover { border-color: #3b4d42; background: var(--color-surface-hover); }
.button:active, .icon-button:active { transform: translateY(1px) scale(.985); }
.button.primary { border-color: var(--color-primary); background: var(--color-primary); color: #04130a; }
.button.primary:hover { background: #53ef91; }
.button.danger { border-color: rgb(255 93 108 / 25%); color: #ff9da6; }
.button.ghost { border-color: transparent; background: transparent; color: var(--color-muted); }
.button.small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.button[disabled], .icon-button[disabled] { opacity: .48; cursor: not-allowed; transform: none; }
.icon-button { width: 40px; padding: 0; }
.icon-button[aria-pressed="true"] { border-color: rgb(46 232 120 / 40%); background: var(--color-primary-soft); color: var(--color-primary); }

.card {
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-medium);
  background: linear-gradient(145deg, rgb(255 255 255 / 2.5%), transparent), var(--color-surface);
  box-shadow: var(--shadow-small);
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--color-border-soft); }
.card-header h2, .card-header h3 { margin: 0; font-size: 14px; }
.card-body { padding: 20px; }

.field { display: grid; gap: 7px; }
.field > span { color: #cad2cd; font-size: 12px; font-weight: 650; }
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #0b100d;
  color: var(--color-text);
  padding: 0 12px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.textarea { min-height: 112px; padding-block: 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgb(46 232 120 / 12%); }
.input::placeholder, .textarea::placeholder { color: var(--color-subtle); }
.field-hint { color: var(--color-muted); font-size: 11px; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 9px; border-radius: var(--radius-pill); background: rgb(255 255 255 / 5%); color: var(--color-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-pill.success { background: rgb(46 232 120 / 11%); color: var(--color-primary); }
.status-pill.warning { background: rgb(255 204 102 / 11%); color: var(--color-warning); }
.status-pill.danger { background: rgb(255 93 108 / 11%); color: var(--color-danger); }
.status-pill.info { background: rgb(117 168 255 / 11%); color: var(--color-info); }

.notice { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 11px; padding: 13px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-small); background: var(--color-surface); color: var(--color-muted); font-size: 12px; }
.notice > svg { margin-top: 2px; color: var(--color-primary); }
.notice strong { display: block; margin-bottom: 2px; color: var(--color-text); }
.notice.warning { border-color: rgb(255 204 102 / 25%); background: rgb(255 204 102 / 5%); }
.notice.warning > svg { color: var(--color-warning); }
.notice.error { border-color: rgb(255 93 108 / 25%); background: rgb(255 93 108 / 5%); }
.notice.error > svg { color: var(--color-danger); }

.skeleton { position: relative; overflow: hidden; background: #18201b; color: transparent !important; border-radius: 6px; }
.skeleton::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 6%), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; content: ""; }
@keyframes shimmer { to { transform: translateX(100%); } }

.empty-state { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 36px; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface-elevated); color: var(--color-primary); font-size: 24px; }
.empty-state h2 { margin: 5px 0 0; font-size: 17px; }
.empty-state p { max-width: 430px; margin: 0 0 8px; color: var(--color-muted); font-size: 12px; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: calc(var(--player-height) + 18px); display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-small); background: #141b17f2; box-shadow: var(--shadow-large); animation: toast-in var(--transition-base) both; pointer-events: auto; }
.toast.success { border-color: rgb(46 232 120 / 35%); }
.toast.error { border-color: rgb(255 93 108 / 35%); }
.toast strong { display: block; font-size: 12px; }
.toast p { margin: 2px 0 0; color: var(--color-muted); font-size: 11px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.dialog { width: min(520px, calc(100vw - 28px)); border: 1px solid var(--color-border); border-radius: var(--radius-large); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-large); }
.dialog::backdrop { background: rgb(0 0 0 / 68%); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--color-border-soft); }
.dialog-head h2 { margin: 0; font-size: 16px; }
.dialog-body { padding: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 0 20px 20px; }

