/* =============================================
   AppStore Premium - Main Stylesheet
   Design: Dark Luxury / Digital Marketplace
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {
  --bg-base: #0a0a0f;
  --bg-card: #111118;
  --bg-glass: rgba(255,255,255,0.04);
  --bg-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --accent: #6c63ff;
  --accent-glow: rgba(108,99,255,0.35);
  --accent-2: #ff6584;
  --accent-3: #43e97b;
  --text-primary: #f0f0f8;
  --text-secondary: #8888aa;
  --text-muted: #55556a;
  --success: #43e97b;
  --warning: #f9c74f;
  --error: #ff6584;
  --info: #4cc9f0;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 15px;
  overflow-x: hidden;
  max-width: 100%;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-primary); }

/* ---- Layout ---- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.navbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.brand-icon svg { width: 18px; height: 18px; color: white; }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

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

.balance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-3);
}

.user-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: white;
  font-size: 0.85rem;
}

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  min-width: 200px;
  padding: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 999;
}
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a, .dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}
.dropdown-menu a:hover, .dropdown-menu button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover {
  background: #7c74ff;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { background: #ff4d6d; transform: translateY(-1px); }

.btn-success {
  background: var(--success);
  color: #0a0a0f;
}
.btn-success:hover { background: #35d468; transform: translateY(-1px); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { border-color: var(--border-strong); }
.card-body { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg-glass); }

/* ---- Product Cards ---- */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(108,99,255,0.2);
}

.product-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.product-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.product-info { padding: 12px 14px; }
.product-cat {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.product-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-duration {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-3);
}
.product-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.badge-auto { background: rgba(67,233,123,0.15); color: var(--accent-3); }
.badge-manual { background: rgba(249,199,79,0.15); color: var(--warning); }
.badge-new { background: rgba(108,99,255,0.2); color: var(--accent); }

/* ---- Grid ---- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Product grid khusus: desktop=4, tablet=3, hp=2 */
.products-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  background: rgba(108,99,255,0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control option { background: var(--bg-card); }

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.8rem; color: var(--error); margin-top: 5px; }

/* ---- Flash Messages ---- */
.flash-msg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}
.flash-msg svg { width: 18px; height: 18px; flex-shrink: 0; }
.flash-msg button { margin-left: auto; background: none; border: none; cursor: pointer; padding: 0; color: inherit; opacity: 0.7; }
.flash-msg button:hover { opacity: 1; }
.flash-success { background: rgba(67,233,123,0.1); border: 1px solid rgba(67,233,123,0.3); color: var(--success); }
.flash-error { background: rgba(255,101,132,0.1); border: 1px solid rgba(255,101,132,0.3); color: var(--error); }
.flash-info { background: rgba(76,201,240,0.1); border: 1px solid rgba(76,201,240,0.3); color: var(--info); }
.flash-warning { background: rgba(249,199,79,0.1); border: 1px solid rgba(249,199,79,0.3); color: var(--warning); }

/* ---- Tables ---- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-glass);
}
table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  vertical-align: middle;
}
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--bg-hover); }

/* ---- Status Badges ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-pending { background: rgba(249,199,79,0.15); color: var(--warning); }
.status-completed { background: rgba(67,233,123,0.15); color: var(--success); }
.status-processing { background: rgba(76,201,240,0.15); color: var(--info); }
.status-cancelled { background: rgba(255,101,132,0.15); color: var(--error); }
.status-failed { background: rgba(255,101,132,0.15); color: var(--error); }
.status-approved { background: rgba(67,233,123,0.15); color: var(--success); }
.status-rejected { background: rgba(255,101,132,0.15); color: var(--error); }

/* ---- Stats Cards ---- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.accent-purple::before { background: var(--accent); }
.stat-card.accent-green::before { background: var(--accent-3); }
.stat-card.accent-pink::before { background: var(--accent-2); }
.stat-card.accent-blue::before { background: var(--info); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.purple { background: rgba(108,99,255,0.15); color: var(--accent); }
.stat-icon.green { background: rgba(67,233,123,0.15); color: var(--accent-3); }
.stat-icon.pink { background: rgba(255,101,132,0.15); color: var(--accent-2); }
.stat-icon.blue { background: rgba(76,201,240,0.15); color: var(--info); }

.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ---- Hero Section ---- */
.hero {
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---- Category Filter ---- */
.category-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin-bottom: 32px;
}
.category-filter::-webkit-scrollbar { display: none; }
.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition);
}
.cat-btn:hover, .cat-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,99,255,0.1);
}

/* ---- Section ---- */
.section { padding: 60px 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.section-title { font-size: 1.6rem; font-weight: 800; }
.section-subtitle { font-size: 0.9rem; color: var(--text-secondary); margin-top: 4px; }
.section-link { font-size: 0.875rem; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* ---- Auth Pages ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}
.auth-page::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(108,99,255,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(255,101,132,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .brand { font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; gap: 10px; justify-content: center; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 28px; }

/* ---- Dashboard ---- */
.dashboard-layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 64px); overflow-x: hidden; }
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 8px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar-nav a svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sidebar-nav a.active {
  background: rgba(108,99,255,0.12);
  color: var(--accent);
}
.main-content { padding: 32px; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.page-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 28px; }

/* ---- Topup ---- */
.method-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.method-card:hover, .method-card.selected {
  border-color: var(--accent);
  background: rgba(108,99,255,0.06);
}
.method-logo { width: 60px; height: 40px; object-fit: contain; margin: 0 auto 8px; display: block; }
.method-name { font-size: 0.875rem; font-weight: 700; }
.method-type { font-size: 0.75rem; color: var(--text-muted); }

/* ---- Product Detail ---- */
.product-detail-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}
.product-detail-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.price-tag {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-3);
  margin: 16px 0;
}
.buy-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 80px;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  padding: 32px;
  transform: scale(0.95);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.modal-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 24px; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
}

/* ---- Search ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 28px;
}
.search-bar svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 56px; height: 56px; margin: 0 auto 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 0.875rem; max-width: 300px; margin: 0 auto; }

/* ---- Footer ---- */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.875rem; margin-top: 14px; line-height: 1.7; }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-secondary); font-size: 0.875rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .product-detail-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; width: 100%; overflow-x: hidden; }
  .sidebar { display: none; }
  .hero { padding: 50px 0; }
  .hero h1 { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .navbar-nav { display: none; }
  .main-content { padding: 16px; width: 100%; box-sizing: border-box; overflow-x: hidden; }
}

/* =============================================
   MOBILE SIDEBAR DRAWER
   ============================================= */

/* Burger button — hidden on desktop */
.burger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}
.burger-btn:hover { background: var(--bg-hover); }
.burger-btn [data-lucide] { width: 22px; height: 22px; }

/* Overlay backdrop */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-overlay.open {
  display: block;
  opacity: 1;
}

/* Sidebar drawer */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 290px;
  max-width: 85vw;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-sidebar.open {
  transform: translateX(0);
}

/* Sidebar header */
.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mobile-sidebar-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.mobile-sidebar-close [data-lucide] { width: 20px; height: 20px; }

/* User info strip */
.mobile-sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-glass);
  flex-shrink: 0;
  flex-wrap: nowrap;
  min-width: 0;
}

.mobile-sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}

.mobile-sidebar-user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.mobile-sidebar-user-name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-sidebar-user-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-balance-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-3);
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 20px;
  padding: 4px 10px;
}

/* Nav links */
.mobile-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 20px;
  flex: 1;
}
.mobile-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}
.mobile-sidebar-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.mobile-sidebar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
  font-weight: 700;
}
.mobile-sidebar-nav a [data-lucide] { width: 18px; height: 18px; flex-shrink: 0; }

.mobile-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 4px;
}

/* Show burger on mobile, hide desktop navbar-nav & balance-badge */
@media (max-width: 768px) {
  .burger-btn { display: flex; align-items: center; justify-content: center; }
  .navbar-nav { display: none !important; }
  .balance-badge { display: none; }
  .navbar-inner { gap: 10px; }
  .navbar-actions .btn { font-size: 0.8rem; padding: 6px 12px; }
}

/* ---- Animations ---- */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade { animation: fadeIn 0.4s ease; }

/* ---- Lucide Icons Size ---- */
[data-lucide] { width: 16px; height: 16px; }
.icon-sm [data-lucide], [data-lucide].icon-sm { width: 14px; height: 14px; }
.icon-md [data-lucide], [data-lucide].icon-md { width: 20px; height: 20px; }
.icon-lg [data-lucide], [data-lucide].icon-lg { width: 24px; height: 24px; }

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-green { color: var(--accent-3); }
.text-red { color: var(--error); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.p-20 { padding: 20px; }
.hidden { display: none !important; }

/* ---- Admin Specific ---- */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-btns { display: flex; align-items: center; gap: 6px; }

/* Custom File Input */
.file-input-wrap { position: relative; }
.file-input-wrap input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.file-input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}
.file-input-label:hover { border-color: var(--accent); color: var(--accent); }

/* Checkbox / Toggle */
.toggle { position: relative; display: inline-flex; align-items: center; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  width: 44px; height: 24px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::after {
  content: '';
  width: 18px; height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::after {
  background: white;
  transform: translateX(20px);
}

/* Account detail box */
.account-box {
  background: rgba(67,233,123,0.05);
  border: 1px solid rgba(67,233,123,0.2);
  border-radius: var(--radius);
  padding: 20px;
}
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.account-row:last-child { border-bottom: none; }
.account-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.account-value { font-family: monospace; font-size: 0.9rem; color: var(--accent-3); font-weight: 600; }
.copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  transition: var(--transition);
}
.copy-btn:hover { color: var(--accent); }

/* =============================================
   MOBILE FIXES - Brand Icon & General
   ============================================= */

/* Paksa brand-icon tidak melar di situasi apapun */
.brand-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  flex-shrink: 0 !important;
}
.brand-icon svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

/* Navbar brand di mobile — jangan melar */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.1rem;
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: calc(100vw - 160px);
  }
  .navbar-inner {
    padding: 0;
  }
  .navbar {
    padding: 0 12px;
  }
}

/* Mobile sidebar brand icon juga */
.mobile-sidebar .brand-icon,
.mobile-sidebar-header .brand-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  flex-shrink: 0 !important;
}

/* Admin stat cards: 2 kolom di tablet, 1 di hp kecil */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .grid-3 { grid-template-columns: 1fr 1fr !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
}

/* Stat card min height agar konsisten di mobile */
.stat-card {
  min-height: unset !important;
  min-width: 0 !important;
}

/* ---- Extra mobile fixes ---- */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .main-content { padding: 12px !important; box-sizing: border-box !important; overflow-x: hidden !important; }
  .card-body { padding: 16px; }
  .card-header { padding: 14px 16px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 1.8rem !important; }
  .navbar-inner { padding: 0 12px; }
}

/* Topup detail responsive grid */
@media (max-width: 640px) {
  .topup-detail-grid {
    grid-template-columns: 1fr !important;
  }
}
