/* ── Base body — flat dark, no distracting gradients ── */
body {
  min-height: 100vh;
  background-color: var(--brand-black);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Header ── */
.portal-header {
  border-bottom: 1px solid var(--border);
  background: rgba(12, 8, 6, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ── Brand ── */
.brand-title {
  font-family: 'Nunito', 'Inter', system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 32px;
  height: 42px;
  object-fit: contain;
  object-position: center;
}

/* ── Nav links ── */
.portal-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.portal-link:hover {
  color: var(--link-hover);
  text-decoration: none;
}
.portal-link.active {
  color: var(--accent);
}

/* ── Chip (user badge) ── */
.merchant-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── Panel cards with Octo-style gradient ── */
.panel {
  background: var(--grad-card), rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: visible;
  position: relative;
}

/* ── Metric cards ── */
.metric-value {
  font-family: 'Nunito', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ── Headings ── */
h1, h2, h3, h4, h5 {
  font-family: 'Nunito', 'Inter', system-ui, sans-serif;
  font-weight: 800;
}

/* ── Buttons ── */
.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.35rem 1rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}
.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

/* ── Mobile nav backdrop — full viewport, body-level ── */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Mobile nav drawer — body-level fixed panel ── */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: #130d09;
  border-left: 1px solid var(--border);
  z-index: 1100;
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(110%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.mobile-nav-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-nav-drawer .portal-link {
  font-size: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--divider);
  display: block;
}
.mobile-nav-drawer .portal-link:last-of-type {
  border-bottom: none;
}

/* ── Close button inside drawer ── */
.nav-close-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.nav-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* ── Hamburger button ── */
.btn-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

@media (max-width: 767px) {
  .btn-hamburger { display: flex; }
  .desktop-nav   { display: none !important; }
}

@media (min-width: 768px) {
  .btn-hamburger       { display: none !important; }
  .mobile-nav-drawer   { display: none !important; }
  .mobile-nav-backdrop { display: none !important; }
}
