/* ════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════════════════════════════════════ */
:root {
  /* Color */
  --bg:           #0a0a0a;
  --surface:      #161616;
  --surface-2:    #1f1f1f;
  --border:       #262626;
  --border-2:     #383838;
  --text:         #fafafa;
  --text-2:       #a3a3a3;
  --muted:        #6b6b6b;
  --accent:       #c4ff3d;
  --accent-hover: #d6ff5e;
  --accent-bg:    rgba(196, 255, 61, 0.08);
  --accent-fg:    #0a0a0a;
  --error:        #f87171;
  --error-bg:     rgba(248, 113, 113, 0.10);
  --warning:      #f59e0b;
  --warning-bg:   rgba(245, 158, 11, 0.10);

  /* Spacing — 4 values */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 16px;
  --gap-lg: 24px;

  /* Type — 5 sizes */
  --t-xs:   0.75rem;    /* 12px */
  --t-sm:   0.8125rem;  /* 13px */
  --t-base: 0.875rem;   /* 14px */
  --t-lg:   1rem;       /* 16px */
  --t-xl:   1.75rem;    /* 28px */

  /* Radius — 3 values */
  --r-sm:   6px;
  --r-md:   12px;
  --r-pill: 999px;

  /* Layout */
  --header-h: 56px;
  --tabs-h:   48px;
  --sidebar-w: 340px;
}

/* ════════════════════════════════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: var(--t-base);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

.hidden { display: none !important; }

/* ════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ════════════════════════════════════════════════════════════════════ */
.heading {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 600;
}

h1.heading { font-size: var(--t-xl); }
h2.heading { font-size: var(--t-lg); }

.label {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.body { color: var(--text-2); font-size: var(--t-sm); }
.hint { color: var(--muted); font-size: var(--t-xs); line-height: 1.5; }

code {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent);
}

pre {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: var(--t-xs);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--gap-sm);
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

kbd {
  font-family: "JetBrains Mono", monospace;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: var(--t-xs);
}

ol, ul { padding-left: 1.4rem; }
ol li, ul li { margin: 4px 0; color: var(--text-2); font-size: var(--t-sm); }

/* ════════════════════════════════════════════════════════════════════
   HEADER + TABS
   ════════════════════════════════════════════════════════════════════ */
.header {
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap-lg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  font-family: "Space Grotesk", ui-sans-serif, sans-serif;
  font-weight: 600;
  font-size: var(--t-lg);
  letter-spacing: -0.01em;
}
.brand-ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
  fill: var(--accent);
  stroke: var(--accent);
}
body.mkt-active .brand-ico { color: var(--mkt-pink); fill: var(--mkt-pink); stroke: var(--mkt-pink); }
.brand-tag {
  font-size: var(--t-xs);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}

.header-status {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: var(--t-xs);
}
#status-text {
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  height: var(--tabs-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--gap-lg);
  display: flex;
  gap: 0;
  align-items: stretch;
  position: sticky;
  top: var(--header-h);
  z-index: 49;
  overflow-x: auto;
}
.tab {
  background: none;
  border: none;
  padding: 0 var(--gap-md);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* ════════════════════════════════════════════════════════════════════
   APP LAYOUT
   ════════════════════════════════════════════════════════════════════ */
.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--gap-md) var(--gap-lg) var(--gap-lg);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Generate: sidebar + main */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--gap-md);
  align-items: start;
}
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
}

/* Other tabs: single column, narrow */
.layout-narrow {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

/* ════════════════════════════════════════════════════════════════════
   SIDEBAR (Generate inputs)
   ════════════════════════════════════════════════════════════════════ */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  position: sticky;
  top: calc(var(--header-h) + var(--tabs-h) + var(--gap-md));
  max-height: calc(100vh - var(--header-h) - var(--tabs-h) - var(--gap-lg));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: var(--gap-md) var(--gap-md) var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}
.sidebar-footer {
  padding: var(--gap-sm) var(--gap-md) var(--gap-md);
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

/* Field groups inside sidebar */
.field { display: flex; flex-direction: column; gap: var(--gap-xs); min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-sm); }
.field-row > * { min-width: 0; }   /* allow shrink instead of overflow */

/* ════════════════════════════════════════════════════════════════════
   MAIN AREA
   ════════════════════════════════════════════════════════════════════ */
.main {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

/* ════════════════════════════════════════════════════════════════════
   CARD (universal box)
   ════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--gap-md);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-sm);
}
.card-head .label { margin: 0; }

.card-section { margin-top: var(--gap-md); }
.card-section:first-child { margin-top: 0; }

.card h2.heading + p { margin-top: 6px; color: var(--text-2); font-size: var(--t-sm); }
.card h3.heading { font-size: var(--t-base); font-weight: 600; margin-top: var(--gap-md); margin-bottom: 6px; color: var(--text); }
.card h3.heading:first-child { margin-top: 0; }

/* ════════════════════════════════════════════════════════════════════
   FORM CONTROLS
   ════════════════════════════════════════════════════════════════════ */
input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: var(--t-base);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); }

/* Range slider */
input[type="range"] { width: 100%; accent-color: var(--accent); }
.slider {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}
.slider-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: var(--t-sm);
  background: var(--accent-bg);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  min-width: 32px;
  text-align: center;
}

/* Checkbox */
.check {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 9px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: var(--t-base);
  cursor: pointer;
  user-select: none;
}
.check input { width: 14px; height: 14px; accent-color: var(--accent); margin: 0; }

/* Segmented control */
.seg {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
  width: 100%;
  overflow: hidden;
}
.seg-btn {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 7px 6px;
  font-size: var(--t-sm);
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface-2); color: var(--text); }
.seg-btn.disabled { opacity: 0.3; pointer-events: none; }

/* ════════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════════ */
.btn {
  padding: 9px 14px;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  width: 100%;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }

.btn-tiny {
  padding: 3px 10px;
  font-size: var(--t-xs);
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-tiny:hover { color: var(--text); border-color: var(--border-2); }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Generate — special */
.btn-generate {
  width: 100%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  font-size: var(--t-base);
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-generate:hover:not(:disabled) { background: var(--accent-hover); }
.btn-generate:active:not(:disabled) { transform: scale(0.98); }
.btn-generate:disabled { opacity: 0.4; cursor: not-allowed; }

/* Action row (buttons side-by-side) */
.actions { display: flex; gap: var(--gap-xs); }
.actions > * { flex: 1; }

/* ════════════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge.loading { background: var(--surface-2); color: var(--muted); }
.badge.ok      { background: var(--accent-bg); color: var(--accent); }
.badge.error   { background: var(--error-bg); color: var(--error); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }

/* ════════════════════════════════════════════════════════════════════
   DROPZONE & PREVIEWS
   ════════════════════════════════════════════════════════════════════ */
.dropzone {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-sm);
  padding: var(--gap-md);
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-size: var(--t-sm);
  background: var(--bg);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--text);
}

.preview {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  margin-top: var(--gap-xs);
  background: #000;
}
audio.preview { max-height: none; height: 36px; padding: 0 8px; }

/* I2V grid — 2 columns */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-xs); }

/* RefGen grid — 3×3 */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ref-slot {
  aspect-ratio: 1;
  position: relative;
  background: var(--bg);
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ref-slot:hover { border-color: var(--accent); }
.ref-slot.has-image { border-style: solid; border-color: var(--border-2); }
.ref-slot.ref-warning {
  border-color: var(--error);
  border-style: solid;
  animation: ref-warn-pulse 1.5s ease-in-out infinite;
}
.ref-slot.ref-warning::after {
  content: "referenced in prompt";
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  font-size: 9px;
  color: var(--error);
  background: rgba(0,0,0,0.85);
  padding: 2px 4px;
  border-radius: 3px;
  text-align: center;
  z-index: 3;
}
@keyframes ref-warn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0); }
}
.ref-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ref-slot .label {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 2;
}
.ref-slot .placeholder {
  font-size: var(--t-lg);
  color: var(--muted);
  opacity: 0.4;
}
.ref-slot .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--error);
  color: #fff;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ════════════════════════════════════════════════════════════════════
   RESULT CARD STATES
   ════════════════════════════════════════════════════════════════════ */
.result-empty {
  padding: var(--gap-lg) var(--gap-md);
  text-align: center;
}
.result-empty .heading {
  margin-bottom: var(--gap-xs);
  color: var(--text);
  background: linear-gradient(180deg, var(--text) 0%, var(--text-2) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.result-empty p {
  color: var(--text-2);
  font-size: var(--t-sm);
  max-width: 48ch;
  margin: 0 auto;
}

.task-meta {
  display: flex;
  gap: var(--gap-md);
  flex-wrap: wrap;
  font-size: var(--t-xs);
  color: var(--muted);
  margin-bottom: var(--gap-sm);
}

.progress-bar {
  background: var(--border);
  border-radius: var(--r-pill);
  height: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
#progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: var(--r-pill);
}
#progress-label { font-size: var(--t-sm); color: var(--text-2); }

#result-video {
  width: 100%;
  border-radius: var(--r-sm);
  background: #000;
  margin-top: var(--gap-sm);
  display: block;
}

.result-actions {
  display: flex;
  gap: var(--gap-xs);
  margin-top: var(--gap-sm);
}
.result-actions a { flex: 1; }

/* ════════════════════════════════════════════════════════════════════
   LOG
   ════════════════════════════════════════════════════════════════════ */
#log {
  max-height: 160px;
  margin: 0;
  font-size: var(--t-xs);
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════════════════
   TASK HISTORY
   ════════════════════════════════════════════════════════════════════ */
.task-history { display: flex; flex-direction: column; gap: var(--gap-xs); }
.task-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px var(--gap-sm);
  transition: border-color 0.15s;
}
.task-item:hover { border-color: var(--border-2); }
.task-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-xs);
  margin-bottom: 2px;
}
.task-item-head code {
  font-size: 11px;
  background: transparent;
  padding: 0;
}
.task-item-head time {
  font-size: var(--t-xs);
  color: var(--muted);
}
.task-item-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 2px;
}
.task-item-prompt {
  font-size: var(--t-sm);
  color: var(--text-2);
  margin-bottom: 6px;
  font-style: italic;
}
.task-item .btn-link {
  font-size: var(--t-xs);
  color: var(--accent);
  font-weight: 500;
}
.task-item .btn-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════
   MODELS LIST
   ════════════════════════════════════════════════════════════════════ */
.model-stats {
  display: flex;
  gap: var(--gap-md);
  flex-wrap: wrap;
  font-size: var(--t-sm);
  color: var(--text-2);
  margin-bottom: var(--gap-sm);
}
.model-stats strong { color: var(--text); font-size: var(--t-lg); font-weight: 700; }
.model-stats strong.stat-ok { color: var(--accent); }
.model-stats strong.stat-err { color: var(--error); }

.model-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}
.model-list li {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--t-xs);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin: 0;
  color: var(--text-2);
}
.model-list li.exhausted {
  opacity: 0.5;
  text-decoration: line-through;
  border-color: rgba(248,113,113,0.25);
}

/* ════════════════════════════════════════════════════════════════════
   ALERT
   ════════════════════════════════════════════════════════════════════ */
.alert {
  padding: 10px var(--gap-sm);
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  border: 1px solid;
}
.alert-warning {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: rgba(245, 158, 11, 0.25);
}

.mt-xs { margin-top: var(--gap-xs); }
.mt-sm { margin-top: var(--gap-sm); }

/* ════════════════════════════════════════════════════════════════════
   MARKETING STUDIO
   ════════════════════════════════════════════════════════════════════ */
:root {
  --mkt-bg: #1a0410;
  --mkt-bg-2: #2a0820;
  --mkt-pink: #ff2a87;
  --mkt-pink-hover: #ff45a0;
  --mkt-pink-bg: rgba(255, 42, 135, 0.12);
  --mkt-card-bg: #1f0a18;
  --mkt-card-border: #3a1530;
  --mkt-card-border-active: #ff2a87;
}

/* Marketing pane — extends to viewport edges via body class */
.mkt-pane {
  margin: calc(-1 * var(--gap-lg));
  padding: var(--gap-lg);
  min-height: calc(100vh - var(--header-h) - var(--tabs-h));
  flex-direction: column;
  gap: var(--gap-lg);
}
.tab-pane.active.mkt-pane {
  display: flex;
}

/* When Marketing tab active, body has gradient — kanan/kiri TIDAK abu lagi */
body.mkt-active {
  background:
    radial-gradient(ellipse 90% 60% at 50% 30%, var(--mkt-bg-2) 0%, transparent 70%),
    linear-gradient(180deg, #1a0410 0%, #0a0204 100%);
}
body.mkt-active .topbar,
body.mkt-active .tabs {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.06);
}
body.mkt-active .app {
  background: transparent;
}

/* Hero stage (centered title + result area) */
.mkt-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-lg);
  text-align: center;
  padding: var(--gap-lg) 0;
}

.mkt-hero {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 4px 32px rgba(255, 42, 135, 0.3);
  background: linear-gradient(180deg, #fff 0%, #ffd6e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Space Grotesk", ui-sans-serif, sans-serif;
}

/* Hook prompt banner */
.mkt-hook-banner {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  background: rgba(196, 255, 61, 0.08);
  border: 1px solid rgba(196, 255, 61, 0.3);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  max-width: 800px;
  font-size: var(--t-sm);
  color: var(--text);
}
.mkt-hook-tag {
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.mkt-x {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.mkt-x:hover { color: var(--text); }

/* Result area */
.mkt-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--gap-md);
  width: 100%;
  max-width: 720px;
}
.mkt-result-progress { margin-bottom: var(--gap-sm); }
#mkt-progress-fill {
  height: 4px;
  background: var(--mkt-pink);
  border-radius: var(--r-pill);
  width: 0%;
  transition: width 0.4s ease;
}
#mkt-video {
  width: 100%;
  border-radius: var(--r-sm);
  background: #000;
  margin-top: var(--gap-sm);
}
.mkt-result-actions {
  display: flex;
  gap: var(--gap-xs);
  margin-top: var(--gap-sm);
}
.mkt-result-actions a { flex: 1; }

/* ─── Bottom command bar ─────────────────────────────────── */
.mkt-bar {
  display: flex;
  gap: var(--gap-sm);
  align-items: flex-end;   /* buttons fixed-size, anchor at bottom */
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--mkt-card-border);
  border-radius: var(--r-md);
  padding: var(--gap-sm);
  position: sticky;
  bottom: var(--gap-md);
  margin-top: auto;
}

.mkt-bar-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
  min-width: 0;
}
.mkt-bar-input-row {
  display: flex;
  gap: var(--gap-xs);
  align-items: flex-start;
  position: relative; /* for tag dropdown anchor */
}
#mkt-prompt {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: var(--t-base);
  resize: none;
  outline: none;
  padding: 8px;
  min-height: 36px;     /* 1 line */
  max-height: 124px;    /* 5 lines */
  line-height: 1.5;
  font-family: inherit;
  overflow-y: auto;
}
#mkt-prompt::placeholder { color: var(--muted); }

/* Tag autocomplete dropdown */
.mkt-tag-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--mkt-card-border);
  border-radius: var(--r-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
}
.mkt-tag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 10px;
  color: var(--text);
  font-size: var(--t-sm);
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
  font-family: inherit;
}
.mkt-tag-item-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.mkt-tag-item-info { flex: 1; min-width: 0; }
.mkt-tag-item-tag {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: var(--accent);
}
/* Override pink accent only inside Marketing tab context */
body.mkt-active .mkt-tag-item-tag { color: var(--mkt-pink); }
body.mkt-active .mkt-tag-item:hover,
body.mkt-active .mkt-tag-item.active {
  background: var(--mkt-pink-bg);
  color: var(--mkt-pink);
}
.mkt-tag-item:hover, .mkt-tag-item.active {
  background: var(--accent-bg);
  color: var(--accent);
}

/* Generic tag input wrap — used by Generate Video prompt */
.tag-input-wrap {
  position: relative;
  width: 100%;
}
.mkt-tag-item-name {
  font-size: var(--t-xs);
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mkt-tag-item-empty {
  padding: 12px;
  color: var(--muted);
  font-size: var(--t-sm);
  text-align: center;
}

.mkt-pills { display: flex; gap: var(--gap-xs); flex-wrap: wrap; }
.mkt-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2);
  font-size: var(--t-sm);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.mkt-pill:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.mkt-pill.selected {
  background: var(--accent-bg);
  border-color: rgba(196, 255, 61, 0.4);
  color: var(--accent);
}
.mkt-pill-svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.85; }
.mkt-pill-arrow { width: 10px; height: 10px; opacity: 0.4; flex-shrink: 0; }
.mkt-pill.selected .mkt-pill-svg,
.mkt-pill.selected .mkt-pill-arrow { opacity: 1; }

/* Generic small icon */
.ico-sm { width: 14px; height: 14px; vertical-align: -2px; flex-shrink: 0; }
.ico-success { color: var(--accent); }
.ico-error   { color: var(--error); }

.btn-svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Heading with icon */
.heading-ico { display: inline-flex; align-items: center; gap: 6px; }

/* Label with icon (Credential tab) */
.field .label svg { display: inline-block; vertical-align: -2px; }

/* Slot (Product / Avatar) — fixed size, doesn't stretch with prompt */
.mkt-slot {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: var(--mkt-card-bg);
  border: 1.5px dashed var(--mkt-card-border);
  border-radius: var(--r-sm);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
  font-family: inherit;
}
.mkt-slot:hover { border-color: var(--mkt-pink); color: var(--text); }
.mkt-slot.filled { border-style: solid; border-color: var(--mkt-card-border); }
.mkt-slot-plus-svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}
.mkt-slot.filled .mkt-slot-plus-svg { display: none; }
.mkt-slot-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.mkt-slot.filled .mkt-slot-label { display: none; }
.mkt-slot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Settings button (gear/sliders) — fixed size */
.mkt-settings-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mkt-settings-btn svg { width: 18px; height: 18px; }
.mkt-settings-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.mkt-bar-settings { display: flex; align-items: stretch; }

/* Generate button — fixed size */
.mkt-generate {
  background: linear-gradient(135deg, var(--mkt-pink) 0%, #d6206d 100%);
  color: #fff;
  font-weight: 700;
  font-size: var(--t-base);
  letter-spacing: 0.04em;
  padding: 0 var(--gap-md);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 130px;
  height: 44px;
  flex-shrink: 0;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(255, 42, 135, 0.3);
  transition: transform 0.1s, box-shadow 0.15s;
}
.mkt-generate-svg { width: 16px; height: 16px; flex-shrink: 0; }
.mkt-generate:hover:not(:disabled) {
  box-shadow: 0 4px 28px rgba(255, 42, 135, 0.5);
  transform: translateY(-1px);
}
.mkt-generate:active:not(:disabled) { transform: scale(0.98); }
.mkt-generate:disabled { opacity: 0.4; cursor: not-allowed; }

/* Settings panel popover */
.mkt-settings-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--gap-md);
  position: fixed;
  bottom: 100px;
  right: var(--gap-lg);
  z-index: 30;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.mkt-settings-grid { display: flex; flex-direction: column; gap: var(--gap-sm); }

/* ─── Modal ──────────────────────────────────────────────── */
body.mkt-modal-open { overflow: hidden; }
.mkt-modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mkt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}
.mkt-modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  width: min(900px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.mkt-modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  font-family: inherit;
}
.mkt-modal-x:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.mkt-modal-head {
  padding: var(--gap-lg) var(--gap-lg) var(--gap-sm);
  flex-shrink: 0;
}
.mkt-modal-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  font-family: "Space Grotesk", ui-sans-serif;
}
.mkt-modal-head .body {
  color: var(--muted);
  font-size: var(--t-sm);
  max-width: 60ch;
}

.mkt-modal-controls {
  padding: 0 var(--gap-lg) var(--gap-sm);
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.mkt-tabs { display: flex; gap: var(--gap-xs); }
.mkt-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: var(--t-sm);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.mkt-tab:hover { color: var(--text); }
.mkt-tab.active {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.mkt-search {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  outline: none;
  margin-left: auto;
  max-width: 280px;
}

.mkt-modal-body {
  padding: var(--gap-md) var(--gap-lg) var(--gap-lg);
  overflow-y: auto;
  flex: 1;
}

/* ─── Card grid ──────────────────────────────────────────── */
.mkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--gap-sm);
}
.mkt-grid-assets { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.mkt-card {
  background: var(--mkt-card-bg);
  border: 2px solid var(--mkt-card-border);
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
  padding: 0;
  position: relative;
}
.mkt-card:hover {
  border-color: var(--mkt-pink);
  transform: translateY(-2px);
}
.mkt-card.selected {
  border-color: var(--mkt-pink);
  box-shadow: 0 0 0 1px var(--mkt-pink), 0 4px 20px rgba(255, 42, 135, 0.3);
}
.mkt-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #000;
  display: block;
}
.mkt-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--mkt-bg-2), var(--mkt-card-bg));
}
.mkt-card-emoji { font-size: 48px; opacity: 0.6; }
.mkt-card-info {
  padding: 8px 10px 10px;
}
.mkt-card-title {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.mkt-card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Asset card delete button */
.mkt-card-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s;
}
.mkt-card-asset:hover .mkt-card-delete { opacity: 1; }
.mkt-card-delete:hover { background: var(--error); }

/* Asset uploader (in product/avatar modal) */
.mkt-asset-uploader {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
  margin-bottom: var(--gap-md);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--border);
}
.mkt-asset-name-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  font-family: inherit;
  outline: none;
}
.mkt-asset-name-input:focus { border-color: var(--mkt-pink); }

/* ─── Marketing log + history cards (mirror Generate tab) ───── */
.mkt-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-sm);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .mkt-cards-row { grid-template-columns: 1fr; }
}
.mkt-side-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--mkt-card-border);
  backdrop-filter: blur(6px);
}
.mkt-side-card #mkt-log {
  font-size: var(--t-xs);
  color: var(--muted);
  max-height: 140px;
  background: rgba(0,0,0,0.3);
  margin: 0;
  border-color: var(--mkt-card-border);
}

/* Marketing result card — adjust spacing */
#mkt-result {
  background: rgba(0, 0, 0, 0.45);
  border-color: var(--mkt-card-border);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  backdrop-filter: blur(6px);
}
#mkt-result .mkt-result-progress { margin-top: var(--gap-sm); }
#mkt-result .progress-bar { background: var(--mkt-card-border); }
#mkt-progress-fill { background: var(--mkt-pink); }

#mkt-task-info code { color: var(--mkt-pink); }
#mkt-result-actions { display: flex; gap: var(--gap-xs); margin-top: var(--gap-sm); }
#mkt-result-actions a { flex: 1; }

/* ════════════════════════════ GENERATE IMAGE TAB ═══════════════════════════ */
:root {
  --img-cyan:    #3dd6ff;
  --img-cyan-bg: rgba(61, 214, 255, 0.10);
}

/* Cyan accent override for image tab — preserves layout but recolors highlights */
body.img-active a              { color: var(--img-cyan); }
body.img-active .tab.active    { border-bottom-color: var(--img-cyan); color: var(--text); }
body.img-active #img-result-active code        { color: var(--img-cyan); }
body.img-active #btn-img-generate              { background: var(--img-cyan); color: var(--bg); }
body.img-active #btn-img-generate:hover:not(:disabled) { background: #6ee0ff; }
body.img-active #img-progress-fill             { background: var(--img-cyan); }
body.img-active input:focus,
body.img-active textarea:focus                 { border-color: var(--img-cyan); }
body.img-active .seg-btn.active                { color: var(--text); }
body.img-active input[type="range"]            { accent-color: var(--img-cyan); }
body.img-active .ref-slot:hover                { border-color: var(--img-cyan); }
body.img-active .ref-slot.filled               { border-color: var(--img-cyan); border-style: solid; }
body.img-active .mkt-tag-item-tag              { color: var(--img-cyan); }
body.img-active .mkt-tag-item.active,
body.img-active .mkt-tag-item:hover            { background: var(--img-cyan-bg); }

/* Seg wrap — 8 ratio buttons jadi multi-row */
.seg.seg-wrap { flex-wrap: wrap; }
.seg.seg-wrap .seg-btn { flex: 0 0 calc(25% - 4px); }

/* Disabled seg button — e.g. 4K untuk Seedream 5.0 Lite */
.seg-btn:disabled,
.seg-btn-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Reference image grid (14 slots) */
.img-ref-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 6px;
}
@media (max-width: 600px) {
  .img-ref-grid { grid-template-columns: repeat(5, 1fr); }
}
.img-ref-grid .ref-slot {
  font-size: var(--t-xs);
}
.ref-slot-num {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  z-index: 2;
  pointer-events: none;
}
.ref-slot.filled .ref-slot-num {
  color: var(--bg);
  background: var(--img-cyan);
  border-radius: 3px;
  padding: 1px 4px;
}
.ref-slot-plus {
  font-size: 18px;
  color: var(--text-2);
  font-weight: 300;
}
.ref-slot.filled .ref-slot-plus { display: none; }
.ref-slot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ref-slot-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  z-index: 3;
}
.ref-slot-x:hover { background: var(--error); }
.ref-slot.dragover { border-color: var(--img-cyan); background: var(--img-cyan-bg); }

/* Result image grid */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-xs);
  margin-top: var(--gap-sm);
}
.img-grid-cell {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg);
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: zoom-in;
}
.img-grid-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.img-grid-cell:hover img { transform: scale(1.02); }
.img-grid-dl {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s;
}
.img-grid-cell:hover .img-grid-dl { opacity: 1; }
.img-grid-dl:hover { background: var(--img-cyan); color: var(--bg); }

/* Lightbox */
.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
}
.img-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Small inline spinner */
.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════ AUTH PAGES ═══════════════════════════ */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 30%, rgba(196, 255, 61, 0.06), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(61, 214, 255, 0.06), transparent 60%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: var(--gap-md);
}
.auth-wrap { width: 100%; max-width: 440px; }
.auth-card {
  background: var(--surface-1);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 32px 28px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--t-lg);
  font-weight: 600;
  margin-bottom: 22px;
  color: var(--accent);
}
.auth-brand .brand-ico { width: 22px; height: 22px; color: var(--accent); fill: none; stroke: var(--accent); }
.auth-title { font-size: 24px; margin-bottom: 4px; }
.auth-sub { color: var(--text-2); margin-bottom: 20px; font-size: var(--t-sm); }
.auth-form { display: flex; flex-direction: column; gap: var(--gap-sm); }
.auth-btn { justify-content: center; margin-top: 8px; width: 100%; }
.auth-alt {
  text-align: center;
  color: var(--text-2);
  font-size: var(--t-sm);
  margin-top: 18px;
}
.auth-alt a { color: var(--accent); font-weight: 500; }
.auth-flash { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.alert-info, .alert-ok { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  border: 1px solid transparent;
}

/* Billing page — 3-card pricing grid */
.billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-sm);
  margin-top: var(--gap-md);
}
.billing-card {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.billing-card-highlight {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.billing-card .heading { font-size: var(--t-lg); margin: 0; }
.billing-price {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 4px 0 0;
  font-family: 'Space Grotesk', sans-serif;
}
.billing-features {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  font-size: var(--t-sm);
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.billing-features li::before {
  content: "✓";
  color: var(--accent);
  margin-right: 6px;
  font-weight: 600;
}
.billing-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.billing-badge-gold {
  background: linear-gradient(135deg, #ffd166, #f3a73a);
  color: #1a1a1a;
}
.auth-card .billing-grid { margin-bottom: 16px; }
.auth-card { max-width: 780px; }
@media (min-width: 600px) {
  .auth-wrap:has(.billing-grid) { max-width: 880px; }
}

/* Header user widget — Day 1 (akan dipakai di index.html) */
.user-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 10px;
  background: var(--surface-2);
  border-radius: 999px;
  font-size: var(--t-xs);
  color: var(--text-2);
}
.user-widget code { background: transparent; color: var(--text); font-size: 11px; }
.user-widget .btn-tiny { margin: 0; }
.user-widget form { display: inline; margin: 0; }
.user-widget form button { background: none; border: none; cursor: pointer; color: var(--text-2); font-size: var(--t-xs); padding: 4px 8px; border-radius: 999px; }
.user-widget form button:hover { color: var(--error); background: var(--error-bg); }
