:root {
  --arc-black: #0b0b0d;
  --arc-black-2: #141416;
  --arc-gold: #d4af37;
  --arc-gold-2: #f1c94a;
  --arc-text: #e8e6e1;
  --arc-text-muted: #a8a49c;
}

body {
  background-color: var(--arc-black);
  color: var(--arc-text);
  font-family: 'Poppins', sans-serif;
}

a { color: var(--arc-gold-2); text-decoration: none; }
a:hover { color: var(--arc-gold); }

.text-gold { color: var(--arc-gold) !important; }
.text-secondary-light { color: var(--arc-text-muted) !important; }

.arc-navbar {
  background-color: var(--arc-black-2);
  border-bottom: 1px solid rgba(212,175,55,.25);
}
.navbar-brand { font-weight: 800; letter-spacing: .5px; color: var(--arc-text) !important; }
.nav-link { color: var(--arc-text-muted) !important; }
.nav-link:hover { color: var(--arc-gold) !important; }

.btn-gold {
  background: linear-gradient(135deg, var(--arc-gold-2), var(--arc-gold));
  color: #1a1400 !important;
  border: none;
  font-weight: 600;
}
.btn-gold:hover { filter: brightness(1.08); color: #1a1400 !important; }

.btn-outline-gold {
  border: 1px solid var(--arc-gold);
  color: var(--arc-gold) !important;
  background: transparent;
  font-weight: 600;
}
.btn-outline-gold:hover { background: var(--arc-gold); color: #1a1400 !important; }

.arc-hero {
  background: radial-gradient(circle at 30% 20%, rgba(212,175,55,.12), transparent 55%), var(--arc-black);
  padding: 6rem 0 4rem;
  border-bottom: 1px solid rgba(212,175,55,.15);
}

.arc-card {
  background-color: var(--arc-black-2);
  border: 1px solid rgba(212,175,55,.18);
  border-radius: .75rem;
}

.arc-card .card-title { color: var(--arc-gold); }

.table-arc {
  --bs-table-bg: transparent;
  --bs-table-color: var(--arc-text);
  border: 1px solid rgba(212,175,55,.25);
}
.table-arc thead { background-color: rgba(212,175,55,.12); color: var(--arc-gold); }
.table-arc td, .table-arc th { border-color: rgba(212,175,55,.12); }

.arc-footer {
  background-color: var(--arc-black-2);
  border-top: 1px solid rgba(212,175,55,.25);
}
.arc-footer a { color: var(--arc-text-muted); }
.arc-footer a:hover { color: var(--arc-gold); }

.form-control, .form-select {
  background-color: var(--arc-black-2);
  border: 1px solid rgba(212,175,55,.25);
  color: var(--arc-text);
}
.form-control:focus, .form-select:focus {
  background-color: var(--arc-black-2);
  color: var(--arc-text);
  border-color: var(--arc-gold);
  box-shadow: 0 0 0 .2rem rgba(212,175,55,.15);
}
.form-control::placeholder { color: var(--arc-text-muted); }
label { color: var(--arc-text-muted); }

.stat-card {
  background: linear-gradient(160deg, var(--arc-black-2), #1c1a12);
  border: 1px solid rgba(212,175,55,.25);
  border-radius: .75rem;
  padding: 1.5rem;
}
.stat-card .stat-value { color: var(--arc-gold); font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { color: var(--arc-text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }

.referral-box {
  background-color: var(--arc-black-2);
  border: 1px dashed rgba(212,175,55,.4);
  border-radius: .5rem;
  padding: .75rem 1rem;
}

/* ==========================================================================
   Member Panel Shell (Milestone 6) — sidebar (desktop) + bottom nav (mobile)
   ========================================================================== */

.arc-impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: #d9534f;
  color: #fff;
  padding: 10px 16px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.arc-panel-body {
  min-height: 100vh;
}

.arc-panel-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* Desktop sidebar */
.arc-sidebar {
  width: 240px;
  flex: 0 0 240px;
  background-color: var(--arc-black-2);
  border-right: 1px solid rgba(212,175,55,.18);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.arc-sidebar-brand {
  display: block;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--arc-text) !important;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding: 0 .5rem;
}

.arc-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.arc-sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: .5rem;
  color: var(--arc-text-muted) !important;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}

.arc-sidebar-link:hover {
  background-color: rgba(212,175,55,.08);
  color: var(--arc-text) !important;
}

.arc-sidebar-link.active {
  background: linear-gradient(135deg, rgba(241,201,74,.16), rgba(212,175,55,.10));
  color: var(--arc-gold) !important;
  border: 1px solid rgba(212,175,55,.3);
}

.arc-nav-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.arc-sidebar-footer {
  border-top: 1px solid rgba(212,175,55,.15);
  padding-top: 1rem;
  margin-top: 1rem;
}

.arc-sidebar-user-name {
  font-weight: 600;
  color: var(--arc-text);
  font-size: .9rem;
}

.arc-sidebar-user-id {
  font-size: .78rem;
  margin-bottom: .75rem;
}

.arc-sidebar-logout {
  color: #e08a85 !important;
}
.arc-sidebar-logout:hover {
  background-color: rgba(217,83,79,.12);
  color: #e08a85 !important;
}

/* Main content column */
.arc-panel-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.arc-panel-content {
  flex: 1 1 auto;
  padding: 1.25rem 1rem 2rem;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .arc-panel-content {
    padding: 2rem 2.5rem 3rem;
  }
}

/* Mobile top bar */
.arc-topbar {
  background-color: var(--arc-black-2);
  border-bottom: 1px solid rgba(212,175,55,.18);
  padding: .75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.arc-topbar-logout {
  color: #e08a85 !important;
  display: inline-flex;
}

/* Mobile bottom nav */
.arc-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background-color: var(--arc-black-2);
  border-top: 1px solid rgba(212,175,55,.22);
  padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(0,0,0,.35);
}

.arc-bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  color: var(--arc-text-muted) !important;
  font-size: .68rem;
  font-weight: 600;
  padding: .35rem .5rem;
  border-radius: .5rem;
  flex: 1 1 0;
  text-align: center;
}

.arc-bottom-link.active {
  color: var(--arc-gold) !important;
}

.arc-bottom-label {
  white-space: nowrap;
}

/* Give bottom-nav clearance on mobile so content never hides behind it */
@media (max-width: 767.98px) {
  .arc-panel-content {
    padding-bottom: 5.5rem;
  }
}

/* Responsive card/table polish reused across all member panel pages */
.arc-panel-content .table-responsive {
  border-radius: .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.arc-panel-content .stat-card {
  padding: 1.1rem 1.25rem;
}

@media (max-width: 575.98px) {
  .arc-panel-content h2 {
    font-size: 1.4rem;
  }
  .referral-box {
    flex-direction: column;
    align-items: stretch !important;
  }
  .referral-box input {
    min-width: 0 !important;
    width: 100%;
  }
}

/* ==========================================================================
   Mobile full-navigation drawer (Milestone 9)
   ========================================================================== */

.arc-hamburger-btn {
  background: transparent;
  border: 1px solid rgba(212,175,55,.3);
  border-radius: .5rem;
  color: var(--arc-text);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.arc-hamburger-btn:hover,
.arc-hamburger-btn:active {
  background-color: rgba(212,175,55,.08);
}

/* Sits above the sticky impersonation banner (z-index 2000) so the drawer
   and its backdrop never render underneath the banner on mobile. */
.arc-mobile-drawer.offcanvas {
  z-index: 2100;
  background-color: var(--arc-black-2);
  color: var(--arc-text);
  border-right: 1px solid rgba(212,175,55,.18);
  width: 280px;
}

.offcanvas-backdrop {
  z-index: 2090;
}

.arc-mobile-drawer .offcanvas-header {
  border-bottom: 1px solid rgba(212,175,55,.15);
  align-items: flex-start;
}

.arc-mobile-drawer .offcanvas-body {
  padding: 1rem;
}

.arc-mobile-drawer .arc-sidebar-footer {
  margin-top: auto;
}

/* ==========================================================================
   Shared empty-state pattern (Milestone 9 polish pass)
   ========================================================================== */

.arc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--arc-text-muted);
}

.arc-empty-state svg {
  opacity: .55;
}

.arc-empty-state .arc-empty-title {
  font-weight: 600;
  color: var(--arc-text);
  font-size: .95rem;
}

.arc-empty-state .arc-empty-sub {
  font-size: .82rem;
  max-width: 320px;
}

/* Slightly smaller stat-value for longer text (e.g. rank name, rupee amount) */
.stat-value-sm {
  font-size: 1.15rem;
}

/* Reusable gold progress bar (business plan "progress to next rank") */
.progress-arc {
  height: 22px;
  background: #241f14;
}

.progress-arc .progress-bar {
  background: var(--arc-gold);
  color: #151004;
  font-weight: 700;
}

/* Reusable gold badge for one-off highlighted labels */
.badge-gold {
  background: var(--arc-gold);
  color: #151004;
}

/* Reusable square product thumbnail (shop grid + cart) */
.arc-product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: .4rem;
}

.arc-product-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #241f14;
  border-radius: .4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ad-hoc narrow input/cell widths reused across shop/cart quantity controls */
.arc-w-qty {
  max-width: 70px;
}

.arc-w-thumb-cell {
  max-width: 110px;
}

/* Darker inset sub-panel inside an .arc-card (e.g. checkout payment-method box) */
.arc-card-inset {
  background: #241f14;
}
