:root {
  --blue: #005bff;
  --blue-dark: #0048cf;
  --blue-soft: #eef4ff;
  --red: #f91155;
  --red-dark: #d90d47;
  --red-soft: #fff0f5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #d9e2f2;
  --panel: #ffffff;
  --page: #f4f7fb;
  --shadow: 0 18px 45px rgba(0, 35, 100, 0.1);
  font-family:
    "Styrene B", "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, var(--page) 62%);
}

button,
textarea,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

html.auth-pending body {
  visibility: hidden;
}

.app-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 100vh;
  padding: 18px;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 22px;
  border: 1px solid rgba(217, 226, 242, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(0, 35, 100, 0.06);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  box-shadow: inset -10px 0 0 var(--red);
  font-size: 15px;
  font-weight: 800;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 10px;
}

.account-button,
.logout-button,
.help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.account-button[hidden],
.logout-button[hidden],
.help-button[hidden] {
  display: none;
}

.logout-button {
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--red);
  background: var(--red-soft);
}

.account-button,
.help-button {
  flex: 0 0 auto;
  gap: 7px;
  padding: 0 11px;
  text-decoration: none;
}

.account-button {
  color: var(--blue);
  background: var(--blue-soft);
}

.help-button {
  color: var(--ink);
  background: #f5f7fb;
  max-width: none;
  margin: 0;
  overflow: visible;
  white-space: normal;
}

.account-button svg,
.help-button svg {
  width: 17px;
  height: 17px;
}

.account-button:hover:not(:disabled) {
  background: #deebff;
}

.help-button:hover {
  background: #edf2f7;
}

.help-menu {
  position: relative;
  width: 100%;
}

.help-menu summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.help-menu summary::-webkit-details-marker {
  display: none;
}

.help-options {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 70;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
}

.help-options a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  max-width: none;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--ink);
  overflow: visible;
  text-decoration: none;
  white-space: normal;
}

.help-options a:hover {
  background: #f5f7fb;
}

.help-options svg {
  width: 16px;
  height: 16px;
}

.logout-button:hover:not(:disabled) {
  background: #ffe0eb;
}

.billing-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid rgba(217, 226, 242, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 35, 100, 0.05);
}

.billing-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
  gap: 8px 12px;
}

.billing-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.billing-balance strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.shop-open-button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.status-pill,
.result-badge,
.counter,
.health-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  color: #475467;
  background: #f2f4f7;
  font-size: 13px;
  font-weight: 700;
}

.health-pill {
  flex: 0 0 auto;
  gap: 8px;
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px currentColor;
  opacity: 0.3;
}

.status-pill.is-loading,
.result-badge.is-loading,
.health-pill.is-loading {
  color: #475467;
}

.status-pill.is-error,
.result-badge.is-error,
.health-pill.is-error {
  color: var(--red);
  background: var(--red-soft);
}

.status-pill.is-success,
.result-badge.is-success,
.health-pill.is-success {
  color: #0f8f52;
  background: #eaf8f1;
}

.health-pill.is-loading .health-dot {
  animation: pulse 1s ease-in-out infinite;
}

.health-pill.is-success .health-dot,
.health-pill.is-error .health-dot {
  opacity: 1;
  box-shadow: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr) minmax(320px, 1.1fr);
  gap: 18px;
  min-height: 0;
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--red);
  background: var(--red-soft);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.icon-button:hover:not(:disabled) {
  background: #ffe0eb;
  transform: translateY(-1px);
}

.icon-button:disabled {
  color: #b8c1d1;
  background: #f5f7fb;
}

.dropzone {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 420px;
  border: 2px dashed #d8dee8;
  border-radius: 8px;
  background: #fbfcfe;
  outline: none;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.dropzone.is-dragover,
.dropzone:focus-visible {
  border-color: #98a2b3;
  background: #ffffff;
}

.dropzone-empty,
.preview-state,
.result-state {
  min-width: 0;
}

.dropzone-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.upload-icon,
.result-placeholder,
.error-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 8px;
  color: #475467;
  background: #f2f4f7;
}

.upload-icon svg,
.result-placeholder svg,
.error-icon svg {
  width: 31px;
  height: 31px;
}

.drop-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.drop-copy {
  margin: -4px 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.secondary-button,
.ghost-button,
.primary-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 9px;
  border-radius: 8px;
  font-weight: 800;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.secondary-button {
  padding: 0 16px;
  color: var(--blue);
  background: var(--blue-soft);
}

.secondary-button[href] {
  text-decoration: none;
}

.secondary-button:hover,
.ghost-button:hover,
.download-button:hover:not(:disabled),
.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.secondary-button:hover {
  background: #deebff;
}

.secondary-button.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.secondary-button.danger {
  color: var(--red);
  background: var(--red-soft);
}

.secondary-button.danger:hover {
  background: #ffe0eb;
}

.preview-state {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  padding: 12px;
  gap: 12px;
}

.preview-state[hidden] {
  display: none;
}

.preview-state img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.preview-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.preview-info > div {
  min-width: 0;
}

.file-name,
.file-meta {
  max-width: 220px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name {
  font-weight: 800;
}

.file-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.prompt-panel {
  gap: 14px;
}

.counter {
  min-width: 42px;
}

textarea {
  width: 100%;
  flex: 1;
  min-height: 345px;
  resize: none;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdff;
  line-height: 1.5;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 91, 255, 0.1);
}

textarea::placeholder {
  color: #8a96aa;
}

.prompt-actions {
  display: grid;
  grid-template-columns: minmax(104px, auto) 1fr;
  gap: 10px;
}

.ghost-button {
  padding: 0 16px;
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--line);
}

.primary-button {
  position: relative;
  padding: 0 18px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(0, 91, 255, 0.22);
}

.primary-button:hover:not(:disabled) {
  background: var(--blue-dark);
  box-shadow: 0 16px 26px rgba(0, 91, 255, 0.26);
}

.primary-button:disabled {
  color: #9aa6bb;
  background: #edf1f7;
  box-shadow: none;
}

.primary-button.is-loading .run-icon {
  display: none;
}

.button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
}

.primary-button.is-loading .button-spinner {
  display: inline-block;
  animation: spin 0.75s linear infinite;
}

.result-panel {
  gap: 14px;
}

.result-state {
  flex: 1;
  min-height: 420px;
}

.jobs-history {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.jobs-history[hidden] {
  display: none;
}

.jobs-history-head,
.job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.jobs-history-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.jobs-list {
  display: grid;
  gap: 6px;
}

.job-empty {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.job-row {
  min-height: 36px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.job-row-main {
  flex: 1;
  display: grid;
  min-width: 0;
  min-height: 36px;
  gap: 4px;
  padding: 8px 10px;
  color: var(--ink);
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.job-row:hover {
  border-color: #a9c7ff;
}

.job-row-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-row-main .job-row-meta,
.job-row-main .job-row-details {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.job-row-main .job-row-meta {
  justify-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2457a6;
  font-weight: 800;
}

.job-row-main .job-row-meta.is-done {
  background: #e8f7ee;
  color: #11845b;
}

.job-row-main .job-row-meta.is-failed,
.job-row-main .job-row-meta.is-timed_out {
  background: #fff1f1;
  color: var(--red);
}

.job-row-main .job-row-details {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-rename-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 30px;
  gap: 6px;
  padding: 0 10px;
  color: #667085;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.job-rename-button svg,
.job-rename-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.job-rename-button:hover {
  color: var(--blue);
  border-color: #a9c7ff;
  background: #ffffff;
}

.job-row.is-renaming {
  padding: 7px;
  border-color: #8db5ff;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 12px 28px rgba(0, 50, 130, 0.09);
}

.job-rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.job-rename-input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid #bfd1ee;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.04);
  font: inherit;
  font-size: 13px;
}

.job-rename-input:focus {
  border-color: #6e9cff;
  box-shadow: 0 0 0 4px rgba(81, 125, 255, 0.16);
  outline: none;
}

.job-rename-action {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.job-rename-action:hover:not(:disabled) {
  transform: translateY(-1px);
}

.job-rename-action.is-save {
  color: #067647;
  border-color: #abe7c5;
  background: #ecfdf3;
}

.job-rename-action.is-save:hover:not(:disabled) {
  background: #dcfae6;
}

.job-rename-action.is-cancel {
  color: #667085;
  background: #f8fafc;
}

.job-rename-action.is-cancel:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #ffffff;
}

.job-rename-form.is-saving {
  opacity: 0.72;
}

.result-empty,
.loading-state,
.error-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  text-align: center;
}

.result-empty[hidden],
.loading-state[hidden],
.error-state[hidden],
.success-state[hidden] {
  display: none;
}

.result-empty p,
.error-state p {
  margin: 0;
}

.result-empty p {
  color: var(--muted);
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dce8ff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.skeleton-stack {
  display: grid;
  width: min(320px, 100%);
  gap: 10px;
}

.skeleton-stack span {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf2fb 0%, #dce8ff 45%, #edf2fb 100%);
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-stack span:nth-child(2) {
  width: 82%;
}

.skeleton-stack span:nth-child(3) {
  width: 58%;
}

.error-icon {
  color: var(--red);
  background: var(--red-soft);
}

.error-title {
  font-size: 18px;
  font-weight: 800;
}

.error-text {
  color: var(--muted);
  line-height: 1.45;
}

.success-state {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  min-height: 0;
  gap: 12px;
}

.cards-grid[hidden],
.ozon-content[hidden],
.ozon-export[hidden],
.result-data[hidden],
.download-button[hidden] {
  display: none;
}

.card-preview {
  display: grid;
  grid-template-rows: minmax(170px, 1fr) auto;
  min-height: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.card-preview img {
  width: 100%;
  height: 100%;
  max-height: 290px;
  object-fit: contain;
  background: #ffffff;
}

.card-preview figcaption {
  padding: 10px 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #ffffff;
  font-size: 13px;
}

.ozon-content {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d7e4fa;
  border-radius: 8px;
  background: #f8fbff;
}

.ozon-header {
  display: grid;
  gap: 4px;
}

.ozon-header h3 {
  margin: 0;
  font-size: 18px;
}

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

.ozon-photos-wrap {
  display: grid;
  gap: 10px;
}

.ozon-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue-dark);
}

.ozon-photo-count {
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #c8d9f5;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ozon-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.ozon-photo {
  margin: 0;
  border: 1px solid #d6e1f4;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.ozon-photo img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.ozon-photo figcaption {
  padding: 8px 10px;
  border-top: 1px solid #e3ecfa;
  color: var(--muted);
  font-size: 12px;
}

.ozon-empty {
  margin: 0;
  padding: 10px;
  border: 1px dashed #c8d9f5;
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
}

.ozon-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

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

.ozon-field-label {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.ozon-field-control {
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid #d6e1f4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  resize: vertical;
}

.ozon-field-control.is-empty {
  color: #8ca3c7;
}

.ozon-schema {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d6e1f4;
  border-radius: 8px;
  background: #ffffff;
}

.ozon-schema-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
}

.ozon-schema label,
.ozon-attribute {
  display: grid;
  gap: 6px;
}

.ozon-schema span,
.ozon-attribute > label,
.ozon-attributes-editor h4 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.ozon-schema input,
.ozon-schema select {
  min-width: 0;
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid #d6e1f4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.ozon-schema-status,
.ozon-schema-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ozon-schema-status.is-loading {
  color: var(--blue-dark);
}

.ozon-schema-status.is-success {
  color: #11845b;
}

.ozon-schema-status.is-error {
  color: var(--red);
}

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

.ozon-attributes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.ozon-attribute {
  padding: 10px;
  border: 1px solid #e2eaf8;
  border-radius: 8px;
  background: #f8fbff;
  align-content: start;
}

.ozon-attribute.is-required {
  border-color: #bcd2f4;
}

.ozon-attribute-meta {
  margin: 0;
}

.ozon-attribute-meta summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.ozon-attribute-meta small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.ozon-attribute-select {
  margin-top: -2px;
}

.ozon-attribute-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ozon-attribute-actions .secondary-button {
  min-height: 34px;
}

.ozon-export {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d7e4fa;
  border-radius: 8px;
  background: #ffffff;
}

.marketplace-price-control {
  display: grid;
  gap: 6px;
  min-width: min(260px, 100%);
  margin-right: auto;
}

.marketplace-price-control span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.marketplace-price-control input {
  min-height: 36px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid #d6e1f4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.marketplace-price-control input:focus {
  border-color: #8fb0e8;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(44, 111, 242, 0.14);
}

.ozon-export p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.ozon-export p.is-loading {
  color: var(--blue-dark);
}

.ozon-export p.is-success {
  color: #0f8f52;
}

.ozon-export p.is-error {
  color: var(--red);
}

.marketplace-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.marketplace-export-actions button[hidden] {
  display: none;
}

.result-data {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  overflow: hidden;
}

.data-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #dbeafe;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 800;
}

pre {
  max-height: 150px;
  margin: 0;
  padding: 12px;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.download-button {
  width: 100%;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 12px 24px rgba(249, 17, 85, 0.2);
}

.download-button:disabled {
  opacity: 0.65;
}

.download-button:hover:not(:disabled) {
  background: var(--red-dark);
}

.shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 12, 22, 0.52);
}

.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 12, 22, 0.52);
}

.shop-overlay[hidden],
.account-overlay[hidden] {
  display: none;
}

.account-overlay.is-embedded {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  min-width: 0;
  padding: 0;
  background: transparent;
}

.account-overlay.is-embedded .account-dialog {
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.account-overlay.is-embedded #accountCloseBtn {
  display: none;
}

.shop-dialog {
  width: min(960px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(7, 12, 22, 0.22);
}

.account-dialog {
  width: min(1320px, 100%);
  max-height: min(780px, calc(100vh - 44px));
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(7, 12, 22, 0.22);
}

.shop-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.shop-heading h2 {
  font-size: 32px;
}

.shop-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #f7faff;
}

.account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #f7faff 0%, #ffffff 100%);
}

.shop-summary span:first-child,
.account-summary-main span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.shop-summary strong,
.account-summary-main strong {
  font-size: 22px;
}

.shop-legal-note {
  margin: 18px 0 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0.55;
}

.account-summary-main {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.account-summary-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
}

.account-summary-icon svg {
  width: 22px;
  height: 22px;
}

.account-summary-main div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-dialog {
  width: min(520px, 100%);
}

.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #f7faff 0%, #ffffff 100%);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
}

.profile-avatar svg {
  width: 24px;
  height: 24px;
}

.profile-details {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.profile-details span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.profile-details strong,
.profile-details p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-details strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.profile-details p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-details p[hidden] {
  display: none;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.profile-logout-button {
  min-height: 42px;
  padding: 0 18px;
}

#shopMessage,
#accountMessage,
#ozonAccountMessage {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

#shopMessage.is-error,
#accountMessage.is-error,
#ozonAccountMessage.is-error {
  color: var(--red);
}

#accountMessage.is-success,
#ozonAccountMessage.is-success {
  color: #0f8f52;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  align-items: start;
  gap: 14px;
  margin-top: 18px;
}

.marketplace-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 98px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #fbfdff;
}

.marketplace-card.is-connected {
  border-color: #bfe4cf;
  background: #f6fcf9;
}

.marketplace-card.is-selected {
  border-color: #99bcff;
  background: #f7faff;
  box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.08);
}

.marketplace-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  min-width: 0;
  gap: 12px;
}

.marketplace-card-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.marketplace-card-head span:not(.marketplace-logo) {
  display: inline-flex;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.marketplace-card-head span.is-connected {
  color: #0f8f52;
}

.marketplace-connect-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #c9d8ef;
  border-radius: 8px;
  color: var(--blue-dark);
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.marketplace-connect-button:hover {
  border-color: #99bcff;
  background: #eef5ff;
}

.marketplace-card.is-selected .marketplace-connect-button {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.marketplace-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.marketplace-logo.is-ozon {
  background: #005bff;
}

.marketplace-logo.is-wildberries {
  background: #b5168d;
}

.marketplace-logo.is-yandex {
  color: #111827;
  background: #ffd426;
}

.marketplace-logo.is-megamarket {
  background: #13a538;
}

.marketplace-account-form,
.ozon-account-form {
  display: grid;
  gap: 14px;
}

.marketplace-account-form[hidden] {
  display: none;
}

.marketplace-account-form label,
.ozon-account-form label {
  display: grid;
  gap: 7px;
  color: #344256;
  font-size: 13px;
  font-weight: 800;
}

.marketplace-account-form input[type="text"],
.marketplace-account-form input[type="password"],
.marketplace-account-form input:not([type]),
.marketplace-account-form textarea,
.ozon-account-form input[type="text"],
.ozon-account-form input[type="password"],
.ozon-account-form input:not([type]) {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdff;
  outline: none;
}

.marketplace-account-form textarea {
  min-height: 56px;
  max-height: 180px;
  overflow-y: hidden;
  padding: 12px;
  resize: none;
  line-height: 1.35;
  field-sizing: content;
}

.marketplace-account-form input:focus,
.marketplace-account-form textarea:focus,
.ozon-account-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 91, 255, 0.1);
}

.marketplace-paste {
  padding: 12px;
  border: 1px dashed #bfd2ee;
  border-radius: 8px;
  background: #ffffff;
}

.marketplace-api-link {
  justify-self: start;
}

.account-toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--ink);
}

.account-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.marketplace-card .account-actions button {
  min-height: 40px;
  padding-inline: 12px;
  font-size: 13px;
}

.marketplace-card .account-actions {
  grid-template-columns: 1fr auto;
}

.marketplace-card .account-actions .danger {
  grid-column: auto;
}

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

.plan-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 18px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.plan-card.is-accent {
  border-color: rgba(0, 91, 255, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
}

.plan-card h3 {
  margin: 0;
  font-size: 22px;
}

.plan-card p {
  margin: 8px 0 0;
  color: #5f6b7a;
  line-height: 1.45;
}

.plan-card > strong {
  font-size: 26px;
}

.plan-buy-button {
  width: 100%;
  box-shadow: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.landing-page {
  background: #ffffff;
  overflow-x: hidden;
}

.landing-page a {
  color: inherit;
  text-decoration: none;
}

.blog-page a {
  color: inherit;
  text-decoration: none;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
  padding: 0 36px;
  border-bottom: 1px solid rgba(217, 226, 242, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.landing-links {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
}

.landing-links a:hover {
  color: var(--blue);
}

.landing-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 10px;
}

.landing-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.landing-login:hover {
  color: #ffffff;
  background: #263244;
}

.landing-page .landing-login {
  color: #ffffff;
}

.landing-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100svh - 220px);
  max-height: 740px;
  padding: 72px 36px;
  overflow: hidden;
}

.landing-hero-image,
.landing-hero-overlay {
  position: absolute;
  inset: 0;
}

.landing-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 12, 22, 0.92) 0%, rgba(7, 12, 22, 0.7) 32%, rgba(7, 12, 22, 0.12) 68%, rgba(7, 12, 22, 0.04) 100%),
    rgba(7, 12, 22, 0.08);
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  min-width: 0;
  color: #ffffff;
}

.landing-kicker {
  margin: 0 0 14px;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-hero h1 {
  margin: 0;
  font-size: 76px;
  line-height: 0.95;
  letter-spacing: 0;
}

.landing-lead {
  width: 100%;
  max-width: 560px;
  margin: 24px 0 0;
  color: #e5edf9;
  font-size: 20px;
  line-height: 1.5;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 9px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
}

.landing-button.primary {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 18px 30px rgba(0, 91, 255, 0.28);
}

.landing-button.primary:hover {
  background: var(--blue-dark);
}

.landing-button.secondary {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.landing-button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.landing-button.inline {
  width: fit-content;
  margin-top: 26px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 40px 0 0;
}

.hero-metrics div {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-metrics dt,
.hero-metrics dd {
  margin: 0;
}

.hero-metrics dt {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.hero-metrics dd {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.35;
}

.landing-section,
.landing-band {
  padding: 76px 36px;
}

.landing-section {
  background: #ffffff;
}

#features {
  padding-top: 40px;
}

.landing-band {
  background: #f6f8fc;
}

.section-heading {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.align-left {
  margin: 0;
  text-align: left;
}

.section-heading.compact {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
}

.section-heading p:not(.eyebrow) {
  margin: 16px 0 0;
  color: #526071;
  font-size: 17px;
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.feature-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(17, 24, 39, 0.06);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
}

.feature-card h3,
.audience-list h3 {
  margin: 18px 0 0;
  font-size: 19px;
  line-height: 1.25;
}

.feature-card p,
.audience-list p,
.workflow-list p {
  margin: 10px 0 0;
  color: #5f6b7a;
  line-height: 1.55;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.feature-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  min-width: 0;
  padding: 24px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #ffffff;
}

.workflow-list span {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.workflow-list strong {
  display: block;
  font-size: 20px;
}

.landing-section.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 42px;
  align-items: start;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

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

.audience-list article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.audience-list h3 {
  margin-top: 0;
}

.blog-preview {
  background: #f8fafc;
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.blog-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
}

.blog-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.blog-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.blog-card p {
  margin: 0;
  color: #5f6b7a;
  font-size: 14px;
  line-height: 1.55;
}

.blog-card a:hover {
  color: var(--blue);
}

.blog-page {
  min-height: 100vh;
  color: var(--ink);
  background: #ffffff;
}

.blog-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.blog-hero {
  display: grid;
  gap: 18px;
  padding: 34px 0 28px;
  border-bottom: 1px solid var(--line);
}

.blog-hero h1 {
  max-width: 860px;
  font-size: 52px;
  line-height: 1.05;
}

.blog-hero p {
  max-width: 760px;
  margin: 0;
  color: #526071;
  font-size: 19px;
  line-height: 1.6;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.blog-list-page .blog-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
}

.blog-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 42px;
  align-items: start;
  padding-top: 38px;
}

.blog-content {
  max-width: 760px;
  min-width: 0;
}

.blog-content h2 {
  margin: 34px 0 12px;
  font-size: 30px;
  line-height: 1.18;
}

.blog-content h2:first-child {
  margin-top: 0;
}

.blog-content p,
.blog-content li {
  color: #364152;
  font-size: 17px;
  line-height: 1.75;
}

.blog-content p {
  margin: 0 0 18px;
}

.blog-content ul,
.blog-content ol {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding-left: 22px;
}

.blog-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.blog-aside strong {
  font-size: 18px;
}

.blog-aside p {
  margin: 0;
  color: #5f6b7a;
  font-size: 14px;
  line-height: 1.55;
}

.blog-aside .landing-button {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 36px;
  color: #5f6b7a;
  border-top: 1px solid var(--line);
  background: #ffffff;
  font-size: 14px;
}

.landing-footer span {
  color: var(--ink);
  font-weight: 900;
}

.landing-footer a {
  color: var(--blue);
  font-weight: 800;
}

.auth-page {
  min-height: 100vh;
  background: #ffffff;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  padding: 42px;
  color: #ffffff;
  overflow: hidden;
}

.auth-visual img,
.auth-visual-overlay {
  position: absolute;
  inset: 0;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-visual-overlay {
  background:
    linear-gradient(180deg, rgba(7, 12, 22, 0.2), rgba(7, 12, 22, 0.9)),
    rgba(7, 12, 22, 0.24);
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
}

.auth-brand {
  color: #ffffff;
  text-decoration: none;
}

.auth-visual h1 {
  margin: 42px 0 0;
  font-size: 62px;
  line-height: 0.95;
}

.auth-visual p {
  max-width: 420px;
  margin: 18px 0 0;
  color: #e5edf9;
  font-size: 18px;
  line-height: 1.5;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 36px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
}

.auth-box {
  width: min(450px, 100%);
  min-width: 0;
}

.auth-box h2 {
  font-size: 34px;
}

.auth-message {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  color: #1f2937;
  background: #f7faff;
  font-size: 14px;
  font-weight: 700;
}

.auth-message.is-error {
  color: var(--red);
  border-color: #ffd0df;
  background: var(--red-soft);
}

.auth-message.is-success {
  color: #0f8f52;
  border-color: #c9ecd9;
  background: #eaf8f1;
}

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

.provider-list {
  margin-top: 24px;
}

.provider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.provider-button:hover {
  border-color: #b7c7e2;
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.provider-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffffff;
  background: #fc3f1d;
  font-weight: 900;
}

.auth-back-link {
  display: inline-flex;
  margin-top: 24px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.auth-back-link:hover {
  color: var(--blue-dark);
}

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

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.9;
    transform: scale(1.15);
  }
}

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

  .result-panel {
    grid-column: 1 / -1;
  }

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

@media (max-width: 980px) {
  .landing-nav {
    padding: 0 18px;
  }

  .landing-links {
    display: none;
  }

  .landing-hero {
    min-height: calc(100svh - 180px);
    padding: 60px 22px;
  }

  .landing-hero h1 {
    font-size: 58px;
  }

  .landing-section,
  .landing-band {
    padding: 58px 22px;
  }

  .workflow-list,
  .landing-section.split,
  .blog-card-grid,
  .blog-list-page .blog-card-grid,
  .blog-article {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 36vh;
  }

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

@media (max-width: 780px) {
  .app-shell {
    min-height: auto;
    padding: 10px;
  }

  .topbar {
    min-height: 58px;
    padding: 0 14px;
    gap: 10px;
  }

  .brand-name {
    font-size: 17px;
  }

  .status-pill {
    display: none;
  }

  .health-pill {
    padding: 0 10px;
  }

  .topbar-status {
    gap: 6px;
  }

  .account-button {
    min-width: 32px;
    padding: 0 8px;
    font-size: 0;
  }

  .account-button svg {
    width: 18px;
    height: 18px;
  }

  .logout-button {
    padding: 0 9px;
  }

  .landing-actions {
    display: none;
  }

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

  .billing-strip {
    grid-template-columns: 1fr auto;
  }

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

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

  .panel {
    padding: 16px;
  }

  h1,
  h2 {
    font-size: 22px;
  }

  .dropzone,
  .result-state {
    min-height: 320px;
  }

  textarea {
    min-height: 230px;
  }

  .prompt-actions {
    grid-template-columns: 1fr;
  }

  .landing-nav {
    min-height: 66px;
  }

  .billing-strip {
    padding: 12px;
  }

  .billing-balance strong {
    font-size: 20px;
  }

  .shop-open-button {
    min-width: 42px;
    padding: 0 10px;
  }

  .shop-open-button svg {
    flex: 0 0 auto;
  }

  .shop-dialog {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .account-dialog {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .account-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-heading h2 {
    font-size: 26px;
  }

  .account-actions,
  .ozon-schema-grid,
  .ozon-export {
    grid-template-columns: 1fr;
  }

  .ozon-export {
    display: grid;
  }

  .marketplace-export-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ozon-attributes-list {
    grid-template-columns: 1fr;
  }

  .landing-login {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12px;
  }

  .landing-hero {
    min-height: calc(100svh - 220px);
    padding: 44px 18px;
  }

  .landing-hero-content,
  .landing-cta-row,
  .hero-metrics {
    width: 100%;
    max-width: 340px;
  }

  .landing-lead {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .landing-hero-overlay {
    background: rgba(7, 12, 22, 0.86);
  }

  .landing-hero h1 {
    font-size: 44px;
  }

  .landing-lead {
    font-size: 17px;
  }

  .landing-cta-row,
  .hero-metrics,
  .feature-grid,
  .workflow-list {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    display: none;
  }

  .landing-cta-row {
    display: grid;
  }

  .landing-button {
    width: 100%;
  }

  .section-heading,
  .section-heading.align-left {
    text-align: left;
  }

  .section-heading h2 {
    width: 100%;
    max-width: 330px;
    font-size: 30px;
    overflow-wrap: break-word;
  }

  .section-heading p:not(.eyebrow) {
    max-width: 330px;
  }

  .landing-section,
  .landing-band {
    padding: 44px 18px;
  }

  .blog-main {
    width: min(100% - 32px, 1120px);
    padding: 34px 0 50px;
  }

  .blog-hero h1 {
    font-size: 36px;
  }

  .blog-hero p,
  .blog-content p,
  .blog-content li {
    font-size: 16px;
  }

  .blog-aside {
    position: static;
  }

  #features {
    padding-top: 28px;
  }

  .feature-card,
  .workflow-list li,
  .audience-list article {
    padding: 18px;
  }

  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 18px;
  }

  .auth-visual {
    min-height: 260px;
    padding: 26px 18px;
  }

  .auth-visual h1 {
    margin-top: 34px;
    font-size: 44px;
  }

  .auth-visual p {
    font-size: 16px;
  }

  .auth-panel {
    padding: 30px 18px 42px;
  }

  .auth-box h2 {
    font-size: 28px;
  }

  .auth-input-row {
    grid-template-columns: 1fr;
  }

  .auth-input-row .primary-button {
    width: 100%;
  }
}

.studio-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f7f9fd 0%, #eef3fa 100%);
}

.studio-page .studio-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 100vh;
  gap: 0;
  padding: 0;
}

.studio-sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  min-width: 0;
  padding: 22px;
  color: #f8fafc;
  background: #101827;
}

.studio-brand {
  color: #ffffff;
  text-decoration: none;
}

.studio-sidebar .brand-mark {
  box-shadow: inset -10px 0 0 var(--red);
}

.studio-nav {
  display: grid;
  gap: 8px;
}

.studio-nav-item {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}

.studio-nav-item:hover,
.studio-nav-item.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.studio-nav-item.is-active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.studio-nav-item svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.studio-nav button.studio-nav-item {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.sidebar-billing {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-billing .billing-label {
  color: #cbd5e1;
}

.sidebar-billing strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.sidebar-billing .shop-open-button {
  width: 100%;
  margin-top: 8px;
}

.sidebar-account {
  display: grid;
  gap: 8px;
  align-self: end;
}

.sidebar-account .account-button,
.sidebar-account .logout-button,
.sidebar-account .help-button {
  width: 100%;
  min-height: 38px;
}

.sidebar-account .help-menu {
  width: 100%;
}

.studio-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 100vh;
  gap: 14px;
  padding: 18px;
}

.studio-main > * {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.studio-main > [hidden] {
  display: none !important;
}

.studio-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(217, 226, 242, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.05);
}

.studio-command-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 10px;
}

.studio-tabs,
.studio-channels,
.prompt-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.studio-tab,
.studio-channels span,
.prompt-presets span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.studio-tab {
  color: #4b5563;
  background: #f3f6fb;
}

.studio-tab.is-active {
  color: #ffffff;
  background: var(--ink);
}

.studio-channels span {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.studio-page .workspace {
  grid-template-columns: minmax(220px, 0.88fr) minmax(260px, 1fr) minmax(340px, 1.28fr);
  gap: 14px;
  min-height: 0;
}

.studio-page .panel {
  padding: 18px;
  border-color: rgba(217, 226, 242, 0.96);
  box-shadow: 0 16px 38px rgba(0, 35, 100, 0.08);
}

.studio-page .panel-heading {
  align-items: center;
  margin-bottom: 14px;
}

.studio-page h1,
.studio-page h2 {
  font-size: 22px;
}

.studio-page .dropzone {
  min-height: 470px;
  border-color: #d8dee8;
  background: #ffffff;
}

.studio-page .drop-title {
  font-size: 18px;
}

.studio-page .prompt-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.prompt-presets {
  margin: -4px 0 0;
  user-select: none;
}

.prompt-presets span {
  color: #475467;
  background: #f2f4f7;
  user-select: none;
}

.prompt-presets span::selection {
  background: transparent;
}

.prompt-presets button::selection {
  background: transparent;
}

.studio-page textarea {
  min-height: 360px;
}

.studio-page .marketplace-account-form textarea {
  flex: 0 0 auto;
  min-height: 56px;
}

.studio-page .result-panel {
  gap: 12px;
}

.studio-page .result-state {
  min-height: 470px;
}

.studio-page .result-empty,
.studio-page .loading-state,
.studio-page .error-state {
  background:
    linear-gradient(180deg, #fbfdff 0%, #f6f9fe 100%);
}

.studio-page .cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.studio-page .ozon-content,
.studio-page .ozon-export,
.studio-page .result-data,
.studio-page .jobs-history {
  box-shadow: none;
}

@media (max-width: 1220px) {
  .studio-page .studio-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .studio-page .workspace {
    grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr);
  }

  .studio-page .result-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .studio-page .studio-shell {
    grid-template-columns: 1fr;
  }

  .studio-sidebar {
    position: static;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    padding: 16px;
  }

  .studio-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .studio-nav-item {
    justify-content: center;
  }

  .sidebar-billing {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .sidebar-billing .billing-label,
  .sidebar-billing strong {
    grid-column: 1;
  }

  .sidebar-billing .shop-open-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: auto;
    min-width: 122px;
    margin: 0;
  }

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

  .studio-main {
    min-height: auto;
    padding: 12px;
  }

  .studio-command {
    align-items: flex-start;
    flex-direction: column;
  }

  .studio-command-right {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .studio-page .result-panel {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .studio-sidebar {
    gap: 12px;
    padding: 12px;
  }

  .studio-brand .brand-name {
    font-size: 18px;
  }

  .studio-nav {
    grid-template-columns: 1fr;
  }

  .studio-nav-item {
    justify-content: flex-start;
  }

  .sidebar-billing,
  .sidebar-account {
    grid-template-columns: 1fr;
  }

  .sidebar-billing .shop-open-button {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  .studio-page .topbar-status {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .studio-page .health-pill,
  .studio-page .status-pill {
    min-width: 0;
  }

  .studio-page .dropzone,
  .studio-page .result-state {
    min-height: 320px;
  }

  .studio-page textarea {
    min-height: 230px;
  }
}

/* Studio redesign from the workspace reference video. */
.studio-page {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eef4ff;
  --ink: #101828;
  --muted: #667085;
  --line: #e4eaf3;
  --panel: #ffffff;
  --page: #f5f7fb;
  --shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
  color: var(--ink);
  background: var(--page);
  font-family:
    "Styrene B", "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.studio-page .studio-shell {
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--page);
}

.studio-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 18px;
  padding: 24px 14px 16px;
  color: var(--ink);
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.studio-brand {
  color: var(--ink);
}

.studio-sidebar .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--blue);
  box-shadow: none;
  font-size: 12px;
}

.studio-sidebar .brand-name {
  font-size: 15px;
  font-weight: 900;
}

.studio-nav {
  gap: 6px;
}

.studio-nav-item {
  min-height: 32px;
  gap: 10px;
  padding: 0 10px;
  color: #475467;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.studio-nav-item:hover,
.studio-nav-item.is-active {
  color: #1d2939;
  background: #edf3ff;
}

.studio-nav-item.is-active {
  box-shadow: none;
}

.studio-nav-item svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.sidebar-billing {
  align-self: end;
  gap: 4px;
  padding: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #f8fafc;
}

.sidebar-billing .billing-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-billing strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
}

.sidebar-billing .shop-open-button {
  min-height: 34px;
  margin-top: 10px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.sidebar-billing .shop-open-button:hover {
  background: var(--blue-dark);
}

.sidebar-account {
  grid-template-columns: 1fr;
  gap: 8px;
}

.sidebar-account .account-button,
.sidebar-account .logout-button,
.sidebar-account .help-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.sidebar-account .account-button {
  color: var(--ink);
}

.sidebar-account .logout-button,
.sidebar-account .help-button {
  color: #475467;
}

.studio-main {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  padding: 0;
}

.studio-command {
  min-height: 70px;
  padding: 16px 38px 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.studio-title {
  min-width: 0;
}

.studio-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.studio-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.studio-command-right {
  gap: 10px;
}

.studio-page .health-pill {
  display: none;
}

.studio-page .topbar-status {
  gap: 0;
}

.studio-page .status-pill {
  min-height: 30px;
  gap: 8px;
  padding: 0 13px;
  color: #0f8f52;
  border: 1px solid #c9ecd9;
  border-radius: 999px;
  background: #f0fdf4;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.studio-page .status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.studio-page .status-pill.is-success {
  color: #0f8f52;
  border-color: #c9ecd9;
  background: #f0fdf4;
}

.studio-page .status-pill.is-loading {
  color: #475467;
}

.studio-page .status-pill.is-error {
  color: var(--red);
  background: #ffffff;
}

.studio-shop-button {
  min-height: 34px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
}

.studio-shop-button:hover {
  background: #f8fafc;
}

.studio-page .workspace {
  counter-reset: studio-step;
  grid-template-columns: minmax(360px, 0.92fr) minmax(520px, 1.18fr);
  align-content: start;
  align-items: start;
  gap: 0 16px;
  min-height: 0;
  padding: 16px 24px 24px 16px;
  overflow-y: auto;
}

.studio-page .studio-compose-column {
  display: grid;
  grid-column: 1;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.studio-page .panel {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.studio-page .upload-panel,
.studio-page .prompt-panel {
  grid-column: 1;
}

.studio-page .result-panel {
  grid-column: 2;
  grid-row: 1;
  min-height: calc(100vh - 102px);
}

.studio-page .panel-heading {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 36px;
  margin: 0 0 10px;
}

.studio-page .panel-heading::before {
  counter-increment: studio-step;
  content: counter(studio-step);
  flex: 0 0 auto;
  width: 16px;
  color: #475467;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.studio-page .panel-heading > div {
  min-width: 0;
}

.studio-page .panel-heading .eyebrow {
  display: none;
}

.studio-page h1,
.studio-page h2 {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.studio-page .upload-reset-button {
  margin-left: auto;
  min-height: 30px;
  padding: 0 8px;
  color: #475467;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.studio-page .upload-reset-button:disabled {
  color: #98a2b3;
  background: transparent;
}

.studio-page .dropzone {
  flex: 0 0 auto;
  min-height: 260px;
  border: 1px dashed #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.studio-page .dropzone.is-dragover,
.studio-page .dropzone:focus-visible {
  border-color: #98a2b3;
  background: #fbfdff;
}

.studio-page .dropzone-empty {
  gap: 10px;
  padding: 26px;
}

.studio-page .upload-icon,
.studio-page .result-placeholder {
  width: 48px;
  height: 48px;
  color: #475467;
  background: #f2f4f7;
}

.studio-page .upload-icon svg,
.studio-page .result-placeholder svg {
  width: 22px;
  height: 22px;
}

.studio-page .drop-title {
  font-size: 16px;
}

.studio-page .drop-copy {
  margin: -3px 0 4px;
  font-size: 12px;
}

.studio-page .preview-state {
  grid-template-rows: minmax(260px, 1fr) auto;
  padding: 12px;
}

.studio-page .preview-state img {
  border-radius: 8px;
  background: #f4f7fb;
}

.studio-page .preview-info {
  padding: 10px 2px 0;
  border: 0;
  background: transparent;
}

.studio-page .file-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.studio-page .file-meta {
  font-size: 12px;
}

.studio-page .prompt-panel {
  margin-top: 0;
  gap: 8px;
}

.studio-page .prompt-panel .panel-heading {
  margin-bottom: 8px;
}

.studio-page .studio-panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f4f7;
}

.studio-page .studio-panel-tab {
  min-height: 32px;
  padding: 0 10px;
  color: #475467;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.studio-page .studio-panel-tab.is-active {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.14);
}

.studio-page .studio-panel-tab:focus-visible,
.studio-page .card-style-option:focus-visible,
.studio-page .studio-model-option:focus-visible,
.studio-page .studio-model-upload-target:focus-within {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.studio-page .prompt-tab-panel {
  min-width: 0;
}

.studio-page .prompt-tab-panel[hidden] {
  display: none !important;
}

.studio-page .style-tab-panel {
  display: grid;
  gap: 10px;
}

.studio-page .model-tab-panel {
  display: grid;
  gap: 10px;
}

.studio-page .card-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.studio-page .studio-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.studio-page .studio-model-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.studio-page .card-style-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 10px;
  color: #1d2939;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
}

.studio-page .card-style-option.is-active {
  border-color: #111827;
  box-shadow: inset 0 0 0 1px #111827, var(--shadow);
}

.studio-page .studio-model-option {
  display: grid;
  grid-template-rows: 168px auto;
  gap: 9px;
  min-height: 232px;
  padding: 8px;
  color: #1d2939;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
}

.studio-page .studio-model-option.is-active {
  border-color: #111827;
  box-shadow: inset 0 0 0 1px #111827, var(--shadow);
}

.studio-page .studio-model-upload.is-active .studio-model-upload-target {
  border-color: #111827;
  box-shadow: inset 0 0 0 1px #111827, var(--shadow);
}

.studio-page .studio-model-option img,
.studio-page .studio-model-empty {
  width: 100%;
  height: 168px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 7px;
  background-color: #f8fafc;
}

.studio-page .studio-model-option img {
  display: block;
  object-fit: contain;
  object-position: center bottom;
}

.studio-page .studio-model-upload-target {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 8px;
  color: #1d2939;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.studio-page .studio-model-upload-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  color: #667085;
  font-size: 28px;
  font-weight: 850;
  border: 1px dashed rgba(15, 23, 42, 0.24);
  border-radius: 7px;
  background: #f8fafc;
}

.studio-page .studio-model-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-page .studio-model-remove {
  align-self: center;
  min-height: 38px;
}

.studio-page .studio-model-empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center 43%, #cbd5e1 0 18px, transparent 19px),
    linear-gradient(180deg, transparent 0 82px, #e2e8f0 83px 138px, transparent 139px),
    #f8fafc;
}

.studio-page .studio-model-empty::after {
  content: "";
  width: 64px;
  height: 78px;
  border: 2px solid #cbd5e1;
  border-top: 0;
  border-radius: 30px 30px 12px 12px;
  transform: translateY(18px);
}

.studio-page .card-style-swatch {
  display: block;
  width: 40px;
  height: 52px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.studio-page .card-style-swatch.is-none {
  background:
    linear-gradient(135deg, transparent 0 46%, #cbd5e1 47% 53%, transparent 54% 100%),
    linear-gradient(45deg, transparent 0 46%, #cbd5e1 47% 53%, transparent 54% 100%),
    #ffffff;
}

.studio-page .card-style-swatch.is-marketplace {
  background:
    linear-gradient(90deg, transparent 0 58%, rgba(37, 99, 235, 0.16) 58% 100%),
    linear-gradient(180deg, #ffffff 0 60%, #eef4ff 60% 100%);
}

.studio-page .card-style-swatch.is-promo {
  background:
    radial-gradient(circle at 72% 24%, #f97316 0 18%, transparent 19%),
    linear-gradient(135deg, #fff7ed 0 48%, #2563eb 49% 100%);
}

.studio-page .card-style-swatch.is-premium {
  background:
    linear-gradient(135deg, #111827 0 52%, #ffffff 53% 100%);
}

.studio-page .card-style-swatch.is-lifestyle {
  background:
    radial-gradient(circle at 64% 32%, rgba(234, 179, 8, 0.42) 0 22%, transparent 23%),
    linear-gradient(160deg, #ecfdf3 0 50%, #fefce8 51% 100%);
}

.studio-page .card-style-swatch.is-minimal {
  background:
    linear-gradient(180deg, #ffffff 0 74%, #f2f4f7 75% 100%);
}

.studio-page .card-style-swatch.is-sale {
  background:
    radial-gradient(circle at 72% 28%, #ef4444 0 22%, transparent 23%),
    linear-gradient(135deg, #fff1f2 0 50%, #fee2e2 51% 100%);
}

.studio-page .card-style-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.studio-page .studio-model-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.studio-page .card-style-copy strong,
.studio-page .studio-model-copy strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.studio-page .card-style-copy small,
.studio-page .studio-model-copy small {
  color: #667085;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.studio-page .selected-style-summary {
  margin: 0;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.studio-page .generation-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 8px;
}

.studio-page .generation-control {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #475467;
  font-size: 11px;
  font-weight: 850;
}

.studio-page .generation-control input,
.studio-page .generation-control select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: #1d2939;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
}

.studio-page .generation-control input:focus,
.studio-page .generation-control select:focus {
  border-color: #111827;
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

.studio-page .counter {
  min-height: 0;
  margin-left: auto;
  padding: 0;
  color: #98a2b3;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.studio-page .counter::before {
  content: "необязательно";
  margin-right: 10px;
  color: #98a2b3;
}

.studio-page .prompt-presets {
  gap: 8px;
  margin: 0 0 8px;
}

.studio-page .prompt-presets button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  color: #344054;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
}

.studio-page .prompt-presets button:first-child {
  color: #344054;
  background: #ffffff;
}

.studio-page .prompt-presets button:first-child::before {
  content: "";
  display: none;
}

.studio-page textarea {
  min-height: 120px;
  padding: 14px;
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.studio-page .prompt-actions {
  grid-template-columns: 1fr;
  gap: 8px;
}

.studio-page .prompt-actions .ghost-button {
  justify-content: flex-start;
  min-height: 30px;
  padding: 0 4px;
  color: #475467;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.studio-page .prompt-actions .primary-button {
  min-height: 46px;
  border-radius: 8px;
}

.studio-page .result-panel .panel-heading {
  margin-bottom: 8px;
}

.studio-page .result-badge {
  min-height: 0;
  margin-left: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-page .result-state {
  min-height: 0;
}

.studio-page .result-empty,
.studio-page .loading-state,
.studio-page .error-state {
  min-height: 312px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.studio-page .result-empty p {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.55;
}

.studio-page .success-state {
  gap: 14px;
}

.studio-page .cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.studio-page .card-preview {
  position: relative;
  grid-template-rows: 190px auto;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.studio-page .card-preview.is-promo {
  border-color: var(--blue);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.95);
}

.studio-page .card-preview.is-sale {
  border-color: var(--red);
  box-shadow: inset 0 0 0 8px var(--red);
}

.studio-page .card-preview-badge {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  color: #1d2939;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-page .card-preview.is-sale .card-preview-badge {
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
}

.studio-page .card-preview img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  background: #f8fafc;
  cursor: zoom-in;
}

.studio-page .card-preview img:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}

.studio-page .card-preview figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.studio-page .card-download-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #667085;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.studio-page .card-download-icon:hover:not(:disabled),
.studio-page .card-download-icon:focus-visible {
  color: var(--blue);
  background: var(--blue-soft);
}

.studio-page .card-download-icon:disabled {
  cursor: wait;
  opacity: 0.48;
}

.studio-page .card-download-icon svg {
  width: 15px;
  height: 15px;
}

.studio-page .result-image-viewer[hidden] {
  display: none;
}

.studio-page .result-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  justify-content: end;
  min-width: 0;
}

.studio-page .result-image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.studio-page .result-image-viewer-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  width: min(50vw, 860px);
  max-width: calc(100vw - 24px);
  height: 100vh;
  min-width: min(480px, calc(100vw - 24px));
  padding: 12px;
  background: #111827;
  box-shadow: -18px 0 42px rgba(15, 23, 42, 0.28);
}

.studio-page .result-image-viewer-panel img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.studio-page .result-image-viewer-close {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.studio-page .result-image-viewer-close:hover,
.studio-page .result-image-viewer-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.studio-page .result-image-viewer-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.studio-page .jobs-history:not([hidden]) {
  display: grid;
}

.studio-page .ozon-content {
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.studio-page .ozon-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.studio-page .ozon-header h3 {
  font-size: 13px;
  font-weight: 900;
}

.studio-page .ozon-header p {
  font-size: 11px;
}

.studio-page .ozon-photos-wrap {
  display: none;
}

.studio-page .ozon-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.studio-page .ozon-field {
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.studio-page .ozon-field-label {
  color: #667085;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.studio-page .ozon-field-control {
  min-height: 54px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  resize: none;
}

.studio-page .ozon-schema {
  gap: 10px;
  padding: 12px;
  border-color: var(--line);
  background: #f8fafc;
}

.studio-page .ozon-schema-grid {
  grid-template-columns: minmax(170px, 1fr) auto minmax(220px, 1.4fr) auto;
  gap: 8px;
}

.studio-page .ozon-schema span,
.studio-page .ozon-attribute > label,
.studio-page .ozon-attributes-editor h4 {
  color: #667085;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.studio-page .ozon-schema input,
.studio-page .ozon-schema select {
  min-height: 36px;
  border-color: var(--line);
}

.studio-page .ozon-schema-status,
.studio-page .ozon-schema-empty {
  font-size: 11px;
  font-weight: 600;
}

.studio-page .ozon-attributes-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.studio-page .ozon-attribute {
  gap: 6px;
  padding: 10px;
  border-color: var(--line);
  background: #ffffff;
}

.studio-page .ozon-attribute-meta summary {
  color: #2563eb;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.studio-page .ozon-attribute-meta small {
  font-size: 10px;
}

.studio-page .ozon-attribute-actions .secondary-button {
  min-height: 32px;
}

.studio-page .ozon-export {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.studio-page .ozon-export::before {
  content: "Выгрузить на площадки";
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.studio-page .ozon-export p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.studio-page .marketplace-price-control {
  min-width: 0;
  margin-right: 0;
}

.studio-page .marketplace-price-control span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.studio-page .marketplace-price-control input {
  min-height: 36px;
  border-color: var(--line);
}

.studio-page .marketplace-export-actions {
  justify-content: flex-start;
  gap: 8px;
}

.studio-page .marketplace-export-actions button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.studio-page .marketplace-export-actions button svg {
  display: none;
}

.studio-page .marketplace-export-actions button::before {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.studio-page [data-marketplace-export="ozon"]::before {
  content: "O";
  background: var(--blue);
}

.studio-page [data-marketplace-export="wildberries"]::before {
  content: "WB";
  background: #c026d3;
}

.studio-page [data-marketplace-export="yandex_market"]::before {
  content: "Я";
  color: #111827;
  background: #ffd84d;
}

.studio-page [data-marketplace-export="megamarket"]::before {
  content: "ММ";
  background: #13a538;
}

.live-card-view {
  display: grid;
  grid-row: 1 / -1;
  align-content: start;
  min-height: 0;
  gap: 14px;
}

.history-view {
  display: grid;
  grid-row: 1 / -1;
  align-content: start;
  min-height: 0;
  gap: 14px;
  padding: 14px 16px 18px;
  overflow: auto;
}

.marketplaces-view {
  display: grid;
  grid-row: 1 / -1;
  align-content: start;
  min-height: 0;
  padding: 14px 16px 18px;
  overflow: auto;
}

.marketplaces-view[hidden] {
  display: none !important;
}

.marketplaces-view .shop-heading,
.marketplaces-view .account-summary,
.marketplaces-view .marketplace-grid {
  border: 1px solid rgba(217, 226, 242, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.05);
}

.marketplaces-view .shop-heading {
  padding: 14px;
}

.marketplaces-view .account-summary {
  margin-top: 14px;
}

.marketplaces-view .marketplace-grid {
  padding: 14px;
}

.history-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 226, 242, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.05);
}

.history-view .jobs-history {
  padding: 14px;
  border: 1px solid rgba(217, 226, 242, 0.92);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.05);
}

.live-card-topbar,
.live-card-filters,
.live-card-panel {
  border: 1px solid rgba(217, 226, 242, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.05);
}

.live-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
}

.live-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
}

.live-card-actions .compact {
  min-height: 36px;
}

.live-card-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) 160px 160px minmax(220px, 1fr) minmax(220px, 1fr) 160px;
  gap: 12px;
  padding: 14px;
}

.live-card-filters label,
.live-card-market-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.live-card-filters span,
.live-card-market-filter legend {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-card-market-filter {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.live-card-market-filter legend {
  padding: 0;
}

.live-card-market-filter label {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-right: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.live-card-market-filter label.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: #eef6ff;
}

.live-card-market-filter label.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.live-card-market-filter input {
  width: 14px;
  height: 14px;
  margin: 0 6px 0 0;
}

.live-card-filters input,
.live-card-filters select,
.live-card-filters textarea {
  min-height: 38px;
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.live-card-filters textarea {
  padding-top: 9px;
  resize: vertical;
}

.live-card-market-filter input[type="checkbox"] {
  min-height: auto;
  width: 14px;
  min-width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 3px;
  accent-color: #2563eb;
}

.live-card-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.live-card-message.is-error {
  color: #b42318;
}

.live-card-message.is-success {
  color: #067647;
}

.live-card-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}

.live-card-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(217, 226, 242, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.05);
}

.live-card-stat span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.live-card-stat strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.05;
}

.live-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  min-height: 0;
}

.live-card-panel {
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
}

.live-card-panel-main {
  min-height: 430px;
}

.live-card-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.live-card-panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.live-card-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.live-card-table-wrap {
  min-width: 0;
  overflow: auto;
}

.live-card-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.live-card-table th,
.live-card-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.live-card-table th:first-child,
.live-card-table td:first-child {
  width: 44px;
  text-align: center;
}

.live-card-table th:nth-child(2),
.live-card-table td:nth-child(2),
.live-card-table th:nth-child(3),
.live-card-table td:nth-child(3),
.live-card-table th:nth-child(4),
.live-card-table td:nth-child(4) {
  text-align: left;
}

.live-card-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #667085;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-card-table td {
  color: var(--ink);
  font-weight: 700;
}

.live-card-table tr.is-clickable {
  cursor: pointer;
}

.live-card-table tr.is-clickable:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: -2px;
}

.live-card-table tr.is-active td {
  background: #eef6ff;
}

.live-card-table tr.is-grouped td {
  background-image: linear-gradient(90deg, rgba(37, 99, 235, 0.05), rgba(255, 255, 255, 0));
}

.live-card-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.live-card-row-check {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.live-card-table .is-muted {
  color: var(--muted);
  font-weight: 600;
}

.live-card-market-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.live-card-market-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  color: #ffffff;
  background: #2563eb;
  font-size: 10px;
  font-weight: 900;
}

.live-card-market-badge.is-wildberries {
  background: #c026d3;
}

.live-card-market-badge.is-yandex_market {
  color: #111827;
  background: #ffd84d;
}

.live-card-market-badge.is-megamarket {
  background: #13a538;
}

.live-card-metrics {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: 520px;
  overflow: auto;
}

.live-card-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.live-card-metric strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.live-card-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.live-card-metric-value {
  justify-self: end;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.live-card-metric.is-missing .live-card-metric-value {
  color: #b42318;
}

.live-card-metric em {
  justify-self: end;
  color: #067647;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.live-card-metric.is-missing em {
  color: #b42318;
}

.live-card-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.live-card-details {
  grid-column: 1 / -1;
}

.live-card-product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 12px;
}

.live-card-product-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.live-card-product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.live-card-product-head strong,
.live-card-product-head span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.live-card-product-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.live-card-product-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.live-card-product-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.live-card-product-images img,
.live-card-product-images span {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.live-card-product-images img {
  object-fit: cover;
}

.live-card-product-images span {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.live-card-product-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.live-card-product-field:nth-child(6),
.live-card-product-field:nth-child(7),
.live-card-product-field:nth-child(8) {
  grid-column: 1 / -1;
}

.live-card-product-field span {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-card-product-field input,
.live-card-product-field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.live-card-product-field textarea {
  resize: vertical;
}

.live-card-product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-card-product-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.live-card-product-status.is-loading {
  color: #2563eb;
}

.live-card-product-status.is-success {
  color: #067647;
}

.live-card-product-status.is-error {
  color: #b42318;
}

.live-card-analysis-panel {
  position: fixed;
  top: 82px;
  right: 18px;
  z-index: 40;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(420px, calc(100vw - 36px));
  max-height: calc(100vh - 110px);
  border: 1px solid rgba(217, 226, 242, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.live-card-analysis-panel[hidden] {
  display: none;
}

.live-card-analysis-panel.is-collapsed {
  grid-template-rows: auto;
  max-height: none;
}

.live-card-analysis-panel.is-collapsed .live-card-analysis-body {
  display: none;
}

.live-card-analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.live-card-analysis-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.live-card-analysis-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.live-card-analysis-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-card-analysis-body {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 12px;
  overflow: auto;
}

.live-card-chat-message {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.live-card-chat-message strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.live-card-chat-message p {
  margin: 0;
  white-space: pre-line;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .live-card-summary {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

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

@media (max-width: 760px) {
  .live-card-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .live-card-actions {
    justify-content: flex-start;
  }

  .live-card-filters,
  .live-card-summary {
    grid-template-columns: 1fr;
  }
}

.studio-page [data-marketplace-export="yandex_market"]::before {
  content: "Я";
  color: #111827;
  background: #ffd84d;
}

.studio-page .download-button {
  min-height: 36px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.studio-page .result-data {
  display: none;
}

.studio-page .shop-dialog {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  padding: 20px;
  border-color: var(--line);
  background: #ffffff;
}

.studio-page .shop-heading h2 {
  font-size: 23px;
}

.studio-page .shop-summary {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.studio-page .plan-grid {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}

.studio-page .plan-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
}

.studio-page .plan-card strong {
  font-size: 22px;
}

.studio-page .account-dialog {
  border-radius: 8px;
}

@media (max-width: 1180px) {
  .studio-page .workspace {
    grid-template-columns: minmax(320px, 0.86fr) minmax(460px, 1.14fr);
  }

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

@media (max-width: 940px) {
  .studio-page .studio-shell {
    grid-template-columns: 1fr;
  }

  .studio-sidebar {
    position: static;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .studio-page .workspace {
    grid-template-columns: 1fr;
    padding: 14px;
    overflow: visible;
  }

  .studio-page .upload-panel,
  .studio-page .prompt-panel,
  .studio-page .studio-compose-column,
  .studio-page .result-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .studio-page .result-panel {
    min-height: 0;
    margin-top: 16px;
  }

  .studio-command {
    align-items: flex-start;
    padding: 14px;
  }

  .studio-command-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .studio-page .result-image-viewer {
    align-items: end;
  }

  .studio-page .result-image-viewer-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: min(82vh, 100vh);
  }

  .studio-sidebar {
    padding: 12px;
  }

  .studio-nav {
    grid-template-columns: 1fr;
  }

  .sidebar-billing,
  .sidebar-account {
    grid-template-columns: 1fr;
  }

  .studio-command {
    min-height: 0;
  }

  .studio-page .cards-grid,
  .studio-page .card-style-grid,
  .studio-page .studio-model-grid,
  .studio-page .studio-model-upload,
  .studio-page .generation-controls,
  .studio-page .ozon-schema-grid,
  .studio-page .ozon-attributes-list,
  .studio-page .ozon-fields {
    grid-template-columns: 1fr;
  }

  .studio-page .card-preview {
    grid-template-rows: 220px auto;
  }

  .studio-page .ozon-export {
    grid-template-columns: 1fr;
  }

  .studio-page .marketplace-export-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Layout hardening for the analytics workspace. */
.studio-page {
  line-height: 1.45;
}

.studio-page .studio-shell {
  grid-template-columns: 204px minmax(0, 1fr);
  min-width: 0;
}

.studio-page .studio-main {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.studio-page .studio-title h1 {
  font-size: 20px;
  font-weight: 750;
}

.studio-page .studio-title p,
.studio-page .live-card-message,
.studio-page .live-card-panel-head span,
.studio-page .live-card-metric span {
  font-weight: 500;
}

.studio-page .studio-nav-item {
  font-size: 13px;
  white-space: nowrap;
}

.studio-page .studio-nav-item:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.live-card-view {
  height: 100%;
  min-width: 0;
  padding: 14px 16px 18px;
  overflow: auto;
}

.live-card-message:empty {
  display: none;
}

.live-card-topbar {
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 12px 14px;
}

.live-card-actions {
  flex: 1 1 280px;
}

.live-card-filters {
  grid-template-columns: minmax(220px, 1.1fr) minmax(132px, 160px) minmax(132px, 160px) minmax(220px, 1fr) minmax(220px, 1fr) minmax(140px, 160px);
  padding: 12px;
}

.live-card-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.live-card-stat {
  padding: 12px;
}

.live-card-stat strong {
  font-size: 20px;
}

.live-card-grid {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  align-items: start;
}

.live-card-panel-main {
  min-height: 360px;
}

.live-card-table {
  min-width: 820px;
  font-size: 12px;
}

.live-card-table th,
.live-card-table td {
  padding: 9px 10px;
}

.live-card-metrics {
  max-height: none;
}

.live-card-metric {
  grid-template-columns: minmax(0, 1fr);
}

.live-card-metric em {
  display: none;
}

@media (max-width: 1360px) {
  .live-card-grid {
    grid-template-columns: 1fr;
  }

  .live-card-metrics {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .live-card-analysis-panel {
    top: 72px;
    right: 12px;
  }
}

@media (max-width: 940px) {
  .studio-page .studio-main {
    height: auto;
    overflow: visible;
  }

  .live-card-view {
    height: auto;
    padding: 14px;
    overflow: visible;
  }

  .history-view {
    height: auto;
    padding: 14px;
    overflow: visible;
  }

  .marketplaces-view {
    height: auto;
    padding: 14px;
    overflow: visible;
  }
}

@media (max-width: 620px) {
  .studio-page .studio-shell,
  .live-card-filters,
  .live-card-summary,
  .live-card-metrics,
  .live-card-product-form {
    grid-template-columns: 1fr;
  }

  .live-card-actions {
    justify-content: stretch;
  }

  .live-card-actions > * {
    flex: 1 1 100%;
  }

  .live-card-market-filter label {
    width: 100%;
    margin-right: 0;
  }

  .live-card-product-field:nth-child(6),
  .live-card-product-field:nth-child(7),
  .live-card-product-field:nth-child(8) {
    grid-column: auto;
  }
}

.live-card-previous-filter {
  display: none;
}

.live-card-view.is-ozon-insights .live-card-market-filter,
.live-card-view.is-ozon-insights .live-card-product-filter,
.live-card-view.is-ozon-insights .live-card-auto-analysis-filter,
.live-card-view.is-ozon-insights .live-card-summary,
.live-card-view.is-ozon-insights .live-card-grid,
.live-card-view.is-ozon-insights #liveCardMergeBtn,
.live-card-view.is-ozon-insights #liveCardExportBtn {
  display: none;
}

.live-card-view.is-ozon-insights .live-card-previous-filter {
  display: grid;
}

.live-card-view.is-ozon-insights .live-card-filters {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ozon-insights-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ozon-insights-shell[hidden],
.ozon-funnel-panel[hidden] {
  display: none;
}

.ozon-insights-overview {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.ozon-health-card,
.ozon-panel,
.ozon-kpi-card,
.ozon-alert,
.ozon-funnel-panel {
  border: 1px solid rgba(217, 226, 242, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.05);
}

.ozon-health-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 16px;
}

.ozon-health-ring {
  --score: 0%;
  --health-color: #98a2b3;
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(var(--health-color) var(--score), #edf2f7 0);
}

.ozon-health-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #ffffff;
}

.ozon-health-ring strong {
  position: relative;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.ozon-health-ring.is-excellent {
  --health-color: #039855;
}

.ozon-health-ring.is-good {
  --health-color: #12b76a;
}

.ozon-health-ring.is-warning {
  --health-color: #f79009;
}

.ozon-health-ring.is-critical {
  --health-color: #d92d20;
}

.ozon-health-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ozon-health-copy span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ozon-health-copy h2 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.2;
}

.ozon-health-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ozon-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-width: 0;
}

.ozon-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-left: 4px solid #12b76a;
}

.ozon-alert.is-critical {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.ozon-alert.is-warning {
  border-left-color: #f79009;
  background: #fffbf0;
}

.ozon-alert.is-ok {
  border-left-color: #12b76a;
  background: #f0fff7;
}

.ozon-alert-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 18px;
}

.ozon-alert strong,
.ozon-alert span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ozon-alert strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.ozon-alert span {
  color: var(--muted);
  font-size: 12px;
}

.ozon-kpi-grid,
.ozon-funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
  min-width: 0;
}

.ozon-kpi-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px;
}

.ozon-kpi-card span,
.ozon-kpi-card small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.ozon-kpi-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.08;
}

.ozon-kpi-card b {
  color: #067647;
  font-size: 12px;
}

.ozon-kpi-card.is-bad b {
  color: #b42318;
}

.ozon-funnel-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.ozon-main-grid,
.ozon-products-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.ozon-panel {
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
}

.ozon-card-tips-panel,
.ozon-chat-panel {
  min-height: 360px;
}

.ozon-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.ozon-section-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.ozon-section-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ozon-card-tips,
.ozon-recommendations {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ozon-tip-card,
.ozon-recommendation {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.ozon-tip-card.priority-1 {
  border-left: 4px solid #d92d20;
}

.ozon-tip-card.priority-2 {
  border-left: 4px solid #f79009;
}

.ozon-tip-card.priority-3 {
  border-left: 4px solid #98a2b3;
}

.ozon-tip-head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.ozon-tip-head strong,
.ozon-recommendation strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.ozon-priority,
.ozon-premium-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
}

.ozon-priority {
  color: #344054;
  background: #eef2f6;
}

.priority-1 .ozon-priority {
  color: #b42318;
  background: #fee4e2;
}

.priority-2 .ozon-priority {
  color: #b54708;
  background: #fef0c7;
}

.ozon-premium-badge {
  color: #ffffff;
  background: #111827;
}

.ozon-tip-card small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.ozon-tip-card p,
.ozon-recommendation p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.ozon-tip-issue {
  color: var(--muted) !important;
}

.ozon-tip-expected,
.ozon-recommendation span {
  color: #067647;
  font-size: 12px;
  font-weight: 800;
}

.ozon-deltas {
  min-width: 0;
  padding: 12px;
  overflow: auto;
}

.ozon-delta-table,
.ozon-product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ozon-delta-table th,
.ozon-delta-table td,
.ozon-product-table th,
.ozon-product-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.ozon-delta-table th,
.ozon-product-table th {
  color: #667085;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ozon-delta-table b {
  color: #067647;
}

.ozon-delta-table tr.is-bad b {
  color: #b42318;
}

.ozon-product-table-wrap {
  min-width: 0;
  overflow: auto;
}

.ozon-product-table {
  min-width: 560px;
}

.ozon-product-table tbody tr.is-critical {
  background: #fff5f5;
}

.ozon-product-table tbody tr.is-warning {
  background: #fffbf0;
}

.ozon-product-table tbody tr.is-ok {
  background: #ffffff;
}

.ozon-product-table td strong,
.ozon-product-table td span,
.ozon-product-table td small {
  display: block;
}

.ozon-product-table td strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
}

.ozon-product-table td span,
.ozon-product-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ozon-product-health {
  position: relative;
  display: grid;
  align-items: center;
  width: 94px;
  height: 24px;
  border-radius: 7px;
  background: #edf2f7;
  overflow: hidden;
}

.ozon-product-health span {
  height: 100%;
  background: #12b76a;
}

.ozon-product-health b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
}

.ozon-chat-panel {
  grid-template-rows: auto minmax(220px, 1fr) auto;
}

.ozon-chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  max-height: 430px;
  padding: 12px;
  overflow: auto;
  background: #fbfdff;
}

.ozon-chat-message {
  max-width: 92%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.ozon-chat-message.is-user {
  justify-self: end;
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.ozon-chat-message p {
  margin: 0 0 8px;
}

.ozon-chat-message p:last-child,
.ozon-chat-message ul:last-child {
  margin-bottom: 0;
}

.ozon-chat-message ul {
  margin: 0 0 8px;
  padding-left: 18px;
}

.ozon-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.ozon-chat-form textarea {
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  resize: vertical;
}

.ozon-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .ozon-insights-overview,
  .ozon-main-grid,
  .ozon-products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ozon-health-card,
  .ozon-alert,
  .ozon-chat-form {
    grid-template-columns: 1fr;
  }

  .ozon-alert .secondary-button,
  .ozon-chat-form .primary-button {
    width: 100%;
  }
}

.admin-page {
  min-height: 100vh;
  background: #f6f8fb;
  color: var(--ink);
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.admin-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-header h1,
.admin-header p {
  margin: 0;
}

.admin-header h1 {
  font-size: 24px;
}

.admin-header p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-status {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-status.is-success {
  color: #126c35;
  border-color: #bde8c9;
  background: #effbf2;
}

.admin-status.is-error {
  color: #a12424;
  border-color: #f3c0c0;
  background: #fff1f1;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-stat-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-stat-card {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
}

.admin-stat-card span,
.admin-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-stat-card strong {
  align-self: end;
  font-size: 24px;
}

.admin-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.admin-panel {
  overflow: hidden;
  margin-bottom: 14px;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.admin-breakdown {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.admin-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.admin-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.admin-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

@media (max-width: 620px) {
  .admin-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .admin-header,
  .admin-grid,
  .admin-columns {
    grid-template-columns: 1fr;
  }
}
