:root {
  --bg: #0f1017;
  --panel: #1a1b27;
  --panel-alt: #212333;
  --line: #31344a;
  --text: #ebeefe;
  --muted: #8f94b2;
  --accent: #ff4156;
  --accent-deep: #d92f42;
  --gold: #c48b2b;
  --danger: #ff4a67;
  --green: #4ed58d;
  --content-max-width: 1180px;
  --content-side-padding: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(255, 65, 86, 0.12), transparent 25%),
    linear-gradient(180deg, #13141c 0%, #090a10 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

textarea {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 440px);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(26, 27, 39, 0.96);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.login-brand__mark {
  display: inline-block;
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 900;
}

.login-brand h1 {
  margin: 8px 0 0;
  color: #ffbe1f;
  font-size: 2rem;
}

.login-brand p {
  margin: 10px 0 24px;
  color: var(--muted);
}

.login-form,
.stack-form {
  display: grid;
  gap: 16px;
}

.login-form label,
.stack-form label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #242638;
}

textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #242638;
  resize: vertical;
}

select {
  padding-right: 40px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

input:focus,
select:focus,
.large-textarea:focus,
.type-picker__trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 65, 86, 0.18);
}

input::placeholder {
  color: #777d9f;
}

.form-error {
  margin: 0;
  color: #ff8c9b;
  font-size: 0.95rem;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.18s ease;
}

.primary-button {
  height: 46px;
  padding: 0 18px;
  color: white;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(180deg, #ff4a60 0%, #ff3049 100%);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button--wide {
  width: 100%;
}

.primary-button--small {
  height: 40px;
  padding: 0 14px;
}

.ghost-button {
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--text);
  background: #232536;
  white-space: nowrap;
}

.danger-button {
  height: 44px;
  padding: 0 16px;
  color: #ff7a8d;
  border: 1px solid var(--danger);
  background: transparent;
}

.danger-link {
  border: 0;
  color: #ff7287;
  background: transparent;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.toast-stack {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 50;
  display: grid;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  min-width: 320px;
  max-width: min(92vw, 520px);
  padding: 14px 18px;
  border: 1px solid rgba(78, 213, 141, 0.78);
  border-radius: 12px;
  color: #75f2aa;
  text-align: center;
  background: rgba(28, 41, 43, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(-8px);
  animation: toast-in 180ms ease forwards;
}

.toast.is-leaving {
  animation: toast-out 180ms ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding:
    14px
    max(18px, calc((100vw - var(--content-max-width)) / 2 + var(--content-side-padding)));
  border-bottom: 1px solid #2c2f42;
  background: rgba(17, 18, 27, 0.95);
  position: relative;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: flex-start;
  text-align: left;
}

.topbar__brand h1 {
  margin: 0;
  color: #ffbe1f;
  font-size: 2rem;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  top: 50%;
  right: max(18px, calc((100vw - var(--content-max-width)) / 2 + var(--content-side-padding)));
  transform: translateY(-50%);
}

.topbar__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.api-status-button {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-weight: 700;
  background: #232536;
  cursor: pointer;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 999px;
  background: #6f7288;
}

.status-dot--ready {
  background: var(--green);
  box-shadow: 0 0 12px rgba(78, 213, 141, 0.8);
}

.status-dot--error {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 74, 103, 0.7);
}

.tabbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  border-bottom: 1px solid #242637;
  background: #101119;
}

.tabbar__item {
  padding: 14px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
}

.tabbar__item.is-active {
  color: #ff6275;
  border-bottom-color: var(--accent);
}

.content-shell {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding: 18px var(--content-side-padding) 60px;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.flash-message {
  padding: 12px 16px;
  border: 1px solid #43374a;
  border-radius: 14px;
  color: #ffdfe5;
  background: rgba(77, 38, 48, 0.72);
}

.flash-message.success,
.flash-message.is-success,
.flash-message--success {
  border-color: rgba(78, 213, 141, 0.52);
  color: #75f2aa;
  background: rgba(28, 41, 43, 0.96);
}

.flash-message.error,
.flash-message.is-error,
.flash-message--error,
.flash-message.danger,
.flash-message.is-danger,
.flash-message--danger {
  border-color: #43374a;
  color: #ffdfe5;
  background: rgba(77, 38, 48, 0.72);
}

.panel,
.toolbar,
.selection-bar {
  border: 1px solid #32354d;
  border-radius: 18px;
  background: #1a1c29;
}

.form-panel {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label {
  color: #ced3ef;
  font-size: 0.92rem;
  font-weight: 700;
}

.field--wide {
  grid-column: 1 / -1;
}

.inline-fetch {
  display: grid;
  grid-template-columns: 1fr 124px;
  gap: 10px;
}

.inline-save {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 10px;
}

.large-textarea {
  min-height: 92px;
}

.inline-fetch > * {
  min-width: 0;
}

.type-picker {
  position: relative;
  min-width: 0;
}

.type-picker__trigger {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #242638;
  cursor: pointer;
}

.type-picker__trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-picker__panel {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1d1f2d;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.type-picker__adder {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px;
  margin-bottom: 12px;
}

.type-picker__section-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.type-picker__list {
  display: grid;
  max-height: 250px;
  overflow-y: auto;
}

.type-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
}

.type-item:hover {
  background: #282b3e;
}

.type-item__name {
  cursor: pointer;
}

.type-item__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.type-item__action {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.fetched-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #383b52;
  border-radius: 16px;
  background: #171926;
}

.fetched-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fetched-card__header span {
  color: var(--muted);
  font-size: 0.92rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stat-box {
  padding: 14px;
  border: 1px solid #2f3248;
  border-radius: 14px;
  background: #222436;
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 0.83rem;
}

.stat-box strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  align-items: stretch;
  gap: 14px 18px;
  margin-top: 20px;
  padding: 12px;
}

.toolbar__filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 10px;
  min-width: 0;
  align-items: center;
}

.toolbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: max-content;
}

.toolbar__actions .ghost-button,
.toolbar__actions .danger-button {
  height: 40px;
  padding: 0 12px;
  font-size: 0.92rem;
}

.filter-picker {
  position: relative;
  min-width: 0;
}

.filter-picker__trigger {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #242638;
  cursor: pointer;
}

.filter-picker__trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-picker__panel {
  position: absolute;
  z-index: 12;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 280px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1d1f2d;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.filter-picker__list {
  display: grid;
  max-height: 280px;
  overflow-y: auto;
}

.filter-picker__option {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.filter-picker__option:hover,
.filter-picker__option.is-selected {
  background: #2b4f97;
}

.toolbar__count {
  color: var(--muted);
}

#selection-toggle.is-active {
  border-color: var(--accent);
  color: #ffd7dd;
  background: rgba(255, 65, 86, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 65, 86, 0.2) inset;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border-color: #8a2735;
  background: #2a1118;
}

.selection-bar__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.table-panel {
  margin-top: 14px;
  overflow: hidden;
}

.table-wrap {
  overflow-x: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

.data-table .col-channel {
  width: 100px;
}

.data-table .col-select {
  width: 42px;
}

.data-table .col-subscribers {
  width: 60px;
}

.data-table .col-videos {
  width: 50px;
}

.data-table .col-views {
  width: 60px;
}

.data-table .col-average {
  width: 70px;
}

.data-table .col-type {
  width: 90px;
}

.data-table .col-reason {
  width: 150px;
}

.data-table .col-reference {
  width: 82px;
}

.data-table .col-tone {
  width: 60px;
}

.data-table .col-actions {
  width: 96px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #2d3046;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
}

.data-table thead th {
  color: #cfd4f1;
  font-size: 0.92rem;
  background: #141620;
  white-space: nowrap;
}

.data-table thead th a {
  color: inherit;
}

.empty-state {
  text-align: center !important;
  color: var(--muted);
  padding: 44px 12px !important;
}

.channel-link {
  color: #5ea2ff;
  font-weight: 700;
}

.channel-link--cell,
.table-text {
  display: block;
  overflow: hidden;
  min-width: 0;
}

.channel-link--cell {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  line-height: 1.45;
}

.data-table td:nth-child(3),
.data-table td:nth-child(4),
.data-table td:nth-child(5),
.data-table td:nth-child(6) {
  white-space: nowrap;
}

.table-text--type {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.table-text--full {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  line-height: 1.4;
}

.data-table td:nth-child(7) {
  overflow: visible;
}

.table-expand {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.table-text--clamp {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.table-expand[aria-expanded="true"] .table-text--clamp {
  display: block;
  -webkit-line-clamp: unset;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

[data-page="material"] .data-table .col-channel {
  width: 290px !important;
}

[data-page="material"] .data-table .col-subscribers {
  width: 140px !important;
}

[data-page="material"] .data-table .col-videos {
  width: 98px !important;
}

[data-page="material"] .data-table .col-views {
  width: 72px !important;
}

[data-page="material"] .data-table .col-type {
  width: 92px !important;
}

[data-page="material"] .data-table .col-reason {
  width: 112px !important;
}

[data-page="material"] .data-table .col-reference {
  width: 102px !important;
}

[data-page="material"] .data-table .col-tone {
  width: 76px !important;
}

[data-page="material"] .data-table .col-actions {
  width: 132px !important;
}

[data-page="material"] .table-panel,
[data-page="material"] .table-wrap {
  overflow: hidden;
}

[data-page="material"] .data-table thead th:first-child {
  border-top-left-radius: 18px;
}

[data-page="material"] .data-table thead th:last-child {
  border-top-right-radius: 18px;
}

[data-page="material"] .data-table th:last-child,
[data-page="material"] .data-table td:last-child {
  padding-left: 8px;
  padding-right: 8px;
  overflow: visible;
  white-space: nowrap;
}

[data-page="material"] .row-actions {
  min-width: 112px;
  gap: 4px;
  justify-content: flex-start;
}

[data-page="material"] .row-actions .icon-button {
  width: 32px;
  height: 32px;
}

.material-title-cell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.material-title-cell__thumb {
  width: 56px;
  height: 56px;
  display: block;
  overflow: hidden;
  border: 1px solid #34374d;
  border-radius: 10px;
  background: #1b1e2b;
}

.material-title-cell__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.material-title-cell__text {
  min-width: 0;
}

.row-selector {
  width: 26px;
  height: 26px;
}

.data-table .select-col {
  width: 42px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.data-table tbody tr {
  min-height: 62px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #34374d;
  color: var(--text);
  background: #222436;
}

.icon-button--favorite {
  color: #8e93b2;
}

.icon-button--favorite.is-active {
  border-color: #c58f2d;
  color: #ffcb61;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.modal__dialog {
  position: relative;
  width: min(100%, 480px);
  padding: 24px;
  border: 1px solid #34374d;
  border-radius: 20px;
  background: #191b28;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.modal__dialog--api {
  width: min(100%, 430px);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  color: #7e839f;
  background: transparent;
  cursor: pointer;
}

.modal__intro {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.quota-card {
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid #35384d;
  border-radius: 16px;
  background: #202234;
}

.quota-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.92rem;
}

.quota-card__title strong {
  color: #f2f4ff;
  white-space: nowrap;
}

.quota-card__title span {
  flex: 1;
  color: #59a3ff;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.quota-card__bar {
  height: 10px;
  margin: 12px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #0f1017;
}

.quota-card__bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff5f73, #ff3049);
}

.quota-card__bar-fill.has-usage {
  min-width: 2px;
}

.quota-card__bar-fill.is-valid {
  background: linear-gradient(90deg, #42d78b, #13b96b);
}

.quota-card__bar-fill.is-invalid {
  background: linear-gradient(90deg, #ff6b7d, #ff3049);
}

.quota-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #9095b2;
  font-size: 0.88rem;
}

.quota-card__help {
  margin: 10px 0 0;
  color: #777d99;
  font-size: 0.84rem;
  line-height: 1.55;
}

.secret-field {
  position: relative;
}

.secret-field input {
  padding-right: 46px;
}

.secret-field__toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  color: #8e93b2;
  background: transparent;
  cursor: pointer;
}

.modal__actions--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.inline-form {
  margin: 0;
}

.danger-button--soft {
  background: transparent;
  white-space: nowrap;
}

.api-help {
  margin-top: 12px;
}

.api-help summary {
  color: #ffbe1f;
  font-weight: 800;
  cursor: pointer;
}

.api-help__footnote {
  color: #9ca2bf;
  font-size: 0.88rem;
  line-height: 1.6;
}

.modal__dialog h2 {
  margin-top: 0;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.help-list {
  color: var(--muted);
  line-height: 1.7;
}

.account-panel {
  margin-bottom: 16px;
}

.account-panel__header {
  margin-bottom: 18px;
}

.account-panel__header h2,
.account-users__header h2 {
  margin: 0 0 6px;
}

.account-panel__header p {
  margin: 0;
  color: var(--muted);
}

.account-form {
  max-width: 520px;
}

.form-actions--left {
  justify-content: flex-start;
}

.account-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.account-checkbox input {
  width: 18px;
  height: 18px;
}

.account-users__header {
  padding: 18px 20px 0;
}

.account-users-table td:last-child,
.account-users-table th:last-child {
  white-space: nowrap;
}

.account-users__self {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Material table action buttons must stay inside the last column */
[data-page="material"] .data-table {
  table-layout: fixed;
}

[data-page="material"] .data-table .col-channel {
  width: 248px !important;
}

[data-page="material"] .data-table .col-subscribers {
  width: 116px !important;
}

[data-page="material"] .data-table .col-videos {
  width: 82px !important;
}

[data-page="material"] .data-table .col-views {
  width: 64px !important;
}

[data-page="material"] .data-table .col-type {
  width: 76px !important;
}

[data-page="material"] .data-table .col-reason {
  width: 92px !important;
}

[data-page="material"] .data-table .col-reference {
  width: 92px !important;
}

[data-page="material"] .data-table .col-tone {
  width: 64px !important;
}

[data-page="material"] .data-table .col-actions {
  width: 132px !important;
}

[data-page="material"] .data-table th:last-child,
[data-page="material"] .data-table td:last-child {
  padding-left: 6px !important;
  padding-right: 10px !important;
  overflow: hidden !important;
  white-space: nowrap;
}

[data-page="material"] .data-table th,
[data-page="material"] .data-table td {
  padding-left: 8px;
  padding-right: 8px;
}

[data-page="material"] .data-table td:nth-child(3) {
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

[data-page="material"] .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

[data-page="material"] .row-actions .icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  font-size: inherit;
  border-radius: 12px;
}

[data-page="bgm"] .data-table td:nth-child(3),
[data-page="bgm"] .data-table td:nth-child(4),
[data-page="bgm"] .data-table td:nth-child(5),
[data-page="bgm"] .data-table td:nth-child(6) {
  white-space: normal;
}

[data-page="bgm"] .data-table td:nth-child(5) {
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

[data-page="bgm"] .data-table th:last-child,
[data-page="bgm"] .data-table td:last-child {
  padding-left: 6px;
  padding-right: 10px;
  white-space: nowrap;
  vertical-align: middle;
}

[data-page="bgm"] .row-actions {
  justify-content: flex-start;
  align-items: center;
  min-height: 34px;
}

[data-page="bgm"] .channel-link--cell {
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.bgm-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #34374d;
  border-radius: 10px;
  background: #222436;
  vertical-align: middle;
}

@media (max-width: 960px) {
  .form-grid,
  .stats-grid,
  .topbar {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .topbar__actions {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    justify-content: center;
  }

  .toolbar__filters {
    grid-template-columns: 1fr;
  }

  .toolbar__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar__brand {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .inline-fetch,
  .type-picker__adder {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

[data-page="social-channel"] .data-table td:nth-child(4) {
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

[data-page="social-channel"] .channel-link--cell {
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

[data-page="social-channel"] .row-actions {
  justify-content: flex-start;
  align-items: center;
  min-height: 34px;
}

.social-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #34374d;
  border-radius: 10px;
  background: #222436;
}
