:root {
  --bg-deep: #070b14;
  --bg-panel: #0d1424;
  --bg-card: #121c31;
  --bg-elevated: #16233d;
  --bg-hover: #1b2a47;
  --border: rgba(148, 163, 184, 0.16);
  --border-accent: rgba(56, 189, 248, 0.48);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-bright: #38bdf8;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --radius-lg: 16px;
  --radius-md: 11px;
  --mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body, html {
  min-height: 100%;
  background:
    radial-gradient(circle at 85% 6%, rgba(14, 165, 233, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 12% 28%, rgba(16, 185, 129, 0.08) 0%, transparent 38%),
    linear-gradient(180deg, #0b1324 0%, var(--bg-deep) 58%);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.1);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.hidden {
  display: none !important;
}

/* ============================================================
   1. Public Studio Showcase & Admin Portal
   ============================================================ */
.landing-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 32px;
  background: rgba(7, 11, 20, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 16.5px;
}

.brand-name {
  display: block;
  font-weight: 700;
  line-height: 1.15;
}

.brand-tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-cube {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #04101d;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.25);
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.landing-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.16s;
}

.landing-links a:hover {
  color: var(--accent-bright);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.status-pill.online .status-dot {
  background: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.75);
}

.status-pill.degraded .status-dot {
  background: var(--rose);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.75);
}

.landing-main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 28px 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.eyebrow-badge .sep {
  opacity: 0.5;
}

.hero-copy h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #bae6fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 640px;
  margin-bottom: 24px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.kpi-card {
  background: rgba(18, 28, 49, 0.85);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 13px 14px;
}

.kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.kpi-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Login Card */
.login-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
}

.login-card-header h2 {
  font-size: 21px;
  font-weight: 700;
  margin-top: 10px;
}

.lock-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin: 8px 0 20px;
  line-height: 1.5;
}

.login-footnote {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.field input, .field select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(7, 11, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s;
}

.field input:focus, .field select:focus {
  border-color: var(--accent-bright);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--border);
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.btn-block {
  width: 100%;
}

.error-msg {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fecdd3;
  font-size: 13px;
}

/* Studio Sections (Pipeline, Format Wizard, Security) */
.studio-section {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.section-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 6px;
}

.section-head h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.5;
}

/* Interactive 10-Stage Pipeline Visualization */
.pipeline-nodes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.pipe-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 12px 13px;
  border-radius: 13px;
  background: rgba(11, 18, 33, 0.85);
  border: 1px solid var(--border);
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  transition: all 0.16s;
}

.pipe-node:hover {
  background: var(--bg-hover);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.pipe-node.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(16, 185, 129, 0.12));
  border-color: var(--accent-bright);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.18);
}

.pipe-step {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-bright);
}

.pipe-label {
  font-size: 13.5px;
  font-weight: 700;
}

.pipe-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.pipeline-detail-card {
  background: rgba(7, 11, 20, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 15px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}

.pipe-detail-main h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pipe-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border);
  color: #cbd5e1;
}

.meta-pill.accent {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.12);
}

.pipe-detail-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.pipe-detail-algo {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.pipe-detail-io {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.io-box {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 13px;
}

.io-box .k {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.io-box .v {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
}

.io-box.qa {
  border-color: rgba(16, 185, 129, 0.32);
  background: rgba(16, 185, 129, 0.07);
}

.io-box.qa .k {
  color: #34d399;
}

/* Format Wizard & Specification Table */
.wizard-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wizard-controls {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
}

.wizard-step {
  background: rgba(7, 11, 20, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.wizard-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-btn {
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.88);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-btn:hover {
  border-color: var(--border-accent);
  color: #fff;
}

.chip-btn.active {
  background: rgba(14, 165, 233, 0.22);
  border-color: var(--accent-bright);
  color: #fff;
}

.wizard-rec-banner {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 14px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wizard-rec-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #f8fafc;
}

.wizard-rec-body {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.5;
}

.wizard-rec-format {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 7px 12px;
  border-radius: 10px;
}

.spec-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.spec-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.muted-note {
  font-size: 12px;
  color: var(--text-muted);
}

.spec-search {
  width: 340px;
  max-width: 100%;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.88);
  color: #fff;
  font-size: 13px;
  outline: none;
}

.spec-search:focus {
  border-color: var(--accent-bright);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.72);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 780px;
}

.spec-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--border);
}

.spec-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-soft);
  vertical-align: top;
  line-height: 1.45;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover td {
  background: rgba(30, 41, 59, 0.38);
}

.spec-fname {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-bright);
  margin-top: 2px;
}

.cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

/* Security Cards & Footer */
.security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.sec-card {
  background: rgba(7, 11, 20, 0.76);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.sec-card h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 7px;
  color: #f8fafc;
}

.sec-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.landing-footer {
  margin-top: auto;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(7, 11, 20, 0.86);
}

.footer-legal-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 780px;
}

.footer-legal-left > span:first-child {
  color: var(--text-soft);
  font-weight: 600;
}

.footer-disclaimer {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal-links a, .inline-link {
  color: var(--accent-bright);
  text-decoration: none;
  font-weight: 600;
}

.footer-legal-links a:hover, .inline-link:hover {
  text-decoration: underline;
}

.workspace-legal-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-muted);
}

.legal-main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.legal-card h1 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal-updated {
  font-size: 12.5px;
  color: var(--accent-bright);
  font-weight: 600;
  margin-top: -8px;
}

.legal-card h2 {
  font-size: 16.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 8px;
}

.legal-card p {
  font-size: 14px;
  line-height: 1.68;
  color: var(--text-soft);
}

/* ============================================================
   2. Main Authenticated Studio Shell
   ============================================================ */
.studio-shell {
  display: grid;
  grid-template-rows: 62px 1fr;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(10, 16, 30, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.muted-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.accent-tag {
  color: var(--accent-bright);
}

.verified-tag {
  color: var(--emerald);
}

.project-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 10px;
}

.project-pill select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.project-pill select option {
  background: var(--bg-panel);
  color: var(--text-main);
}

.studio-main {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - 62px);
  overflow: hidden;
}

.sidebar {
  background: rgba(11, 18, 33, 0.94);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 18px;
  gap: 18px;
}

.sidebar-queue-card {
  flex: 1;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.panel-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-sub-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dropzone {
  border: 1.5px dashed rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.05);
  border-radius: 13px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.dropzone:hover, .dropzone.dragover {
  background: rgba(14, 165, 233, 0.12);
  border-color: var(--accent-bright);
}

.dropzone h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}

.dropzone p {
  font-size: 12px;
  color: var(--text-muted);
}

.selected-file-box {
  margin-top: 12px;
}

.selected-file-name {
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
  word-break: break-all;
}

.local-import-details {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.local-import-details summary {
  cursor: pointer;
}

.local-import-row {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.local-import-row input {
  flex: 1;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #070b14;
  color: #fff;
  font-size: 12px;
}

.upload-status {
  font-size: 12px;
  color: var(--accent-bright);
  margin-top: 8px;
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.job-item {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.16s;
}

.job-item:hover {
  background: var(--bg-hover);
}

.job-item.active {
  border-color: var(--accent-bright);
  background: rgba(14, 165, 233, 0.12);
}

.job-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.job-item-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-completed { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.badge-processing, .badge-queued { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.badge-ready { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-failed { background: rgba(244, 63, 94, 0.2); color: #fb7185; }

.job-item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

.mini-progress {
  height: 4px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  margin-top: 8px;
  overflow: hidden;
}

.mini-progress-lg {
  height: 7px;
}

.mini-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #10b981);
  transition: width 0.3s ease;
}

/* Right Workspace */
.workspace {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 24px;
  gap: 18px;
}

.workspace-job-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.empty-state-panel {
  margin: auto;
  max-width: 820px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.empty-state-hero {
  text-align: center;
  padding: 16px;
}

.empty-state-hero h2 {
  color: var(--text-main);
  font-size: 22px;
  margin-bottom: 8px;
}

.empty-state-hero p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.mini-stage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.mini-stage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
}

.mini-stage-card .s-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent-bright);
  font-weight: 700;
}

.mini-stage-card .s-name {
  font-size: 13px;
  font-weight: 700;
  margin: 3px 0;
}

.mini-stage-card .s-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.pipeline-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.job-header-title {
  font-size: 18px;
  font-weight: 700;
}

.job-header-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.job-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-pills {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.stage-pill {
  font-size: 10.5px;
  text-align: center;
  padding: 5px 4px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 600;
}

.stage-pill.done {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.stage-pill.active {
  background: rgba(14, 165, 233, 0.24);
  border-color: var(--accent-bright);
  color: #fff;
}

/* Interactive 3D Showcase Frame */
.showcase-card {
  position: relative;
  height: 540px;
  min-height: 460px;
  background: #050811;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

#three-container {
  width: 100%;
  height: 100%;
}

.viewer-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 10;
}

.viewer-hud-top > * {
  pointer-events: auto;
}

.hud-top-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hud-floor-muted {
  color: var(--text-muted);
  margin-left: 8px;
}

.hud-measure {
  border-color: #facc15;
  color: #fef08a;
}

.hud-select {
  color: #fff;
  cursor: pointer;
}

.hud-glass {
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 11px;
  padding: 8px 13px;
  font-size: 12.5px;
}

.viewer-hud-bottom {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 10;
}

.mode-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s;
}

.mode-btn:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.14);
}

.mode-btn.active {
  background: var(--accent);
  color: #fff;
}

.sweep-strip {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  gap: 5px;
  z-index: 10;
}

.sweep-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.sweep-dot.active {
  background: var(--accent-bright);
  color: #04101d;
  border-color: #fff;
}

/* Metrics, Downloads & Sharing */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
}

.metric-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 13px 15px;
}

.metric-tile .k {
  font-size: 11.5px;
  color: var(--text-muted);
}

.metric-tile .v {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
  color: #f1f5f9;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 11px;
}

.dl-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dl-info h4 {
  font-size: 13px;
  font-weight: 600;
}

.dl-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.warning-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.warning-item {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fde68a;
}

.share-controls-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.share-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #070b14;
  color: #fff;
  font-size: 13px;
}

.share-select {
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #070b14;
  color: #fff;
  font-size: 13px;
}

.share-checkbox-label {
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.share-links-list {
  margin-top: 10px;
}

.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 8px;
  font-size: 12.5px;
}

/* Modal Reference Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.78);
  backdrop-filter: blur(8px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 1080px;
  max-height: 88vh;
  background: var(--bg-panel);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 700;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Guest Viewer */
.guest-shell {
  width: 100vw;
  height: 100vh;
  position: relative;
  background: #050811;
}

.guest-canvas {
  width: 100%;
  height: 100%;
}

/* Keyboard Accessibility Focus Rings */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* ============================================================
   3. Responsive Tablet & Mobile Layouts
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-nodes, .mini-stage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pipeline-detail-card {
    grid-template-columns: 1fr;
  }
  .wizard-controls {
    grid-template-columns: 1fr;
  }
  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .studio-main {
    grid-template-columns: 300px 1fr;
  }
  .stage-pills {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .landing-links {
    display: none;
  }
  .landing-main {
    padding: 22px 16px 40px;
    gap: 28px;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .studio-section {
    padding: 18px 16px;
  }
  .security-grid {
    grid-template-columns: 1fr;
  }
  .studio-shell {
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: 100vh;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }
  .topbar-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .studio-main {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
  .workspace {
    padding: 14px;
  }
  .showcase-card {
    height: 400px;
    min-height: 340px;
  }
  .viewer-hud-bottom {
    width: calc(100% - 24px);
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 16px;
    bottom: 10px;
  }
  .sweep-strip {
    bottom: 64px;
  }
  .stage-pills {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lang-mount { position: relative; display: inline-flex; align-items: center; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 36px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg-panel, #111827);
  color: #f8fafc; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.lang-flag-svg { border-radius: 2px; flex-shrink: 0; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 120; min-width: 170px;
  padding: 6px; border-radius: 10px; border: 1px solid var(--border); background: #0f172a;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55); display: grid; gap: 3px;
}
.lang-option {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px; border: 0;
  border-radius: 6px; background: transparent; color: #cbd5e1; font-size: 13px; text-align: left; cursor: pointer;
}
.lang-option:hover, .lang-option.selected { background: rgba(56, 189, 248, 0.16); color: #f8fafc; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contact-full { grid-column: 1 / -1; }
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .contact-grid { grid-template-columns: 1fr; }
}
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
