:root {
  --bg-0: #040404;
  --bg-1: #090909;
  --bg-2: #111214;
  --bg-3: #181a1e;
  --card: rgba(14, 15, 17, 0.92);
  --card-soft: rgba(22, 24, 27, 0.88);
  --card-strong: rgba(26, 28, 32, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5f3;
  --muted: #a7a9ad;
  --muted-strong: #c9cbd0;
  --accent: #f7f7f5;
  --accent-dark: #111214;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.03);
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Satoshi", "Neue Haas Grotesk Display Pro", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 22%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.04), transparent 24%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 38%, var(--bg-2) 100%);
  color: var(--text);
}
body.catalogue-editor-open { overflow: hidden; }

button, input, textarea, select { font: inherit; }
code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 8px;
}

.shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 26px;
  padding: 26px;
  min-height: 100vh;
  align-items: start;
}

.rail {
  position: sticky;
  top: 26px;
  align-self: start;
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.brand-block {
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 34%, rgba(10,10,10,0.94) 100%),
    linear-gradient(180deg, #151618 0%, #050505 100%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.brand-logo {
  width: 100%;
  max-width: 220px;
  display: block;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.45));
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.58);
}

.brand-sub {
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
}

.workspace {
  display: grid;
  gap: 26px;
  min-width: 0;
}
.triple-grid, .dual-grid, .hero-grid { display: grid; gap: 26px; }
.hero-grid { grid-template-columns: 0.92fr 1.08fr; }
.triple-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wide-gap { gap: 30px; }

.card {
  background: linear-gradient(180deg, rgba(20, 22, 25, 0.92) 0%, rgba(8, 9, 11, 0.98) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, transparent 34%);
}

.tone-access { background: linear-gradient(180deg, rgba(27, 28, 31, 0.96) 0%, rgba(9, 10, 12, 0.98) 100%); }
.tone-output { background: linear-gradient(180deg, rgba(18, 21, 24, 0.96) 0%, rgba(7, 8, 9, 0.98) 100%); }
.tone-hero { background: linear-gradient(180deg, rgba(29, 30, 34, 0.96) 0%, rgba(9, 10, 11, 0.98) 100%); }
.tone-gallery { background: linear-gradient(180deg, rgba(21, 23, 26, 0.98) 0%, rgba(8, 8, 10, 1) 100%); }
.tone-panel { background: linear-gradient(180deg, rgba(17, 19, 22, 0.98) 0%, rgba(7, 7, 8, 1) 100%); }
.tone-model { background: linear-gradient(180deg, rgba(22, 24, 29, 0.98) 0%, rgba(8, 8, 10, 1) 100%); }
.tone-structure { background: linear-gradient(180deg, rgba(25, 26, 28, 0.98) 0%, rgba(10, 10, 11, 1) 100%); }
.tone-campaign { background: linear-gradient(180deg, rgba(19, 21, 23, 0.98) 0%, rgba(6, 6, 7, 1) 100%); }
.tone-garments { background: linear-gradient(180deg, rgba(20, 20, 22, 0.98) 0%, rgba(5, 5, 6, 1) 100%); }
.tone-preview { background: linear-gradient(180deg, rgba(18, 20, 24, 0.98) 0%, rgba(5, 5, 6, 1) 100%); }
.tone-results { background: linear-gradient(180deg, rgba(24, 24, 26, 0.98) 0%, rgba(7, 7, 8, 1) 100%); }
.tone-template { background: linear-gradient(180deg, rgba(22, 24, 26, 0.98) 0%, rgba(6, 7, 8, 1) 100%); }
.tone-library { background: linear-gradient(180deg, rgba(17, 18, 21, 0.98) 0%, rgba(5, 5, 6, 1) 100%); }

.panel-title-card h2,
.section-header h2,
.toolbar h3,
.card h2,
.card h3,
.hero-card h1,
.summary-title { margin: 0; }

.section-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.section-header p,
.subtle,
.hero-copy-text,
.result-meta,
.prompt-meta,
.mini-note,
.gallery-kicker,
.hero-eyebrow {
  color: var(--muted);
  line-height: 1.55;
}

.compact-header { margin-bottom: 20px; }

.hero-eyebrow,
.gallery-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  margin-bottom: 10px;
}

.hero-card {
  min-height: 100%;
  display: grid;
  gap: 18px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.hero-card h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-inline: auto;
}

.hero-copy-text {
  max-width: 60ch;
  margin-inline: auto;
}

.hero-pills { gap: 12px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.sample-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 16px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.sample-item {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  min-height: 0;
}
.sample-item-large { grid-row: 1 / span 2; }
.sample-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.94) contrast(1.02);
}

.panel-title-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.panel-title-card h2 {
  font-size: 1.45rem;
}

.route-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(31, 33, 36, 0.96) 0%, rgba(14, 15, 17, 0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
}

.route-tab {
  min-width: 138px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted-strong);
  box-shadow: none;
}

.route-tab.is-active {
  background: linear-gradient(180deg, #ffffff 0%, #d7dadf 100%);
  color: #09090a;
  box-shadow: 0 14px 28px rgba(255,255,255,0.08);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #c9ccd1 100%);
  color: #08090b;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(255,255,255,0.08);
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.field { display: grid; gap: 8px; position: relative; z-index: 1; }
.field > span, .pose-row-title, .card h2, .card h3, .summary-title { font-weight: 700; color: var(--text); }
.stack { display: grid; gap: 14px; }

.toolbar,
.pose-row-header,
.garment-header,
.shot-header,
.split-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea,
input[type="file"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(31, 33, 37, 0.98) 0%, rgba(17, 18, 20, 0.98) 100%);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.05);
}

textarea { resize: vertical; min-height: 110px; }

button {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
button:hover { transform: translateY(-1px); }
button.primary,
.anchor-button.primary {
  background: linear-gradient(180deg, #ffffff 0%, #d7dadf 100%);
  color: #09090a;
  box-shadow: 0 18px 34px rgba(255, 255, 255, 0.12);
}
button.secondary {
  background: linear-gradient(180deg, rgba(39, 41, 45, 0.98) 0%, rgba(21, 22, 24, 0.98) 100%);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
button.ghost {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--muted);
}
button.danger {
  background: linear-gradient(180deg, rgba(53, 27, 29, 0.95) 0%, rgba(24, 11, 12, 0.98) 100%);
  border: 1px solid rgba(255, 110, 110, 0.16);
  color: #ffbdbd;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(29, 31, 35, 0.96) 0%, rgba(15, 16, 18, 0.98) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  color: var(--muted-strong);
}
.radio-pill:has(input:checked) {
  border-color: rgba(255,255,255,0.28);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.22);
}

.pose-row, .garment-card, .shot-card, .metrics, .preview-block, .template-result, .result-grid, .upscale-panel {
  display: grid;
  gap: 12px;
}

.pose-row, .shot-card, .upscale-panel, .catalogue-block {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(26, 28, 31, 0.94) 0%, rgba(13, 14, 16, 0.98) 100%);
}

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

.catalogue-block {
  display: grid;
  gap: 12px;
}

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

.catalogue-summary-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 32%),
    linear-gradient(180deg, rgba(30, 32, 35, 0.96) 0%, rgba(12, 13, 15, 0.98) 100%);
}

.catalogue-summary-head,
.catalogue-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.catalogue-summary-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.54);
  margin-bottom: 8px;
}

.catalogue-summary-copy {
  color: var(--muted);
  line-height: 1.5;
}

.catalogue-summary-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalogue-stat {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%);
}

.catalogue-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.catalogue-stat strong {
  display: block;
  font-size: 1.15rem;
  color: var(--text);
}

.catalogue-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}

.catalogue-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.04) 100%);
  color: var(--text);
  font-size: 0.9rem;
}

.catalogue-chip-count {
  color: var(--muted);
}

.catalogue-summary-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.03) 100%);
  color: var(--muted);
}

.catalogue-count-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: end;
}

.catalogue-count-label {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-weight: 600;
}

select[multiple] {
  min-height: 220px;
}

.catalogue-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.catalogue-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 4, 0.76);
  backdrop-filter: blur(12px);
}

.catalogue-editor-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 18px;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.06), transparent 30%),
    linear-gradient(180deg, rgba(25, 27, 30, 0.98) 0%, rgba(8, 9, 11, 1) 100%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.48);
}

.catalogue-editor-panel h3 {
  margin: 0 0 6px;
}

.catalogue-editor-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  min-height: 0;
}

.catalogue-editor-column {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

.catalogue-editor-scroller {
  min-height: 0;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.catalogue-editor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalogue-option-list,
.catalogue-editor-selected {
  display: grid;
  gap: 10px;
}

.catalogue-option {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.catalogue-option:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 100%);
}

.catalogue-option.is-selected {
  border-color: rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
}

.catalogue-option-mark {
  min-width: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.24);
  color: var(--muted-strong);
  font-size: 0.82rem;
}

.catalogue-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.catalogue-option-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalogue-editor-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 128px auto;
  align-items: end;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
}

.catalogue-editor-row-main {
  display: grid;
  gap: 4px;
}

.catalogue-editor-row-main span {
  color: var(--muted);
  font-size: 0.88rem;
}

.catalogue-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.garment-card {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(24, 26, 29, 0.96) 0%, rgba(10, 11, 12, 0.98) 100%);
  overflow: hidden;
}
.garment-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(36, 38, 41, 0.92) 0%, rgba(17, 18, 19, 0.98) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.garment-card > summary::-webkit-details-marker { display: none; }
.garment-body { padding: 16px; display: grid; gap: 14px; }

.inline-grid-2, .inline-grid-3, .metric-grid, .usage-grid {
  display: grid;
  gap: 12px;
}
.inline-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inline-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.usage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.preview-panel, .results-pane, #outputs-panel { display: grid; gap: 14px; }

.summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.summary-pill {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 600;
}

.preview-files, .image-grid, .preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.preview-item, .image-card, .metric-card, .usage-card, .template-result, .alert, .empty-state {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(29, 31, 35, 0.9) 0%, rgba(15, 16, 18, 0.98) 100%);
}

.preview-item img, .image-card img, .preview-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: 10px;
}

.preview-item strong, .image-card strong {
  display: block;
  margin-bottom: 4px;
}

.metric-card strong, .usage-card strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 6px;
}

.status {
  min-height: 24px;
  color: var(--muted);
}
.status.error { color: #ffbdbd; }
.status.success { color: #d7e8d7; }
.hidden { display: none !important; }
.anchor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 16px;
}

.alert { display: grid; gap: 6px; }
.alert.error {
  background: linear-gradient(180deg, rgba(60, 29, 31, 0.94) 0%, rgba(26, 12, 13, 0.98) 100%);
  color: #ffd0d0;
}
.alert.success {
  background: linear-gradient(180deg, rgba(31, 41, 35, 0.94) 0%, rgba(12, 18, 14, 0.98) 100%);
  color: #e4f4e4;
}
.alert.warning {
  background: linear-gradient(180deg, rgba(59, 50, 29, 0.94) 0%, rgba(25, 22, 12, 0.98) 100%);
  color: #ffebbf;
}

.mini-note { font-size: 0.94rem; }
.file-summary, .file-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.file-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  color: var(--text);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.92rem;
  max-width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
}
.file-tag span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-tag-remove {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}
.file-tag-remove:hover {
  background: rgba(255,255,255,0.14);
}
.empty-state { color: var(--muted); }

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.checkbox {
  width: 18px;
  height: 18px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.loader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.loader::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 18px 0 0 rgba(255,255,255,0.36), 36px 0 0 rgba(255,255,255,0.16);
  animation: pulse 0.9s infinite linear;
}

.password-wrap {
  position: relative;
  display: block;
}
.password-wrap input {
  padding-right: 56px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}
.password-toggle:hover {
  background: rgba(255,255,255,0.1);
}
.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes pulse {
  0% { transform: translateX(0); opacity: 0.72; }
  50% { transform: translateX(6px); opacity: 1; }
  100% { transform: translateX(0); opacity: 0.72; }
}

@media (max-width: 1320px) {
  .hero-grid,
  .triple-grid,
  .dual-grid,
  .catalogue-grid,
  .catalogue-summary-grid,
  .catalogue-summary-metrics,
  .hero-stats,
  .inline-grid-2,
  .inline-grid-3,
  .metric-grid,
  .usage-grid {
    grid-template-columns: 1fr;
  }

  .sample-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .sample-item-large { grid-row: auto; }

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

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .rail,
  .workspace {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .rail {
    position: static;
  }

  .route-switch {
    width: 100%;
  }

  .route-tab {
    flex: 1 1 0;
  }
}

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

  .catalogue-overlay {
    padding: 14px;
  }

  .catalogue-editor-panel {
    padding: 18px;
    max-height: calc(100vh - 28px);
  }

  .catalogue-editor-head,
  .catalogue-summary-head {
    flex-direction: column;
  }

  .catalogue-editor-row {
    grid-template-columns: 1fr;
  }

  .catalogue-editor-actions > * {
    width: 100%;
  }
}
