:root {
  --bg: #051f20;
  --surface: #0b2b26;
  --surface-2: #163832;
  --border: rgba(142, 182, 155, 0.20);
  --border-strong: rgba(142, 182, 155, 0.35);
  --primary: #8eb69b;
  --primary-rgb: 142, 182, 155;
  --secondary: #daf1de;
  --accent: #235347;
  --success: #8eb69b;
  --danger: #f87171;
  --text: #daf1de;
  --text-muted: #8eb69b;
  --text-subtle: #8eb69b;
  --radius: 14px;
  --font-heading: 'Fraunces', Georgia, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.editor-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.16;
}

.ambient-glow-1 {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, #163832, transparent 70%);
}

.ambient-glow-2 {
  width: 440px;
  height: 440px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle, #235347, transparent 70%);
}

/* Auth & Loading Screens */
.center-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(11, 43, 38, 0.88);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-badge {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
  border: 1px solid rgba(var(--primary-rgb), 0.30);
}

.auth-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.auth-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(var(--primary-rgb), 0.22);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.muted-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Workspace Layout */
.workspace-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: rgba(5, 31, 32, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.25), rgba(251, 191, 36, 0.18));
  border: 1px solid rgba(var(--primary-rgb), 0.36);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.meta-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.25);
}

.meta-sync {
  font-size: 0.76rem;
  color: var(--text-subtle);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-body {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(11, 43, 38, 0.78);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  backdrop-filter: blur(16px);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.nav-item.is-active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.30);
}

.nav-count {
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
}

.nav-item.is-active .nav-count {
  background: rgba(var(--primary-rgb), 0.22);
  color: var(--primary);
}

/* Main Panel */
.main-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.38rem;
  font-weight: 700;
}

.panel-subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.card {
  background: rgba(11, 43, 38, 0.80);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.04rem;
  font-weight: 700;
}

.card-desc {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.card-danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(69, 10, 10, 0.22);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.85));
  color: #051f20;
  box-shadow: 0 8px 20px -6px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-ghost {
  background: rgba(148, 163, 184, 0.10);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: rgba(148, 163, 184, 0.18);
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-danger-soft {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}

.btn-danger-soft:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.22);
}

.btn-sm {
  padding: 7px 11px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 0.88rem;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.span-2 {
  grid-column: span 2;
}

.field-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #daf1de;
}

.field-hint {
  font-size: 0.77rem;
  color: var(--text-subtle);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(5, 31, 32, 0.65);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.input-error {
  border-color: var(--danger) !important;
}

.form-alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.info-banner {
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 0.84rem;
  background: rgba(251, 191, 36, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.30);
  color: #fde68a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(5, 31, 32, 0.45);
  border: 1px solid var(--border);
}

.switch-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-title {
  font-size: 0.88rem;
  font-weight: 600;
}

.switch-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Color Picker Group */
.color-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch {
  width: 44px;
  height: 40px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(5, 31, 32, 0.7);
  cursor: pointer;
  flex-shrink: 0;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

.range-val {
  min-width: 54px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
}

/* Image Preview */
.image-preview-box {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px dashed var(--border-strong);
  background: rgba(5, 31, 32, 0.55);
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
  position: relative;
}

.image-preview-box img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.image-preview-empty {
  font-size: 0.8rem;
  color: var(--text-subtle);
  text-align: center;
}

/* Theme Live Preview */
.theme-preview {
  padding: 20px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.theme-preview-surface {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-preview-badge {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.theme-preview-btn {
  align-self: flex-start;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  color: #051f20;
}

/* Product & Item Lists */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-stat {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(5, 31, 32, 0.55);
  border: 1px solid var(--border);
}

.mini-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mini-stat-val {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2px;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(5, 31, 32, 0.52);
  border: 1px solid var(--border);
  transition: border-color 0.18s ease;
}

.product-row:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
}

.row-thumb {
  width: 92px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(var(--primary-rgb), 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-title {
  font-weight: 700;
  font-size: 0.96rem;
}

.row-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-published {
  background: rgba(52, 211, 153, 0.15);
  color: #8eb69b;
  border: 1px solid rgba(52, 211, 153, 0.30);
}

.status-draft {
  background: rgba(148, 163, 184, 0.15);
  color: #daf1de;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.status-featured {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.generic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(5, 31, 32, 0.52);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.empty-box {
  padding: 36px 20px;
  border-radius: 14px;
  border: 1px dashed var(--border-strong);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.empty-box h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.empty-box p {
  margin: 0;
  font-size: 0.86rem;
  max-width: 420px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.subtab-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(11, 43, 38, 0.72);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.subtab-btn.is-active {
  background: var(--primary);
  color: #051f20;
  border-color: var(--primary);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.14);
  border: 1px solid rgba(var(--primary-rgb), 0.28);
  font-size: 0.82rem;
}

.chip button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-weight: 700;
  padding: 0 2px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 31, 32, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-card {
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0b2b26;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 28px 70px -20px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

/* Toast */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: rgba(11, 43, 38, 0.95);
  color: var(--text);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.75);
}

.toast-success {
  border-color: rgba(52, 211, 153, 0.45);
  color: #daf1de;
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

/* Responsive */
@media (max-width: 920px) {
  .workspace-body {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }

  .nav-item {
    width: auto;
    white-space: nowrap;
  }
}

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

  .field.span-2 {
    grid-column: span 1;
  }

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

  .stats-strip {
    grid-template-columns: 1fr;
  }
}

/* ClipON Logo Branding Styles */
.topbar-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.auth-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  margin-bottom: 4px;
}

/* --- Multi-akun: kategori dan akun pembeli --- */
.auth-card-wide {
  max-width: 560px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(5, 31, 32, 0.6);
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.is-active {
  background: var(--primary);
  color: #051f20;
}

.auth-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.category-card {
  margin-bottom: 16px;
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.category-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.category-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.category-badge {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #051f20;
  font-size: 0.78rem;
  font-weight: 700;
}

.category-card .row-actions {
  flex-wrap: wrap;
}

.buyer-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.code-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.pick-list {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 6px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(5, 31, 32, 0.52);
  border: 1px solid var(--border);
  cursor: pointer;
}

.pick-row:hover {
  border-color: var(--primary);
}

.pick-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pick-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pick-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .buyer-row {
    grid-template-columns: 1fr;
  }
}

/* Micro-animasi baris produk (halus, palet ClipON) */
.product-row {
  transition: border-color 0.18s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.product-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7);
}

.row-thumb img {
  transition: transform 0.3s ease;
}

.product-row:hover .row-thumb img {
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .product-row,
  .row-thumb img {
    transition: none;
  }

  .product-row:hover,
  .product-row:hover .row-thumb img {
    transform: none;
  }
}

/* Tipografi lembut: Fraunces (judul) + Figtree (teks). SOFT=100 membulatkan ujung huruf agar tidak kaku. */
body {
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* === Theme Studio: Galeri Preset, Impor/Ekspor JSON, & Live Portal Preview === */
.nav-draft-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.40);
  flex-shrink: 0;
}

.theme-dirty-pill {
  align-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.30);
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.theme-dirty-pill.is-dirty {
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.40);
}

.theme-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 20px;
  align-items: start;
  max-width: 100%;
}

.theme-controls-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.theme-preview-col {
  position: sticky;
  top: 84px;
  min-width: 0;
  max-width: 100%;
}

.theme-section-card,
.theme-preview-card {
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.theme-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.theme-subhead > * {
  min-width: 0;
  max-width: 100%;
}

.theme-active-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.theme-active-badge.is-preset {
  background: rgba(var(--primary-rgb), 0.16);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
}

.theme-active-badge.is-custom {
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

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

.theme-preset-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(5, 31, 32, 0.56);
  color: var(--text);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.theme-preset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), 0.55);
  background: rgba(11, 43, 38, 0.85);
}

.theme-preset-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.theme-preset-card.is-selected {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.45), 0 14px 28px -18px rgba(0, 0, 0, 0.8);
}

.preset-mini-scene {
  background: var(--p-bg, #051f20);
  border-radius: 10px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.preset-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.preset-mini-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--p-primary, #8eb69b);
  box-shadow: 12px 0 0 var(--p-accent, #235347);
}

.preset-mini-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--p-primary, #8eb69b);
  color: var(--p-on-primary, #051f20);
}

.preset-mini-card {
  background: var(--p-surface, #0b2b26);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.preset-mini-line {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: var(--p-primary, #8eb69b);
}

.preset-mini-line-title {
  width: 68%;
  opacity: 0.9;
}

.preset-mini-line-sub {
  width: 46%;
  opacity: 0.42;
}

.preset-mini-cta {
  width: 38%;
  height: 8px;
  margin-top: 2px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--p-primary, #8eb69b), var(--p-accent, #235347));
}

.preset-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preset-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.preset-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.preset-official-tag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.18);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
}

.preset-desc {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preset-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 2px;
}

.preset-swatches {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.preset-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.preset-selected-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #051f20;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.theme-preset-card.is-selected .preset-selected-tag {
  opacity: 1;
  transform: scale(1);
}

/* Impor / Ekspor JSON */
.theme-transfer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-import-feedback {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 500;
}

.theme-import-feedback.is-error {
  border: 1px solid rgba(248, 113, 113, 0.42);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.theme-import-feedback.is-success {
  border: 1px solid rgba(var(--primary-rgb), 0.45);
  background: rgba(var(--primary-rgb), 0.14);
  color: #daf1de;
}

/* Live Portal Preview Toolbar & Frame */
.theme-preview-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-preview-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theme-preview-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.theme-preview-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-seg-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(5, 31, 32, 0.7);
  border: 1px solid var(--border);
  gap: 2px;
}

.preview-seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.preview-seg-btn:hover {
  color: var(--text);
}

.preview-seg-btn.is-active {
  background: var(--primary);
  color: #051f20;
}

.preview-seg-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.theme-live-stage {
  border-radius: 14px;
  padding: 12px;
  background: rgba(5, 31, 32, 0.65);
  border: 1px solid var(--border);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.theme-live-frame {
  width: 100%;
  transition: max-width 0.25s ease;
}

.theme-live-frame.is-mobile {
  max-width: 348px;
  border-radius: 26px;
  padding: 8px;
  background: #071314;
  border: 2px solid rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.85);
}

/* Scoped Portal Preview Canvas */
.theme-live-portal {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius, 16px);
  background-color: var(--bg, #051f20);
  color: var(--text-on-bg, var(--text-main, #daf1de));
  font-family: var(--font-body, 'Figtree', sans-serif);
  padding: 14px;
  border: 1px solid var(--glass-border, rgba(142, 182, 155, 0.20));
  transition: background-color 0.2s ease, color 0.2s ease, border-radius 0.2s ease;
  max-width: 100%;
  min-width: 0;
}

.theme-live-frame.is-mobile .theme-live-portal {
  border-radius: 18px;
  padding: 11px;
}

.tlp-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.tlp-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tlp-bg-image.has-image {
  opacity: 0.24;
}

.tlp-bg-image.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.tlp-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(44px);
  opacity: 0.28;
}

.tlp-orb-1 {
  width: 210px;
  height: 210px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.85), transparent 70%);
}

.tlp-orb-2 {
  width: 190px;
  height: 190px;
  top: 60px;
  right: -70px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.72), transparent 70%);
}

.tlp-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.tlp-glass {
  background: var(--glass-bg, rgba(11, 43, 38, 0.78));
  color: var(--text-main, #daf1de);
  border: 1px solid var(--glass-border, rgba(142, 182, 155, 0.20));
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
}

.tlp-hero {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.tlp-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tlp-brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tlp-brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text-main);
}

.tlp-brand-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.tlp-hero-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tlp-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--theme-icon-border);
  background: var(--theme-icon-bg);
  color: var(--theme-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tlp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr);
  gap: 12px;
  align-items: center;
}

.theme-live-frame.is-mobile .tlp-hero-grid {
  grid-template-columns: 1fr;
}

.tlp-hero-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.tlp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--hero-pill-ink);
  background: var(--theme-icon-bg);
  border: 1px solid var(--theme-icon-border);
}

.tlp-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--theme-icon);
}

.tlp-hero-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tlp-hero-sub {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tlp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: calc(var(--radius, 16px) * 0.65);
  background: var(--primary);
  color: var(--on-primary, #051f20);
  font-size: 0.73rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.tlp-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-live-frame.is-mobile .tlp-hero-visual {
  order: -1;
}

.tlp-official-logo {
  width: 84px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.theme-live-portal[data-preview-mode="light"] .tlp-official-logo {
  filter: brightness(0.6) saturate(1.15);
}

.tlp-feature-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.theme-live-frame.is-mobile .tlp-feature-strip {
  grid-template-columns: 1fr;
}

.tlp-mini-stat {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.tlp-themed-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--theme-icon-bg);
  border: 1px solid var(--theme-icon-border);
  color: var(--theme-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tlp-mini-stat-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tlp-mini-stat-val {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.tlp-mini-stat-lbl {
  font-size: 0.67rem;
  color: var(--text-muted);
}

.tlp-catalog {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tlp-cat-top {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tlp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--input-bg);
}

.tlp-search-icon {
  color: var(--input-icon, var(--theme-icon));
  display: inline-flex;
  align-items: center;
}

.tlp-search-placeholder {
  font-size: 0.72rem;
  color: var(--input-text, var(--text-subtle));
  opacity: 0.72;
}

.tlp-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tlp-tab {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-muted);
}

.tlp-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary, #051f20);
}

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

.theme-live-frame.is-mobile .tlp-products-grid {
  grid-template-columns: 1fr;
}

.tlp-product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tlp-product-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(var(--accent-rgb), 0.10));
  border-bottom: 1px solid var(--glass-border);
  overflow: hidden;
}

.tlp-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tlp-product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-icon);
}

.tlp-product-badges {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.tlp-badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--badge-surface);
}

.tlp-badge-primary {
  color: var(--badge-primary-ink, var(--theme-icon));
  border: 1px solid var(--theme-icon-border);
}

.tlp-badge-accent {
  color: var(--badge-accent-ink, var(--accent-ink));
  border: 1px solid rgba(var(--accent-ink-rgb), 0.40);
}

.tlp-banner-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.tlp-banner-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.tlp-banner-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tlp-empty-state {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.tlp-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-icon-bg);
  border: 1px solid var(--theme-icon-border);
  color: var(--theme-icon);
}

.tlp-empty-title {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  color: var(--text-main);
}

.tlp-empty-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.tlp-cta-disabled {
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-subtle);
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px dashed var(--glass-border);
}

.tlp-product-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.tlp-product-cat {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--theme-icon);
}

.tlp-product-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.tlp-product-desc {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.tlp-product-cta {
  width: 100%;
  margin-top: 4px;
  padding: 6px 10px;
  font-size: 0.7rem;
}

.tlp-footer {
  padding: 9px 12px;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
}

@media (max-width: 1180px) {
  .theme-studio-grid {
    grid-template-columns: 1fr;
  }

  .theme-preview-col {
    position: static;
    order: -1;
  }
}

@media (max-width: 620px) {
  .workspace-body {
    padding: 12px;
  }

  .card {
    padding: 16px;
  }

  .theme-live-stage {
    padding: 8px;
  }

  .theme-preset-grid {
    grid-template-columns: 1fr;
  }

  .tlp-products-grid {
    grid-template-columns: 1fr;
  }

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

  .tlp-brand-tagline {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-preset-card,
  .theme-live-frame,
  .theme-live-portal {
    transition: none;
  }

  .theme-preset-card:hover {
    transform: none;
  }
}

/* Pustaka ikon kustom */
.icon-pool { margin-top: 10px; display: grid; gap: 8px; }
.icon-pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.icon-pool-cell { position: relative; }
.icon-pool-item { display: block; width: 100%; padding: 4px; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; background: transparent; cursor: pointer; }
.icon-pool-item:hover, .icon-pool-item:focus-visible, .icon-pool-item[aria-pressed="true"] { border-color: var(--primary, #8eb69b); outline: none; box-shadow: 0 0 0 2px rgba(142,182,155,0.35); }
.icon-pool-item .product-art { width: 100%; height: 56px; border-radius: 8px; }
.icon-pool-remove { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: #0b2b26; color: #daf1de; font-size: 11px; line-height: 1; cursor: pointer; }
.icon-pool-remove:hover, .icon-pool-remove:focus-visible { background: #7a2b2b; }
