/* ==========================================================================
   GASTERUS v3 — LAYOUT SYSTEM
   Header, Navigation, Sidebar, Page Container, Footer
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  display: flex;
  align-items: center;
}

.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  order: -1;
  margin-right: auto;
}

.brand-logo .brand-logo-img {
  height: 46px;
  width: auto;
  max-width: 230px;
  object-fit: contain;
  object-position: left center;
  display: block;
  background: transparent;
  image-rendering: auto;
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.55));
}

@media (max-width: 480px) {
  .brand-logo .brand-logo-img {
    height: 38px;
    max-width: 185px;
  }
}

.brand-logo .logo-badge {
  background: var(--brand-gold);
  color: var(--text-inverse);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

/* Top Nav Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-primary);
}

/* Header User / Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* User Balance Pill */
.balance-pill {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  gap: var(--space-2);
  font-size: 0.875rem;
}

.balance-pill .balance-amount {
  font-weight: 700;
  color: var(--text-gold);
}

/* Main Content Wrapper */
.app-main {
  flex: 1;
  padding-block: var(--space-6);
}

/* Ticker / Running Info */
.info-ticker {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: var(--space-2);
  font-size: 0.85rem;
  overflow: hidden;
  white-space: nowrap;
}

/* Footer */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-8);
  margin-top: auto;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col a {
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  text-align: center;
  color: var(--text-muted);
}

/* Navigation Drawer (konsisten dengan mobile-blue.css) */
.menu-toggle {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--brand-primary);
  font-size: 1.125rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(2, 6, 23, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.nav-drawer-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 950;
  width: 280px;
  max-width: 82vw;
  background: linear-gradient(180deg, #0f1c30 0%, #060b14 100%);
  border-right: 1px solid var(--border-strong);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.8);
  transform: translateX(-100%);
  transition: transform 220ms ease;
  overflow-y: auto;
  padding-bottom: 30px;
}

body.nav-open .nav-drawer,
.nav-drawer.open {
  transform: translateX(0);
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, #12223a 0%, #08111f 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-drawer-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.nav-drawer-close {
  background: none;
  border: none;
  color: #f87171;
  font-size: 1.0625rem;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.nav-drawer-close:hover {
  color: #ffffff;
}

.nav-drawer-body {
  padding: 8px 0;
}

.nav-drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 150ms ease;
  border-left: 3px solid transparent;
}

.nav-drawer-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--brand-primary);
  color: #ffffff;
}
