.account-shortcut {
  position: relative;
}

.account-shortcut__status {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--muted);
}

html[data-portal-role="viewer"] .account-shortcut__status,
html[data-portal-role="rightsholder"] .account-shortcut__status,
html[data-portal-role="rights_manager"] .account-shortcut__status,
html[data-portal-role="admin"] .account-shortcut__status {
  background: #2eaa67;
}

html[data-portal-role="pending"] .account-shortcut__status {
  background: #f5a524;
}

.account-shortcut.is-active {
  border-color: var(--surface-strong);
  background: var(--surface-strong);
  color: var(--text-inverse);
}

.portal-auth,
.portal-simple-page,
.portal-account-empty {
  width: 100%;
  max-width: 100%;
}

.portal-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  min-height: min(720px, calc(100vh - 146px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portal-auth__main {
  width: min(100%, 660px);
  padding: clamp(36px, 5.2vw, 76px);
}

.portal-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin: -10px 0 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.portal-back:hover {
  color: var(--text);
}

.portal-back svg {
  width: 17px;
  height: 17px;
}

.portal-auth h1,
.portal-account-empty h1 {
  max-width: 14ch;
  margin: 9px 0 14px;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.portal-auth__lead {
  max-width: 54ch;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.identity-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.identity-heading em {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(4, 58px);
  gap: 10px;
}

.identity-button {
  display: grid;
  place-items: center;
  width: 58px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.identity-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.identity-button:disabled {
  cursor: default;
  opacity: 0.82;
}

.identity-button:disabled:hover {
  border-color: var(--line);
  background: var(--bg-elevated);
  transform: none;
}

.identity-button img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.portal-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.portal-divider::before,
.portal-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.phone-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.phone-login__heading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.phone-login__heading strong {
  color: var(--text);
}

.portal-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.portal-field input,
.portal-field select,
.portal-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
}

.portal-field textarea {
  min-height: 112px;
  resize: vertical;
}

.portal-field input:focus,
.portal-field select:focus,
.portal-field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent);
}

.portal-submit {
  grid-column: 1 / -1;
  min-height: 50px;
  white-space: nowrap;
}

.portal-form-error {
  grid-column: 1 / -1;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, #dc3f35 30%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, #dc3f35 8%, var(--surface));
  color: #bd2e26;
  font-size: 12px;
  font-weight: 650;
}

.portal-text-button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 5px 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.portal-terms {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.portal-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 11px;
  margin: 0 0 20px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, #2f7de1 28%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, #2f7de1 8%, var(--surface));
}

.portal-notice__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, #2f7de1 15%, var(--surface));
  color: #2f7de1;
}

.portal-notice__icon svg,
.portal-notice > button svg {
  width: 18px;
  height: 18px;
}

.portal-notice > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 12px;
}

.portal-notice > div span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.portal-notice > button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.portal-auth__partner {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(38px, 5vw, 72px);
  background:
    radial-gradient(circle at 95% 5%, rgba(255, 112, 44, 0.8), transparent 18rem),
    radial-gradient(circle at 0% 100%, rgba(91, 57, 204, 0.5), transparent 24rem),
    #151219;
  color: #fff;
}

.portal-auth__partner::after {
  position: absolute;
  right: -145px;
  bottom: -145px;
  z-index: -1;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.portal-auth__partner .eyebrow {
  color: #ff766b;
}

.portal-auth__partner-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.portal-auth__partner-icon svg {
  width: 28px;
  height: 28px;
}

.portal-auth__partner h2 {
  max-width: 14ch;
  margin: 8px 0 16px;
  font-size: clamp(28px, 3.1vw, 44px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.portal-auth__partner p {
  max-width: 44ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
}

.portal-auth__partner ul {
  display: grid;
  gap: 12px;
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 600;
}

.portal-auth__partner li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.portal-auth__partner li svg {
  width: 17px;
  height: 17px;
  color: #ff766b;
}

.portal-partner-cta {
  align-self: flex-start;
  color: #111114;
}

.portal-partner-cta svg {
  width: 17px;
  height: 17px;
}

.portal-auth__partner-note {
  max-width: 44ch;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  line-height: 1.5;
}

.portal-simple-page {
  padding-bottom: 32px;
}

.portal-page-hero {
  margin-top: 0;
}

.registration-choice,
.holder-register-start {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.registration-choice__card,
.holder-register-start > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.registration-choice__card > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 46px;
  border-radius: 17px;
  background: var(--surface-soft);
}

.registration-choice__card > span svg {
  width: 26px;
  height: 26px;
}

.registration-choice__card h2,
.holder-register-start h2 {
  margin: 6px 0 11px;
  font-size: clamp(25px, 2.7vw, 36px);
  font-weight: 650;
  line-height: 1.05;
}

.registration-choice__card p,
.holder-register-start p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.registration-choice__card .button,
.holder-register-start .button {
  align-self: flex-start;
  margin-top: auto;
}

.registration-choice__card--accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 126, 60, 0.7), transparent 18rem),
    #17131c;
  color: #fff;
}

.registration-choice__card--accent p {
  color: rgba(255, 255, 255, 0.68);
}

.registration-choice__card--accent > span {
  background: rgba(255, 255, 255, 0.1);
}

.holder-register-start__primary {
  background: color-mix(in srgb, #21a038 9%, var(--surface)) !important;
}

.holder-register-start__mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 46px;
  border-radius: 17px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 137, 133, 0.14);
}

.holder-register-start__mark img {
  width: 36px;
  height: 36px;
}

.portal-account-empty {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 300px;
  padding: clamp(30px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.portal-account-empty__icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.portal-account-empty__icon svg {
  width: 32px;
  height: 32px;
}

.portal-account-empty h1 {
  margin-bottom: 9px;
  font-size: clamp(28px, 3.2vw, 44px);
}

.portal-account-empty p {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.portal-account-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.my-account-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  margin: -18px 0 28px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.my-account-card > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.my-account-card svg {
  width: 21px;
  height: 21px;
}

.my-account-card > div {
  display: grid;
  min-width: 0;
}

.my-account-card small {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.my-account-card strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-account-card em {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-account-card > svg {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .portal-auth {
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  }

  .portal-auth__main,
  .portal-auth__partner {
    padding: 42px;
  }

}

@media (max-width: 900px) {
  .portal-auth {
    grid-template-columns: 1fr;
  }

  .portal-auth__main {
    width: 100%;
  }

  .portal-auth__partner {
    min-height: 520px;
  }

  .portal-account-empty {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .portal-account-empty__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .portal-auth,
  .portal-account-empty {
    border-radius: 22px;
  }

  .portal-auth__main,
  .portal-auth__partner {
    padding: 29px 22px;
  }

  .portal-auth h1 {
    font-size: clamp(31px, 10vw, 42px);
  }

  .portal-auth__lead {
    font-size: 14px;
  }

  .phone-login,
  .registration-choice,
  .holder-register-start {
    grid-template-columns: 1fr;
  }

  .identity-button {
    min-height: 56px;
  }

  .phone-login .portal-submit {
    width: 100%;
  }

  .portal-auth__partner {
    min-height: 500px;
  }

  .portal-partner-cta {
    width: 100%;
    justify-content: center;
  }

  .registration-choice__card,
  .holder-register-start > div {
    min-height: 310px;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .registration-choice__card > span,
  .holder-register-start__mark {
    margin-bottom: 34px;
  }

  .portal-account-empty {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 22px;
  }

  .portal-account-empty__icon {
    width: 60px;
    height: 60px;
  }

  .portal-account-empty__actions,
  .portal-account-empty__actions .button {
    width: 100%;
  }

  .my-account-card {
    margin-top: -6px;
  }
}

/* Partner and administration workspace */
.portal-workspace,
.account-page,
.holder-application-page {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.portal-workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.portal-sidebar {
  position: sticky;
  top: 98px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: min(670px, calc(100vh - 126px));
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, var(--accent-soft), transparent 15rem),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.portal-sidebar__brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 4px 3px 18px;
  border-bottom: 1px solid var(--line);
}

.portal-sidebar__brand > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--surface-strong);
  color: var(--text-inverse);
}

.portal-workspace--admin .portal-sidebar__brand > span {
  background: var(--accent);
  color: #fff;
}

.portal-workspace--manager .portal-sidebar__brand > span {
  background: #246bbd;
  color: #fff;
}

.portal-sidebar__brand svg {
  width: 20px;
  height: 20px;
}

.portal-sidebar__brand > div {
  display: grid;
  min-width: 0;
}

.portal-sidebar__brand small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.portal-sidebar__brand strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-sidebar nav {
  display: grid;
  gap: 4px;
  margin: 16px 0;
}

.portal-sidebar nav a,
.portal-sidebar__back {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease;
}

.portal-sidebar nav a:hover,
.portal-sidebar nav a.is-active,
.portal-sidebar__back:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.portal-sidebar nav a.is-active {
  box-shadow: inset 3px 0 var(--accent);
}

.portal-sidebar nav svg,
.portal-sidebar__back svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.portal-sidebar nav b {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
}

.portal-sidebar__back {
  margin-top: auto;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}

.portal-workspace__main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.portal-workspace__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  padding: 4px 2px 8px;
}

.portal-workspace__topbar > div:first-child {
  min-width: 0;
}

.portal-workspace__topbar h1 {
  margin: 7px 0 5px;
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 680;
  letter-spacing: -.025em;
  line-height: 1;
}

.portal-workspace__topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.portal-workspace__top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.portal-profile {
  display: grid;
  grid-template-columns: 44px minmax(0, 124px) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 2px 6px 2px 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.portal-profile__home {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.portal-profile__home > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text-inverse);
  font-size: 10px;
  font-weight: 750;
}

.portal-profile__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.portal-profile__home:hover,
.portal-profile__logout:hover { background: var(--surface-soft); }

.portal-profile strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-profile svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.portal-panel,
.portal-form,
.review-card,
.moderation-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.portal-panel {
  overflow: hidden;
}

.portal-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.portal-panel__head h2 {
  margin: 4px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 650;
  letter-spacing: -.015em;
}

.portal-panel__head > a,
.portal-panel__head > strong,
.portal-panel__head > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
}

.portal-panel__head > a svg {
  width: 15px;
  height: 15px;
}

.portal-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.portal-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.portal-status--success { border-color: color-mix(in srgb, #21965b 26%, var(--line)); background: color-mix(in srgb, #21965b 8%, var(--surface)); color: #19814c; }
.portal-status--danger { border-color: color-mix(in srgb, #db4037 28%, var(--line)); background: color-mix(in srgb, #db4037 8%, var(--surface)); color: #c8342c; }
.portal-status--warning { border-color: color-mix(in srgb, #d38914 30%, var(--line)); background: color-mix(in srgb, #e19a25 10%, var(--surface)); color: #a96806; }
.portal-status--info { border-color: color-mix(in srgb, #307fd9 28%, var(--line)); background: color-mix(in srgb, #307fd9 9%, var(--surface)); color: #246bbd; }

.content-status-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.portal-status--transcode svg { width: 12px; height: 12px; }
.portal-status--transcode-processing { background: linear-gradient(115deg, color-mix(in srgb, #307fd9 13%, var(--surface)), color-mix(in srgb, #8a4fff 9%, var(--surface))); }
.portal-status--transcode-processing svg { animation: transcode-breathe 1.5s ease-in-out infinite; }

.transcode-qualities { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.transcode-quality { display: inline-grid; grid-template-columns: 11px auto; grid-template-rows: auto auto; align-items: center; column-gap: 4px; min-height: 31px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--muted); line-height: 1; }
.transcode-quality svg { grid-row: 1 / 3; width: 10px; height: 10px; }
.transcode-quality strong { font-size: 7px; font-weight: 750; letter-spacing: .04em; }
.transcode-quality small { font-size: 6px; }
.transcode-quality--ready { border-color: color-mix(in srgb, #21965b 28%, var(--line)); background: color-mix(in srgb, #21965b 8%, var(--surface)); color: #19814c; }
.transcode-quality--processing { border-color: color-mix(in srgb, #307fd9 30%, var(--line)); background: color-mix(in srgb, #307fd9 8%, var(--surface)); color: #246bbd; }
.transcode-quality--failed { border-color: color-mix(in srgb, #db4037 28%, var(--line)); background: color-mix(in srgb, #db4037 8%, var(--surface)); color: #c8342c; }

@keyframes transcode-breathe { 50% { opacity: .45; transform: scale(.9); } }

.portal-status-banner,
.admin-alert,
.upload-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.portal-status-banner > svg,
.admin-alert > span,
.upload-summary > span {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--accent-text);
}

.admin-alert > span,
.upload-summary > span {
  display: grid;
  place-items: center;
  padding: 0;
}

.admin-alert svg,
.upload-summary svg {
  width: 20px;
  height: 20px;
}

.portal-status-banner > div,
.admin-alert > div,
.upload-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.portal-status-banner strong,
.admin-alert strong,
.upload-summary strong {
  font-size: 12px;
  font-weight: 700;
}

.portal-status-banner span,
.admin-alert p,
.upload-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.portal-status-banner > a {
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 700;
}

.portal-status-banner--success { border-color: color-mix(in srgb, #21965b 26%, var(--line)); }
.portal-status-banner--warning { border-color: color-mix(in srgb, #e19a25 30%, var(--line)); }
.admin-alert { border-color: color-mix(in srgb, #307fd9 25%, var(--line)); }

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

.portal-kpis > article,
.portal-kpis > a {
  display: grid;
  min-width: 0;
  min-height: 152px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.portal-kpis span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.portal-kpis strong {
  margin-top: 14px;
  overflow-wrap: anywhere;
  font-size: clamp(23px, 2.4vw, 34px);
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1;
}

.portal-kpis em {
  margin-top: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.portal-kpis small {
  align-self: end;
  margin-top: 14px;
  color: var(--muted);
  font-size: 9px;
}

.portal-kpis .portal-kpi--accent {
  border-color: transparent;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 126, 60, .7), transparent 13rem),
    #19151d;
  color: #fff;
}

.portal-kpi--accent span,
.portal-kpi--accent small { color: rgba(255,255,255,.64); }

.partner-overview-grid,
.admin-overview-grid,
.organization-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.portal-panel--chart {
  padding-bottom: 8px;
}

.analytics-chart {
  display: block;
  width: 100%;
  height: auto;
  padding: 12px 20px 0;
  overflow: visible;
}

.analytics-chart__labels {
  fill: var(--muted);
  font: 500 10px "Montserrat", sans-serif;
}

.action-list,
.admin-queue {
  display: flex;
  flex-direction: column;
}

.action-list > a,
.admin-queue > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}

.action-list > a:last-child,
.admin-queue > a:last-child { border-bottom: 0; }

.action-list__icon,
.admin-queue__avatar,
.admin-queue__thumb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--accent-text);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.action-list__icon svg,
.admin-queue__thumb svg { width: 20px; height: 20px; }
.admin-queue__thumb img { width: 100%; height: 100%; object-fit: cover; }

.action-list > a > div,
.admin-queue > a > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.action-list strong,
.admin-queue strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-list span:not(.portal-status),
.admin-queue small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-mini-empty {
  padding: 28px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.portal-dev-note {
  padding: 12px 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

/* Tables */
.portal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.portal-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.portal-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.portal-table td {
  min-width: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  vertical-align: middle;
}

.portal-table tbody tr:last-child td { border-bottom: 0; }

.content-cell,
.user-cell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 210px;
}

.content-cell > img,
.content-cell > span {
  width: 58px;
  height: 38px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--surface-soft);
  object-fit: cover;
}

.content-cell > span { display: grid; place-items: center; }
.content-cell > span svg { width: 18px; height: 18px; }

.content-cell > .content-cell__thumbnail {
  position: relative;
  isolation: isolate;
  background: #101010 url('/assets/video-placeholder.svg') center / cover no-repeat;
}

/* Portrait previews keep the same text column alignment and compact rows. */
.content-cell > .content-cell__thumbnail--shorts {
  width: 36px;
  height: 64px;
  background-image: url('/assets/shorts-placeholder.svg?v=2');
  aspect-ratio: 9 / 16;
  justify-self: center;
  border-radius: 6px;
}

.content-cell__thumbnail-mark {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.6px;
  text-align: center;
}

.content-cell__thumbnail > img,
.content-cell__thumbnail > canvas,
.content-cell__thumbnail > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.content-cell__thumbnail > img[hidden] { display: none; }
.content-cell__thumbnail > video { opacity: 0; }
.content-cell__thumbnail > video.has-frame,
.content-cell__thumbnail > canvas.has-frame,
.content-cell__thumbnail > img.is-loaded { opacity: 1; }

.content-cell > div,
.user-cell > div {
  display: grid;
  min-width: 0;
}

.content-cell small,
.user-cell small,
.table-secondary {
  color: var(--muted);
  font-size: 8px;
}

.admin-holder-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.content-cell strong,
.user-cell strong,
.table-primary {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-cell em {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-cell { grid-template-columns: 36px minmax(0, 1fr); min-width: 170px; }
.user-cell > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 750;
}

.employee-mark {
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  border-radius: 11px !important;
  background: #fff !important;
  color: inherit;
}

.employee-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.employee-mark__dark { display: none !important; }
.employee-mark--profile { width: 35px !important; height: 35px !important; }
.employee-mark--sidebar { width: 42px !important; height: 42px !important; }
.employee-mark--table { width: 36px !important; height: 36px !important; }
.employee-mark--account { width: 48px !important; height: 48px !important; }

html[data-theme="dark"] .employee-mark,
html[data-theme="system"] .employee-mark {
  background: #06070a !important;
}

html[data-theme="dark"] .employee-mark__light { display: none !important; }
html[data-theme="dark"] .employee-mark__dark { display: block !important; }

@media (prefers-color-scheme: light) {
  html[data-theme="system"] .employee-mark { background: #fff !important; }
  html[data-theme="system"] .employee-mark__light { display: block !important; }
  html[data-theme="system"] .employee-mark__dark { display: none !important; }
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .employee-mark__light { display: none !important; }
  html[data-theme="system"] .employee-mark__dark { display: block !important; }
}

.portal-table__actions {
  white-space: nowrap;
  text-align: right;
}

.portal-table__actions button {
  display: inline-grid;
  vertical-align: middle;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--muted);
  cursor: pointer;
}

.portal-table__actions button:hover { color: var(--accent-text); border-color: var(--line-strong); }
.portal-table__actions svg { width: 16px; height: 16px; }

.portal-role {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.portal-role--admin { background: var(--accent-soft); color: var(--accent-text); }
.portal-role--rightsholder { background: color-mix(in srgb, #21965b 11%, var(--surface)); color: #19814c; }
.portal-role--pending { background: color-mix(in srgb, #e19a25 12%, var(--surface)); color: #a96806; }
.portal-role--rights_manager { background: color-mix(in srgb, #307fd9 11%, var(--surface)); color: #246bbd; }

.portal-filter-row,
.admin-table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.filter-chips {
  display: flex;
  max-width: 100%;
  overflow-x: auto;
  gap: 7px;
  padding: 2px;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips .chip { flex: 0 0 auto; }

/* Account and application */
.account-avatar { position: relative; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; background: var(--surface-strong); color: var(--text-inverse); font-weight: 750; }
.account-avatar > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.account-avatar--topbar { width: 32px; height: 32px; border-radius: 50%; font-size: 11px; }
.account-avatar--preview { width: 104px; height: 104px; border-radius: 50%; font-size: 28px; }
.account-avatar-editor { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 22px; padding: 24px; }
.account-avatar-editor__body { min-width: 0; }
.account-avatar-editor__body h2 { margin: 0 0 8px; font-size: 18px; }
.account-avatar-editor__body > p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.account-avatar-editor__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.account-avatar-editor__actions [hidden] { display: none; }
.account-avatar-editor__choose { position: relative; cursor: pointer; }
.account-avatar-editor__choose:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.account-avatar-editor__choose:has(input:disabled) { opacity: .5; cursor: default; }
.account-avatar-editor__choose input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.account-avatar-editor__status { min-height: 1.6em; margin: 10px 0 0; }
.account-shortcut.has-account-avatar { position: relative; overflow: hidden; border-radius: 50%; }
.account-shortcut.has-account-avatar > svg { visibility: hidden; }
.account-shortcut__avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) {
  .account-avatar-editor { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .account-avatar--preview { width: 88px; height: 88px; }
  .account-avatar-editor__actions .button { min-height: 42px; }
}

.account-page {
  display: grid;
  gap: 18px;
}

.account-header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.account-header__avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--surface-strong);
  color: var(--text-inverse);
  font-size: 16px;
  font-weight: 750;
}

.account-header h1 {
  margin: 5px 0 2px;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 680;
  letter-spacing: -.025em;
  line-height: 1;
}

.account-header p { margin: 0; color: var(--muted); font-size: 11px; }

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(150px, .55fr));
  gap: 14px;
}

.account-welcome,
.account-stat,
.account-partner-card,
.account-settings-grid > article,
.pending-hero,
.pending-details > section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.account-welcome {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 27px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 120, 50, .78), transparent 16rem),
    #18141c;
  color: #fff;
}

.account-welcome h2 {
  max-width: 17ch;
  margin: 8px 0 10px;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.05;
}
.account-welcome p { max-width: 52ch; margin: 0; color: rgba(255,255,255,.66); font-size: 11px; line-height: 1.6; }
.account-welcome .button { align-self: flex-start; margin-top: auto; }

.account-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 190px;
  padding: 22px;
}
.account-stat > span { color: var(--accent-text); }
.account-stat svg { width: 24px; height: 24px; }
.account-stat strong { margin-top: 22px; font-size: 38px; font-weight: 670; letter-spacing: -.04em; }
.account-stat em { color: var(--muted); font-size: 10px; font-style: normal; }

.account-partner-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 19px;
  padding: 25px;
}
.account-partner-card > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: var(--accent-soft); color: var(--accent-text); }
.account-partner-card > span svg { width: 25px; height: 25px; }
.account-partner-card h2 { margin: 5px 0 6px; font-size: clamp(20px, 2.2vw, 29px); font-weight: 650; }
.account-partner-card p { max-width: 66ch; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.account-partner-card--active { border-color: color-mix(in srgb, #21965b 30%, var(--line)); }
.account-partner-card--active > span { background: color-mix(in srgb, #21965b 11%, var(--surface)); color: #19814c; }

.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.account-settings-grid > article { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 13px; padding: 20px; }
.account-settings-grid > article > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--surface-soft); color: var(--muted); }
.account-settings-grid svg { width: 20px; height: 20px; }
.account-settings-grid h3 { margin: 1px 0 5px; font-size: 13px; font-weight: 650; }
.account-settings-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.account-password > summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.account-password > summary::-webkit-details-marker { display: none; }
.account-password > summary::marker { content: ""; }

.account-password > summary > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--accent-text);
}

.account-password > summary > span svg { width: 22px; height: 22px; }

.account-password > summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-password > summary strong { font-size: 13px; font-weight: 650; }
.account-password > summary small { color: var(--muted); font-size: 10px; }

.account-password > summary > svg {
  width: 18px;
  height: 18px;
  justify-self: end;
  color: var(--muted);
  transition: transform .2s ease;
}

.account-password[open] > summary {
  border-bottom: 1px solid var(--line);
}

.account-password[open] > summary > svg { transform: rotate(90deg); }

.account-password > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
  border-radius: inherit;
}

.account-password > .portal-form {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pending-hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  padding: 25px;
}
.pending-hero__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: color-mix(in srgb, #e19a25 12%, var(--surface)); color: #b87409; }
.pending-hero__icon svg { width: 25px; height: 25px; }
.pending-hero h2 { margin: 5px 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 650; }
.pending-hero p { max-width: 70ch; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.application-timeline,
.payout-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  list-style: none;
}
.application-timeline li,
.payout-steps li { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; min-width: 0; padding: 19px; border-right: 1px solid var(--line); }
.application-timeline li:last-child,
.payout-steps li:last-child { border-right: 0; }
.application-timeline li > span,
.payout-steps li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 750; }
.application-timeline li.is-complete > span { background: #21965b; color: #fff; }
.application-timeline li.is-current > span,
.payout-steps li.is-current > span { background: var(--accent); color: #fff; }
.application-timeline svg { width: 16px; height: 16px; }
.application-timeline li > div,
.payout-steps li > div { display: grid; min-width: 0; gap: 3px; }
.application-timeline strong,
.payout-steps strong { font-size: 9px; font-weight: 700; }
.application-timeline small,
.payout-steps small { color: var(--muted); font-size: 8px; line-height: 1.4; }

.pending-details { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.pending-details > section { display: grid; gap: 4px; padding: 20px; }
.pending-details span { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pending-details strong { font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.pending-details small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }

.pending-correction,
.impersonation-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, #e19a25 32%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, #e19a25 9%, var(--surface));
}

.pending-correction > div,
.impersonation-banner > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pending-correction strong,
.impersonation-banner strong { font-size: 11px; font-weight: 700; }
.pending-correction span,
.impersonation-banner small { color: var(--muted); font-size: 9px; }

.impersonation-banner {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  margin-bottom: 16px;
  border-color: color-mix(in srgb, #307fd9 30%, var(--line));
  background: color-mix(in srgb, #307fd9 8%, var(--surface));
}

.impersonation-banner > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, #307fd9 14%, var(--surface));
  color: #307fd9;
}

.impersonation-banner svg { width: 20px; height: 20px; }

.holder-application-page { padding-bottom: 30px; }
.holder-application-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.holder-application-head h1 { margin: 6px 0 0; font-size: clamp(28px, 3.6vw, 48px); font-weight: 680; letter-spacing: -.03em; line-height: 1; }

.holder-stepper { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.holder-stepper li { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.holder-stepper li:not(:last-child)::after { width: 24px; height: 1px; margin-left: 1px; background: var(--line-strong); content: ""; }
.holder-stepper li > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 9px; font-weight: 700; }
.holder-stepper li svg { width: 14px; height: 14px; }
.holder-stepper em { font-size: 8px; font-style: normal; font-weight: 650; }
.holder-stepper .is-current { color: var(--accent-text); }
.holder-stepper .is-current > span { border-color: var(--accent); background: var(--accent); color: #fff; }
.holder-stepper .is-complete > span { border-color: #21965b; background: #21965b; color: #fff; }

.portal-form { padding: clamp(22px, 3.2vw, 38px); }
.portal-form__section-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.portal-form__section-head > div > span { color: var(--accent-text); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.portal-form__section-head h2 { margin: 5px 0 0; font-size: clamp(23px, 2.7vw, 34px); font-weight: 650; letter-spacing: -.02em; }
.portal-form__section-head p { max-width: 44ch; margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.portal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; min-width: 0; }
.portal-field--wide { grid-column: 1 / -1; }
.portal-field small { color: var(--muted); font-size: 8px; font-weight: 500; line-height: 1.4; }
.portal-field textarea { font-family: inherit; }

.portal-segment { display: flex; width: fit-content; max-width: 100%; gap: 4px; margin: 0 0 22px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.portal-segment legend,
.upload-types legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.portal-segment input,
.upload-types input,
.portal-check-group input,
.portal-consent input,
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.portal-segment label { cursor: pointer; }
.portal-segment span { display: grid; place-items: center; min-height: 40px; padding: 0 15px; border-radius: 10px; color: var(--muted); font-size: 10px; font-weight: 650; }
.portal-segment input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }

.portal-check-group { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 22px; padding: 0; border: 0; }
.portal-check-group legend { width: 100%; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.portal-check-group label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); font-size: 10px; font-weight: 600; cursor: pointer; }
.portal-check-group label > span,
.portal-consent > span { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 5px; color: transparent; }
.portal-check-group svg,
.portal-consent svg { width: 12px; height: 12px; }
.portal-check-group input:checked + span,
.portal-consent input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }

.portal-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; color: var(--muted); cursor: pointer; }
.portal-consent > span { flex: 0 0 auto; margin-top: 1px; }
.portal-consent em { max-width: 76ch; font-size: 9px; font-style: normal; line-height: 1.55; }

.portal-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.portal-form__actions--sticky { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 4; padding: 12px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(18px); }

.holder-review { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.holder-review > section { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elevated); }
.holder-review__wide { grid-column: 1 / -1; }
.holder-review > section > span { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.holder-review h3 { margin: 7px 0 13px; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.holder-review dl,
.organization-card dl,
.review-card dl,
.moderation-card dl { display: grid; gap: 8px; margin: 0; }
.holder-review dl div,
.organization-card dl div,
.review-card dl div,
.moderation-card dl div { display: flex; justify-content: space-between; gap: 16px; min-width: 0; }
.holder-review dt,
.organization-card dt,
.review-card dt,
.moderation-card dt { color: var(--muted); font-size: 9px; }
.holder-review dd,
.organization-card dd,
.review-card dd,
.moderation-card dd { margin: 0; font-size: 9px; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
/* Upload and partner reports */
.upload-jobs { display: grid; gap: 16px; margin-block: 0 26px; min-width: 0; scroll-margin-top: calc(var(--app-header-h, 75px) + var(--app-header-safe, 0px) + 12px); }
.upload-jobs[hidden] { display: none; }
.upload-jobs__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-jobs__head > div { display: grid; min-width: 0; gap: 4px; }
.upload-jobs__head h2 { margin: 0; font-size: 18px; font-weight: 650; }
.upload-jobs__head [data-upload-jobs-count] { color: var(--muted); font-size: 11px; }
.upload-jobs__head > button { flex-shrink: 0; min-height: 40px; }
.upload-jobs__head > .upload-jobs__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.upload-jobs__actions .button { min-height: 40px; }
.upload-jobs__hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.upload-jobs__actions [hidden] { display: none; }
.upload-jobs__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; }
.upload-job { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); }
.upload-job[data-upload-state="uploading"],
.upload-job[data-upload-state="preparing"],
.upload-job[data-upload-state="verifying"] { border-color: color-mix(in srgb, #307fd9 42%, var(--line)); }
.upload-job[data-upload-state="success"] { border-color: color-mix(in srgb, #21965b 38%, var(--line)); }
.upload-job[data-upload-state="error"],
.upload-job[data-upload-state="cancel_error"],
.upload-job[data-upload-state="confirm_error"] { border-color: color-mix(in srgb, #d94a4a 42%, var(--line)); }
.upload-job__summary { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 16px; grid-template-rows: auto auto; align-items: center; gap: 3px 8px; min-height: 72px; padding: 10px; cursor: pointer; list-style: none; }
.upload-job__summary::-webkit-details-marker { display: none; }
.upload-job__summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; border-radius: 11px; }
.upload-job__summary:hover { background: var(--surface-soft); }
.upload-job__icon { display: grid; place-items: center; grid-column: 1; grid-row: 1 / 3; width: 24px; height: 30px; border-radius: 8px; background: var(--surface-soft); color: var(--accent-text); }
.upload-job__icon svg { width: 16px; height: 16px; }
.upload-job__identity { display: grid; min-width: 0; gap: 1px; grid-column: 2; grid-row: 1; }
.upload-job__title { color: var(--text); font-size: 12px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.upload-job__artist { color: var(--muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.upload-job__duplicate { color: #a96716; font-size: 10px; line-height: 1.4; }
.upload-job__duplicate[hidden] { display: none; }
.upload-job:not([open]) .upload-job__title,
.upload-job:not([open]) .upload-job__artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-job__status { grid-column: 2; grid-row: 2; color: #307fd9; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.upload-job[data-upload-state="success"] .upload-job__status,
.upload-job[data-upload-state="success"] .upload-job__percent { color: #21965b; }
.upload-job[data-upload-state="error"] .upload-job__status,
.upload-job[data-upload-state="cancel_error"] .upload-job__status,
.upload-job[data-upload-state="confirm_error"] .upload-job__status { color: #d94a4a; }
.upload-job[data-upload-state="cancelled"] .upload-job__status,
.upload-job[data-upload-state="cancelled"] .upload-job__percent { color: var(--muted); }
.upload-job__percent { grid-column: 3; grid-row: 1 / 3; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.upload-job__chevron { grid-column: 4; grid-row: 1 / 3; display: grid; place-items: center; color: var(--muted); }
.upload-job__chevron svg { width: 16px; height: 16px; transition: transform 160ms ease; }
.upload-job[open] .upload-job__chevron svg { transform: rotate(90deg); }
.upload-job__body { min-width: 0; padding: 12px; border-top: 1px solid var(--line); }
.upload-job__body .upload-transfer { border: 0; border-radius: 0; background: none; padding: 0; }
.upload-job__body [hidden] { display: none !important; }
.upload-job__body .upload-transfer__files { grid-template-columns: minmax(0, 1fr); }
.upload-job__body .upload-transfer__head { grid-template-columns: 10px minmax(0, 1fr) auto; }
.upload-job__body .upload-transfer__head strong { font-size: 11px; }
.upload-job__body .upload-transfer__amount { overflow-wrap: anywhere; line-height: 1.6; }
.upload-job__body .upload-transfer footer { flex-wrap: wrap; }
.upload-job__body .upload-transfer footer .button { min-height: 42px; }
.unfinished-uploads { display: grid; gap: 12px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.unfinished-uploads[hidden] { display: none; }
.unfinished-uploads__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.unfinished-uploads__head > div { flex: 1 1 220px; min-width: 0; }
.unfinished-uploads__head h3 { margin: 0; font-size: 14px; line-height: 1.5; }
.unfinished-uploads__head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.upload-job--recovered { display: grid; align-content: start; gap: 7px; padding: 12px; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.upload-job--recovered header { display: grid; gap: 3px; }
.upload-job--recovered header > strong { font-size: 12px; }
.upload-job--recovered header > span { color: #a96716; }
.upload-job--recovered p { margin: 0; color: var(--muted); }
.upload-job--recovered small { color: var(--muted); font-size: 10px; }
.upload-job--recovered .unfinished-uploads__error { color: #c45239; }
.upload-job--recovered .button { justify-self: start; min-height: 36px; margin-top: 3px; }
@media (min-width: 1280px) {
  .upload-jobs__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .upload-jobs__grid { grid-template-columns: minmax(0, 1fr); }
  .upload-jobs__head { align-items: flex-start; flex-wrap: wrap; }
  .upload-jobs__head h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .upload-job__chevron svg { transition: none; }
}
.upload-form { display: grid; gap: 24px; }
.clip-duplicates { min-width: 0; padding: 12px; border: 1px solid #dca74c70; border-radius: 12px; background: #dca74c0d; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.clip-duplicates[hidden] { display: none; }
.clip-duplicates > strong { color: #a96716; font-size: 12px; }
.clip-duplicates p { margin: 5px 0 8px; color: var(--muted); }
.clip-duplicates > small { display: block; color: var(--muted); }
.clip-duplicates__matches { display: grid; gap: 9px; margin: 10px 0 0; padding: 0; list-style: none; }
.clip-duplicates__matches li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); }
.clip-duplicates__matches li > div:first-child { flex: 1 1 180px; min-width: 0; }
.clip-duplicates__matches strong, .clip-duplicates__matches small { display: block; }
.clip-duplicates__matches small { margin-top: 2px; color: var(--muted); }
.clip-duplicates__links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.clip-duplicates__links a, .clip-duplicates__links button { border: 0; padding: 5px 0; background: none; color: var(--accent-text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.clip-duplicates > .button { margin-top: 10px; min-height: 34px; }
.clip-duplicates .clip-duplicates__declaration { margin-top: 10px; color: var(--text); }
.upload-job__body > .clip-duplicates { margin-bottom: 12px; padding: 9px; }
.clip-duplicates-dialog { width: min(600px, calc(100vw - 24px)); height: auto; }
.clip-duplicates-dialog .content-dialog__info { border-left: 0; }
.clip-duplicate-badge { padding: 4px 7px; border: 1px solid #dca74c70; border-radius: 7px; background: #dca74c0d; color: #a96716; font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.upload-step { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; }
.upload-step > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--surface-strong); color: var(--text-inverse); font-size: 12px; font-weight: 750; }
.upload-step h2 { margin: 0 0 3px; font-size: 18px; font-weight: 650; }
.upload-step p { margin: 0; color: var(--muted); font-size: 9px; }

.upload-types { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.upload-types label { min-width: 0; cursor: pointer; }
.upload-types label > span { display: grid; grid-template-columns: 28px minmax(0,1fr) 18px; grid-template-rows: auto auto; gap: 2px 9px; min-height: 80px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg-elevated); }
.upload-types label > span > svg:first-child { grid-row: 1 / 3; width: 25px; height: 25px; align-self: center; color: var(--muted); }
.upload-types label > span > svg:last-child { grid-column: 3; grid-row: 1 / 3; align-self: center; width: 17px; height: 17px; color: transparent; }
.upload-types strong { font-size: 11px; font-weight: 650; }
.upload-types small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.upload-types input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.upload-types input:checked + span > svg:last-child { color: var(--accent-text); }

.upload-publish-choice { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.upload-publish-choice legend { width: 100%; margin: 0 0 8px; color: var(--muted); font-size: 9px; font-weight: 650; }
.upload-publish-choice label { min-width: 0; cursor: pointer; }
.upload-publish-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-publish-choice label > span { display: grid; grid-template-columns: 18px minmax(0,1fr); align-content: center; gap: 3px 10px; min-height: 76px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg-elevated); }
.upload-publish-choice label > span::before { grid-row: 1 / 3; align-self: center; width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 50%; content: ""; }
.upload-publish-choice strong { font-size: 10px; font-weight: 650; }
.upload-publish-choice small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.upload-publish-choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.upload-publish-choice input:checked + span::before { border: 5px solid var(--accent); background: var(--surface); }
.upload-publish-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-publish-choice--compact { margin-bottom: 14px; }
.upload-publish-choice--compact label > span { min-height: 64px; padding: 11px 13px; }
.upload-form [data-release-schedule-field][hidden],
.content-dialog__editor [data-release-schedule-field][hidden],
.upload-form [data-shorts-field][hidden],
.upload-form [data-clip-editorial-field][hidden],
.content-dialog__editor [data-clip-editorial-field][hidden],
.content-dialog__editor [data-shorts-field][hidden] { display: none; }

.upload-files { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.upload-files:has(> [data-cover-field][hidden]) { grid-template-columns: minmax(0,1fr); }
.upload-drop[hidden] { display: none; }
.upload-cover-choice { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; cursor: pointer; }
.upload-cover-choice[hidden] { display: none; }
.upload-cover-choice input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.upload-cover-choice strong { display: block; font-size: 11px; }
.upload-cover-choice small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.upload-drop { display: grid; place-items: center; min-height: 178px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 17px; background: var(--bg-elevated); text-align: center; cursor: pointer; }
.upload-drop:hover { border-color: var(--accent); }
.upload-drop__icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 11px; border-radius: 14px; background: var(--surface-soft); color: var(--accent-text); }
.upload-drop__icon svg { width: 21px; height: 21px; }
.upload-drop strong { font-size: 11px; font-weight: 650; }
.upload-drop small { max-width: 31ch; margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 8px; }
.upload-summary { grid-template-columns: 40px minmax(0,1fr); background: color-mix(in srgb, #307fd9 7%, var(--surface)); }

.upload-transfer {
  display: grid;
  gap: 13px;
  padding: 18px;
  scroll-margin-block: 88px calc(104px + env(safe-area-inset-bottom));
  border: 1px solid color-mix(in srgb, #307fd9 32%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, #307fd9 15%, transparent), transparent 50%),
    var(--bg-elevated);
}

.upload-transfer[hidden] { display: none; }
.upload-form [data-upload-cancel][hidden],
.upload-form [data-upload-retry][hidden] { display: none; }

.upload-transfer__head {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.upload-transfer__head > div { display: grid; min-width: 0; gap: 2px; }
.upload-transfer__head strong { font-size: 12px; font-weight: 680; }
.upload-transfer__head small,
.upload-transfer__amount { color: var(--muted); font-size: 9px; }
.upload-transfer__head > b { color: var(--accent-text); font-size: 15px; font-weight: 700; }

.upload-transfer__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #307fd9;
  box-shadow: 0 0 0 0 color-mix(in srgb, #307fd9 35%, transparent);
  animation: upload-pulse 1.8s ease-out infinite;
}

.upload-transfer[data-state="success"] .upload-transfer__pulse { background: #21965b; animation: none; }
.upload-transfer[data-state="error"] .upload-transfer__pulse,
.upload-transfer[data-state="cancel_error"] .upload-transfer__pulse,
.upload-transfer[data-state="cancelled"] .upload-transfer__pulse { background: #d94a4a; animation: none; }

.upload-transfer__total,
.upload-transfer__files article i {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-soft);
}

.upload-transfer__total i,
.upload-transfer__files article i::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--upload-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #307fd9, var(--accent));
  content: '';
  transition: width 180ms linear;
}

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

.upload-transfer__files:has(> article[hidden]) { grid-template-columns: minmax(0, 1fr); }
.upload-transfer__files article[hidden] { display: none; }

.upload-transfer__files article {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.upload-transfer__files article > span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: color-mix(in srgb, #307fd9 10%, var(--surface-soft));
  color: #307fd9;
}

.upload-transfer__files article > span svg { width: 18px; height: 18px; }
.upload-transfer__files article > div { display: grid; min-width: 0; gap: 4px; }
.upload-transfer__files article strong { font-size: 10px; font-weight: 680; }
.upload-transfer__files article small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.upload-transfer__files article > b { font-size: 10px; font-weight: 700; }
.upload-transfer__files article[data-state="complete"] > span { background: color-mix(in srgb, #21965b 13%, var(--surface)); color: #19814c; }
.upload-transfer__files article[data-state="complete"] i::after { background: #21965b; }

.upload-transfer footer { display: flex; justify-content: flex-end; gap: 8px; }
.upload-transfer footer .button { min-height: 38px; padding-inline: 14px; font-size: 9px; }

.upload-submit {
  min-width: 184px;
}

.upload-submit:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.upload-submit[aria-busy="true"] {
  cursor: progress;
  opacity: .82;
}

.upload-submit[aria-busy="true"]::before {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: upload-spin .8s linear infinite;
  content: '';
}

.upload-form[data-upload-state="preparing"] .portal-form__actions--sticky,
.upload-form[data-upload-state="uploading"] .portal-form__actions--sticky,
.upload-form[data-upload-state="verifying"] .portal-form__actions--sticky {
  border-color: color-mix(in srgb, #307fd9 38%, var(--line));
}

.upload-form[aria-busy="true"] [data-portal-action="save-upload-draft"] {
  display: none;
}

@keyframes upload-pulse {
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes upload-spin {
  to { transform: rotate(360deg); }
}

.manager-on-behalf {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, #307fd9 28%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, #307fd9 8%, var(--surface));
}

.manager-on-behalf > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #307fd9;
  color: #fff;
}

.manager-on-behalf svg { width: 22px; height: 22px; }
.manager-on-behalf > small { grid-column: 2; color: var(--muted); font-size: 8px; line-height: 1.5; }

.manager-org-list {
  display: grid;
}

.manager-org-list > article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.3fr) minmax(140px, .7fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.manager-org-list > article:last-child { border-bottom: 0; }
.manager-org-list__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--surface-soft); color: #307fd9; }
.manager-org-list__icon svg { width: 20px; height: 20px; }
.manager-org-list article > div { display: grid; gap: 3px; min-width: 0; }
.manager-org-list strong,
.manager-org-list b { overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.manager-org-list small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.portal-compact-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 650; }
.portal-compact-select select { min-height: 42px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 10px; }

.analytics-list,
.payment-list,
.compact-records,
.audit-list { display: grid; }
.analytics-list > div,
.payment-list > article,
.compact-records > div,
.audit-list > div { display: grid; align-items: center; gap: 12px; min-width: 0; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.analytics-list > div:last-child,
.payment-list > article:last-child,
.compact-records > div:last-child,
.audit-list > div:last-child { border-bottom: 0; }
.analytics-list > div { grid-template-columns: 28px minmax(0,1.4fr) repeat(2,minmax(90px,.7fr)) minmax(80px,.6fr); }
.analytics-list > div > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 700; }
.analytics-list strong,
.payment-list strong,
.compact-records strong { overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.analytics-list em,
.payment-list span,
.compact-records span { color: var(--muted); font-size: 9px; font-style: normal; }
.analytics-list b,
.payment-list b,
.compact-records b { font-size: 10px; font-weight: 700; text-align: right; }

.payment-current { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 18px; padding: 25px; border-radius: 22px; background: linear-gradient(135deg, #19151d, #30223b); color: #fff; box-shadow: var(--shadow); }
.payment-current h2 { margin: 5px 0 4px; font-size: 24px; font-weight: 650; }
.payment-current p { margin: 0; color: rgba(255,255,255,.6); font-size: 9px; }
.payment-current > strong { font-size: clamp(26px,3vw,40px); font-weight: 680; letter-spacing: -.03em; }
.payment-list > article { grid-template-columns: minmax(0,1.5fr) minmax(90px,.6fr) auto 82px 34px; }
.payment-list > article > div { display: grid; gap: 3px; min-width: 0; }
.payment-list button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elevated); color: var(--muted); cursor: pointer; }
.payment-list button svg { width: 16px; height: 16px; }

.payout-profile { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 21px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.payout-profile > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--surface-soft); color: var(--muted); }
.payout-profile svg { width: 23px; height: 23px; }
.payout-profile h2 { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.payout-profile p { max-width: 70ch; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.organization-card { padding: 24px; }
.organization-card__head { display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 13px; align-items: center; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.organization-card__head > span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--surface-soft); color: var(--accent-text); }
.organization-card__head svg { width: 23px; height: 23px; }
.organization-card__head small { color: var(--muted); font-size: 8px; }
.organization-card__head h2 { margin: 3px 0; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.organization-card__head p { margin: 0; color: var(--muted); font-size: 9px; }

.manager-picker { display: grid; gap: 9px; min-width: 0; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.manager-picker[hidden] { display: none; }
.manager-picker > legend { display: grid; gap: 3px; width: 100%; margin: 0 0 1px; padding: 0; color: var(--text); }
.manager-picker > legend strong { font-size: 12px; font-weight: 650; }
.manager-picker > legend small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.manager-picker__options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; min-width: 0; }
.manager-picker__options label { position: relative; min-width: 0; cursor: pointer; }
.manager-picker__options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.manager-picker__choice { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 9px; min-height: 52px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-elevated); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.manager-picker__choice > svg { width: 20px; height: 20px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 6px; color: transparent; }
.manager-picker__choice > span { display: grid; gap: 2px; min-width: 0; }
.manager-picker__choice strong { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.manager-picker__choice small { overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.manager-picker__options input:checked + .manager-picker__choice { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); background: var(--accent-soft); }
.manager-picker__options input:checked + .manager-picker__choice > svg { border-color: var(--accent); background: var(--accent); color: #fff; }
.manager-picker__options input:focus-visible + .manager-picker__choice { outline: 2px solid var(--focus); outline-offset: 2px; }
.manager-picker__options label:hover .manager-picker__choice { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.manager-picker:disabled { opacity: .66; }
.manager-picker:disabled .manager-picker__options label { cursor: default; }
.manager-picker--compact { gap: 7px; }
.manager-picker--compact > legend strong { font-size: 10px; }
.manager-picker--compact > legend small { font-size: 8px; }
.manager-picker--compact .manager-picker__options { grid-template-columns: 1fr; max-height: 178px; padding-right: 3px; overflow-y: auto; overscroll-behavior: contain; }
.manager-picker--compact .manager-picker__choice { min-height: 46px; padding: 7px 9px; }
.manager-picker__empty { padding: 11px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 9px; line-height: 1.45; }

/* Administration */
.admin-alert { grid-template-columns: 40px minmax(0,1fr); }
.create-account summary { display: grid; grid-template-columns: 42px minmax(0,1fr) 18px; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.create-account summary::-webkit-details-marker { display: none; }
.create-account summary > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-text); }
.create-account summary svg { width: 20px; height: 20px; }
.create-account summary > div { display: grid; gap: 2px; }
.create-account summary strong { font-size: 12px; font-weight: 650; }
.create-account summary small { color: var(--muted); font-size: 9px; }
.create-account[open] summary > svg { transform: rotate(90deg); }
.create-account .portal-form { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }

.admin-table-tools { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.admin-search { display: grid; grid-template-columns: 18px minmax(130px,280px) auto; align-items: center; min-width: 0; min-height: 42px; padding-left: 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-elevated); }
.admin-search svg { width: 16px; height: 16px; color: var(--muted); }
.admin-search input { min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.admin-search button { align-self: stretch; padding: 0 14px; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; background: transparent; color: var(--accent-text); font-size: 9px; font-weight: 700; cursor: pointer; }

.review-list,
.moderation-list { display: grid; gap: 14px; min-width: 0; }
.review-card { overflow: hidden; }
.review-card--collapsible:not([open]) > :not(summary) { display: none; }
.review-card__summary { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 20px; padding: 18px 22px; cursor: pointer; list-style: none; transition: background .18s ease; }
.review-card__summary::-webkit-details-marker { display: none; }
.review-card__summary::marker { content: ''; }
.review-card__summary:hover { background: var(--surface-soft); }
.review-card__summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; border-radius: 20px; }
.review-card--collapsible[open] > .review-card__summary { border-bottom: 1px solid var(--line); }
.review-card__summary-name { display: grid; gap: 5px; min-width: 0; }
.review-card__summary-name > strong { font-size: clamp(15px,1.7vw,19px); font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.review-card__summary-name > span { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.review-card__summary-side { display: grid; justify-items: end; gap: 8px; }
.review-card__clip-count { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.review-card__clip-count b { color: var(--text); }
.review-card__toggle { display: flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: 9px; }
.review-card__toggle svg { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .18s ease; }
.review-card__collapse-label, .review-card[open] .review-card__expand-label { display: none; }
.review-card[open] .review-card__collapse-label { display: inline; }
.review-card[open] .review-card__toggle svg { transform: rotate(-90deg); }
.review-card__catalog { padding: 17px 22px 0; }
.review-card__catalog > span { color: var(--muted); font-size: 9px; }
.review-card__catalog p { margin: 7px 0 0; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.rightsholder-list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rightsholder-list-toolbar > span { color: var(--muted); font-size: 11px; }
.rightsholder-list-toolbar > div { display: flex; flex-wrap: wrap; gap: 8px; }
.rightsholder-list-toolbar .button { min-height: 40px; }
.review-card > header { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.review-card__type { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--surface-soft); color: var(--accent-text); font-size: 10px; font-weight: 750; }
.review-card header > div { min-width: 0; }
.review-card header small { color: var(--muted); font-size: 8px; }
.review-card h2 { margin: 3px 0; font-size: clamp(17px,2vw,23px); font-weight: 650; overflow-wrap: anywhere; }
.review-card header p { margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.review-card__body { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(240px,.6fr); gap: 22px; padding: 20px 22px; }
.review-card__body dl { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 26px; }
.review-card__side { display: grid; align-content: start; gap: 12px; min-width: 0; }
.review-documents { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
.review-documents > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface-soft); }
.review-documents svg { width: 18px; height: 18px; }
.review-documents > div { display: grid; gap: 2px; }
.review-documents strong { font-size: 9px; font-weight: 650; }
.review-documents small { color: var(--muted); font-size: 8px; }
.review-documents button { grid-column: 1 / -1; min-height: 32px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 8px; }
.holder-manager-form { display: grid; gap: 11px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
.holder-manager-form[aria-busy="true"] { opacity: .7; }
.holder-manager-form__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.holder-manager-form__actions > span { color: var(--muted); font-size: 8px; }
.holder-manager-form__actions .button { flex: 0 0 auto; min-height: 34px; padding-inline: 12px; font-size: 8px; }
.holder-manager-form--unavailable strong { font-size: 10px; }
.holder-manager-form--unavailable span { color: var(--muted); font-size: 8px; }
.holder-access-badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; padding: 5px 8px; border: 1px solid #a88635; border-radius: 8px; color: var(--text); background: rgba(168, 134, 53, .13); font-size: 9px; font-weight: 700; line-height: 1.4; }
.holder-access-badge svg { width: 13px; height: 13px; flex: 0 0 auto; }
.holder-access-form__feedback { margin: 0; color: var(--text); font-size: 10px; line-height: 1.5; }
.manager-org-list > article > .holder-access-form { grid-column: 1 / -1; width: 100%; box-sizing: border-box; }

.rightsholder-clips { padding: 18px 22px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-soft) 44%, var(--surface)); }
.rightsholder-clips > header { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.rightsholder-clips > header > div { display: grid; gap: 3px; }
.rightsholder-clips h3 { margin: 0; font-size: 14px; font-weight: 650; }
.rightsholder-clips > header > strong { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 8px; border-radius: 999px; background: var(--surface); color: var(--accent-text); font-size: 10px; }
.rightsholder-clips ul { display: grid; gap: 6px; max-height: 340px; margin: 0; padding: 0 3px 0 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.rightsholder-clips li { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.rightsholder-clips li button { display: grid; grid-template-columns: minmax(0,1fr) auto 16px; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease; }
.rightsholder-clips li button:hover { border-color: color-mix(in srgb, var(--accent) 46%, var(--line)); transform: translateY(-1px); }
.rightsholder-clips li button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rightsholder-clips li button > span:first-child { display: grid; gap: 2px; min-width: 0; }
.rightsholder-clips li button > span:first-child strong { overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.rightsholder-clips li button > span:first-child small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.rightsholder-clips li button > svg { width: 16px; height: 16px; color: var(--muted); }
.rightsholder-clips li .rightsholder-clips__edit { display: grid; grid-template-columns: 1fr; place-items: center; flex: 0 0 42px; width: 42px; padding: 9px; }
.rightsholder-clips li .rightsholder-clips__edit > svg { grid-area: auto; }
.rightsholder-clips__empty { padding: 15px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 9px; text-align: center; }

.review-archive { display: grid; gap: 14px; margin-top: 28px; }
.review-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-inline: 3px; }
.review-section-head h2 { margin: 4px 0 0; font-size: clamp(20px,2.4vw,28px); font-weight: 650; }
.review-section-head > strong { display: grid; place-items: center; min-width: 34px; height: 34px; padding-inline: 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 10px; }
.review-card > footer,
.moderation-card footer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 16px; padding: 18px 22px; border-top: 1px solid var(--line); background: var(--bg-elevated); }
.review-card footer > div,
.moderation-card footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.review-card footer > span:last-child { color: var(--muted); font-size: 9px; }

.moderation-card { display: grid; grid-template-columns: minmax(250px,.7fr) minmax(0,1.3fr); overflow: hidden; }
.moderation-card__preview { position: relative; min-height: 310px; background: #0b0b0d; }
.moderation-card__preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.moderation-card__preview > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.moderation-card__preview > span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.moderation-card__preview > span svg { width: 40px; height: 40px; }
.moderation-card__preview > button { position: absolute; left: 50%; bottom: 15px; display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(10,10,12,.76); color: #fff; font-family: inherit; font-size: 8px; font-weight: 650; transform: translateX(-50%); backdrop-filter: blur(10px); white-space: nowrap; cursor: pointer; }
.moderation-card__preview > button:hover { background: rgba(10,10,12,.92); }
.moderation-card__preview > button svg { width: 15px; height: 15px; }
.moderation-card__preview-state { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 24px; background: rgba(6,7,10,.76); color: rgba(255,255,255,.78); text-align: center; backdrop-filter: blur(3px); }
.moderation-card__preview-state svg { width: 32px; height: 32px; }
.moderation-card__preview-state strong { color: #fff; font-size: 10px; font-weight: 680; }
.moderation-card__preview-state small { max-width: 250px; color: rgba(255,255,255,.58); font-size: 8px; line-height: 1.5; }
.moderation-card__preview-state--ready svg { color: #70d79c; }
.moderation-card__preview-state--processing svg { color: #78b7ff; }
.moderation-card__preview-state--failed svg { color: #ff8c86; }
.moderation-card__content { display: flex; flex-direction: column; min-width: 0; padding: 21px; }
.moderation-card__content > header { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.moderation-card h2 { margin: 5px 0 4px; font-size: clamp(19px,2.2vw,28px); font-weight: 650; overflow-wrap: anywhere; }
.moderation-card header p { margin: 0; color: var(--muted); font-size: 9px; }
.moderation-card dl { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 24px; margin: 17px 0; }
.moderation-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.moderation-checks span { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 8px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 8px; }
.moderation-checks svg { width: 13px; height: 13px; }
.moderation-checks .moderation-check--complete,
.moderation-checks .moderation-check--ready { color: #278754; }
.moderation-checks .moderation-check--processing { color: #307fd9; }
.moderation-checks .moderation-check--failed { color: #c93636; }
.moderation-card__content > .transcode-qualities { margin-top: 9px; }
.moderation-transcode-gate { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; margin-top: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.moderation-transcode-gate > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); }
.moderation-transcode-gate > span svg { width: 16px; height: 16px; }
.moderation-transcode-gate > div { display: grid; gap: 3px; min-width: 0; }
.moderation-transcode-gate strong { font-size: 9px; font-weight: 680; }
.moderation-transcode-gate small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.moderation-transcode-gate--ready { border-color: color-mix(in srgb, #2f9b61 30%, var(--line)); background: color-mix(in srgb, #2f9b61 7%, var(--surface)); }
.moderation-transcode-gate--ready > span { color: #278754; }
.moderation-transcode-gate--processing { border-color: color-mix(in srgb, #307fd9 26%, var(--line)); background: color-mix(in srgb, #307fd9 7%, var(--surface)); }
.moderation-transcode-gate--processing > span { color: #307fd9; }
.moderation-transcode-gate--failed { border-color: color-mix(in srgb, #c93636 32%, var(--line)); background: color-mix(in srgb, #c93636 7%, var(--surface)); }
.moderation-transcode-gate--failed > span { color: #c93636; }
.moderation-card__retry { align-self: flex-start; min-height: 38px; margin-top: 11px; font-size: 8px; }
.moderation-card__publish-wait { margin: 12px 0 0; }
.moderation-transcode-hint { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border: 1px solid color-mix(in srgb, #307fd9 25%, var(--line)); border-radius: 12px; background: color-mix(in srgb, #307fd9 7%, var(--surface)); color: var(--muted); font-size: 8px; line-height: 1.45; }
.moderation-transcode-hint svg { width: 14px; height: 14px; flex: 0 0 auto; color: #307fd9; }
.moderation-transcode-hint--failed { border-color: color-mix(in srgb, #c93636 30%, var(--line)); background: color-mix(in srgb, #c93636 7%, var(--surface)); }
.moderation-transcode-hint--failed svg { color: #c93636; }
.moderation-card footer { grid-template-columns: 1fr; margin: auto -21px -21px; }
.moderation-publish-choice { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0; padding: 0; border: 0; }
.moderation-publish-choice legend { margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 650; }
.moderation-publish-choice label { position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 9px; min-height: 66px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; }
.moderation-publish-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.moderation-publish-choice label:has(input:disabled) { opacity: .52; cursor: not-allowed; }
.moderation-publish-choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.moderation-publish-choice span { display: grid; gap: 3px; min-width: 0; }
.moderation-publish-choice strong { font-size: 9px; font-weight: 650; }
.moderation-publish-choice small { color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.moderation-card .button:disabled,
.portal-table__actions button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

.compact-records > div { grid-template-columns: minmax(0,1.4fr) minmax(110px,.7fr) auto; }
.compact-records--finance > div { grid-template-columns: minmax(0,1.4fr) minmax(110px,.7fr) minmax(90px,.6fr) auto; }

.audit-list > div { grid-template-columns: 34px minmax(0,1fr) minmax(110px,.55fr) minmax(110px,.55fr); }
.audit-list > div > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-soft); color: var(--muted); }
.audit-list svg { width: 16px; height: 16px; }
.audit-list > div > div { display: grid; gap: 2px; min-width: 0; }
.audit-list strong { overflow: hidden; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.audit-list small,
.audit-list em,
.audit-list time { overflow: hidden; color: var(--muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.portal-empty-state { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 15px; padding: 24px; }
.portal-empty-state > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--surface-soft); color: var(--muted); }
.portal-empty-state > span svg { width: 22px; height: 22px; }
.portal-empty-state h2 { margin: 0 0 5px; font-size: 17px; font-weight: 650; }
.portal-empty-state p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.credential-dialog,
.account-editor {
  width: min(620px, calc(100vw - 28px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 28px));
  margin: auto;
  padding: clamp(22px, 4vw, 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0,0,0,.32);
}

.account-editor { width: min(760px, calc(100vw - 28px)); }
.credential-dialog::backdrop,
.account-editor::backdrop,
.content-dialog::backdrop { background: rgba(8,8,12,.68); backdrop-filter: blur(10px); }
.credential-dialog__close { position: absolute; z-index: 2; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg-elevated); color: var(--muted); cursor: pointer; }
.credential-dialog__close svg { width: 18px; height: 18px; }
.credential-dialog__header { padding-right: 48px; }
.credential-dialog__header > span { color: var(--accent-text); font-size: 9px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.credential-dialog__header h2 { margin: 7px 0 9px; font-size: clamp(24px,4vw,34px); font-weight: 680; letter-spacing: -.02em; line-height: 1.04; }
.credential-dialog__header p { max-width: 56ch; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.credential-dialog__account { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 0; padding: 12px 14px; border-radius: 13px; background: var(--accent-soft); }
.credential-dialog__account strong { min-width: 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 650; }
.credential-dialog__account span { flex: 0 0 auto; color: var(--accent-text); font-size: 8px; font-weight: 700; }
.credential-dialog__values { display: grid; gap: 10px; margin: 13px 0; }
.credential-dialog__values > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg-elevated); }
.credential-dialog__values dt { color: var(--muted); font-size: 8px; font-weight: 650; }
.credential-dialog__values dd { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; margin: 6px 0 0; }
.credential-dialog__values code { overflow-wrap: anywhere; color: var(--text); font: 650 14px/1.4 "Montserrat", sans-serif; letter-spacing: .02em; }
.credential-dialog__values button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 9px; font-weight: 650; cursor: pointer; }
.credential-dialog__message { display: grid; gap: 7px; margin: 0 0 13px; color: var(--muted); font-size: 9px; font-weight: 650; }
.credential-dialog__message textarea { width: 100%; min-height: 178px; padding: 13px 14px; resize: vertical; border: 1px solid var(--line); border-radius: 14px; outline: 0; background: var(--bg-elevated); color: var(--text); font: 520 10px/1.6 "Montserrat", sans-serif; }
.credential-dialog__actions { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 9px; margin-top: 14px; }
.credential-dialog__actions .button { min-height: 46px; padding-inline: 12px; font-size: 9px; }
.credential-dialog__actions svg { width: 15px; height: 15px; }
.credential-dialog__done { width: 100%; min-height: 46px; margin-top: 10px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 650; cursor: pointer; }
.credential-dialog__done:hover { background: var(--surface-soft); color: var(--text); }
.account-editor .portal-form { margin-top: 22px; padding: 0; border: 0; box-shadow: none; }
.portal-table__actions .admin-user-quota-button { width: auto; min-width: 62px; padding-inline: 10px; font-size: 9px; font-weight: 650; }
.account-editor .account-upload-quota { margin-top: 20px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.account-upload-quota__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.account-upload-quota__head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.account-upload-quota__exhausted { padding: 5px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-size: 9px; font-weight: 650; }
.account-upload-quota__usage { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.account-upload-quota__usage > span { display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
.account-upload-quota__usage strong { color: var(--text); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.account-upload-quota__hint { margin: 12px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.account-upload-quota .portal-form__actions { margin-top: 14px; }


.content-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  height: min(700px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 24px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0,0,0,.38);
}

/* Keep native dialogs hidden until showModal(); the body owns the scroll. */
.content-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.content-dialog__close { top: 12px; right: 12px; z-index: 2; }
.content-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 0; max-height: min(160px, 30dvh); padding: 15px 74px 14px 18px; overflow: auto; border-bottom: 1px solid var(--line); background: var(--surface); }
.content-dialog__header > div:first-child { min-width: 0; }
.content-dialog__header > div:first-child > span { color: var(--accent-text); font-size: 8px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.content-dialog__header h2 { margin: 5px 0; font-size: clamp(18px,2vw,24px); font-weight: 680; line-height: 1.15; overflow-wrap: anywhere; }
.content-dialog__header p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.content-dialog__header > .content-status-stack { flex: 0 0 auto; justify-content: flex-end; margin-top: 4px; }
.content-dialog__layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(360px,1fr); grid-template-rows: minmax(0,1fr); min-height: 0; overflow: clip; }
.content-dialog__stage { display: grid; grid-template-rows: minmax(0,1fr) auto; place-items: stretch; min-width: 0; min-height: 0; overflow: hidden; background: #050506; }
.content-dialog__media { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; background: #050506; }
.content-dialog__media video { display: block; width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; background: #050506; }
.content-dialog__stage--shorts .content-dialog__media video { width: auto; max-width: 100%; margin-inline: auto; aspect-ratio: 9/16; }
.content-dialog__transcode-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 68px; padding: 10px 13px; border-top: 1px solid rgba(255,255,255,.1); background: #111116; color: #fff; }
.content-dialog__transcode-state--processing { background: linear-gradient(110deg, #111923, #1a1324); }
.content-dialog__transcode-state--ready { background: linear-gradient(110deg, #101b16, #121922); }
.content-dialog__transcode-state--failed { background: linear-gradient(110deg, #211113, #181116); }
.content-dialog__transcode-state > div:first-child { display: grid; gap: 4px; }
.content-dialog__transcode-state .portal-status { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff; }
.content-dialog__transcode-state p { margin: 0; color: rgba(255,255,255,.58); font-size: 8px; }
.content-dialog__transcode-state .transcode-quality { border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); }
.content-dialog__transcode-state .transcode-quality--ready { color: #7ee1a9; }
.content-dialog__retry { width: 100%; margin-top: 14px; }
.content-dialog__video-error { position: absolute; right: 16px; bottom: 16px; left: 16px; margin: 0; padding: 11px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(12,12,15,.86); color: #fff; font-size: 9px; line-height: 1.45; text-align: center; backdrop-filter: blur(10px); }
.content-dialog__video-empty { display: grid; width: 100%; height: 100%; place-content: center; justify-items: center; gap: 10px; color: rgba(255,255,255,.74); font-size: 10px; }
.content-dialog__video-empty svg { width: 38px; height: 38px; }
.content-dialog__video-empty strong { color: #fff; font-size: 11px; font-weight: 680; text-align: center; }
.content-dialog__video-empty small { max-width: 420px; padding-inline: 22px; color: rgba(255,255,255,.56); font-size: 9px; line-height: 1.55; text-align: center; }
.content-dialog__video-empty--processing svg { color: #78b7ff; }
.content-dialog__video-empty--failed svg { color: #ff8c86; }
.content-dialog__video-empty--legacy svg { color: #e8a438; }
.content-dialog__info { min-width: 0; min-height: 0; padding: 16px; overflow: auto; scrollbar-gutter: stable; border-left: 1px solid var(--line); background: var(--bg-elevated); overscroll-behavior: contain; }
.content-dialog__edit-entry { width: 100%; margin-bottom: 12px; }
.portal-content-mode-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.portal-content-mode-actions .button { min-height: 40px; }
.portal-content-mode-actions [aria-current="page"] { border-color: var(--accent); color: var(--accent-text); }
.content-dialog__facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; margin: 0; }
.content-dialog__facts > div { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.content-dialog__facts dt { color: var(--muted); font-size: 8px; }
.content-dialog__facts dd { margin: 0; overflow-wrap: anywhere; font-size: 9px; font-weight: 650; line-height: 1.45; }
.content-dialog__moderation { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; margin: 15px 0; padding: 13px; border: 1px solid color-mix(in srgb, #e8a438 35%, var(--line)); border-radius: 14px; background: color-mix(in srgb, #e8a438 8%, var(--surface)); }
.content-dialog__moderation > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, #e8a438 16%, var(--surface)); color: #ad6a00; }
.content-dialog__moderation svg { width: 16px; height: 16px; }
.content-dialog__moderation strong { font-size: 9px; font-weight: 680; }
.content-dialog__moderation p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; white-space: pre-wrap; }
.content-dialog__editor { display: grid; gap: 15px; margin-top: 18px; }
.content-dialog__editor .portal-form-grid { gap: 11px; }
.content-dialog__section-title { display: grid; gap: 3px; }
.content-dialog__section-title span { color: var(--accent-text); font-size: 8px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.content-dialog__section-title strong { font-size: 10px; font-weight: 650; line-height: 1.45; }
.content-dialog__warning { margin-top: 0; padding: 12px; border: 1px solid color-mix(in srgb, #e8a438 35%, var(--line)); border-radius: 13px; background: color-mix(in srgb, #e8a438 7%, var(--surface)); }
.content-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 15px; border-top: 1px solid var(--line); }
.content-dialog__actions .button { min-height: 44px; font-size: 9px; }
.content-dialog__actions [aria-busy="true"] { cursor: progress; opacity: .7; }
.content-dialog__locked { margin-top: 16px; }
.content-dialog__description { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.content-dialog__description span { color: var(--muted); font-size: 8px; font-weight: 650; }
.content-dialog__description p { margin: 7px 0 0; font-size: 9px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

.content-publication { display: grid; gap: 12px; margin-top: 17px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.content-publication > p, .content-publication > small { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.content-publication__fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.content-publication__timezone { grid-column: 1 / -1; }
.content-publication .portal-field { min-width: 0; }
.content-publication .portal-field input, .content-publication .portal-field select { min-width: 0; width: 100%; }
.content-publication__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.content-publication__actions .button { flex: 1 1 120px; min-height: 42px; padding-inline: 10px; font-size: 9px; }
.content-publication[aria-busy="true"] { opacity: .7; }

@media (max-width: 900px) {
  .content-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); border-radius: 19px; }
  .content-dialog__header { display: grid; gap: 6px; padding: 12px 62px 12px 14px; }
  .content-dialog__header > .content-status-stack { justify-content: flex-start; margin-top: 0; }
  .content-dialog__layout { grid-template-columns: 1fr; grid-template-rows: max-content max-content; align-content: start; overflow: auto; overscroll-behavior: contain; }
  .content-dialog__stage { min-height: 0; aspect-ratio: auto; }
  .content-dialog__stage--shorts { aspect-ratio: auto; }
  .content-dialog__media { min-height: 120px; max-height: 42dvh; aspect-ratio: 16/9; }
  .content-dialog__media video { width: 100%; height: 100%; max-height: 42dvh; object-fit: contain; }
  .content-dialog__stage--shorts .content-dialog__media { height: min(360px, 42dvh); aspect-ratio: auto; }
  .content-dialog__stage--shorts .content-dialog__media video { width: auto; height: 100%; max-width: 100%; max-height: 100%; aspect-ratio: 9/16; }
  .content-dialog__transcode-state { align-items: flex-start; flex-direction: column; min-height: 0; }
  .content-dialog__info { padding: 14px; overflow: visible; scrollbar-gutter: auto; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 1180px) {
  .portal-workspace {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    top: auto;
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(0, 2fr) auto;
    align-items: center;
    min-height: 0;
    padding: 10px;
    border-radius: 18px;
  }

  .portal-sidebar__brand {
    padding: 0 12px 0 0;
    border: 0;
    border-right: 1px solid var(--line);
  }

  .portal-sidebar nav {
    display: flex;
    max-width: 100%;
    margin: 0;
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .portal-sidebar nav::-webkit-scrollbar { display: none; }
  .portal-sidebar nav a { flex: 0 0 auto; white-space: nowrap; }
  .portal-sidebar nav a.is-active { box-shadow: inset 0 -3px var(--accent); }
  .portal-sidebar__back { margin: 0; padding: 0 10px; border: 0; white-space: nowrap; }
  .portal-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .portal-sidebar { grid-template-columns: minmax(0,1fr) auto; }
  .portal-sidebar__brand { display: none; }
  .portal-sidebar nav { padding-left: 0; }
  .portal-workspace__topbar { align-items: flex-start; }
  .portal-profile { grid-template-columns: 44px auto; }
  .portal-profile strong { display: none; }
  .partner-overview-grid,
  .admin-overview-grid,
  .organization-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-welcome { grid-column: 1 / -1; }
  .application-timeline,
  .payout-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .application-timeline li:nth-child(2),
  .payout-steps li:nth-child(2) { border-right: 0; }
  .application-timeline li:nth-child(-n+2),
  .payout-steps li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pending-details { grid-template-columns: 1fr; }
  .moderation-card { grid-template-columns: 1fr; }
  .moderation-card__preview { min-height: 0; aspect-ratio: 16/9; }
  .review-card__body { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .portal-workspace { gap: 14px; }
  .portal-sidebar { position: relative; top: auto; margin-inline: -16px; padding-inline: 16px 8px; border-right: 0; border-left: 0; border-radius: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); box-shadow: none; }
  .portal-sidebar nav { margin-right: 50px; }
  .portal-sidebar nav a { min-height: 40px; padding: 0 10px; font-size: 10px; }
  .portal-sidebar nav b { min-width: 18px; height: 18px; font-size: 8px; }
  .portal-sidebar__back { position: absolute; right: 8px; width: 42px; min-height: 40px; padding: 0; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 0; }

  .portal-workspace__topbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
  .portal-workspace__topbar h1 { font-size: 28px; }
  .portal-workspace__top-actions { min-width: 0; width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .portal-workspace__top-actions .button { flex: 1 1 auto; max-width: 100%; white-space: normal; }
  .portal-profile { margin-left: auto; }

  .portal-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .portal-kpis > article,
  .portal-kpis > a { min-height: 130px; padding: 15px; }
  .portal-kpis strong { margin-top: 10px; font-size: clamp(21px,7vw,29px); }

  .portal-status-banner,
  .admin-alert,
  .upload-summary { grid-template-columns: 36px minmax(0,1fr); padding: 13px; }
  .portal-status-banner > svg,
  .admin-alert > span,
  .upload-summary > span { width: 36px; height: 36px; padding: 9px; }
  .portal-status-banner > a { grid-column: 2; }

  .portal-panel,
  .portal-form,
  .review-card,
  .moderation-card { border-radius: 18px; }
  .portal-panel__head { padding: 17px; }
  .portal-panel__head h2 { font-size: 19px; }

  .account-header { grid-template-columns: 52px minmax(0,1fr); padding: 18px; }
  .account-header__avatar { width: 52px; height: 52px; border-radius: 16px; }
  .account-header > .button { grid-column: 1 / -1; width: 100%; }
  .account-header h1 { font-size: 25px; }
  .account-grid { gap: 9px; }
  .account-welcome { min-height: 280px; padding: 22px; }
  .account-stat { min-height: 145px; padding: 17px; }
  .account-stat strong { font-size: 30px; }
  .account-partner-card { grid-template-columns: 46px minmax(0,1fr); padding: 18px; }
  .account-partner-card > span { width: 46px; height: 46px; border-radius: 14px; }
  .account-partner-card .button { grid-column: 1 / -1; width: 100%; }
  .account-settings-grid { grid-template-columns: 1fr; gap: 9px; }
  .account-password > summary { grid-template-columns: 42px minmax(0,1fr) 18px; gap: 12px; min-height: 72px; padding: 14px 16px; }
  .account-password > summary > span { width: 42px; height: 42px; border-radius: 13px; }
  .account-password > summary > span svg { width: 20px; height: 20px; }
  .account-password > summary > svg { width: 17px; height: 17px; }
  .account-password > summary strong { font-size: 12px; }
  .account-password > summary small { font-size: 9px; }

  .pending-hero { grid-template-columns: 48px minmax(0,1fr); padding: 18px; }
  .pending-hero__icon { width: 48px; height: 48px; border-radius: 15px; }
  .pending-hero > .portal-status { grid-column: 2; }
  .application-timeline,
  .payout-steps { grid-template-columns: 1fr; }
  .application-timeline li,
  .payout-steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  .application-timeline li:last-child,
  .payout-steps li:last-child { border-bottom: 0; }

  .holder-application-head { display: grid; align-items: start; }
  .holder-stepper { width: 100%; justify-content: space-between; }
  .holder-stepper li { display: grid; justify-items: center; gap: 5px; }
  .holder-stepper li:not(:last-child)::after { position: absolute; display: none; }
  .holder-stepper em { font-size: 7px; }
  .portal-form { padding: 20px 17px; }
  .portal-form__section-head { display: grid; gap: 7px; }
  .portal-form-grid,
  .holder-review,
  .upload-types,
  .upload-publish-choice,
  .upload-files,
  .upload-transfer__files { grid-template-columns: 1fr; }
  .upload-transfer { padding: 15px; }
  .upload-transfer__head { grid-template-columns: 11px minmax(0, 1fr) auto; }
  .upload-transfer footer { display: grid; grid-template-columns: 1fr; }
  .upload-transfer footer .button { width: 100%; }
  .portal-field--wide,
  .holder-review__wide { grid-column: auto; }
  .portal-form__actions { display: grid; grid-template-columns: 1fr; }
  .portal-form__actions .button { width: 100%; }
  .portal-form__actions--sticky { border-radius: 18px; }
  .content-dialog__header h2 { font-size: 21px; }
  .content-dialog__facts { grid-template-columns: 1fr; }
  .content-dialog__actions { display: grid; grid-template-columns: 1fr; }
  .content-dialog__actions .button { width: 100%; }
  .portal-segment { width: 100%; }
  .portal-segment label { flex: 1; }
  .portal-segment span { padding-inline: 10px; }

  .portal-filter-row,
  .admin-table-tools { display: grid; align-items: stretch; }
  .portal-filter-row .button { width: 100%; }
  .admin-search { grid-template-columns: 18px minmax(0,1fr) auto; }

  .portal-table-wrap { overflow: visible; }
  .portal-table { display: block; min-width: 0; }
  .portal-table thead { display: none; }
  .portal-table tbody { display: grid; gap: 9px; padding: 10px; }
  .portal-table tr { display: grid; min-width: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
  .portal-table td { display: grid; grid-template-columns: minmax(86px,.35fr) minmax(0,1fr); align-items: center; gap: 10px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .portal-table td::before { color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; content: attr(data-label); }
  .portal-table td:first-child { grid-template-columns: 1fr; }
  .portal-table td:first-child::before { display: none; }
  .portal-table td:last-child { border-bottom: 0; }
  .portal-table__actions { display: flex !important; grid-template-columns: none !important; justify-content: flex-end; }
  .portal-table__actions::before { display: none; }
  .content-cell,
  .user-cell { min-width: 0; }

  .analytics-list > div { grid-template-columns: 28px minmax(0,1fr) auto; padding: 13px 15px; }
  .analytics-list > div em { display: none; }
  .payment-current { grid-template-columns: 1fr; padding: 20px; }
  .payment-current > strong { margin-top: 10px; }
  .payment-list > article { grid-template-columns: minmax(0,1fr) auto; padding: 14px 16px; }
  .payment-list > article > .portal-status,
  .payment-list > article > small { grid-column: 1; }
  .payment-list > article > button { grid-column: 2; grid-row: 1 / 4; }
  .payout-profile { grid-template-columns: 44px minmax(0,1fr); }
  .payout-profile .button { grid-column: 1 / -1; width: 100%; }

  .review-card > header { grid-template-columns: 42px minmax(0,1fr); padding: 17px; }
  .review-card__summary { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 16px; }
  .review-card__summary-name { grid-column: 1 / -1; }
  .review-card__summary > .content-status-stack { min-width: 0; align-items: flex-start; }
  .review-card__catalog { padding: 16px 17px 0; }
  .review-card__type { width: 42px; height: 42px; border-radius: 13px; }
  .review-card header > .portal-status { grid-column: 2; }
  .review-card__body { padding: 17px; }
  .review-card__body dl,
  .moderation-card dl { grid-template-columns: 1fr; }
  .manager-picker__options { grid-template-columns: 1fr; }
  .holder-manager-form__actions { display: grid; grid-template-columns: 1fr; }
  .holder-manager-form__actions .button { width: 100%; }
  .rightsholder-clips { padding: 16px 17px; }
  .rightsholder-clips li button { grid-template-columns: minmax(0,1fr) 16px; }
  .rightsholder-clips li button > .portal-status { grid-column: 1; width: fit-content; }
  .rightsholder-clips li button > svg { grid-column: 2; grid-row: 1 / 3; }
  .review-section-head { align-items: center; }
  .review-card > footer,
  .moderation-card footer { grid-template-columns: 1fr; padding: 16px; }
  .review-card footer > div,
  .moderation-card footer > div { display: grid; grid-template-columns: 1fr; }
  .review-card footer .button,
  .moderation-card footer .button { width: 100%; }
  .moderation-card__content { padding: 17px; }
  .moderation-card footer { margin: 18px -17px -17px; }
  .moderation-publish-choice { grid-template-columns: 1fr; }
  .moderation-card__content > header { display: grid; }
  .moderation-card__content > header .portal-status { margin-top: 5px; }

  .compact-records > div,
  .compact-records--finance > div { grid-template-columns: minmax(0,1fr) auto; padding: 13px 16px; }
  .compact-records > div > span,
  .compact-records--finance > div > span { grid-column: 1; }
  .compact-records--finance > div > .portal-status { grid-column: 1 / -1; }
  .audit-list > div { grid-template-columns: 32px minmax(0,1fr); padding: 13px 15px; }
  .audit-list > div > em,
  .audit-list > div > time { grid-column: 2; }

  .pending-correction,
  .impersonation-banner { grid-template-columns: 1fr; }
  .impersonation-banner > span { display: none; }
  .pending-correction .button,
  .impersonation-banner .button { width: 100%; }

  .portal-form__actions--sticky {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .manager-on-behalf { grid-template-columns: 40px minmax(0, 1fr); padding: 13px; }
  .manager-on-behalf > span { width: 40px; height: 40px; }
  .manager-org-list > article { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 13px 15px; }
  .manager-org-list > article > div:nth-of-type(2) { grid-column: 2; }
  .manager-org-list > article > .portal-status { grid-column: 3; grid-row: 1; }

  .credential-dialog,
  .account-editor { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); padding: 20px 16px; border-radius: 20px; }
  .credential-dialog__close { top: 11px; right: 11px; }
  .credential-dialog__header { padding-right: 42px; }
  .credential-dialog__account { display: grid; }
  .credential-dialog__values dd { grid-template-columns: 1fr; }
  .credential-dialog__values button { width: 100%; }
  .credential-dialog__actions { grid-template-columns: 1fr; }
  .credential-dialog__actions .button { width: 100%; min-height: 48px; }
  .portal-empty-state { grid-template-columns: 40px minmax(0,1fr); padding: 18px; }
  .portal-empty-state > span { width: 40px; height: 40px; border-radius: 13px; }
}

@media (max-width: 390px) {
  .content-publication__fields { grid-template-columns: minmax(0, 1fr); }
  .portal-kpis { grid-template-columns: 1fr; }
  .portal-kpis > article,
  .portal-kpis > a { min-height: 118px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-welcome { grid-column: auto; }
  .portal-check-group { display: grid; grid-template-columns: 1fr; }
  .identity-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .identity-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .upload-transfer__pulse { animation: none; }
  .portal-status--transcode-processing svg { animation: none; }
  .upload-submit[aria-busy="true"]::before { animation: none; }
  .upload-transfer__total i,
  .upload-transfer__files article i::after { transition: none; }
}
/* Rights-holder identity profiles */
.holder-credit-field {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--portal-accent, #ef3429) 32%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--portal-accent, #ef3429) 5%, var(--surface));
}

.holder-profile-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: min(900px, calc(100dvh - 32px));
  overflow: auto;
}

.holder-profile-dialog__header {
  padding-right: 56px;
}

.holder-profile-sections {
  display: grid;
  gap: 18px;
}

.holder-profile-section {
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, var(--portal-accent, #ef3429) 6%);
}

.holder-profile-section[hidden],
.holder-profile-section [hidden] {
  display: none !important;
}

.holder-profile-section--private {
  border-color: color-mix(in srgb, #6e63ff 34%, var(--line));
  background: color-mix(in srgb, var(--surface) 94%, #6e63ff 6%);
}

.holder-profile-section__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-bottom: 18px;
}

.holder-profile-section__head > span {
  width: 100%;
  color: var(--portal-accent, #ef3429);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.holder-profile-section__head > span svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.holder-profile-section__head > strong {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
}

.holder-profile-section__head > small {
  color: var(--muted);
  font-size: 12px;
}

.holder-profile-actions {
  position: sticky;
  bottom: -1px;
  z-index: 2;
  padding: 16px 0 4px;
  background: linear-gradient(0deg, var(--surface) 70%, transparent);
}

.holder-missing-fields {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, #e09214 35%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, #e09214 8%, var(--surface));
}

.holder-missing-fields strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.holder-missing-fields strong svg {
  width: 17px;
  height: 17px;
}

.holder-missing-fields > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.holder-missing-fields > div span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.holder-missing-fields--card {
  margin: 0 24px 20px;
}

.holder-incomplete-risk {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
  padding: 22px;
  border: 2px solid color-mix(in srgb, #d97812 72%, var(--line));
  border-radius: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #e09214 16%, transparent), transparent 72%),
    var(--bg-elevated);
}

.holder-incomplete-risk__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: color-mix(in srgb, #e09214 20%, var(--surface));
  color: #c76d0c;
}

.holder-incomplete-risk__icon svg {
  width: 25px;
  height: 25px;
}

.holder-incomplete-risk h3 {
  margin: 1px 0 6px;
  font-size: 18px;
  font-weight: 720;
  line-height: 1.2;
}

.holder-incomplete-risk p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.holder-incomplete-risk__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.holder-incomplete-risk__fields span {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, #d97812 30%, var(--line));
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
}

.holder-incomplete-risk .holder-incomplete-risk__consent {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, #d97812 38%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, #e09214 8%, var(--surface));
  color: var(--text);
}

.holder-incomplete-risk__consent em {
  font-size: 11px;
  font-weight: 650;
}

.manager-org-list article {
  grid-template-columns: 42px minmax(0, 1.25fr) minmax(130px, .65fr) minmax(130px, auto) auto;
  gap: 14px;
}

.manager-org-list article > div:first-of-type em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.manager-org-list__state {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.manager-org-list__state > small {
  max-width: 210px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.manager-org-list__open {
  white-space: nowrap;
}

.portal-consent--compact {
  align-self: end;
  min-height: 48px;
}

@media (max-width: 760px) {
  .manager-org-list > article {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .manager-org-list > article > div:nth-of-type(2),
  .manager-org-list > article > .manager-org-list__state,
  .manager-org-list > article > .manager-org-list__open {
    grid-column: 2 / -1;
  }

  .holder-profile-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 22px;
  }

  .holder-profile-section {
    padding: 16px;
    border-radius: 18px;
  }

  .holder-profile-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .holder-profile-actions .button,
  .manager-org-list__open {
    width: 100%;
  }

  .holder-missing-fields--card {
    margin-inline: 14px;
  }

  .holder-incomplete-risk {
    grid-template-columns: 1fr;
    padding: 17px;
  }

  .holder-incomplete-risk__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
}

/* Destructive content actions and the full administrative audit. */
.button--danger {
  border-color: #c93636;
  background: #c93636;
  color: #fff;
  box-shadow: 0 8px 22px rgba(157, 25, 25, .18);
}

.button--danger:hover {
  border-color: #a82222;
  background: #a82222;
  color: #fff;
}

.button--danger:disabled,
.portal-icon-button--danger:disabled {
  cursor: progress;
  opacity: .58;
}

.portal-table__actions .portal-icon-button--danger {
  border-color: color-mix(in srgb, #d13b35 25%, var(--line));
  color: #c8342c;
}

.portal-table__actions .portal-icon-button--danger:hover {
  border-color: color-mix(in srgb, #d13b35 55%, var(--line));
  background: color-mix(in srgb, #d13b35 9%, var(--surface));
  color: #aa241e;
}

.portal-table__actions [aria-busy="true"] svg,
.button--danger[aria-busy="true"] svg,
.audit-loading svg,
.audit-pagination [aria-busy="true"] svg {
  animation: audit-spin 1.1s linear infinite;
}

@keyframes audit-spin {
  to { transform: rotate(360deg); }
}

.content-dialog__danger-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, #d13b35 34%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, #d13b35 7%, var(--surface));
}

.content-dialog__danger-zone > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.content-dialog__danger-zone strong {
  color: #b32923;
  font-size: 10px;
  font-weight: 700;
}

.content-dialog__danger-zone > div > span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.content-dialog__danger-zone .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  white-space: nowrap;
}

.content-dialog__danger-zone .button svg {
  width: 15px;
  height: 15px;
}

.portal-notice--danger {
  border-color: color-mix(in srgb, #d13b35 34%, var(--line));
  background: color-mix(in srgb, #d13b35 7%, var(--surface));
}

.portal-notice--danger .portal-notice__icon {
  color: #c8342c;
}

.admin-content-tools {
  display: block;
}

.admin-content-tools .filter-chips {
  margin-top: 12px;
}

.admin-catalog-filters {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(0, 2.1fr);
  align-items: end;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.admin-catalog-filters__search,
.admin-catalog-filters__selectors {
  min-width: 0;
}

.admin-catalog-filters__selectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-catalog-filters .portal-field {
  gap: 6px;
  font-size: 10px;
}

.admin-catalog-filters .portal-field input,
.admin-catalog-filters .portal-field select {
  min-height: 44px;
  max-width: 100%;
  padding: 10px;
  border-radius: 11px;
  font-size: 12px;
}

.admin-catalog-filters .portal-field select {
  text-overflow: ellipsis;
}

.admin-catalog-period {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.admin-catalog-period legend {
  max-width: 100%;
  padding: 0 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.admin-catalog-period__bounds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-catalog-period__bound {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.admin-catalog-period input {
  font-variant-numeric: tabular-nums;
}

.admin-catalog-filters__hint {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-catalog-filters__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.admin-catalog-filters__actions .button {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 11px;
}

.admin-catalog-filters__actions .button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.admin-catalog-results {
  margin: 10px 18px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.admin-catalog-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-catalog-empty > * {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-catalog-empty strong {
  color: var(--text);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .admin-catalog-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-catalog-filters__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .admin-catalog-filters {
    gap: 12px;
    padding: 12px;
    border-radius: 15px;
  }

  .admin-catalog-filters__selectors,
  .admin-catalog-period__bounds {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .admin-catalog-period {
    padding: 10px;
  }

  .admin-catalog-period__bound {
    gap: 8px;
  }

  .admin-catalog-filters__actions .button {
    flex: 1 1 100px;
  }
}

@media (max-width: 390px) {
  .admin-catalog-period__bound {
    grid-template-columns: minmax(0, 1fr);
  }
}

.audit-panel {
  overflow: hidden;
}

.audit-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, .35fr) minmax(170px, .4fr);
  align-items: end;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.audit-search {
  width: 100%;
}

.audit-tools > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.audit-tools select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 10px;
}

.audit-tools select:focus-visible,
.audit-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.audit-event {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.audit-event:last-child {
  border-bottom: 0;
}

.audit-event__row {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1fr) minmax(180px, .65fr) minmax(120px, .38fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 20px;
}

.audit-event__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--muted);
}

.audit-event__icon svg {
  width: 17px;
  height: 17px;
}

.audit-event__main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.audit-event__main strong,
.audit-event__main small,
.audit-event__main em,
.audit-event__row time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-event__main strong {
  font-size: 10px;
  font-weight: 680;
}

.audit-event__main small,
.audit-event__main em,
.audit-event__row time {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.audit-event__main em {
  color: var(--text);
  font-weight: 600;
}

.audit-event__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.audit-event__badges > span {
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.audit-event__badges .audit-event__outcome--success { color: #19814c; }
.audit-event__badges .audit-event__outcome--pending { color: #a96806; }
.audit-event__badges .audit-event__outcome--failed,
.audit-event__badges .audit-event__outcome--denied { color: #c8342c; }

.audit-event__details {
  margin: 0 20px 14px 70px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg-elevated);
}

.audit-event__details summary {
  padding: 10px 12px;
  color: var(--accent-text);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.audit-event__details > div {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.audit-event__details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.audit-event__details dl > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.audit-event__details dt {
  color: var(--muted);
  font-size: 7px;
}

.audit-event__details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 8px;
  font-weight: 650;
}

.audit-event__details pre {
  max-height: 320px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font: 8px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.audit-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.audit-loading svg {
  width: 16px;
  height: 16px;
}

.audit-error {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  margin: 14px 18px 0;
}

.audit-error > button {
  display: inline-flex;
  width: auto;
  min-width: 96px;
  padding-inline: 14px;
  white-space: nowrap;
}

.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-top: 1px solid var(--line);
}

.audit-pagination span,
.audit-pagination em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.audit-pagination .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.audit-pagination svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 900px) {
  .audit-tools {
    grid-template-columns: 1fr 1fr;
  }

  .audit-search {
    grid-column: 1 / -1;
  }

  .audit-event__row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .audit-event__badges {
    grid-column: 2 / -1;
  }

  .audit-event__row time {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .content-dialog__danger-zone,
  .audit-tools {
    grid-template-columns: 1fr;
  }

  .content-dialog__danger-zone .button,
  .audit-tools .audit-search,
  .audit-pagination .button {
    width: 100%;
  }

  .audit-search {
    grid-column: auto;
  }

  .audit-event__row {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 13px 14px;
  }

  .audit-event__row time,
  .audit-event__badges {
    grid-column: 2;
  }

  .audit-event__row time {
    grid-row: auto;
  }

  .audit-event__details {
    margin: 0 14px 13px 48px;
  }

  .audit-event__details dl {
    grid-template-columns: 1fr;
  }

  .audit-pagination {
    display: grid;
  }
}

/* Show cards belong to the series; episodes keep their own optional artwork. */
.upload-form [data-episode-field][hidden],
.content-dialog__editor [data-episode-field][hidden],
.upload-form [data-related-target][hidden],
.content-dialog__editor [data-related-target][hidden],
.portal-show-form [hidden] { display: none; }
.portal-show-form { display: grid; gap: 24px; }
.portal-show-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.portal-show-actions .button { min-height: 42px; font-size: 10px; }
.portal-show-covers { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.portal-show-cover { display: grid; gap: 10px; min-width: 0; font-size: 12px; font-weight: 650; }
.portal-show-cover small, .portal-show-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.portal-show-cover input { width: 100%; min-width: 0; font-size: 11px; }
.portal-show-cover__preview { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--bg-elevated); aspect-ratio: 16 / 9; }
.portal-show-cover--coverPortrait .portal-show-cover__preview { width: min(100%, 174px); aspect-ratio: 2 / 3; }
.portal-show-cover__preview > span { display: grid; gap: 12px; justify-items: center; color: var(--muted); }
.portal-show-cover__preview svg { width: 24px; height: 24px; }
.portal-show-cover__preview img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: var(--bg-elevated); }
.portal-show-progress { padding: 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; }
.portal-shows-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.portal-show-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elevated); color: var(--text); text-decoration: none; }
.portal-show-card__preview { display: block; }
.portal-show-card__preview > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.portal-show-card > div { padding: 18px; }
.portal-show-card small { color: var(--muted); font-size: 10px; }
.portal-show-card h2 { margin: 7px 0; font-size: 20px; overflow-wrap: anywhere; }
.portal-show-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.6; }
.portal-show-card div > span { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.portal-show-card svg { width: 16px; height: 16px; }
.portal-show-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elevated); }
.portal-show-summary__covers { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.portal-show-summary img { width: 100%; border-radius: 10px; object-fit: cover; }
.portal-show-summary__landscape { aspect-ratio: 16 / 9; }
.portal-show-summary__portrait { aspect-ratio: 2 / 3; }
.portal-show-summary h2 { margin: 8px 0; overflow-wrap: anywhere; }
.portal-show-summary p { color: var(--muted); font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .portal-show-covers, .portal-shows-grid, .portal-show-summary { grid-template-columns: 1fr; }
  .portal-show-cover--coverPortrait .portal-show-cover__preview { width: min(100%, 195px); }
}
.upload-form .portal-field,
.content-dialog__editor .portal-field,
.portal-show-form .portal-field { align-content: start; }
.portal-show-cover { position: relative; cursor: pointer; }
.portal-show-cover input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; }
.portal-show-cover__choose { justify-self: start; padding: 9px 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); font-size: 11px; }
.portal-show-cover:focus-within .portal-show-cover__preview { outline: 2px solid var(--focus); outline-offset: 3px; }
.portal-show-form .upload-step > span svg { width: 20px; height: 20px; }


.content-cover-frame { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.content-cover-frame p { margin: 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.content-cover-frame__controls { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.content-cover-frame .button { min-height: 40px; padding: 8px 12px; font-size: 11px; }
.content-cover-frame > .button { justify-self: start; }
.content-cover-frame__time { display: grid; flex: 1 1 96px; gap: 4px; min-width: 0; color: var(--muted); font-size: 10px; }
.content-cover-frame__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 1 0 100%; gap: 6px; }
.content-cover-frame__step-hint { color: var(--muted); font-size: 10px; line-height: 1.5; }
.content-cover-frame__step-hint[hidden] { display: none; }
.content-cover-frame__steps > button { min-width: 44px; min-height: 40px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 11px; cursor: pointer; }
.content-cover-frame__time input { width: 100%; min-width: 0; height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }
.content-cover-frame button:disabled, .content-cover-frame input:disabled { cursor: default; opacity: .55; }
.content-cover-frame__result { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.content-cover-frame__result[hidden] { display: none; }
.content-cover-frame__result img { width: 76px; height: 54px; object-fit: contain; border-radius: 7px; background: #101010; }
@media (max-width: 480px) {
  .content-cover-frame { padding: 12px; }
  .content-cover-frame > .button { width: 100%; justify-self: stretch; }
  .content-cover-frame .button, .content-cover-frame__steps > button, .content-cover-frame__time input { min-height: 44px; }
}

/* Keep the chosen frame visible while its controls are used on a phone. */
@media (max-width: 900px) {
  .content-dialog:has([data-portal-form="content-cover-frame"]) .content-dialog__layout {
    scroll-padding-top: calc(clamp(140px, 26dvh, 240px) + 12px);
  }
  .content-dialog:has([data-portal-form="content-cover-frame"]) .content-dialog__stage {
    position: sticky;
    top: 0;
    z-index: 2;
    align-self: start;
    height: clamp(140px, 26dvh, 240px);
    grid-template-rows: minmax(0, 1fr);
    border-bottom: 1px solid var(--line);
  }
  .content-dialog:has([data-portal-form="content-cover-frame"]) .content-dialog__media {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    aspect-ratio: auto;
  }
  .content-dialog:has([data-portal-form="content-cover-frame"]) .content-dialog__transcode-state--ready { display: none; }
}

/* Read-only system access remains distinct from editable staff roles. */
.portal-role--observer { color: #4c58a0; background: #edf0fb; }
.portal-observer-label { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.portal-observer-notice { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 12px; }
.portal-observer-notice span { color: var(--muted); line-height: 1.5; }
.portal-readonly-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 20px 0; }
.portal-readonly-facts div { min-width: 0; }
.portal-readonly-facts dt { color: var(--muted); font-size: 12px; }
.portal-readonly-facts dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 14px; }
.portal-readonly-assignment p { color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 560px) { .portal-readonly-facts { grid-template-columns: 1fr; } }
