.wf-um-widget {
  --wf-um-bg: #0f172a;
  --wf-um-bg-soft: #111827;
  --wf-um-surface: #1a1a1c;
  --wf-um-surface-strong: #1f1f22;
  --wf-um-border: #2f2f35;
  --wf-um-text: #f8fafc;
  --wf-um-muted: #cbd5e1;
  --wf-um-accent: #22d3ee;

  background: #000;
  border: 0;
  border-radius: 14px;
  color: var(--wf-um-text);
  padding: 14px;
  box-shadow: none;
  font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  margin: 1rem 0;
}

.wf-um-card {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 10px;
  background: transparent;
  box-shadow: none;
}

.wf-um-card:last-child {
  margin-bottom: 0;
}

.wf-um-auth-card,
.wf-um-login-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--wf-um-border);
  border-radius: 8px;
  background: var(--wf-um-surface);
}

.wf-um-headline {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--wf-um-text);
}

.wf-um-subtle {
  color: var(--wf-um-muted);
}

.wf-um-grid {
  display: grid;
  gap: 10px;
}

.wf-um-grid-profile {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 10px;
}

.wf-um-field {
  border: 1px solid var(--wf-um-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--wf-um-surface);
}

.wf-um-field span {
  display: block;
  color: var(--wf-um-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.wf-um-field strong {
  color: var(--wf-um-text);
  word-break: break-word;
}

.wf-um-field-edit {
  display: flex;
  flex-direction: column;
}

.wf-um-inline-edit {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.wf-um-inline-edit .wf-um-input-text {
  flex: 1 1 auto;
  min-width: 0;
}

.wf-um-inline-edit .wf-um-button-small {
  flex: 0 0 auto;
  min-width: 68px;
}

.wf-um-field-coins {
  text-align: center;
}

.wf-um-field-coins span,
.wf-um-field-coins strong {
  text-align: center;
}

.wf-um-actions,
.wf-um-auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wf-um-auth-copy {
  min-width: 0;
}

.wf-um-auth-copy .wf-um-subtle {
  line-height: 1.35;
}

.wf-um-auth-label,
.wf-um-auth-username {
  display: inline;
}

.wf-um-admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.wf-um-tab-button {
  appearance: none;
  border: 1px solid var(--wf-um-border);
  background: #121214;
  color: var(--wf-um-muted);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wf-um-tab-button:hover {
  border-color: #05556f;
  color: var(--wf-um-text);
}

.wf-um-tab-button.is-active {
  background: linear-gradient(180deg, #001216, #004256);
  border-color: #004256;
  color: #ffffff;
}

.wf-um-admin-panel[hidden] {
  display: none !important;
}

.wf-um-twitch-grid {
  display: grid;
  gap: 12px;
}

.wf-um-twitch-summary,
.wf-um-twitch-card {
  border: 1px solid var(--wf-um-border);
  border-radius: 8px;
  padding: 12px;
  background: var(--wf-um-surface);
}

.wf-um-twitch-channels {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.wf-um-twitch-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.wf-um-twitch-meta {
  color: var(--wf-um-muted);
  margin-bottom: 6px;
  word-break: break-word;
}

.wf-um-twitch-error {
  color: #fca5a5;
  margin-top: 6px;
}

.wf-um-twitch-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.wf-um-twitch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--wf-um-border);
}

.wf-um-twitch-badge.is-connected {
  background: #052e16;
  color: #bbf7d0;
  border-color: #15803d;
}

.wf-um-twitch-badge.is-disconnected {
  background: #3f1d0d;
  color: #fdba74;
  border-color: #c2410c;
}

.wf-um-admin-placeholder {
  padding: 18px;
}

.wf-um-placeholder-copy {
  color: var(--wf-um-text);
}

.wf-um-placeholder-copy strong {
  display: block;
  margin-bottom: 6px;
}

.wf-um-placeholder-copy p {
  margin: 0;
  color: var(--wf-um-muted);
}

.wf-um-loading-progress {
  width: 100%;
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--wf-um-border);
  border-radius: 999px;
  background: #121214;
}

.wf-um-loading-progress-bar {
  height: 100%;
  background: linear-gradient(180deg, #001216, #004256);
  transition: width 0.2s ease;
}

.wf-um-loading-status {
  margin-top: 8px;
  color: var(--wf-um-muted);
  font-size: 12px;
}

.wf-um-coins-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

.wf-um-coins-integration {
  padding: 12px;
  border: 1px solid var(--wf-um-border);
  border-radius: 8px;
  background: var(--wf-um-surface);
}

.wf-um-coins-integration-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.wf-um-coins-integration-head strong {
  color: var(--wf-um-text);
}

.wf-um-coins-integration-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 8px;
}

.wf-um-field-debug {
  grid-column: 1 / -1;
}

.wf-um-debug-code {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  color: var(--wf-um-text);
}

.wf-um-coins-meta,
.wf-um-coins-editor {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
  border: 1px solid var(--wf-um-border);
  border-radius: 8px;
  background: var(--wf-um-surface);
}

.wf-um-coins-meta {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.9fr) auto;
  align-items: end;
}

.wf-um-coins-editor {
  grid-template-columns: 140px 140px 140px 160px auto;
  align-items: end;
  margin-top: 10px;
}

.wf-um-coins-meta-item {
  min-width: 0;
}

.wf-um-coins-meta-item label {
  display: block;
  margin-bottom: 6px;
  color: var(--wf-um-muted);
  font-size: 12px;
}

.wf-um-coins-editor-item {
  min-width: 0;
}

.wf-um-coins-editor-item label {
  display: block;
  margin-bottom: 6px;
  color: var(--wf-um-muted);
  font-size: 12px;
}

.wf-um-coins-meta-action {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-bottom: 1px;
}

.wf-um-coins-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: flex-end;
  padding-bottom: 1px;
}

.wf-um-coins-table tbody tr {
  cursor: pointer;
}

.wf-um-coins-table tbody tr.is-selected td {
  background: #202126;
}

.wf-um-input-readonly {
  color: var(--wf-um-text);
  cursor: default;
}

@media (max-width: 980px) {
  .wf-um-coins-meta,
  .wf-um-coins-editor {
    grid-template-columns: 1fr;
  }

  .wf-um-coins-actions {
    justify-content: flex-start;
  }

  .wf-um-coins-integration-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.wf-um-row-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
}

.wf-um-user-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--wf-um-text);
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.wf-um-user-link:hover {
  color: #7dd3fc;
}

.wf-um-user-link:focus-visible {
  outline: 1px solid #0ea5b7;
  outline-offset: 2px;
  border-radius: 4px;
}

.wf-um-user-link-with-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wf-um-channel-sub-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.wf-um-channel-sub-icon {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.wf-um-channel-sub-icon.is-active {
  background: #22c55e;
}

.wf-um-channel-sub-icon.is-inactive {
  background: #111111;
}

.wf-um-channel-sub-icon.is-unavailable {
  background: #ef4444;
}

.wf-um-mod-cell {
  text-align: center !important;
}

.wf-um-mod-checkbox {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  accent-color: transparent !important;
  background-image: none !important;
  width: 16px;
  height: 16px;
  cursor: pointer;
  background-color: #121214;
  border: 1px solid var(--wf-um-border);
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
}

.wf-um-mod-checkbox::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #22c55e;
  transform: scale(0);
  transition: transform 0.12s ease;
}

.wf-um-admin-users-table .wf-um-mod-checkbox::after {
  background: #22c55e !important;
}

.wf-um-mod-checkbox:checked::after {
  transform: scale(1);
}

.wf-um-mod-checkbox:checked {
  background-color: #121214;
  border-color: var(--wf-um-border);
}

.wf-um-button,
.wf-um-input {
  border: 1px solid var(--wf-um-border);
  background: #121214;
  color: var(--wf-um-text);
  border-radius: 8px;
  box-shadow: none;
}

.wf-um-button {
  appearance: none;
  cursor: pointer;
  background: linear-gradient(180deg, #001216, #004256);
  border-color: #004256;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 14px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wf-um-button:hover {
  background: linear-gradient(180deg, #00161b, #05556f);
  border-color: #05556f;
}

.wf-um-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.wf-um-button-secondary {
  background: linear-gradient(180deg, #001216, #004256);
  border-color: #004256;
  min-height: 30px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.wf-um-button-secondary:hover {
  background: linear-gradient(180deg, #00161b, #05556f);
  border-color: #05556f;
}

.wf-um-button-small {
  min-height: 30px;
  padding: 6px 10px;
  white-space: nowrap;
}

.wf-um-button-danger {
  background: linear-gradient(180deg, #2a0f12, #6e1117);
  border-color: #8b1e24;
}

.wf-um-button-danger:hover {
  background: linear-gradient(180deg, #341114, #8f171d);
  border-color: #a11d24;
}

.wf-um-table-wrap {
  width: 100%;
  margin-top: 10px;
  background: var(--wf-um-surface);
  border: 1px solid var(--wf-um-border);
  border-radius: 8px;
  overflow-x: hidden;
  outline: 0;
  box-shadow: none;
}

.wf-um-table {
  width: 100%;
  min-width: 880px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 0 !important;
  background: var(--wf-um-surface);
  outline: 0;
  box-shadow: none;
}

.wf-um-table th,
.wf-um-table td {
  border-bottom: 1px solid var(--wf-um-border) !important;
  border-right: 1px solid var(--wf-um-border) !important;
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
  background: var(--wf-um-surface);
  border-left: 0 !important;
  border-top: 0 !important;
}

.wf-um-table th:last-child,
.wf-um-table td:last-child {
  border-right: 0;
}

.wf-um-table thead tr:first-child th {
  border-top: 0 !important;
}

.wf-um-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.wf-um-table th {
  color: #ffffff !important;
  font-weight: 600;
  background: var(--wf-um-surface-strong);
  text-align: center;
  white-space: nowrap;
}

.wf-um-table td:nth-child(1),
.wf-um-table td:nth-child(2),
.wf-um-table td:nth-child(3),
.wf-um-table td:nth-child(4),
.wf-um-table td:nth-child(6) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-um-table td:nth-child(1),
.wf-um-table td:nth-child(2),
.wf-um-table td:nth-child(3),
.wf-um-table td:nth-child(4),
.wf-um-table td:nth-child(6) {
  max-width: 0;
}

.wf-um-table th:nth-child(1),
.wf-um-table td:nth-child(1) {
  width: 22%;
  text-align: left;
}

.wf-um-table th:nth-child(2),
.wf-um-table td:nth-child(2) {
  width: 25%;
  text-align: left;
}

.wf-um-table th:nth-child(3),
.wf-um-table td:nth-child(3) {
  width: 120px;
  text-align: center;
}

.wf-um-table th:nth-child(4),
.wf-um-table td:nth-child(4) {
  width: 18%;
  text-align: center;
}

.wf-um-table th:nth-child(5),
.wf-um-table td:nth-child(5) {
  width: 90px;
  text-align: center;
}

.wf-um-table th:nth-child(6),
.wf-um-table td:nth-child(6) {
  width: 220px;
  text-align: center;
}

.wf-um-table tbody tr:hover,
.wf-um-table tbody tr:hover td {
  background: #202126;
}

.wf-um-table-profile {
  min-width: 0;
}

.wf-um-admin-users-table th:nth-child(1),
.wf-um-admin-users-table td:nth-child(1) {
  width: 16%;
  text-align: left;
}

.wf-um-admin-users-table th:nth-child(2),
.wf-um-admin-users-table td:nth-child(2) {
  width: calc(20% - 10px);
  text-align: left;
}

.wf-um-admin-users-table th:nth-child(3),
.wf-um-admin-users-table td:nth-child(3) {
  width: 92px;
  text-align: center;
}

.wf-um-admin-users-table th:nth-child(4),
.wf-um-admin-users-table td:nth-child(4) {
  width: 16%;
  text-align: center;
}

.wf-um-admin-users-table th:nth-child(5),
.wf-um-admin-users-table td:nth-child(5) {
  width: 72px;
  text-align: center;
}

.wf-um-admin-users-table th:nth-child(5) {
  text-align: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.wf-um-admin-users-table th:nth-child(6),
.wf-um-admin-users-table td:nth-child(6) {
  width: 118px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.wf-um-admin-users-table th:nth-child(7),
.wf-um-admin-users-table td:nth-child(7) {
  width: 140px;
  text-align: center;
}

.wf-um-admin-users-table th:nth-child(8),
.wf-um-admin-users-table td:nth-child(8) {
  width: 170px;
  text-align: center;
}

.wf-um-admin-users-table td:nth-child(1),
.wf-um-admin-users-table td:nth-child(2),
.wf-um-admin-users-table td:nth-child(4),
.wf-um-admin-users-table td:nth-child(8) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
}

.wf-um-status-cell {
  text-align: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.wf-um-admin-users-table td:nth-child(1) {
  padding-left: 8px;
}

.wf-um-admin-users-table td:nth-child(3),
.wf-um-admin-users-table td:nth-child(3) .wf-um-input-coins {
  text-align: center !important;
}

.wf-um-admin-users-table .wf-um-input-coins {
  display: block !important;
  text-align: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.wf-um-admin-users-table td:nth-child(3) {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.wf-um-admin-users-table td[data-label="Coins"] {
  text-align: center !important;
}

.wf-um-admin-users-table td[data-label="Coins"] > * {
  margin-left: auto !important;
  margin-right: auto !important;
}

.wf-um-admin-users-table td:nth-child(6) .wf-um-input-select,
.wf-um-admin-users-table td:nth-child(7) .wf-um-input-select {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  text-align: center !important;
  text-align-last: center !important;
}

.wf-um-admin-users-table td:nth-child(6) .wf-um-input-select option,
.wf-um-admin-users-table td:nth-child(7) .wf-um-input-select option {
  text-align: center;
}

.wf-um-admin-users-table td[data-label="Status"],
.wf-um-admin-users-table td[data-label="Airline"] {
  text-align: center !important;
}

.wf-um-admin-users-table td[data-label="Status"] .wf-um-input-select,
.wf-um-admin-users-table td[data-label="Airline"] .wf-um-input-select {
  margin-left: auto !important;
  margin-right: auto !important;
}

.wf-um-input-select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
}

.wf-um-user-log-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(2px);
}

.wf-um-user-log-modal {
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  position: relative;
  isolation: isolate;
  border: 1px solid #3a3b45;
  border-radius: 12px;
  background: #17181f;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.62);
  padding: 18px;
}

.wf-um-user-log-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--wf-um-border);
}

.wf-um-user-log-modal-title {
  margin: 0;
  color: var(--wf-um-text);
  font-size: 18px;
  font-weight: 700;
}

.wf-um-user-log-modal-subtitle {
  margin: 4px 0 0;
  color: var(--wf-um-muted);
}

.wf-um-user-log-table {
  min-width: 0;
}

.wf-um-user-log-modal .wf-um-table-wrap {
  margin-top: 0;
  background: #17181f;
  border-color: #343642;
}

.wf-um-user-log-modal .wf-um-table,
.wf-um-user-log-modal .wf-um-table th,
.wf-um-user-log-modal .wf-um-table td {
  background: #17181f;
}

.wf-um-user-log-modal .wf-um-table th {
  background: #21232d;
}

.wf-um-user-log-table th:nth-child(1),
.wf-um-user-log-table td:nth-child(1) {
  width: 180px;
}

.wf-um-user-log-table th:nth-child(2),
.wf-um-user-log-table td:nth-child(2) {
  width: 140px;
}

.wf-um-user-log-table th:nth-child(3),
.wf-um-user-log-table td:nth-child(3) {
  width: 180px;
}

.wf-um-user-log-table th:nth-child(4),
.wf-um-user-log-table td:nth-child(4) {
  width: 90px;
  text-align: center;
}

.wf-um-user-log-table th:nth-child(5),
.wf-um-user-log-table td:nth-child(5) {
  width: 100px;
  text-align: center;
}

.wf-um-user-log-table th:nth-child(6),
.wf-um-user-log-table td:nth-child(6) {
  width: auto;
}

.wf-um-protocol-table {
  min-width: 0;
  table-layout: auto;
  width: 100%;
}

.wf-um-protocol-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.wf-um-field-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wf-um-protocol-wrap {
  overflow-x: hidden;
}

.wf-um-table.wf-um-protocol-table th:nth-child(1),
.wf-um-table.wf-um-protocol-table td:nth-child(1) {
  width: 138px !important;
  text-align: center;
}

.wf-um-table.wf-um-protocol-table th:nth-child(2),
.wf-um-table.wf-um-protocol-table td:nth-child(2) {
  width: 116px !important;
  text-align: center;
  white-space: nowrap;
}

.wf-um-table.wf-um-protocol-table th:nth-child(3),
.wf-um-table.wf-um-protocol-table td:nth-child(3) {
  width: 110px !important;
  text-align: center;
}

.wf-um-table.wf-um-protocol-table th:nth-child(4),
.wf-um-table.wf-um-protocol-table td:nth-child(4) {
  width: 156px !important;
  text-align: center;
  white-space: nowrap;
}

.wf-um-table.wf-um-protocol-table th:nth-child(5),
.wf-um-table.wf-um-protocol-table td:nth-child(5) {
  width: 22px !important;
  text-align: center;
}

.wf-um-table.wf-um-protocol-table th:nth-child(6),
.wf-um-table.wf-um-protocol-table td:nth-child(6) {
  width: 104px !important;
  text-align: center;
}

.wf-um-table.wf-um-protocol-table th:nth-child(7),
.wf-um-table.wf-um-protocol-table td:nth-child(7) {
  width: auto !important;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: hidden;
  text-overflow: initial;
}

.wf-um-table.wf-um-protocol-table th:nth-child(8),
.wf-um-table.wf-um-protocol-table td:nth-child(8) {
  width: 182px !important;
  text-align: center;
}

.wf-um-table.wf-um-protocol-table th,
.wf-um-table.wf-um-protocol-table td {
  padding: 5px 6px;
}

.wf-um-table.wf-um-protocol-table th {
  text-align: center !important;
  padding-left: 4px;
  padding-right: 4px;
}

.wf-um-table.wf-um-protocol-table td:nth-child(1),
.wf-um-table.wf-um-protocol-table td:nth-child(2),
.wf-um-table.wf-um-protocol-table td:nth-child(3),
.wf-um-table.wf-um-protocol-table td:nth-child(7),
.wf-um-table.wf-um-protocol-table td:nth-child(8) {
  white-space: normal;
  overflow: hidden;
  text-overflow: initial;
  word-break: break-word;
}

.wf-um-table.wf-um-protocol-table td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-um-table.wf-um-protocol-table th:nth-child(1),
.wf-um-table.wf-um-protocol-table td:nth-child(1),
.wf-um-table.wf-um-protocol-table th:nth-child(2),
.wf-um-table.wf-um-protocol-table td:nth-child(2),
.wf-um-table.wf-um-protocol-table th:nth-child(3),
.wf-um-table.wf-um-protocol-table td:nth-child(3),
.wf-um-table.wf-um-protocol-table th:nth-child(4),
.wf-um-table.wf-um-protocol-table td:nth-child(4),
.wf-um-table.wf-um-protocol-table th:nth-child(5),
.wf-um-table.wf-um-protocol-table td:nth-child(5),
.wf-um-table.wf-um-protocol-table th:nth-child(6),
.wf-um-table.wf-um-protocol-table td:nth-child(6),
.wf-um-table.wf-um-protocol-table th:nth-child(7),
.wf-um-table.wf-um-protocol-table td:nth-child(7),
.wf-um-table.wf-um-protocol-table th:nth-child(8),
.wf-um-table.wf-um-protocol-table td:nth-child(8) {
  max-width: none !important;
}

.wf-um-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--wf-um-border);
  background: #121214;
  color: var(--wf-um-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.wf-um-protocol-table .wf-um-button-small {
  min-width: 98px;
  padding-left: 12px;
  padding-right: 12px;
}

.wf-um-protocol-preview-card {
  margin-top: 12px;
  padding: 12px;
}

.wf-um-row-actions-protocol-preview {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.wf-um-protocol-preview-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wf-um-protocol-preview-title span {
  font-size: 12px;
  color: var(--wf-um-text-dim, #9aa3b2);
}

.wf-um-protocol-preview-table th,
.wf-um-protocol-preview-table td {
  padding: 5px 6px;
}

.wf-um-protocol-preview-table th {
  text-align: center !important;
  padding-left: 4px;
  padding-right: 4px;
}

.wf-um-table.wf-um-protocol-preview-table th:nth-child(1),
.wf-um-table.wf-um-protocol-preview-table td:nth-child(1) {
  width: 138px !important;
  text-align: center;
}

.wf-um-table.wf-um-protocol-preview-table th:nth-child(2),
.wf-um-table.wf-um-protocol-preview-table td:nth-child(2) {
  width: 116px !important;
  text-align: center;
  white-space: nowrap;
}

.wf-um-table.wf-um-protocol-preview-table th:nth-child(3),
.wf-um-table.wf-um-protocol-preview-table td:nth-child(3) {
  width: 110px !important;
  text-align: center;
}

.wf-um-table.wf-um-protocol-preview-table th:nth-child(4),
.wf-um-table.wf-um-protocol-preview-table td:nth-child(4) {
  width: 156px !important;
  text-align: center;
  white-space: nowrap;
}

.wf-um-table.wf-um-protocol-preview-table th:nth-child(5),
.wf-um-table.wf-um-protocol-preview-table td:nth-child(5) {
  width: auto !important;
  text-align: left;
}

.wf-um-table.wf-um-protocol-preview-table th:nth-child(6),
.wf-um-table.wf-um-protocol-preview-table td:nth-child(6) {
  width: 96px !important;
  text-align: center;
}

.wf-um-row-actions-protocol {
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.wf-um-protocol-user-input {
  min-width: 110px;
  text-align: center;
}

.wf-um-status-badge.is-ok {
  background: #052e16;
  color: #bbf7d0;
  border-color: #15803d;
}

.wf-um-status-badge.is-duplicate {
  background: #172554;
  color: #bfdbfe;
  border-color: #2563eb;
}

.wf-um-status-badge.is-ignored {
  background: #3f1d0d;
  color: #fdba74;
  border-color: #c2410c;
}

.wf-um-status-badge.is-error {
  background: #3f0b14;
  color: #fecaca;
  border-color: #dc2626;
}

.wf-um-table-profile th:nth-child(1),
.wf-um-table-profile td:nth-child(1) {
  width: 18%;
  text-align: left;
}

.wf-um-table-profile th:nth-child(2),
.wf-um-table-profile td:nth-child(2) {
  width: 34%;
  text-align: left;
}

.wf-um-table-profile th:nth-child(3),
.wf-um-table-profile td:nth-child(3) {
  width: 32%;
  text-align: center;
}

.wf-um-table-profile th:nth-child(4),
.wf-um-table-profile td:nth-child(4) {
  width: 16%;
  text-align: center;
}

.wf-um-profile-coins-cell {
  text-align: center !important;
}

.wf-um-profile-coins-cell strong {
  display: inline-block;
}

.wf-um-profile-status-cell {
  text-align: center !important;
}

.wf-um-profile-status-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.wf-um-checkbox-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--wf-um-text);
  font-size: 13px;
  white-space: nowrap;
}

.wf-um-checkbox-inline-status {
  gap: 6px;
}

.wf-um-checkbox-inline input[type="checkbox"] {
  margin: 0;
}

.wf-um-support-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 88px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--wf-um-border);
  background: #121214;
  color: var(--wf-um-muted);
  font-weight: 600;
  text-align: center;
}

.wf-um-support-status-badge.is-active {
  background: #042f2e;
  border-color: #0f766e;
  color: #ccfbf1;
}

.wf-um-support-status-empty {
  display: inline-block;
  min-width: 16px;
  color: var(--wf-um-text);
  font-weight: 600;
  line-height: 1;
}

.wf-um-status-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.wf-um-status-help-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--wf-um-border);
  border-radius: 8px;
  background: var(--wf-um-surface);
  padding: 10px 12px;
}

.wf-um-status-help-item strong {
  color: var(--wf-um-text);
}

.wf-um-status-help-item span {
  color: var(--wf-um-muted);
  font-size: 12px;
  line-height: 1.4;
}

.wf-um-status-table th,
.wf-um-status-table td {
  text-align: center;
  vertical-align: middle;
}

.wf-um-status-table .wf-um-input {
  max-width: 100%;
}

.wf-um-status-table-wrap {
  overflow-x: auto;
}

.wf-um-status-table {
  table-layout: fixed;
  width: 100%;
  min-width: 860px;
}

.wf-um-status-table th {
  white-space: nowrap;
}

.wf-um-status-table th:nth-child(1),
.wf-um-status-table td:nth-child(1) {
  width: 56px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

.wf-um-status-table th:nth-child(2),
.wf-um-status-table td:nth-child(2) {
  width: 34%;
  text-align: left;
}

.wf-um-status-table th:nth-child(3),
.wf-um-status-table td:nth-child(3) {
  width: 16%;
  text-align: center;
}

.wf-um-status-table td:nth-child(3) .wf-um-input {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.wf-um-status-table th:nth-child(4),
.wf-um-status-table td:nth-child(4) {
  width: 20%;
  text-align: right;
  padding-right: 12px;
}

.wf-um-status-table td:nth-child(4) .wf-um-input {
  text-align: right;
  margin-left: auto;
}

.wf-um-status-table th:nth-child(5),
.wf-um-status-table td:nth-child(5) {
  width: 210px;
}

.wf-um-status-row.is-dragging td {
  opacity: 0.6;
  background: #202126;
}

.wf-um-status-drag-cell {
  text-align: center;
}

.wf-um-status-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px dashed var(--wf-um-border);
  border-radius: 6px;
  background: #121214;
  color: var(--wf-um-muted);
  cursor: grab;
  user-select: none;
  font-size: 16px;
  line-height: 1;
}

.wf-um-status-row.is-dragging .wf-um-status-drag-handle {
  cursor: grabbing;
}

.wf-um-status-drag-placeholder {
  display: inline-block;
  min-width: 16px;
  color: var(--wf-um-muted);
  font-weight: 600;
}

.wf-um-status-active-cell {
  text-align: center;
}

.wf-um-row-actions-status {
  justify-content: center;
  flex-wrap: wrap;
}

.wf-um-row-actions-status .wf-um-button {
  min-width: 96px;
}

.wf-um-input {
  width: 100%;
  max-width: 88px;
  min-height: 30px;
  padding: 6px 10px;
  background: #121214 !important;
  border: 1px solid var(--wf-um-border) !important;
  color: #f1f1f1 !important;
  border-radius: 6px;
  appearance: none;
  box-sizing: border-box;
}

.wf-um-input-text {
  max-width: 100%;
  padding-left: 7px !important;
  padding-right: 7px !important;
}

.wf-um-input-coins {
  text-align: center !important;
  margin: 0 auto;
  width: 64px;
  max-width: 64px;
  padding-left: 7px !important;
  padding-right: 7px !important;
}

.wf-um-inline-edit .wf-um-input-text,
.wf-um-table .wf-um-input-text,
.wf-um-table .wf-um-input-coins {
  padding-left: 7px !important;
  padding-right: 7px !important;
}

.wf-um-input:focus {
  outline: none;
  border-color: #2ea3f2 !important;
}

.wf-um-profile-actions {
  margin-top: 10px;
}

.wf-um-empty {
  text-align: center !important;
  color: var(--wf-um-muted);
}

.wf-um-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  background: #052e16;
  color: #bbf7d0;
  border: 1px solid #15803d;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}

.wf-um-login-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.wf-um-login-modal {
  width: min(460px, 100%);
  background: linear-gradient(160deg, #0f172a, #111827);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 18px 20px;
  color: #f8fafc;
  text-align: center;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}

.wf-um-login-modal h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.wf-um-login-modal p {
  margin: 0 auto 14px;
  max-width: 380px;
  line-height: 1.45;
  color: #f8fafc;
}

.wf-um-login-error {
  min-height: 20px;
  margin: 0 0 8px;
  color: #fca5a5;
}

.wf-um-login-error:empty {
  display: none;
}

.wf-um-login-actions {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.wf-um-login-button {
  min-height: 50px;
  padding: 10px 20px;
  min-width: 200px;
}

@media (max-width: 760px) {
  .wf-um-protocol-summary {
    grid-template-columns: 1fr;
  }

  .wf-um-widget {
    padding: 10px;
    border-radius: 10px;
  }

  .wf-um-auth-card,
  .wf-um-login-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .wf-um-auth-card > *,
  .wf-um-login-card > * {
    width: 100%;
  }

  .wf-um-admin-tabs {
    flex-wrap: wrap;
  }

  .wf-um-tab-button {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
    min-width: 0;
  }

  .wf-um-twitch-card-head,
  .wf-um-user-log-modal-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .wf-um-twitch-actions,
  .wf-um-actions,
  .wf-um-auth-actions,
  .wf-um-row-actions,
  .wf-um-login-actions {
    width: 100%;
    justify-content: stretch;
  }

  .wf-um-twitch-actions .wf-um-button,
  .wf-um-actions .wf-um-button,
  .wf-um-auth-actions .wf-um-button,
  .wf-um-row-actions .wf-um-button,
  .wf-um-login-actions .wf-um-button {
    flex: 1 1 auto;
  }

  .wf-um-table {
    min-width: 820px;
  }

  .wf-um-table th,
  .wf-um-table td {
    padding: 6px 4px;
  }

  .wf-um-inline-edit {
    flex-wrap: wrap;
  }

  .wf-um-inline-edit .wf-um-button-small {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .wf-um-widget {
    padding: 8px;
  }

  .wf-um-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    margin-top: 8px;
  }

  .wf-um-admin-users-table,
  .wf-um-protocol-table,
  .wf-um-user-log-table {
    min-width: 0;
    table-layout: auto;
    background: transparent;
  }

  .wf-um-admin-users-table thead,
  .wf-um-protocol-table thead,
  .wf-um-user-log-table thead {
    display: none;
  }

  .wf-um-admin-users-table tbody,
  .wf-um-protocol-table tbody,
  .wf-um-user-log-table tbody,
  .wf-um-admin-users-table tr,
  .wf-um-protocol-table tr,
  .wf-um-user-log-table tr,
  .wf-um-admin-users-table td,
  .wf-um-protocol-table td,
  .wf-um-user-log-table td {
    display: block;
    width: 100% !important;
    max-width: none !important;
  }

  .wf-um-admin-users-table tr,
  .wf-um-protocol-table tr,
  .wf-um-user-log-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--wf-um-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--wf-um-surface);
  }

  .wf-um-admin-users-table td,
  .wf-um-protocol-table td,
  .wf-um-user-log-table td {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    word-break: break-word;
    border-right: 0 !important;
    border-bottom: 1px solid var(--wf-um-border) !important;
    background: var(--wf-um-surface);
  }

  .wf-um-admin-users-table td:last-child,
  .wf-um-protocol-table td:last-child,
  .wf-um-user-log-table td:last-child {
    border-bottom: 0 !important;
  }

  .wf-um-admin-users-table td::before,
  .wf-um-protocol-table td::before,
  .wf-um-user-log-table td::before {
    content: attr(data-label);
    position: static;
    display: block;
    width: 100%;
    margin-bottom: 2px;
    color: var(--wf-um-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }

  .wf-um-admin-users-table td > *,
  .wf-um-protocol-table td > *,
  .wf-um-user-log-table td > * {
    width: 100%;
    min-width: 0;
  }

  .wf-um-admin-users-table td .wf-um-user-link,
  .wf-um-protocol-table td .wf-um-user-link,
  .wf-um-user-log-table td .wf-um-user-link {
    display: block;
    width: 100%;
    text-align: center;
  }

  .wf-um-admin-users-table td .wf-um-user-link-with-icons {
    justify-content: center;
  }

  .wf-um-admin-users-table td[data-label="Mods"] {
    min-height: 40px;
  }

  .wf-um-admin-users-table td[data-label="Mods"] .wf-um-mod-checkbox {
    margin-top: 0;
    width: auto;
  }

  .wf-um-admin-users-table .wf-um-input,
  .wf-um-admin-users-table .wf-um-input-text,
  .wf-um-admin-users-table .wf-um-input-select {
    max-width: 100%;
    width: 100%;
  }

  .wf-um-admin-users-table .wf-um-input-coins {
    width: 88px;
    max-width: 100%;
    margin: 0;
  }

  .wf-um-admin-users-table .wf-um-input-text,
  .wf-um-admin-users-table .wf-um-input-select,
  .wf-um-admin-users-table .wf-um-input-coins {
    text-align: center;
  }

  .wf-um-row-actions {
    display: flex;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .wf-um-user-log-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .wf-um-login-modal {
    padding: 16px 14px;
  }

  .wf-um-login-modal h3 {
    font-size: 18px;
  }

  .wf-um-auth-card {
    align-items: center;
    text-align: center;
  }

  .wf-um-auth-card strong,
  .wf-um-auth-card span,
  .wf-um-user-link {
    word-break: break-word;
  }

  .wf-um-auth-copy .wf-um-subtle {
    display: block;
    text-align: center;
  }

  .wf-um-auth-label,
  .wf-um-auth-username {
    display: inline;
  }
}

@media (max-width: 480px) {
  .wf-um-tab-button {
    flex-basis: 100%;
  }

  .wf-um-admin-users-table td,
  .wf-um-protocol-table td,
  .wf-um-user-log-table td {
    padding: 9px;
  }

  .wf-um-admin-users-table td::before,
  .wf-um-protocol-table td::before,
  .wf-um-user-log-table td::before {
    width: 100%;
  }

  .wf-um-auth-card {
    padding: 10px 12px;
  }

  .wf-um-auth-copy .wf-um-subtle {
    font-size: 13px;
  }

  .wf-um-auth-label {
    display: inline;
  }

  .wf-um-auth-username {
    display: inline;
  }
}
