:root {
  --bg: #efe8dc;
  --ink: #13212f;
  --muted: #677787;
  --panel: rgba(255, 250, 244, 0.84);
  --line: rgba(19, 33, 47, 0.12);
  --red: #c84d34;
  --gold: #b6851d;
  --blue: #2e6d8f;
  --green: #2f7c63;
  --shadow: 0 24px 60px rgba(32, 29, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(200, 77, 52, 0.18), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(46, 109, 143, 0.14), transparent 26rem),
    linear-gradient(160deg, #f4ecdf 0%, #ebe2d4 52%, #e6dccf 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.card-like,
.panel,
.stat-card,
.auth-copy {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
}

.primary-button,
.ghost-button,
.app-nav-item,
.avatar-button,
.avatar-menu-item,
.modal-close {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-button:disabled,
.ghost-button:disabled,
.app-nav-item:disabled,
.modal-close:disabled {
  cursor: default;
  pointer-events: none;
  opacity: 0.42;
  transform: none !important;
}

.primary-button,
.ghost-button,
.app-nav-item,
.avatar-menu-item,
.modal-close {
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.app-nav-item:hover,
.avatar-menu-item:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.primary-button,
.ghost-button {
  padding: 12px 16px;
  border-radius: 14px;
}

.primary-button {
  color: white;
  background: linear-gradient(140deg, #c84d34, #da7d35);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.analytics-panel {
  padding: 22px 24px;
}

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

.analytics-kpi {
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line);
}

.analytics-kpi span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytics-kpi strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
  line-height: 1.05;
}

.analytics-chart {
  display: grid;
  gap: 12px;
}

.analytics-bar {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
}

.analytics-bar__label,
.analytics-bar__value {
  font-size: 0.92rem;
  color: var(--ink);
}

.analytics-bar__track {
  height: 14px;
  border-radius: 999px;
  background: rgba(19, 33, 47, 0.08);
  overflow: hidden;
}

.analytics-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(140deg, #c84d34, #da7d35);
  min-width: 6px;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 14px 12px;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.analytics-table th {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.analytics-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.analytics-filters label {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.analytics-filters span {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.analytics-filters select,
.analytics-filters input {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.analytics-stepper {
  display: flex;
  gap: 8px;
}

@media (max-width: 980px) {
  .analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

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

.auth-shell--full {
  min-height: 100vh;
}

.auth-stage {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 520px);
  gap: 18px;
  align-items: start;
  justify-content: center;
}

.auth-stage--single {
  width: min(620px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

.auth-copy,
.auth-card {
  padding: 30px 26px;
  border-radius: 28px;
}

.auth-copy {
  background: linear-gradient(140deg, rgba(19, 33, 47, 0.92), rgba(45, 63, 83, 0.88));
  color: white;
  min-height: 100%;
}

.auth-copy .eyebrow,
.auth-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.auth-copy h1,
.auth-card h2,
.panel h3,
.modal h3,
.section-header h1,
.section-header h2 {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
}

.auth-copy h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.auth-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-top: 18px;
  margin-bottom: 14px;
}

.auth-card p,
.auth-copy p,
.panel p,
.stat-card p,
.modal p {
  margin: 0;
  line-height: 1.45;
}

.auth-headline-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.auth-headline-row--card {
  margin-bottom: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-switch--dark {
  color: var(--muted);
}

.language-switch select {
  min-width: 88px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.auth-card .stack-form {
  margin-top: 24px;
}

.auth-method-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(19, 33, 47, 0.05);
  border: 1px solid rgba(19, 33, 47, 0.08);
}

.auth-method-button {
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease;
}

.auth-method-button.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(19, 33, 47, 0.08);
}

.auth-method-hint {
  margin: -4px 0 0;
  color: var(--muted);
}

#auth-entry-state,
.auth-success {
  display: grid;
  gap: 18px;
}

.auth-footer {
  display: grid;
  gap: 10px;
}

.auth-code-entry {
  margin-top: 14px;
  padding-top: 0;
}

.auth-code-entry .ghost-button {
  justify-content: center;
}

.auth-warning {
  padding: 16px;
  border-radius: 18px;
  background: rgba(201, 89, 52, 0.08);
  border: 1px solid rgba(201, 89, 52, 0.2);
}

.auth-warning p {
  margin: 0;
}

.auth-success-box {
  margin-top: 18px;
  padding: 24px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(19, 33, 47, 0.03), rgba(19, 33, 47, 0.055));
  border: 1px solid rgba(19, 33, 47, 0.12);
}

.auth-success-box h3 {
  margin: 8px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
}

#login-code-form {
  margin-top: 0;
  gap: 18px;
}

.login-code-field {
  display: grid;
  gap: 10px;
}

#login-code-form input[name="code"] {
  min-height: 72px;
  padding: 18px 20px;
  border-radius: 20px;
  text-align: center;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 1.6rem;
}

#login-code-form .ghost-button {
  min-height: 68px;
  border-radius: 18px;
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(140deg, #c84d34, #da7d35);
  border: 0;
}

.stack-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

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

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

.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.stack-form textarea {
  resize: vertical;
  min-height: 120px;
}

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

.full {
  grid-column: 1 / -1;
}

.honeypot-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--blue);
  line-height: 1.5;
}

.form-feedback.hidden {
  display: none !important;
}

.form-feedback--card {
  min-height: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(19, 33, 47, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 600;
}

.form-feedback--success {
  border-color: rgba(69, 136, 101, 0.25);
  background: rgba(222, 243, 231, 0.92);
  color: #20543b;
}

.form-feedback--error {
  border-color: rgba(184, 65, 39, 0.28);
  background: rgba(253, 232, 227, 0.95);
  color: #8f2e1a;
}

.form-feedback--info {
  border-color: rgba(41, 99, 161, 0.22);
  background: rgba(232, 241, 252, 0.92);
  color: #234b7a;
}

.form-feedback--top {
  margin: 0 0 14px;
}

.app-shell {
  width: calc(100% - 32px);
  max-width: none;
  margin: 16px;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(200, 77, 52, 0.18), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(46, 109, 143, 0.14), transparent 26rem),
    linear-gradient(160deg, rgba(244, 236, 223, 0.98) 0%, rgba(235, 226, 212, 0.98) 52%, rgba(230, 220, 207, 0.98) 100%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.app-loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading-card {
  width: min(620px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  min-height: 280px;
  padding: 38px 34px;
  align-content: center;
  text-align: center;
  border-radius: 28px;
  background: rgba(255, 250, 244, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
}

.app-loading-card h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  white-space: nowrap;
}

.app-loading-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-loading-spinner {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 4px solid rgba(46, 109, 143, 0.12);
  border-top-color: #2e6d8f;
  border-right-color: #c84d34;
  animation: upload-spin 0.8s linear infinite;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border-radius: 24px;
}

.brand-lockup {
  display: grid;
  gap: 2px;
}

.app-brand {
  margin: 0;
  flex: 0 0 auto;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-domain,
.brand-tagline {
  margin: 0;
}

.brand-domain {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.brand-tagline {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.app-nav-item {
  padding: 9px 13px;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
}

.app-nav-item--with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #c84d34;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.app-nav-item.is-active {
  color: white;
  background: linear-gradient(140deg, #1d3044, #345d7d);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.avatar-menu-wrap {
  position: relative;
}

.avatar-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: linear-gradient(140deg, #13212f, #c84d34);
  overflow: hidden;
  padding: 0;
}

.avatar-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
  z-index: 30;
}

.avatar-menu-item {
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
}

.avatar-menu-item:hover {
  background: rgba(19, 33, 47, 0.06);
}

.avatar-menu-item--danger {
  color: var(--red);
}

.app-main {
  padding: 16px 0 0;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.panel-list,
.stats-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.frontend-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 14px;
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.settings-tab-button.is-active {
  color: white;
  background: linear-gradient(140deg, #2e4c69, #24405a);
  border-color: transparent;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: grid;
}

.settings-panel[data-settings-panel="subscriptions"].is-active {
  grid-column: 1;
}

.subscription-settings-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}

.subscription-settings-grid input,
.subscription-settings-grid select {
  min-height: 46px;
  padding: 10px 12px;
}

.subscription-settings-actions {
  display: flex;
  align-items: end;
}

.subscription-settings-actions .primary-button {
  min-height: 46px;
  padding-inline: 18px;
  white-space: nowrap;
}

.content-library-controls {
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr) minmax(220px, 0.9fr) minmax(220px, 0.9fr);
}

.panel,
.stat-card {
  border-radius: 26px;
  padding: 16px 18px;
}

.frontend-panel {
  display: grid;
  gap: 10px;
}

.frontend-panel-toprow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.frontend-panel-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
}

.frontend-panel-actions {
  display: flex;
  justify-content: flex-end;
}

.frontend-panel-actions .ghost-button {
  padding: 10px 14px;
}

.frontend-panel-link {
  text-decoration: none;
}

.frontend-panel-link span {
  font-size: 0.9em;
}

.frontend-panel-domain-inline {
  color: var(--muted);
  font-size: 0.95rem;
}

.frontend-panel-meta,
.frontend-panel-locales,
.frontend-panel-description {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill--active {
  color: #15523f;
  background: rgba(47, 124, 99, 0.16);
  border: 1px solid rgba(47, 124, 99, 0.22);
}

.status-pill--inactive {
  color: #8d3f2d;
  background: rgba(200, 77, 52, 0.12);
  border: 1px solid rgba(200, 77, 52, 0.2);
}

.status-pill--warning {
  color: #8a5b00;
  background: rgba(215, 166, 42, 0.16);
  border: 1px solid rgba(215, 166, 42, 0.24);
}

.status-pill--danger {
  color: #8d2330;
  background: rgba(204, 70, 96, 0.14);
  border: 1px solid rgba(204, 70, 96, 0.2);
}

.frontend-panel-shot {
  min-height: 160px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.38);
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
}

.frontend-panel-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1180px) {
  .frontend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .subscription-settings-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .frontend-grid {
    grid-template-columns: 1fr;
  }

  .subscription-settings-grid {
    grid-template-columns: 1fr;
  }
}

.panel h3,
.stat-card strong {
  font-family: "Space Grotesk", sans-serif;
}

.stat-card span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
}

.accent-red {
  border-top: 5px solid var(--red);
}

.accent-gold {
  border-top: 5px solid var(--gold);
}

.accent-blue {
  border-top: 5px solid var(--blue);
}

.accent-green {
  border-top: 5px solid var(--green);
}

.section-header,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.panel-head-copy {
  max-width: none;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.upload-panel .panel-head {
  display: block;
  margin-bottom: 24px;
}

.section-header {
  margin-bottom: 12px;
}

.section-actions {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.content-filter {
  display: grid;
  gap: 6px;
}

.content-filter span {
  font-size: 0.85rem;
  color: var(--muted);
}

.content-filter input,
.content-filter select {
  width: 100%;
  min-width: 0;
}

.content-filter input {
  min-height: 48px;
  padding: 0.78rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font: inherit;
}

.content-filter input:focus,
.content-filter select:focus {
  outline: none;
  border-color: rgba(46, 109, 143, 0.46);
  box-shadow: 0 0 0 3px rgba(46, 109, 143, 0.12);
}

.content-filter--search {
  min-width: 260px;
  flex: 1 1 260px;
}

.content-filter select {
  min-width: 150px;
}

.content-list-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.content-table-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.content-list-head h3 {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
}

.panel-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.content-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.content-editor-modal {
  display: block;
}

.upload-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.upload-panel {
  min-height: 0;
}

.upload-library-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 14px;
}

.content-library-controls {
  grid-template-columns: minmax(260px, 1.55fr) repeat(3, minmax(0, 0.9fr));
  align-items: end;
}

.upload-library-actions {
  margin-bottom: 14px;
}

.upload-filter-field {
  display: grid;
  gap: 6px;
}

.upload-filter-field span {
  font-size: 0.8rem;
  color: var(--muted);
}

.upload-filter-field input,
.upload-filter-field select {
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.upload-library-preview {
  display: none !important;
}

.upload-library-preview-media {
  min-height: 220px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(19, 33, 47, 0.92);
}

.upload-library-preview-media img,
.upload-library-preview-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.upload-library-preview-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
}

.upload-library-preview-meta {
  display: grid;
  align-content: start;
  gap: 14px;
}

.upload-library-preview-meta h4 {
  margin: 4px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}

.upload-library-preview-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.upload-library-preview-facts span {
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: rgba(19, 33, 47, 0.06);
}

.upload-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
}

.upload-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

.upload-table th,
.upload-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(19, 33, 47, 0.08);
  text-align: left;
  vertical-align: middle;
}

.upload-table th:last-child,
.upload-table td:last-child {
  width: 156px;
}

.upload-table-check-cell {
  width: 54px;
  text-align: center !important;
}

.upload-table th {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
}

.upload-table-row {
  transition: background 140ms ease;
}

.upload-table-row.is-busy {
  opacity: 0.6;
}

.upload-table-media-cell {
  width: 112px;
}

.upload-table-thumb {
  width: 78px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
  background: rgba(19, 33, 47, 0.12);
}

.upload-table-thumb--fallback {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-table-file {
  display: grid;
  gap: 4px;
}

.upload-table-file strong {
  font-size: 0.98rem;
}

.upload-table-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-table-file-meta code {
  font-family: "IBM Plex Sans", sans-serif;
  padding: 0;
  background: transparent;
  color: inherit;
}

.upload-table-file span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.upload-table-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
}

.upload-publication-toggle {
  min-width: 84px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.upload-publication-toggle--online {
  color: #20543b;
  background: rgba(222, 243, 231, 0.92);
  border: 1px solid rgba(69, 136, 101, 0.25);
}

.upload-publication-toggle--offline {
  color: #5c6570;
  background: rgba(239, 241, 244, 0.92);
  border: 1px solid rgba(34, 50, 68, 0.14);
}

.upload-action-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  color: #223244;
}

.upload-action-button svg {
  width: 17px;
  height: 17px;
  display: block;
  stroke: currentColor;
}

.upload-action-button:disabled {
  color: rgba(34, 50, 68, 0.34);
}

.ghost-button--danger.upload-action-button {
  color: #9a4533;
}

.spin-icon {
  animation: upload-spin 0.9s linear infinite;
}

.ghost-button--danger {
  color: #8d3f2d;
  background: rgba(200, 77, 52, 0.08);
  border: 1px solid rgba(200, 77, 52, 0.24);
}

.ghost-button--danger:hover {
  background: rgba(200, 77, 52, 0.14);
}

.media-preview-stage {
  min-height: 420px;
  margin-top: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(19, 33, 47, 0.94);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.media-preview-stage img,
.media-preview-stage video {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  background: rgba(19, 33, 47, 0.94);
}

.media-preview-placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.media-preview-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
}

.content-preview-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-preview-meta span,
.content-preview-tags span {
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: rgba(19, 33, 47, 0.06);
  color: var(--muted);
  font-size: 0.84rem;
}

.content-preview-body {
  margin-top: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 22px;
}

.content-preview-description {
  color: var(--ink);
  line-height: 1.7;
}

.content-preview-description :first-child {
  margin-top: 0;
}

.content-preview-description :last-child {
  margin-bottom: 0;
}

.content-preview-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-tray {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 32px));
  border-radius: 24px;
  border: 1px solid rgba(19, 33, 47, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(19, 33, 47, 0.18);
  backdrop-filter: blur(18px);
  z-index: 45;
}

.upload-tray-head {
  display: grid;
  gap: 14px;
  padding: 18px 18px 12px;
}

.upload-tray-head > div:first-child {
  min-width: 0;
}

.upload-tray-head strong {
  display: block;
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
}

.upload-tray-head-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.upload-tray-head-actions .ghost-button {
  padding: 10px 14px;
}

#upload-tray-pick-button {
  justify-self: start;
}

#upload-tray-clear-button,
#upload-tray-toggle {
  padding-inline: 12px;
}

.upload-tray-body {
  padding: 0 18px 18px;
  border-radius: 0 0 24px 24px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.upload-tray-body.is-dragover {
  background: rgba(46, 109, 143, 0.08);
  box-shadow: inset 0 0 0 2px rgba(46, 109, 143, 0.18);
}

.upload-tray-list {
  display: grid;
  gap: 10px;
}

.upload-tray-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(19, 33, 47, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.upload-tray-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.upload-tray-item-copy {
  display: grid;
  gap: 5px;
}

.upload-tray-item-copy strong {
  font-size: 0.96rem;
}

.upload-tray-item-copy span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.upload-tray-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-tray-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(19, 33, 47, 0.08);
  overflow: hidden;
}

.upload-tray-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, #2e6d8f, #c84d34);
}

.upload-tray-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 44;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(19, 33, 47, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(19, 33, 47, 0.16);
}

.upload-view-active .upload-tray-launcher {
  display: none !important;
}

.upload-table-empty td {
  padding: 20px 16px;
}

.upload-table-empty strong,
.upload-table-empty span {
  display: block;
}

.upload-table-empty span {
  margin-top: 6px;
  color: var(--muted);
}

.upload-table-inline-progress {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-pagination {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.upload-pagination-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-pagination-group--compact {
  justify-content: flex-end;
  align-items: flex-end;
}

.upload-pagination-status {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.upload-pagination-field {
  display: grid;
  gap: 6px;
}

.upload-pagination-field span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.upload-pagination-field select,
.upload-pagination-field input {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.upload-pagination-field--page input {
  width: 110px;
}

.upload-pagination-group--compact .ghost-button {
  min-height: 44px;
  align-self: flex-end;
}

.upload-pagination .ghost-button:disabled {
  cursor: default;
  pointer-events: none;
}

.upload-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(19, 33, 47, 0.08);
}

.upload-status-pill--with-spinner {
  gap: 8px;
}

.upload-status-pill--uploading {
  color: #8a5b0d;
  background: rgba(182, 133, 29, 0.12);
}

.upload-status-pill--processing {
  color: #1f5570;
  background: rgba(46, 109, 143, 0.14);
}

.upload-status-pill--completed {
  color: #15523f;
  background: rgba(47, 124, 99, 0.16);
}

.upload-status-pill--failed {
  color: #8d3f2d;
  background: rgba(200, 77, 52, 0.12);
}

.upload-progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(19, 33, 47, 0.08);
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, #2e6d8f, #c84d34);
  transition: width 140ms ease;
}

.upload-processing-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(46, 109, 143, 0.18);
  border-top-color: #2e6d8f;
  animation: upload-spin 0.8s linear infinite;
}

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

.content-table-panel,
.editor-panel {
  min-height: 360px;
}

.content-table {
  min-width: 980px;
}

.content-table th:last-child,
.content-table td:last-child {
  width: 118px;
}

.content-table-row {
  transition: background 140ms ease;
}

.content-table-row:hover {
  background: rgba(46, 109, 143, 0.05);
}

.content-table-row.is-active {
  background: rgba(46, 109, 143, 0.1);
}

.content-table-main {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: default;
}

.content-table-title {
  display: grid;
  gap: 5px;
}

.content-table-title strong {
  font-size: 0.98rem;
  font-weight: 600;
}

.content-table-title small {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.content-pill {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(19, 33, 47, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.74rem;
}

.content-empty {
  display: grid;
  gap: 6px;
  padding: 20px 4px 4px;
  color: var(--muted);
}

.content-empty strong {
  color: var(--ink);
  font-size: 1rem;
}

.content-detail-blocks {
  display: grid;
  gap: 22px;
}

.content-detail-section {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.editor-empty-state {
  display: grid;
  gap: 10px;
}

.editor-form {
  gap: 20px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 22px;
  align-items: start;
}

.editor-main,
.editor-sidebar {
  display: grid;
  gap: 18px;
}

.profile-editor-layout {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.65fr);
}

.editor-title-field input {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  padding: 16px 18px;
}

.profile-public-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 14px;
}

.profile-display-name-field input {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 16px;
}

.profile-description-field {
  grid-column: 1 / -1;
}

.editor-body-field textarea {
  min-height: 260px;
  line-height: 1.55;
}

.rich-editor {
  display: grid;
  gap: 10px;
}

.rich-editor-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}

.rich-editor-button {
  min-width: 48px;
  padding: 10px 12px;
  border-radius: 12px;
}

.rich-editor-toolbar .ghost-button:hover,
.rich-editor-toolbar .ghost-button:focus-visible {
  transform: none;
}

.rich-editor-surface,
.quill-surface.ql-container {
  min-height: 280px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  outline: none;
}

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

.profile-image-copy {
  margin: 0;
  color: var(--muted);
}

.profile-image-stack {
  display: grid;
  gap: 12px;
}

.profile-image-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "head"
    "preview"
    "action";
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line);
}

.profile-image-head {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-image-head strong {
  font-size: 1rem;
}

.profile-image-head span {
  color: var(--muted);
  font-size: 0.86rem;
}

.profile-image-preview {
  grid-area: preview;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 18px;
  border: 1px dashed rgba(19, 33, 47, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), rgba(255, 250, 244, 0.62)),
    linear-gradient(140deg, rgba(19, 33, 47, 0.05), rgba(200, 77, 52, 0.08));
  color: var(--muted);
  text-align: center;
}

.profile-image-preview--avatar {
  aspect-ratio: 1 / 1;
  width: min(180px, 100%);
  max-height: 180px;
}

.profile-image-preview--profile {
  aspect-ratio: 9 / 16;
  width: min(180px, 100%);
  max-height: 320px;
}

.profile-images-box .ghost-button {
  grid-area: action;
  align-self: stretch;
  min-height: 46px;
  padding: 12px 14px;
}

.profile-image-card .ghost-button {
  width: 100%;
}

.profile-image-card .ghost-button:hover,
.profile-image-card .ghost-button:focus-visible {
  transform: none;
}

.profile-image-preview span {
  font-size: 0.88rem;
  padding: 14px;
}

.profile-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-image-preview span {
  padding: 20px;
  font-weight: 600;
}

.modal--profile-crop {
  width: min(980px, 100%);
}

.profile-crop-stage {
  margin-top: 20px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(19, 33, 47, 0.1);
  background: rgba(19, 33, 47, 0.06);
  min-height: 420px;
}

.profile-crop-stage img {
  display: block;
  max-width: 100%;
}

.profile-form-saving {
  opacity: 0.7;
  pointer-events: none;
}

.quill-surface.ql-container {
  overflow: hidden;
}

.quill-surface .ql-editor {
  min-height: 280px;
  padding: 16px 18px;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.rich-editor-surface:empty::before,
.quill-surface .ql-editor.ql-blank::before {
  content: attr(data-placeholder);
  color: var(--muted);
  font-style: normal;
  left: 18px;
  right: 18px;
}

.rich-editor-surface h2,
.rich-editor-surface h3,
.rich-editor-surface h4,
.rich-editor-surface p,
.rich-editor-surface blockquote,
.rich-editor-surface ul,
.rich-editor-surface ol {
  margin: 0 0 14px;
}

.rich-editor-surface p,
.rich-editor-surface ul,
.rich-editor-surface ol,
.rich-editor-surface li,
.rich-editor-surface blockquote,
.quill-surface .ql-editor p,
.quill-surface .ql-editor ul,
.quill-surface .ql-editor ol,
.quill-surface .ql-editor li,
.quill-surface .ql-editor blockquote {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
}

.rich-editor-surface h2 {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.18;
}

.rich-editor-surface h3 {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.22;
}

.rich-editor-surface h4 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.26;
}

.rich-editor-surface blockquote {
  padding-left: 16px;
  border-left: 3px solid rgba(19, 33, 47, 0.18);
  color: var(--muted);
}

.quill-surface .ql-editor h2 {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.18;
}

.quill-surface .ql-editor h3 {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.22;
}

.quill-surface .ql-editor h4 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.26;
}

.quill-surface .ql-editor blockquote {
  padding-left: 16px;
  border-left: 3px solid rgba(19, 33, 47, 0.18);
  color: var(--muted);
}

.editor-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.editor-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line);
}

.editor-box-fields {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-box-fields--single {
  grid-template-columns: minmax(0, 1fr);
}

.editor-box-fields--toggles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-box-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.editor-box-copy {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

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

.checkbox-field input {
  width: auto !important;
  margin: 0;
}

.checkbox-field--inline span {
  color: var(--ink);
  font-size: 0.95rem;
}

.editor-box .checkbox-field--inline {
  padding: 4px 0;
  display: inline-flex !important;
  width: auto;
  white-space: nowrap;
}

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

.editor-box-stats div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.editor-box-stats strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
}

.editor-box-stats span {
  color: var(--muted);
  font-size: 0.84rem;
}

.editor-box-fields label:has(input[type="datetime-local"]),
.editor-box-fields label:has(select[name="status"]),
.editor-box-fields label:has(input[name="price_amount"]),
.editor-box-fields label:has(select[name="price_currency"]),
.editor-box-fields label:has(select[name="channel_id"]),
.editor-box-fields label:has(select[name="audience_type"]) {
  min-width: 0;
}

.editor-actions {
  display: flex;
  justify-content: flex-start;
}

.editor-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.assignment-summary-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.assignment-summary-chip,
.assignment-summary-empty {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(19, 33, 47, 0.06);
  color: var(--ink);
  font-size: 0.9rem;
}

.assignment-summary-empty {
  color: var(--muted);
}

.publication-channel-picker {
  display: grid;
  gap: 10px;
}

.publication-channel-option {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.publication-channel-option input {
  width: auto;
  margin: 0;
}

.channel-rule-list {
  display: grid;
  gap: 12px;
}

.panel-list.compact {
  gap: 12px;
}

.publication-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line);
}

.publication-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.publication-card-meta h4 {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.publication-card-status {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(19, 33, 47, 0.06);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.publication-card-details {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.rule-chip-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.rule-chip,
.rule-card {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(19, 33, 47, 0.06);
  color: var(--ink);
  font-size: 0.84rem;
}

.rule-card {
  display: grid;
  gap: 4px;
}

.rule-card strong {
  font-size: 0.92rem;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.rule-builder-note {
  color: var(--muted);
}

.channel-rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.rule-builder-grid {
  display: grid;
  gap: 14px;
}

.rule-builder-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
}

.rule-builder-section--summary {
  background: rgba(46, 109, 143, 0.08);
  border-color: rgba(46, 109, 143, 0.16);
}

.rule-summary-box {
  display: grid;
  gap: 8px;
}

.rule-summary-box strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

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

.checklist,
.timeline,
.info-list {
  display: grid;
  gap: 12px;
}

.timeline {
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.timeline strong {
  font-weight: 600;
}

.timeline span,
.check-row,
.info-list dd {
  color: var(--muted);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  margin: 0;
}

.info-list {
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt,
.info-list dd {
  margin: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 32, 0.42);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.overlay.hidden {
  display: none;
}

.modal {
  position: relative;
  width: min(520px, 100%);
  padding: 30px 26px;
  border-radius: 28px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.modal.wide {
  width: min(860px, 100%);
}

.modal--upload-edit {
  width: min(920px, 100%);
}

.modal--upload-edit .stack-form {
  gap: 18px;
}

.modal--upload-edit .rich-editor-surface {
  min-height: 220px;
}

.modal--upload-edit .modal-actions {
  position: sticky;
  bottom: 0;
  padding: 14px 0 0;
  background: rgba(255, 250, 244, 0.98);
  border-top: 1px solid rgba(19, 33, 47, 0.08);
}

.upload-edit-form {
  gap: 20px;
}

.upload-edit-inline-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(160px, 1fr);
  gap: 14px;
  align-items: start;
}

.upload-edit-tag-field {
  position: relative;
}

.upload-custom-screenshot-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(19, 33, 47, 0.06);
  border: 1px solid rgba(19, 33, 47, 0.08);
}

.upload-custom-screenshot-preview span {
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-custom-screenshot-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
}

.upload-custom-screenshot-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.upload-video-screenshot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-video-screenshot-head strong {
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-video-screenshot-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(19, 33, 47, 0.06);
  border: 1px solid rgba(19, 33, 47, 0.08);
}

.upload-video-screenshot-stage video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  background: #000;
}

.upload-video-screenshot-stage span {
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(19, 33, 47, 0.12);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.98);
  box-shadow: 0 18px 40px rgba(19, 33, 47, 0.12);
}

.tag-suggestions.hidden {
  display: none !important;
}

.tag-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.tag-suggestion:hover,
.tag-suggestion:focus-visible,
.tag-suggestion.is-active {
  background: rgba(19, 33, 47, 0.06);
}

.tag-suggestion-count {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.upload-edit-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line);
}

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

.upload-edit-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.upload-edit-field--full {
  grid-column: 1 / -1;
}

.upload-comments-box {
  margin-top: 20px;
}

.upload-comments-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.upload-comments-head strong {
  display: block;
  font-size: 1.02rem;
}

.upload-comments-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 420px;
  text-align: right;
}

.upload-comments-list {
  display: grid;
  gap: 14px;
}

.upload-comment-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(17, 39, 61, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
}

.upload-comment-card.is-hidden {
  opacity: 0.74;
  border-style: dashed;
}

.upload-comment-meta,
.upload-comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.upload-comment-author,
.upload-comment-reply-author {
  font-weight: 700;
}

.upload-comment-date,
.upload-comment-status,
.upload-comment-report,
.upload-comment-block {
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-comment-body,
.upload-comment-reply-body {
  margin: 0;
  color: #27384c;
  line-height: 1.55;
  white-space: pre-wrap;
}

.upload-comment-actions {
  gap: 8px;
}

.upload-comment-replies {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  border-left: 2px solid rgba(17, 39, 61, 0.08);
}

.upload-comment-reply {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 246, 248, 0.95);
}

.upload-comment-reply-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-comment-reply-form {
  display: grid;
  gap: 8px;
}

.upload-comment-reply-form textarea {
  min-height: 92px;
  resize: vertical;
}

.upload-comment-reply-form-actions {
  display: flex;
  justify-content: flex-end;
}

.comments-table td {
  vertical-align: top;
}

.comments-status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comments-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 14px;
  color: var(--muted);
}

.comments-summary-link {
  border: 0;
  background: transparent;
  color: #40607d;
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
}

.comments-summary-link span {
  color: var(--muted);
}

.comments-summary-link.is-active {
  color: var(--ink);
  font-weight: 700;
}

.comments-summary-link:hover,
.comments-summary-link:focus-visible {
  color: #1f3e5b;
  text-decoration: underline;
}

.comments-summary-sep {
  color: rgba(64, 96, 125, 0.45);
}

.comments-table-comment {
  min-width: 460px;
}

.comments-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.comments-entry-meta strong {
  color: var(--ink);
  font-size: 1rem;
}

.comments-entry-body {
  margin: 0;
  color: #27384c;
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 0.98rem;
}

.comments-entry-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.comments-entry-replies {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid rgba(17, 39, 61, 0.08);
}

.comments-entry-reply {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 246, 248, 0.95);
}

.comments-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.92rem;
}

.comments-row-action {
  border: 0;
  background: transparent;
  color: #40607d;
  padding: 0;
  cursor: pointer;
}

.comments-row-action--danger {
  color: #b33a2b;
}

.comments-row-action:hover,
.comments-row-action:focus-visible {
  color: #1f3e5b;
  text-decoration: underline;
}

.comments-row-action--danger:hover,
.comments-row-action--danger:focus-visible {
  color: #922b20;
}

.comments-row-action:not(:last-child)::after {
  content: "|";
  margin-left: 6px;
  color: rgba(64, 96, 125, 0.4);
}

.comments-reply-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.comments-reply-form textarea {
  min-height: 92px;
  resize: vertical;
}

.comments-reply-form-actions {
  display: flex;
  justify-content: flex-end;
}

.comments-upload-meta {
  display: grid;
  gap: 4px;
}

.comments-upload-meta span {
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-word;
}

.modal > .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.modal h3 {
  margin: 0 0 14px;
}

.modal p {
  line-height: 1.5;
}

.modal .stack-form {
  margin-top: 24px;
}

.modal .form-feedback {
  margin-top: 18px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.modal-checkbox-grid {
  align-items: center;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(19, 33, 47, 0.08);
}

@media (max-width: 980px) {
  .app-header {
    flex-wrap: wrap;
  }

  .app-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .two-columns,
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .profile-editor-layout,
  .profile-contact-grid {
    grid-template-columns: 1fr;
  }

  .profile-image-card {
    grid-template-columns: 1fr;
  }

  .profile-image-preview--avatar {
    width: min(150px, 100%);
    max-height: 150px;
  }

  .profile-image-preview--profile {
    width: min(150px, 100%);
    max-height: 266px;
  }

  .profile-crop-stage {
    min-height: 260px;
  }

  .content-workspace {
    grid-template-columns: 1fr;
  }

  .upload-library-controls,
  .upload-library-preview {
    grid-template-columns: 1fr;
  }

  .editor-layout,
  .editor-meta-grid,
  .editor-bottom-grid {
    grid-template-columns: 1fr;
  }

  .channel-rules-grid,
  .rule-timing-grid {
    grid-template-columns: 1fr;
  }

  .editor-box-fields {
    grid-template-columns: 1fr;
  }

  .editor-box-stats {
    grid-template-columns: 1fr;
  }
  .upload-tray {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .upload-tray-launcher {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 720px) {
  .app-loading-card {
    width: min(100%, 520px);
    min-height: 240px;
    padding: 30px 22px;
  }

  .app-loading-card h2 {
    white-space: normal;
  }

  #login-code-form input[name="code"] {
    min-height: 64px;
    font-size: 1.28rem;
  }

  .auth-shell {
    padding: 12px;
  }

  .auth-stage {
    width: 100%;
    gap: 12px;
  }

  .auth-copy,
  .auth-card {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-headline-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-switch {
    width: 100%;
    justify-content: space-between;
  }

  .auth-card h2 {
    font-size: 1.7rem;
  }

  .app-shell {
    width: calc(100% - 20px);
    margin: 10px;
  }

  .upload-library-controls {
    grid-template-columns: 1fr;
  }

  .content-library-controls,
  .upload-edit-grid {
    grid-template-columns: 1fr;
  }

  .upload-edit-inline-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .upload-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .app-header {
    padding: 14px;
    border-radius: 20px;
  }

  .app-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .app-nav {
    gap: 8px;
  }

  .app-nav-item,
  .ghost-button,
  .primary-button {
    width: 100%;
    justify-content: center;
  }

  .section-actions {
    width: 100%;
  }

  .content-filter {
    width: 100%;
  }

  .content-filter--search {
    min-width: 0;
    flex-basis: 100%;
  }

  .content-filter input,
  .content-filter select {
    min-width: 0;
  }

  .modal {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .modal-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .editor-box-fields--toggles,
  .modal-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .avatar-menu {
    width: min(220px, calc(100vw - 44px));
  }
}
