/* ============================================================================
   Ngerapek v2.2 — Aesthetic Modern SaaS Design System
   Palette: Obsidian Violet & Warm Silk (Dark) / Alabaster Editorial (Light)
   Terinspirasi Linear, Raycast & Vercel — ultra-clean hairline borders & SVG icons
   ============================================================================ */
:root {
  --bg-main: #09090d;
  --bg-sidebar: #0d0d13;
  --bg-surface: #12121a;
  --bg-surface-2: #181823;
  --bg-elevated: #1e1e2c;
  --bg-hover: rgba(167, 139, 250, 0.08);
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --text-main: #f4f4f6;
  --text-secondary: #c4c4d0;
  --text-muted: #7c7c8e;
  --accent: #8b5cf6;
  --accent-bright: #a78bfa;
  --accent-2: #ec4899;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.65);
  --radius: 14px;
  --radius-sm: 9px;
}

[data-theme="light"] {
  --bg-main: #f7f7fa;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-2: #f4f4f8;
  --bg-elevated: #ededf4;
  --bg-hover: rgba(124, 58, 237, 0.06);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --text-main: #111118;
  --text-secondary: #3f3f4e;
  --text-muted: #717184;
  --accent: #7c3aed;
  --accent-bright: #6d28d9;
  --accent-2: #db2777;
  --accent-soft: rgba(124, 58, 237, 0.10);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.10);
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.09);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.10);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.09);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(900px 420px at 78% -10%, rgba(139, 92, 246, 0.10), transparent 65%),
    radial-gradient(650px 360px at 18% 0%, rgba(236, 72, 153, 0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  font-size: 13.5px;
  line-height: 1.55;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(900px 420px at 80% -10%, rgba(124, 58, 237, 0.06), transparent 65%),
    radial-gradient(600px 340px at 15% 0%, rgba(236, 72, 153, 0.04), transparent 60%);
}

a { color: inherit; text-decoration: none; }

.nv-ico {
  flex-shrink: 0;
  vertical-align: middle;
  display: inline-block;
}

/* Custom sleek scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

/* Sidebar */
.sidebar {
  width: 256px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 45;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 10, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  cursor: pointer;
}
.sidebar-backdrop.open { display: block; }

body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}
body.sidebar-collapsed .main-wrap {
  margin-left: 0;
}

.brand {
  height: 64px;
  min-height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.stock-example-box {
  background: var(--bg-main);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.stock-example-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-bright);
}
.stock-example-pre {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  margin: 0;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.30);
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.store-switcher {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(139, 92, 246, 0.035);
}
.store-switcher-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.store-switcher select {
  width: 100%;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 9px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  cursor: pointer;
}
.store-banner-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: var(--bg-surface);
}
.store-banner-hero img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.nav-scroll { padding: 10px 10px 14px; overflow-y: auto; flex: 1; }

.nav-group {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 14px 10px 6px;
  opacity: 0.85;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 2px;
  transition: all 0.14s ease;
  border: 1px solid transparent;
}

.nav-item .nv-ico { opacity: 0.78; transition: opacity 0.14s ease; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-main); }
.nav-item:hover .nv-ico { opacity: 1; }

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 600;
  border-color: rgba(139, 92, 246, 0.22);
  box-shadow: var(--inner-highlight);
}
.nav-item.active .nv-ico { opacity: 1; color: var(--accent-bright); }

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-badge {
  background: rgba(139, 92, 246, 0.20);
  border-color: rgba(139, 92, 246, 0.28);
  color: var(--accent-bright);
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

/* Main Content Area */
.main-wrap {
  flex: 1;
  margin-left: 256px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 64px;
  min-height: 64px;
  padding: 0 24px;
  background: rgba(9, 9, 13, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}

[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.84); }

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.menu-toggle:hover {
  background: var(--accent-soft);
  border-color: rgba(139, 92, 246, 0.42);
  color: var(--accent-bright);
}
.topbar-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gw-logo {
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  display: inline-block;
  vertical-align: middle;
}
.gw-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 4px;
  border-radius: 99px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.content {
  padding: 28px 30px 56px;
  max-width: 1340px;
  width: 100%;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.page-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* Grids & Cards */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow), var(--inner-highlight);
}

.kpi-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.kpi-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.kpi-clickable {
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.kpi-clickable:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: var(--shadow), 0 0 0 1px rgba(139, 92, 246, 0.22);
  transform: translateY(-2px);
}
.rev-bar-track {
  width: 100%;
  max-width: 180px;
  height: 7px;
  border-radius: 99px;
  background: var(--bg-surface-2);
  overflow: hidden;
  border: 1px solid var(--border);
}
.rev-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kpi-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid rgba(139, 92, 246, 0.20);
}
.kpi-icon-box.mint { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.20); }
.kpi-icon-box.sky { background: var(--info-soft); color: var(--info); border-color: rgba(96, 165, 250, 0.20); }
.kpi-icon-box.rose { background: var(--danger-soft); color: var(--danger); border-color: rgba(251, 113, 133, 0.20); }

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.kpi-value {
  font-size: 25px;
  font-weight: 700;
  margin: 10px 0 4px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.section-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Sparkline SVG */
.sparkline-wrap { margin-top: 12px; width: 100%; height: 42px; }
.sparkline-wrap svg { width: 100%; height: 42px; display: block; overflow: visible; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.14s ease;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: linear-gradient(180deg, #9366f9 0%, #7c3aed 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 18px -6px rgba(139, 92, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--bg-surface-2);
  border-color: var(--border);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--border-strong); color: var(--text-main); background: var(--bg-elevated); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 7px 9px;
}
.btn-ghost:hover { background: var(--bg-surface-2); color: var(--text-main); }

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.20);
}
.btn-danger:hover { background: var(--danger); color: #ffffff; border-color: transparent; }

.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge-success { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.18); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(251, 113, 133, 0.18); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(251, 191, 36, 0.18); }
.badge-info { background: var(--accent-soft); color: var(--accent-bright); border-color: rgba(139, 92, 246, 0.20); }
.badge-neutral { background: var(--bg-surface-2); color: var(--text-muted); border-color: var(--border); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-surface-2);
}
tbody tr { transition: background 0.12s ease; }
tbody tr:hover td { background: rgba(139, 92, 246, 0.04); }

/* Forms & Inputs */
.form-group { margin-bottom: 15px; }
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}
textarea { resize: vertical; min-height: 92px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  background: var(--bg-surface-2);
  cursor: pointer;
  transition: all 0.15s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.banner-thumb {
  width: 52px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* Flash Alerts */
.flash {
  padding: 11px 15px;
  border-radius: 11px;
  margin-bottom: 18px;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
}
.flash-success { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.25); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(251, 113, 133, 0.25); }
.flash-info { background: var(--accent-soft); color: var(--accent-bright); border-color: rgba(139, 92, 246, 0.25); }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 8, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65), var(--inner-highlight);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--bg-surface-2);
  transition: border-color 0.14s ease;
}
.radio-card:hover { border-color: var(--accent); }
.radio-card input { width: auto; margin-top: 3px; accent-color: var(--accent); }

/* Telegram Chat Mockup */
.tg-mock {
  background: #0e1621;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  color: #e4e8f0;
}
.tg-bubble {
  background: #182533;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 12.5px;
  white-space: pre-wrap;
  line-height: 1.55;
}
.tg-bubble blockquote {
  display: inline-block;
  margin: 0 0 6px 0;
  padding: 4px 10px;
  border-left: 3px solid #60a5fa;
  background: rgba(96, 165, 250, 0.14);
  border-radius: 4px 8px 8px 4px;
  font-size: 12px;
}
.tg-keypad {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 8px;
}
.tg-key {
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #e4e8f0;
  padding: 6px 4px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
}
.tg-btn-row { display: flex; gap: 5px; margin-top: 5px; }
.tg-inline-btn {
  flex: 1;
  text-align: center;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.22);
  color: #ddd6fe;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.14s ease;
}
.tab:hover { color: var(--text-main); border-color: var(--border-strong); }
.tab.active {
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-color: rgba(139, 92, 246, 0.28);
  font-weight: 600;
}

/* Auth Pages (Login & Register — Clean Obsidian Card) */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background-color: #09090b;
  background-image: none;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 34px 32px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
}
.auth-card label {
  color: #e4e4e7;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 6px;
}
.auth-req { color: #ef4444; margin-left: 2px; }
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #f4f4f6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.auth-card input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.28);
}
.pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pwd-wrap input {
  padding-right: 42px !important;
}
.pwd-eye-btn {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 38px;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #a1a1aa;
  border-radius: 0 7px 7px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.14s ease, background 0.14s ease;
}
.pwd-eye-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.07); }
.auth-submit-btn {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #6366f1;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.auth-submit-btn:hover { background: #4f46e5; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: #71717a;
  font-size: 11.5px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.google-auth-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #f4f4f6;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.google-auth-btn:hover {
  background: #24242d;
  border-color: rgba(255, 255, 255, 0.20);
}

/* Searchable Product Select inside Tambah Stok modal */
.sselect { position: relative; width: 100%; }
.sselect-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input, var(--bg-surface-2));
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sselect.open .sselect-trigger,
.sselect-trigger:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.22);
}
.sselect-placeholder { color: var(--text-muted); font-weight: 400; }
.sselect-caret { color: var(--text-muted); font-size: 12px; transition: transform 0.15s ease; }
.sselect.open .sselect-caret { transform: rotate(180deg); }
.sselect-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.sselect.open .sselect-menu { display: block; }
.sselect-search {
  width: 100%;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 10px 13px !important;
  background: var(--bg-surface-2) !important;
  font-size: 13px;
}
.sselect-search:focus { box-shadow: none !important; }
.sselect-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}
.sselect-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.sselect-item:hover,
.sselect-item.active {
  background: rgba(99, 102, 241, 0.16);
  color: #ffffff;
}
.sselect-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.sselect-empty {
  padding: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Precision Avatar Cropper & Clickable Profile Trigger */
.avatar-edit-trigger {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface-2);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.16s ease, transform 0.14s ease;
}
.avatar-edit-trigger:hover {
  border-color: var(--accent-bright);
  transform: scale(1.03);
}
.avatar-edit-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 14, 0.56);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.avatar-edit-trigger:hover .avatar-edit-overlay { opacity: 1; }

.avatar-dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  background: var(--bg-surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.avatar-dropzone:hover,
.avatar-dropzone.dragover {
  border-color: var(--accent-bright);
  background: rgba(139, 92, 246, 0.08);
}

.avatar-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.avatar-stage {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14), 0 12px 32px rgba(0, 0, 0, 0.45);
  background: #111116;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.avatar-stage.dragging { cursor: grabbing; }
.avatar-stage canvas {
  width: 240px;
  height: 240px;
  display: block;
  pointer-events: none;
}
.avatar-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.avatar-guides .guide-h {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}
.avatar-guides .guide-v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}
.avatar-guides .guide-ring {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}
.avatar-mini-previews {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.avatar-prev-circle {
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: block;
  background: #111116;
}
.avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
}
.avatar-ctrl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.avatar-ctrl-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  padding: 0;
  border: none;
  background: transparent;
}

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .sidebar {
    top: 64px;
    height: calc(100vh - 64px);
    z-index: 50;
    transform: translateX(-100%);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.55);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand { display: none; }
  .sidebar-backdrop { top: 64px; z-index: 45; }
  body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
  body.sidebar-collapsed .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0 !important; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .variant-grid { grid-template-columns: 1fr !important; }
}
