/**
 * ============================================================================
 * STYLE.CSS - MODERN TECH RESPONSIVE STYLESHEET
 * ============================================================================
 * Desain modern, sleek, bernuansa Titanium Flagship Store (bukan hijau-kuning).
 * Variabel warna di-inject otomatis dari config.js
 * ============================================================================
 */

:root {
  --primary: #0f172a;          /* Deep Slate / Midnight Titanium */
  --primary-d: #020617;        /* Jet Obsidian Black */
  --primary-mid: #1e293b;      /* Slate 800 */
  --accent: #38bdf8;           /* Electric Sky Blue */
  --accent-d: #0284c7;         /* Deep Cobalt Blue */
  --bg: #f8fafc;               /* Ice White Slate (Crisp & Bersih) */
  --card-bg: #ffffff;          /* Pure White */
  --ink: #0f172a;              /* Deep Navy Slate Text */
  --muted: #64748b;            /* Muted Gray */
  --border: #e2e8f0;           /* Clean Modern Border */
  --err: #ef4444;              /* Coral Red */
  --ok: #10b981;               /* Emerald Green */
  --wa: #25d366;
  --wa-dark: #16a34a;
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 100% 100%, rgba(15, 23, 42, 0.05) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: 95px;
  font-size: 14.5px;
  line-height: 1.45;
  display: flex;
  justify-content: center;
}

/* APP SHELL WRAPPER (Mobile Simulation on Desktop, 100% on Mobile) */
.app-shell {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.08);
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.hdr {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #ffffff;
  padding: 24px 18px 46px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.22);
  transition: background 0.3s ease;
}

.hdr.has-bg {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.hdr.has-bg::before,
.hdr.has-bg::after {
  display: none;
}

.hdr.has-bg h1 span {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.hdr.has-bg .tagline,
.hdr.has-bg .meta {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

/* Header Admin Action Buttons */
.hdr-admin-tools {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  position: relative;
  z-index: 10;
}

body.editing .hdr-admin-tools {
  display: flex;
}

.btn-hdr-tool {
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-hdr-tool:hover {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-hdr-tool.danger {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 0.6);
}

.btn-hdr-tool.danger:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Store Logo (Avatar Header) */
.store-logo-wrap {
  margin: 0 auto 10px;
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.store-logo-wrap:hover {
  transform: scale(1.05);
}

.store-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.brand-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hdr h1 {
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.6px;
  line-height: 1.15;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s;
}

.hdr h1 span {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hdr h1:active {
  transform: scale(0.97);
}

.hdr .tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  font-style: italic;
  letter-spacing: 0.3px;
  margin-top: 5px;
}

.hdr .meta {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.hdr .meta .sec {
  display: inline-flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  margin-top: 6px;
  font-weight: 700;
  font-size: 10.5px;
}

.sync-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: #888;
  flex-shrink: 0;
}

.sync-dot.online {
  background: #10b981;
  animation: pulse-dot 2s infinite;
}

.sync-dot.offline {
  background: #f59e0b;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Trust Badge Bar (Jaminan Kepercayaan Toko - Running Marquee / Ticker) */
.trust-bar-wrap {
  margin: -14px 0 14px;
  overflow: hidden;
  position: relative;
  z-index: 6;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  user-select: none;
}

.trust-bar {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: trust-marquee 26s linear infinite;
  padding: 6px 0;
  will-change: transform;
}

.trust-bar:hover,
.trust-bar:active {
  animation-play-state: paused;
}

@keyframes trust-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.trust-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: grab;
}

.trust-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.trust-item .trust-icon {
  font-size: 13.5px;
}

/* ==========================================================================
   CONTAINER
   ========================================================================== */
.container {
  padding: 0 14px;
}

/* ==========================================================================
   ADMIN TOOLBAR PANEL (TOP)
   ========================================================================== */
.admin-bar {
  margin-top: -24px;
  margin-bottom: 12px;
  position: relative;
  z-index: 10;
  display: none;
}

.admin-bar.show {
  display: block;
}

.admin-card {
  background: #ffffff;
  border: 1.5px solid var(--accent);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-stat {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.admin-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.admin-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.admin-group:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.admin-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 7px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-group-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Pair segment for Excel buttons */
.admin-btn-pair {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}

/* VENDOR & SUPER ADMIN SUITE STYLES */
.admin-group.vendor-group {
  background: linear-gradient(135deg, #fdf4ff 0%, #f5f3ff 100%);
  border: 1.5px solid #d8b4fe;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.08);
}

.admin-group.vendor-group:hover {
  background: linear-gradient(135deg, #fae8ff 0%, #ede9fe 100%);
  border-color: #c084fc;
}

.admin-group.vendor-group .admin-group-label {
  color: #7e22ce;
  font-weight: 900;
}

.vendor-badge {
  background: #7e22ce;
  color: #ffffff;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

.btn-admin.vendor-btn {
  background: linear-gradient(135deg, #7e22ce 0%, #9333ea 100%);
  color: #ffffff;
  border: 1px solid #a855f7;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.25);
}

.btn-admin.vendor-btn:hover {
  background: linear-gradient(135deg, #6b21a8 0%, #7e22ce 100%);
  transform: translateY(-1px);
}

/* VENDOR SALES KIT MODAL CARDS */
.vendor-output-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

.vendor-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
}

.vendor-link-preview {
  font-family: monospace;
  font-size: 11px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  border-radius: 6px;
  color: #0369a1;
  word-break: break-all;
  user-select: all;
}

.vendor-pitch-preview {
  font-size: 12px;
  line-height: 1.5;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 10px;
  border-radius: 6px;
  color: #1e293b;
  white-space: pre-wrap;
  max-height: 160px;
  overflow-y: auto;
}

.vendor-btn-group {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-copy:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-copy.wa-btn {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.btn-copy.wa-btn:hover {
  background: #059669;
}

.btn-admin {
  background: var(--primary);
  color: #ffffff;
  border: 0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-admin:active {
  transform: scale(0.96);
}

.btn-admin.warn {
  background: var(--accent);
  color: #0f172a;
  border: 1px solid var(--accent-d);
}

.btn-admin.danger {
  background: #fff;
  color: var(--err);
  border: 1.5px solid var(--err);
}

.btn-admin.excel-btn {
  background: #0284c7;
  color: #ffffff;
  border-radius: 7px;
}

.btn-admin.excel-btn.template {
  background: #16a34a;
  color: #ffffff;
}

.btn-admin.excel-btn:hover {
  filter: brightness(1.08);
}

.btn-admin.story-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.excel-template-box {
  transition: all 0.2s ease;
}

.excel-template-box:hover {
  background: #ecfdf5 !important;
  border-color: #16a34a !important;
}

/* ==========================================================================
   SEARCH & ADVANCED FILTERS
   ========================================================================== */
.search-wrap {
  margin-top: -22px;
  margin-bottom: 10px;
  position: relative;
  z-index: 5;
}

.admin-bar.show + .search-wrap {
  margin-top: 0;
}

.search-box {
  background: #ffffff;
  border-radius: 50px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  border: 2px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 22px rgba(56, 189, 248, 0.22);
}

.search-box .icn {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}

.search-box input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.btn-clear-search {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: none;
  padding: 2px 6px;
}

.btn-clear-search.show {
  display: inline-block;
}

.btn-filter-toggle {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--primary);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.btn-filter-toggle.active {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--primary);
}

/* FILTER PANEL (COLLAPSIBLE) */
.filter-panel {
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.filter-panel.open {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-group {
  margin-bottom: 12px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--ink);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.chip:active {
  transform: scale(0.96);
}

.chip.active {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.btn-reset-filters {
  background: none;
  border: 0;
  color: var(--err);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* ==========================================================================
   CATEGORY TABS
   ========================================================================== */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
  padding: 0 2px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tab:active {
  transform: scale(0.95);
}

.tab.active {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

/* ==========================================================================
   SLOGAN STATUS BAR & INFO NOTICE
   ========================================================================== */
.status-bar {
  background: #ffffff;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: 24px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.info-notice {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.12) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1.5px dashed var(--accent);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  margin-bottom: 12px;
}

.info-notice strong {
  color: var(--primary);
  font-weight: 800;
}

/* Editable Slogan & Notice in Admin Mode */
body.editing .editable-block {
  cursor: pointer;
  position: relative;
  outline: 2px dashed var(--accent) !important;
  outline-offset: 3px;
  transition: all 0.2s ease;
}

body.editing .editable-block:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  transform: scale(1.01);
}

.editable-badge {
  display: none;
}

body.editing .editable-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--accent);
  color: #0f172a;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.editable-badge-bottom {
  display: none;
}

body.editing .editable-badge-bottom {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent-dark);
  text-decoration: underline;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   PRODUCT CATALOG (ACCORDION)
   ========================================================================== */
.cat-section {
  background: #ffffff;
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.cat-header {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-mid) 100%);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.cat-header h2 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-header .cat-count {
  font-weight: 600;
  font-size: 11px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 10px;
}

.cat-header .arrow {
  color: var(--accent);
  font-size: 12px;
  transition: transform 0.25s ease;
}

.cat-section.open .arrow {
  transform: rotate(180deg);
}

.items {
  display: none;
}

.cat-section.open .items {
  display: block;
}

/* PRODUCT ROW */
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 8px;
  transition: background 0.15s;
}

.item:last-child {
  border-bottom: 0;
}

.item:active {
  background: #f8fafc;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.25;
}

.item-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* MODERN TECH BADGES */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.badge.ibox {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.badge.bc {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.badge.wifi {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.badge.storage {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}

.badge.repack {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.badge.custom-cat {
  background: #ecfeff;
  color: #0e7490;
  border-color: #a5f3fc;
}

/* STOCK BADGES (Ready, Sisa 1, Sold) */
.badge-stock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.badge-stock.ready {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-stock.sisa1 {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulse-sisa 2s infinite ease-in-out;
}

.badge-stock.sold {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  text-decoration: line-through;
}

@keyframes pulse-sisa {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* PROMO & HIGHLIGHT BADGES */
.badge-promo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.28);
}

/* PRICE & ACTIONS */
.item-action-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
}

.price-now {
  font-size: 15px;
  font-weight: 900;
  color: var(--primary);
  white-space: nowrap;
}

.btn-wa-item {
  background: #25d366;
  color: #ffffff;
  border: 0;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.32);
  transition: all 0.15s;
}

.btn-wa-item:active {
  transform: scale(0.94);
}

.btn-share-item {
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-share-item:hover {
  background: #e2e8f0;
  color: var(--primary);
}

.btn-share-item:active {
  transform: scale(0.92);
}

.item.sold-out {
  opacity: 0.65;
}

.item.sold-out .btn-wa-item {
  background: #cbd5e1;
  color: #64748b;
  pointer-events: none;
  box-shadow: none;
}

.btn-item-edit {
  display: none;
  background: var(--accent);
  color: #0f172a;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 800;
  align-items: center;
  justify-content: center;
}

body.editing .btn-item-edit {
  display: inline-flex;
}

/* STORY GENERATOR CANVAS MODAL */
.story-modal-box {
  max-width: 440px !important;
}

.story-preview-container {
  width: 100%;
  max-height: 480px;
  overflow-y: auto;
  background: #020617;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 8px;
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.story-preview-container canvas {
  width: 100%;
  max-width: 270px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: block;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 36px 18px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.empty-state .icn-empty {
  font-size: 38px;
  margin-bottom: 6px;
  display: block;
}

.empty-state h3 {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 12.5px;
}

/* ==========================================================================
   FOOTER & ADDRESS
   ========================================================================== */
.footer {
  margin-top: 20px;
  padding: 16px 14px 20px;
  text-align: center;
}

.address-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  border: 1.5px solid var(--border);
  text-align: left;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.address-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.address-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.35;
}

.address-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.btn-maps {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.cta-general {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  margin-bottom: 12px;
  transition: transform 0.15s;
}

.cta-general:active {
  transform: translateY(2px);
}

.footer-notes {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-notes strong {
  color: var(--primary);
}

.copyright {
  margin-top: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.admin-trigger-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
}

/* ==========================================================================
   FLOATING ACTION BUTTON (WHATSAPP)
   ========================================================================== */
.fab-wa {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  z-index: 100;
  text-decoration: none;
  color: #fff;
  font-size: 28px;
  animation: pulse-fab 2.4s infinite;
}

@keyframes pulse-fab {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-bg.show {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal h3 {
  font-size: 17px;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 0;
  font-size: 20px;
  color: #888;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal .field {
  margin-bottom: 12px;
}

.modal label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.modal input,
.modal textarea,
.modal select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  outline: 0;
  font-family: inherit;
  background: #fff;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.modal .info-box {
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.4;
}

.modal .row-btn {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* EXCEL IMPORT DROPZONE */
.import-drop {
  border: 2px dashed var(--accent);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: background 0.2s;
  display: block;
}

.import-drop:hover {
  background: #ffffff;
}

.import-drop input[type="file"] {
  display: none;
}

.import-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.import-preview-table-wrap {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 10px;
}

.import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.import-table th {
  background: var(--primary);
  color: #ffffff;
  padding: 6px 8px;
  text-align: left;
  position: sticky;
  top: 0;
}

.import-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--accent);
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 13px;
  z-index: 300;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  max-width: 90vw;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.err {
  background: var(--err);
  color: #fff;
  border-color: transparent;
}

.toast.ok {
  background: var(--ok);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   BADGE PHOTO BUTTON (HYBRID PHYSICAL PHOTO)
   ========================================================================== */
.badge-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-dark);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.badge-photo-btn:hover {
  background: var(--accent);
  color: #0f172a;
  transform: translateY(-1px);
}

.badge-photo-btn.has-photo {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.4);
  font-weight: 800;
}

.badge-photo-btn.has-photo:hover {
  background: #10b981;
  color: #ffffff;
}

/* ITEM PHOTO MANAGER IN ITEM MODAL */
.item-photos-manager {
  background: #f8fafc;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 10px;
}

.item-photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.item-photo-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.item-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-del-photo {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* LIGHTBOX PHOTO MODAL */
.photo-modal-box {
  max-width: 460px !important;
  text-align: center;
}

.photo-modal-subtitle {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-top: -6px;
  margin-bottom: 12px;
}

.photo-lightbox-viewer {
  position: relative;
  width: 100%;
  height: 280px;
  background: #020617;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.photo-lightbox-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.photo-lightbox-nav {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.btn-photo-nav {
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: all 0.15s ease;
}

.btn-photo-nav:hover {
  background: var(--accent);
  color: #0f172a;
}

#photoLightboxCounter {
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.photo-thumbnails-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.photo-thumb-item {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #020617;
}

.photo-thumb-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  transform: scale(1.05);
}

.photo-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-album-link {
  color: #0284c7;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* TRUST BADGE MODAL EDITOR */
.trust-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.trust-badge-icon-input {
  width: 48px !important;
  text-align: center;
  font-size: 16px;
  padding: 6px !important;
  flex-shrink: 0;
}

.trust-badge-text-input {
  flex: 1;
}

.btn-del-trust {
  background: none;
  border: 0;
  color: var(--err);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ==========================================================================
   ADAPTIVE RESPONSIVE DESKTOP & TABLET LAYOUT (>= 860px)
   ========================================================================== */
@media (min-width: 860px) {
  body {
    padding-bottom: 60px;
    background-color: var(--bg);
    background-image:
      radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.09) 0%, transparent 45%),
      radial-gradient(circle at 90% 90%, rgba(15, 23, 42, 0.06) 0%, transparent 50%);
  }

  /* 1. App Shell Widens to Modern Flagship Container */
  .app-shell {
    max-width: 1080px;
    border-radius: 28px;
    margin: 28px auto;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    border: 1px solid var(--border);
  }

  /* 2. Header Section on Desktop */
  .hdr {
    padding: 38px 36px 52px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .store-logo-wrap {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
  }

  .hdr h1 {
    font-size: 38px;
    letter-spacing: -0.8px;
  }

  .hdr .tagline {
    font-size: 15px;
    margin-top: 6px;
  }

  .hdr .meta {
    font-size: 13px;
    margin-top: 16px;
  }

  /* 3. Running Trust Badge Marquee on Desktop */
  .trust-bar-wrap {
    margin: -18px 0 18px;
  }

  .trust-item {
    font-size: 12px;
    padding: 8px 18px;
  }

  /* 4. Container Spacing */
  .container {
    padding: 0 32px 30px;
  }

  /* 5. Search Bar & Advanced Filters */
  .search-wrap {
    margin-top: -26px;
    margin-bottom: 14px;
  }

  .search-box {
    padding: 12px 24px;
  }

  .search-box input {
    font-size: 15px;
  }

  .filter-panel {
    padding: 18px 22px;
  }

  .chip-row {
    gap: 8px;
  }

  .chip {
    padding: 6px 14px;
    font-size: 12px;
  }

  /* 6. Tabs & Notice Bars */
  .tabs {
    gap: 10px;
    margin-bottom: 14px;
  }

  .tab {
    padding: 10px 22px;
    font-size: 13px;
  }

  .status-bar {
    font-size: 12px;
    padding: 10px 18px;
    margin-bottom: 12px;
  }

  .info-notice {
    font-size: 13.5px;
    padding: 14px 22px;
    margin-bottom: 18px;
  }

  /* 7. PRODUCT CATALOG: 2-COLUMN GRID SYSTEM */
  .cat-section {
    border-radius: 20px;
    margin-bottom: 16px;
  }

  .cat-header {
    padding: 14px 22px;
  }

  .cat-header h2 {
    font-size: 17px;
  }

  .cat-section.open .items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    background: #f8fafc;
  }

  .item {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }

  .item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(56, 189, 248, 0.5);
  }

  .item:last-child {
    border-bottom: 1.5px solid var(--border);
  }

  .item-name {
    font-size: 15px;
  }

  .price-now {
    font-size: 16px;
  }

  /* 8. Admin Toolbar Panel on Desktop */
  .admin-bar {
    margin-top: -26px;
    margin-bottom: 16px;
  }

  .admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .admin-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 12px;
  }

  .admin-group {
    padding: 12px 14px;
  }

  .admin-group-btns {
    gap: 8px;
  }

  .btn-admin {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* 9. Modals on Desktop (Spacious & Clean) */
  .modal {
    max-width: 580px;
    border-radius: 22px;
    padding: 26px;
  }

  #importModal .modal {
    max-width: 820px;
  }

  .import-preview-table-wrap {
    max-height: 320px;
  }

  .import-table {
    font-size: 12.5px;
  }

  .import-table th,
  .import-table td {
    padding: 8px 12px;
  }

  #storyModal .modal {
    max-width: 640px;
  }

  .story-preview-container {
    max-height: 540px;
    padding: 14px;
  }

  .story-preview-container canvas {
    max-width: 300px;
  }

  #storeInfoModal .modal {
    max-width: 660px;
  }

  #bulkModal .modal {
    max-width: 580px;
  }

  #noticeModal .modal {
    max-width: 580px;
  }

  /* 10. Footer on Desktop */
  .footer {
    padding-top: 30px;
    margin-top: 24px;
  }

  .address-card {
    padding: 20px 26px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  .cta-general {
    font-size: 15px;
    padding: 15px 36px;
  }

  /* 11. Floating Action Button on Desktop */
  .fab-wa {
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    font-size: 32px;
  }
}
