/* haulora/pwa - fresh mobile-first stylesheet (not dashboard.css's desktop
   sidebar layout system). Color tokens match dev/public/assets/css/
   dashboard.css's :root so the PWA reads as the same product. */

:root {
  --bg:      #08071E;
  --bg-2:    #181B22;
  --accent:  #0098D6;
  --text:    #DCE1FA;
  --text-2:  #9BA1B5;
  --text-3:  #838B9F;
  --border:  #1E2130;
  --danger:  #E5484D;
  --success: #3DD68C;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

/* ── APP SHELL ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 56px;
  padding: 0 1rem;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: -0.5rem;
  border-radius: 8px;
  color: var(--text-2);
}

.topbar-back:active {
  background: rgba(255, 255, 255, 0.06);
}

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
}

/* No persistent bottom bar - /menu (a 2x5 grid, see .menu-grid below) is
   the post-login home; every other page shows a back-to-menu control in
   its topbar instead (partials/topbar.ejs's `back` flag). */
.content {
  min-height: calc(100dvh - 56px);
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
}

.loading, .error, .empty {
  color: var(--text-3);
  font-size: 0.875rem;
  padding: 2rem 0;
  text-align: center;
}

.error { color: var(--danger); }

/* ── LOGIN / AUTH-COMPLETE ─────────────────────────────────── */

.login-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.login-title { margin: 0; font-size: 1.5rem; }
.login-sub   { margin: 0 0 1rem; color: var(--text-2); }
.login-status { color: var(--text-2); }

.btn-steam {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── STAT / CARD PRIMITIVES ────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.875rem 1rem;
}

.stat-value { font-size: 1.25rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--text-3); margin-top: 0.125rem; }

.section-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 1.5rem 0 0.5rem;
}

.list { display: flex; flex-direction: column; gap: 0.5rem; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.875rem;
}

.list-row-main { min-width: 0; }
.list-row-title { font-size: 0.875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-sub   { font-size: 0.75rem; color: var(--text-3); margin-top: 0.125rem; }
.list-row-value { font-size: 0.875rem; font-weight: 600; white-space: nowrap; }

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.tab {
  flex: 0 0 auto;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── MENU GRID (post-login home) ───────────────────────────── */

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.menu-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  aspect-ratio: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.1s;
}

.menu-tile:active {
  background: rgba(255, 255, 255, 0.06);
}

.menu-tile-icon {
  color: var(--accent);
}

.menu-tile-disabled {
  color: var(--text-3);
}

.menu-tile-disabled .menu-tile-icon {
  color: var(--text-3);
}

.menu-tile-logout {
  color: var(--danger);
}

.menu-tile-logout .menu-tile-icon {
  color: var(--danger);
}
