/* GEF Studio Console — cloud v1 stylesheet
   Palette aligned with REVIEW_CONSOLE_v0.2.html (GEF teal + deep blue)
   Inter font. Mobile-first, responsive at 600 / 900 / 1200 px breakpoints. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

:root {
  --gef-primary: #2A7B84;
  --gef-deep: #0B4168;
  --gef-accent: #3FC1B0;
  --gef-ice: #F0F9F8;
  --text-dark: #1A2B3C;
  --text-body: #374151;
  --text-muted: #6B7280;
  --bg-cream: #F7FCFF;
  --bg-soft: #F0F9F8;
  --green: #10B981;
  --green-soft: #D1FAE5;
  --yellow: #F59E0B;
  --yellow-soft: #FEF3C7;
  --red: #EF4444;
  --red-soft: #FEE2E2;
  --hairline: rgba(15,30,35,0.08);
  --hairline-strong: rgba(15,30,35,0.16);
  --shadow-card: 0 4px 16px rgba(11,65,104,0.08);
  --shadow-hover: 0 14px 40px rgba(11,65,104,0.18);
  --radius-card: 8px;
  --radius-btn: 10px;
  --eyebrow-ls: 0.24em;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* HEADER */
.site-header {
  background: white;
  border-bottom: 1px solid var(--hairline);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gef-primary); flex-shrink: 0; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; color: var(--text-dark); }
.env-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gef-ice);
  color: var(--gef-primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.header-meta { font-size: 12px; color: var(--text-muted); }
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--gef-primary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
}
.back-link:hover { background: var(--gef-ice); }

/* HERO */
.hero { padding: 36px 0 18px; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--eyebrow-ls);
  text-transform: uppercase;
  color: var(--gef-primary);
  margin-bottom: 6px;
}
.hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.hero .lede { color: var(--text-muted); max-width: 640px; font-size: 14px; }

/* BUNDLE CARDS (index page) */
.bundles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 12px 0 60px;
}
@media (min-width: 720px) { .bundles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .bundles { grid-template-columns: repeat(3, 1fr); } }

.bundle-card {
  background: white;
  border-radius: var(--radius-card);
  padding: 20px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}
.bundle-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.bundle-card .sku-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gef-primary);
  text-transform: uppercase;
}
.bundle-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.bundle-card .desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.bundle-card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--text-muted);
}
.bundle-card .status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-REVIEW { background: var(--yellow-soft); color: #92400E; }
.status-APPROVED { background: var(--green-soft); color: #047857; }
.status-REBUILD { background: var(--red-soft); color: #991B1B; }
.status-PUBLISHED { background: var(--gef-ice); color: var(--gef-primary); }

/* LOOP CARDS (review page) */
.loop-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 24px 0 8px;
}
@media (min-width: 720px) { .loop-cards { grid-template-columns: repeat(3, 1fr); } }
.loop-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: white;
}
.loop-card .ico { font-size: 22px; margin-bottom: 4px; font-weight: 700; }
.loop-card .label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: var(--eyebrow-ls);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.loop-card .desc { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.loop-approve { background: linear-gradient(135deg, var(--green-soft) 0%, #ECFDF5 100%); border-color: rgba(16,185,129,0.25); }
.loop-approve .label, .loop-approve .ico { color: #047857; }
.loop-modify { background: linear-gradient(135deg, var(--yellow-soft) 0%, #FFFBEB 100%); border-color: rgba(245,158,11,0.28); }
.loop-modify .label, .loop-modify .ico { color: #92400E; }
.loop-reject { background: linear-gradient(135deg, var(--red-soft) 0%, #FEF2F2 100%); border-color: rgba(239,68,68,0.25); }
.loop-reject .label, .loop-reject .ico { color: #991B1B; }

/* OPS PIPELINE */
.ops-strip,
.rebuild-queue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid rgba(42,123,132,0.22);
  border-radius: 8px;
  background: white;
}
.rebuild-queue[hidden] { display: none; }
.ops-strip strong,
.rebuild-queue strong { display: block; font-size: 15px; letter-spacing: 0; }
.ops-strip p,
.rebuild-queue p { color: var(--text-muted); font-size: 12px; max-width: 560px; }
.ops-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gef-primary);
  margin-bottom: 2px;
}

/* STATS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0 12px;
}
@media (min-width: 720px) { .stats-row { grid-template-columns: repeat(6, 1fr); } }
.stat-card {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
}
.stat-card .num { font-size: 24px; font-weight: 800; color: var(--gef-primary); line-height: 1.1; }
.stat-card .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}
.stat-approve .num { color: var(--green); }
.stat-modify .num { color: var(--yellow); }
.stat-reject .num { color: var(--red); }
.stat-rebuild .num { color: var(--gef-primary); }

/* ACTIONS BAR */
.actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  min-height: 44px;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gef-primary); color: white; }
.btn-primary:hover { background: var(--gef-deep); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--gef-ice); color: var(--gef-primary); border-color: rgba(42,123,132,0.22); }
.btn-secondary:hover { background: var(--bg-soft); color: var(--gef-deep); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--hairline-strong); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text-dark); }
.storage-note { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.production-gate-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(245,158,11,0.28);
  border-radius: 8px;
  background: #FFFBEB;
  color: #92400E;
  font-size: 12px;
}
.production-gate-note strong {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.production-gate-note span { color: inherit; line-height: 1.4; }
.production-gate-note.is-ready {
  border-color: rgba(16,185,129,0.25);
  background: #ECFDF5;
  color: #047857;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 18px;
}
.filter-btn {
  border: 1px solid var(--hairline-strong);
  background: white;
  color: var(--text-muted);
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--gef-primary);
  color: white;
  border-color: var(--gef-primary);
}

/* ASSETS GRID */
.assets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 80px;
}
@media (min-width: 720px) { .assets { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .assets { grid-template-columns: repeat(3, 1fr); } }

.asset-card {
  background: white;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.asset-card[data-approval="approved"] { border-color: rgba(16,185,129,0.45); box-shadow: 0 0 0 2px rgba(16,185,129,0.18), var(--shadow-card); }
.asset-card[data-approval="modify"] { border-color: rgba(245,158,11,0.45); box-shadow: 0 0 0 2px rgba(245,158,11,0.2), var(--shadow-card); }
.asset-card[data-approval="reject"] { border-color: rgba(239,68,68,0.45); box-shadow: 0 0 0 2px rgba(239,68,68,0.18), var(--shadow-card); opacity: 0.85; }
.asset-card[data-approval="regenerating"] { border-color: rgba(42,123,132,0.5); box-shadow: 0 0 0 2px rgba(42,123,132,0.18), var(--shadow-card); }
.asset-card.visual-winner { border-top: 4px solid var(--gef-primary); }
.asset-card.visual-sanitized { border-top: 4px solid var(--yellow); }
.asset-card.visual-pending { border-top: 4px solid rgba(107,114,128,0.55); }

.asset-media { position: relative; background: #F3F4F6; }
.asset-state {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--text-dark);
  border: 1px solid var(--hairline);
  font-size: 10px;
  font-weight: 800;
}

.asset-img {
  background: #F3F4F6 repeating-linear-gradient(45deg, transparent 0 14px, rgba(0,0,0,0.02) 14px 28px);
  aspect-ratio: 1 / 1;
  display: block;
  width: 100%;
  object-fit: contain;
}
.asset-img.wide { aspect-ratio: 3 / 2; }

.asset-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.asset-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.asset-slot { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gef-primary); font-weight: 700; }
.asset-stage { font-size: 10px; color: var(--text-muted); font-weight: 800; letter-spacing: 0.08em; }
.asset-fn { font-size: 13px; color: var(--text-body); line-height: 1.4; }
.asset-dim { font-size: 11px; color: var(--text-muted); }
.asset-readiness { display: flex; flex-wrap: wrap; gap: 6px; }
.asset-visual-status {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-soft);
  color: var(--gef-primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.visual-sanitized .asset-visual-status {
  background: var(--yellow-soft);
  color: #92400E;
  border-color: rgba(245,158,11,0.28);
}
.visual-pending .asset-visual-status {
  background: #F3F4F6;
  color: var(--text-muted);
}
.asset-conversion-status {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: #EEF6FF;
  color: var(--gef-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.asset-conversion-status.conversion-hardening {
  background: var(--yellow-soft);
  color: #92400E;
  border-color: rgba(245,158,11,0.28);
}
.asset-conversion-status.conversion-blocked {
  background: var(--red-soft);
  color: #991B1B;
  border-color: rgba(239,68,68,0.25);
}
.asset-production-note {
  padding: 8px 10px;
  border-left: 3px solid rgba(42,123,132,0.45);
  background: var(--bg-soft);
  color: var(--text-body);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.review-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 8px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: white;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
}
.rc-btn:hover { background: var(--bg-soft); }
.rc-btn[aria-pressed="true"][data-action="approved"] { background: var(--green); color: white; border-color: var(--green); }
.rc-btn[aria-pressed="true"][data-action="modify"] { background: var(--yellow); color: white; border-color: var(--yellow); }
.rc-btn[aria-pressed="true"][data-action="reject"] { background: var(--red); color: white; border-color: var(--red); }

.comment-area {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-body);
  resize: vertical;
  background: white;
}
.comment-area:focus { outline: 2px solid var(--gef-accent); outline-offset: 1px; }
.comment-area::placeholder { color: var(--text-muted); }

.asset-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-btn {
  flex: 1 1 120px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-soft);
  color: var(--gef-primary);
  border-radius: 8px;
  min-height: 36px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.mini-btn:hover { background: var(--gef-ice); }
.mini-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rebuild-chip {
  padding: 8px 10px;
  background: var(--gef-ice);
  color: var(--gef-primary);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* STATES */
.loading { padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.empty-state, .error-state {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 40px 24px;
  text-align: center;
  margin: 24px 0;
}
.empty-state h2, .error-state h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p, .error-state p { color: var(--text-muted); font-size: 14px; }
.error-state h2 { color: var(--red); }

/* FOOTER */
.site-footer {
  margin-top: auto;
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
  background: white;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* MODALS / TOAST */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10,20,28,0.44);
}
.modal[hidden] { display: none; }
.modal-panel {
  position: relative;
  width: min(560px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow-hover);
}
.modal-wide { width: min(1120px, 100%); }
.modal-panel h2 { font-size: 20px; margin: 4px 0 8px; }
.modal-panel p { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: white;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.compare-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 860px) { .compare-grid { grid-template-columns: repeat(2, 1fr); } }
.compare-grid figure {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}
.compare-grid img { width: 100%; display: block; object-fit: contain; aspect-ratio: 3 / 2; }
.compare-grid figcaption { padding: 10px 12px; font-size: 12px; color: var(--text-muted); font-weight: 800; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--gef-deep);
  color: white;
  box-shadow: var(--shadow-hover);
  font-size: 13px;
  font-weight: 700;
}
.toast[hidden] { display: none; }

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
:focus-visible { outline: 2px solid var(--gef-accent); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 720px) {
  .ops-strip,
  .rebuild-queue { align-items: flex-start; flex-direction: column; }
  .production-gate-note { align-items: flex-start; flex-direction: column; }
  .storage-note { width: 100%; margin-left: 0; }
}
