:root {
  color-scheme: light;
  --bg: #f6efe6;
  --bg-deep: #f1e0cf;
  --surface: rgba(255, 252, 247, 0.9);
  --surface-strong: #fffaf4;
  --border: rgba(29, 70, 63, 0.12);
  --text: #18322d;
  --muted: #5f746d;
  --accent: #0d7365;
  --accent-strong: #095449;
  --accent-soft: rgba(13, 115, 101, 0.1);
  --warm: #f07d4f;
  --warm-soft: rgba(240, 125, 79, 0.14);
  --shadow: 0 24px 60px rgba(92, 68, 33, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-display: "Space Grotesk", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(240, 125, 79, 0.28), transparent 30%),
    radial-gradient(circle at bottom right, rgba(13, 115, 101, 0.18), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  overflow-x: hidden;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.aurora {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.aurora-left {
  top: -10rem;
  left: -8rem;
  background: rgba(240, 125, 79, 0.32);
}

.aurora-right {
  right: -10rem;
  bottom: -12rem;
  background: rgba(13, 115, 101, 0.26);
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 32rem);
  padding: 1rem;
}

.hero,
.panel,
.login-card {
  backdrop-filter: blur(16px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  animation: rise 0.6s ease both;
}

.eyebrow,
.panel-kicker,
.badge-title {
  margin: 0 0 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.77rem;
  color: var(--accent);
}

.hero h1,
.panel-heading h2 {
  margin: 0;
  font-family: var(--font-display);
}

.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  line-height: 1;
}

.hero-text {
  max-width: 46rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-badge {
  min-width: 18rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(13, 115, 101, 0.08), rgba(240, 125, 79, 0.14));
  border: 1px solid rgba(13, 115, 101, 0.16);
}

.hero-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.badge-subtitle {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  line-height: 1.5;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  animation: rise 0.7s ease both;
}

.login-card {
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  animation: rise 0.6s ease both;
}

.login-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.8rem);
}

.login-copy {
  margin: 0.9rem 0 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 1rem;
}

.controls-panel {
  animation-delay: 0.05s;
}

.output-panel {
  animation-delay: 0.12s;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.endpoint-pill,
.status-pill {
  align-self: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(13, 115, 101, 0.16);
  white-space: nowrap;
}

.status-pill.is-loading {
  background: var(--warm-soft);
  color: #8c4d2d;
  border-color: rgba(240, 125, 79, 0.28);
}

.status-pill.is-error {
  background: rgba(191, 64, 64, 0.12);
  color: #8e2222;
  border-color: rgba(191, 64, 64, 0.24);
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 700;
}

.field-help {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.inline-field {
  display: flex;
  gap: 0.65rem;
}

input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  border: 1px solid rgba(24, 50, 45, 0.12);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: rgba(13, 115, 101, 0.42);
  box-shadow: 0 0 0 4px rgba(13, 115, 101, 0.1);
}

textarea {
  resize: vertical;
  min-height: 11rem;
  line-height: 1.65;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.4rem 0;
  cursor: pointer;
  color: var(--muted);
}

.checkbox-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.info-strip span {
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  background: rgba(13, 115, 101, 0.08);
  color: var(--accent-strong);
  border: 1px solid rgba(13, 115, 101, 0.14);
  font-size: 0.9rem;
}

.preset-chip,
.chip,
.ghost-button,
.primary-button,
.download-link {
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.preset-chip,
.chip {
  padding: 0.72rem 0.92rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 50, 45, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.preset-chip:hover,
.chip:hover,
.ghost-button:hover,
.primary-button:hover,
.download-link:hover {
  transform: translateY(-1px);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f8fffd;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(13, 115, 101, 0.18);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 0.85rem;
}

.field-slider input[type="range"] {
  width: 100%;
  accent-color: var(--warm);
}

.client-note {
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: rgba(240, 125, 79, 0.12);
  border: 1px solid rgba(240, 125, 79, 0.2);
  color: #8c4d2d;
  line-height: 1.55;
}

.form-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.primary-button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--warm), #e95d2e);
  color: #fffaf7;
  box-shadow: 0 12px 28px rgba(240, 125, 79, 0.22);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.86rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border: 1px solid rgba(24, 50, 45, 0.1);
}

.small-button {
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
}

.status-card,
.usage-card,
.gallery-empty,
.result-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(24, 50, 45, 0.08);
  background: var(--surface-strong);
}

.status-card {
  padding: 1rem 1.05rem;
}

.status-card p {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 0;
}

.meta-grid dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.meta-grid dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
}

.usage-card {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

.usage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.usage-heading span {
  font-weight: 700;
}

.usage-card pre {
  margin: 0;
  padding: 0.9rem;
  overflow: auto;
  border-radius: var(--radius-md);
  background: #f7f2ea;
  color: #3f5b54;
  line-height: 1.55;
}

.gallery-empty {
  margin-top: 1rem;
  padding: 1.3rem;
  text-align: center;
}

.gallery-empty h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
}

.gallery-empty p {
  margin: 0;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.result-card {
  overflow: hidden;
  animation: rise 0.45s ease both;
}

.result-image-shell {
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(13, 115, 101, 0.07), rgba(240, 125, 79, 0.08)),
    repeating-linear-gradient(
      45deg,
      rgba(13, 115, 101, 0.05),
      rgba(13, 115, 101, 0.05) 12px,
      transparent 12px,
      transparent 24px
    );
}

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

.result-body {
  padding: 1rem;
}

.result-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.result-prompt {
  margin: 0 0 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .hero-badge {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 1rem 0.85rem 2rem;
  }

  .hero,
  .panel {
    padding: 1.2rem;
    border-radius: 22px;
  }

  .panel-heading,
  .usage-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-tools {
    justify-content: stretch;
  }

  .field-grid,
  .gallery,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .inline-field {
    flex-direction: column;
  }

  .form-actions,
  .result-actions {
    flex-direction: column;
  }

  .primary-button,
  .download-link,
  .ghost-button {
    width: 100%;
  }
}

/* Industrial control-room skin */
:root {
  color-scheme: dark;
  --bg: #07110f;
  --bg-deep: #020706;
  --surface: rgba(12, 22, 20, 0.88);
  --surface-strong: #0e1816;
  --border: rgba(128, 255, 232, 0.16);
  --text: #effffb;
  --muted: #92aaa4;
  --accent: #4ce0cf;
  --accent-strong: #65f2df;
  --accent-soft: rgba(76, 224, 207, 0.13);
  --warm: #b79b56;
  --warm-soft: rgba(183, 155, 86, 0.14);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

body {
  padding-bottom: 6.8rem;
  background:
    radial-gradient(circle at 8% -10%, rgba(76, 224, 207, 0.22), transparent 28rem),
    radial-gradient(circle at 105% 5%, rgba(183, 155, 86, 0.18), transparent 26rem),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, #07110f, #020706 64%, #15140d);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(76, 224, 207, 0.05), transparent 18%, transparent 82%, rgba(183, 155, 86, 0.05)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: screen;
}

.aurora {
  opacity: 0.32;
  filter: blur(70px);
}

.aurora-left {
  background: rgba(76, 224, 207, 0.32);
}

.aurora-right {
  background: rgba(183, 155, 86, 0.25);
}

.page-shell {
  max-width: 1360px;
}

.hero,
.panel,
.login-card {
  border-color: var(--border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
}

.hero::before,
.panel::before,
.login-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-top: 1px solid rgba(76, 224, 207, 0.28);
  background: linear-gradient(90deg, rgba(76, 224, 207, 0.12), transparent 34%, rgba(183, 155, 86, 0.1));
  opacity: 0.85;
}

.hero-copy,
.hero-badge,
.panel > *,
.login-card > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.panel-kicker,
.badge-title,
.ops-kicker {
  color: var(--warm);
  font-weight: 700;
}

.hero h1,
.panel-heading h2,
.login-card h1 {
  letter-spacing: -0.05em;
  text-transform: none;
}

.hero-badge,
.status-card,
.usage-card,
.gallery-empty,
.result-card {
  border-color: rgba(128, 255, 232, 0.13);
  background:
    linear-gradient(145deg, rgba(76, 224, 207, 0.07), rgba(183, 155, 86, 0.035)),
    #0b1412;
}

input[type="password"],
input[type="text"],
textarea,
.preset-chip,
.chip,
.ghost-button {
  border-color: rgba(128, 255, 232, 0.15);
  background: rgba(5, 12, 11, 0.74);
  color: var(--text);
}

textarea {
  min-height: 14rem;
}

input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: rgba(76, 224, 207, 0.58);
  box-shadow: 0 0 0 4px rgba(76, 224, 207, 0.11);
}

.chip.is-active,
.primary-button,
.download-link {
  background: linear-gradient(135deg, #56f0dc, #31c0b0 58%, #b79b56);
  color: #06110f;
  box-shadow: 0 16px 36px rgba(76, 224, 207, 0.18);
}

.status-pill,
.endpoint-pill,
.info-strip span {
  border-color: rgba(76, 224, 207, 0.2);
  background: rgba(76, 224, 207, 0.09);
  color: var(--accent-strong);
}

.status-pill.is-loading {
  position: relative;
  overflow: hidden;
}

.status-pill.is-loading::after {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--warm), transparent);
  animation: ops-scan 1.05s linear infinite;
}

.usage-card {
  display: none !important;
}

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

.result-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.result-image-shell {
  background:
    linear-gradient(135deg, rgba(76, 224, 207, 0.08), rgba(183, 155, 86, 0.08)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 18px);
}

.ops-taskbar {
  position: fixed;
  right: 1.15rem;
  bottom: 1rem;
  left: 1.15rem;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr) 8.5rem;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(128, 255, 232, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(76, 224, 207, 0.11), transparent 32%, rgba(183, 155, 86, 0.08)),
    rgba(6, 14, 12, 0.92);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.ops-launch {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.95rem;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  color: #04110f;
  text-align: left;
  background: linear-gradient(135deg, #5df5e1, #44cbbd 62%, #b79b56);
}

.ops-launch-title {
  font-weight: 900;
}

.ops-launch-meta {
  font-size: 0.8rem;
  font-weight: 700;
}

.ops-bus {
  min-width: 0;
}

.ops-bus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

.ops-bus-head strong {
  color: var(--warm);
}

.ops-task-list {
  display: flex;
  gap: 0.6rem;
  overflow: auto;
}

.ops-idle {
  color: var(--muted);
  font-size: 0.86rem;
}

.ops-task-chip {
  flex: 0 0 min(28rem, 72vw);
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(128, 255, 232, 0.17);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.ops-task-chip div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.ops-task-chip p {
  margin: 0.25rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-task-chip i {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--warm)) 0 / var(--progress) 100% no-repeat, rgba(255, 255, 255, 0.09);
}

.ops-clock {
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  padding: 0.75rem;
  border: 1px solid rgba(128, 255, 232, 0.13);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.ops-clock span {
  color: var(--muted);
  font-size: 0.74rem;
}

.ops-output-panel,
.ops-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 1.75rem;
  background: rgba(2, 7, 6, 0.78);
  backdrop-filter: blur(24px);
}

.ops-output-panel.is-open,
.ops-preview-modal.is-open {
  display: block;
}

.ops-output-shell {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  height: calc(100vh - 3.5rem);
  overflow: hidden;
  border: 1px solid rgba(128, 255, 232, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, #0a1714, #030908 70%, #15140d);
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: 0 28px 110px rgba(0, 0, 0, 0.62);
}

.ops-side {
  padding: 1.5rem;
  border-right: 1px solid rgba(128, 255, 232, 0.14);
  background: rgba(76, 224, 207, 0.05);
}

.ops-side h2,
.ops-main h2,
.ops-preview-info h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.ops-side p:not(.ops-kicker),
.ops-copy,
.ops-preview-info p {
  color: var(--muted);
  line-height: 1.7;
}

.ops-tab,
.ops-close,
.ops-action,
.ops-card-actions button {
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(128, 255, 232, 0.15);
  border-radius: 14px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
}

.ops-tab.is-active,
.ops-card-actions button:first-child {
  color: #04110f;
  background: linear-gradient(135deg, #5df5e1, #42c9bb 62%, #b79b56);
}

.ops-close {
  margin-top: 1.4rem;
}

.ops-main {
  min-width: 0;
  overflow: auto;
  padding: 1.55rem;
}

.ops-main-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(128, 255, 232, 0.12);
}

.ops-stats {
  display: flex;
  gap: 0.7rem;
}

.ops-stats div {
  min-width: 6rem;
  padding: 0.85rem;
  border: 1px solid rgba(128, 255, 232, 0.14);
  border-radius: 16px;
  text-align: right;
  background: rgba(255, 255, 255, 0.045);
}

.ops-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.ops-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.ops-actions {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}

.ops-actions .ops-action {
  width: auto;
  margin-top: 0;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.ops-output-card,
.ops-history-row,
.ops-empty {
  overflow: hidden;
  border: 1px solid rgba(128, 255, 232, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.ops-card-preview {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.035);
}

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

.ops-card-preview span {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: #04110f;
  background: var(--accent);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.ops-card-body {
  padding: 0.95rem;
}

.ops-card-body h3 {
  margin: 0;
  font-size: 1rem;
}

.ops-card-body p,
.ops-history-row span {
  color: var(--muted);
  line-height: 1.55;
}

.ops-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.ops-card-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
}

.ops-empty {
  display: grid;
  place-items: center;
  min-height: 20rem;
  color: var(--muted);
  text-align: center;
}

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

.ops-history {
  display: grid;
  gap: 0.75rem;
}

.ops-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.ops-history-row strong {
  display: block;
}

.ops-history-row em {
  color: var(--warm);
  font-style: normal;
  font-weight: 900;
}

.ops-history-row.is-failed em {
  color: #ff8a8a;
}

.ops-preview-modal {
  z-index: 60;
}

.ops-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  max-width: 1180px;
  height: calc(100vh - 3.5rem);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(128, 255, 232, 0.18);
  border-radius: 26px;
  background: #07110f;
  box-shadow: 0 28px 110px rgba(0, 0, 0, 0.65);
}

.ops-preview-media {
  display: grid;
  place-items: center;
  min-width: 0;
  background: #030706;
}

.ops-preview-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ops-preview-info {
  padding: 1.4rem;
  border-left: 1px solid rgba(128, 255, 232, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

@keyframes ops-scan {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 10rem;
  }

  .ops-taskbar {
    grid-template-columns: 1fr;
  }

  .ops-clock {
    display: none;
  }

  .ops-output-panel,
  .ops-preview-modal {
    padding: 0.75rem;
  }

  .ops-output-shell,
  .ops-preview-card {
    grid-template-columns: 1fr;
    height: calc(100vh - 1.5rem);
  }

  .ops-side,
  .ops-preview-info {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(128, 255, 232, 0.14);
  }

  .ops-main-head,
  .ops-stats {
    flex-direction: column;
  }
}

/* Single-screen refinement: keep the workspace clean and let cards scroll inside. */
[hidden] {
  display: none !important;
}

.info-strip,
.endpoint-pill,
.hero-badge,
.usage-card {
  display: none !important;
}

.hero-text {
  max-width: 64rem;
}

@media (min-width: 821px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    padding-bottom: 0;
    font-size: 14px;
  }

  .page-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.75rem;
    width: min(100%, 1440px);
    height: 100dvh;
    max-width: none;
    padding: 0.75rem 1rem 5.15rem;
    overflow: hidden;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.95rem 1.15rem;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 3vw, 3.15rem);
  }

  .hero-text {
    margin-top: 0.45rem;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .eyebrow,
  .panel-kicker,
  .ops-kicker {
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
  }

  .layout {
    min-height: 0;
    height: 100%;
    margin-top: 0;
    gap: 0.85rem;
    grid-template-columns: minmax(320px, 405px) minmax(0, 1fr);
  }

  .panel {
    display: flex;
    min-height: 0;
    padding: 0.85rem;
    border-radius: 20px;
  }

  .panel-heading {
    flex: 0 0 auto;
    align-items: center;
    margin-bottom: 0.7rem;
  }

  .panel-heading h2 {
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.05;
  }

  .panel-tools {
    gap: 0.45rem;
  }

  .controls-panel {
    flex-direction: column;
  }

  .controls-panel form {
    min-height: 0;
    overflow: auto;
    padding-right: 0.2rem;
    scrollbar-gutter: stable;
  }

  .output-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.7rem;
  }

  .field {
    margin-bottom: 0.56rem;
  }

  .field-label {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
  }

  .field-help {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.4;
  }

  textarea {
    height: 7.1rem;
    min-height: 7.1rem;
    max-height: 16vh;
    padding: 0.8rem 0.9rem;
    line-height: 1.55;
  }

  input[type="password"],
  input[type="text"] {
    padding: 0.75rem 0.85rem;
  }

  .preset-row {
    gap: 0.45rem;
    margin-bottom: 0.55rem;
  }

  .preset-chip,
  .chip {
    padding: 0.48rem 0.62rem;
    font-size: 0.8rem;
  }

  .field-grid {
    gap: 0.5rem 0.58rem;
  }

  .chip-group {
    gap: 0.42rem;
  }

  .client-note {
    margin-bottom: 0.7rem;
    padding: 0.72rem 0.8rem;
    font-size: 0.84rem;
  }

  .primary-button,
  .download-link,
  .ghost-button {
    padding: 0.72rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .status-card {
    padding: 0.78rem 0.9rem;
  }

  .status-card p {
    line-height: 1.45;
  }

  .status-pill {
    padding: 0.44rem 0.7rem;
    font-size: 0.8rem;
  }

  .meta-grid {
    gap: 0.55rem;
    margin-top: 0.65rem;
  }

  .meta-grid dt {
    font-size: 0.72rem;
  }

  .meta-grid dd {
    margin-top: 0.15rem;
    font-size: 0.9rem;
  }

  .gallery-empty,
  .gallery {
    min-height: 0;
    margin-top: 0;
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .gallery-empty {
    display: grid;
    place-items: center;
    padding: 1rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    align-content: start;
    gap: 0.75rem;
    padding-right: 0.2rem;
  }

  .result-card {
    border-radius: 16px;
  }

  .result-image-shell {
    aspect-ratio: 4 / 3;
  }

  .result-body {
    padding: 0.78rem;
  }

  .result-title {
    margin-bottom: 0.3rem;
    font-size: 0.96rem;
  }

  .result-prompt {
    margin-bottom: 0.65rem;
    font-size: 0.82rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  .result-actions {
    gap: 0.5rem;
  }

  .ops-taskbar {
    right: 1rem;
    bottom: 0.75rem;
    left: 1rem;
    grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr) 7.75rem;
    gap: 0.7rem;
    min-height: 4rem;
    padding: 0.55rem;
    border-radius: 18px;
  }

  .ops-launch {
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
  }

  .ops-launch-meta {
    font-size: 0.74rem;
  }

  .ops-bus-head {
    margin-bottom: 0.32rem;
    font-size: 0.66rem;
  }

  .ops-idle,
  .ops-task-chip p {
    font-size: 0.78rem;
  }

  .ops-task-chip {
    padding: 0.48rem 0.62rem;
    border-radius: 12px;
  }

  .ops-clock {
    padding: 0.6rem;
    border-radius: 14px;
  }
}
