/* ═══════════════════════════════════════════════════
   KREDITS — page reset and the older app header pieces (.k-header,
   app switcher, user chip, bottom nav). Colours, fonts and the shared
   components (.k-btn, .k-card, .k-input, .k-modal, .k-toast) live in
   /shared/kredits-tokens.css and /shared/kredits-base.css, which every
   page loads before this file.
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body { background: var(--surface-alt); color: var(--ink); font-family: var(--font-body); min-height: 100vh; overflow-x: hidden; }

/* ── KREDITS PLATFORM HEADER ── */
.k-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.k-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.k-logo-mark {
  width: 30px; height: 34px; flex-shrink: 0;
  background: url(/icons/k-mark-tight.png) center / contain no-repeat;
  font-size: 0; color: transparent;   /* the old "K" letter inside is hidden: the mark is the image */
}
.k-logo-text { display: flex; flex-direction: column; line-height: 1; gap: 1px; }
.k-logo-brand { font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.k-logo-app   { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }

/* App switcher pill */
.k-app-switcher {
  display: flex; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px; gap: 0;
  box-shadow: none;
}
.k-app-btn {
  display: flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 6px 12px; border-radius: 16px; border: none;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
  color: var(--text-muted); background: transparent; text-decoration: none;
}
.k-app-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.k-app-btn:hover:not(.active) { color: var(--ink); }

/* User chip */
.k-user-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px 4px 4px;
  min-height: 36px; font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.k-user-chip:hover { border-color: var(--accent); color: var(--accent); }
.k-user-av {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--on-accent);
  flex-shrink: 0;
}
.k-sync-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0;
}
.k-sync-dot.live { background: var(--success); }

/* Bottom nav */
.k-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; box-shadow: var(--shadow-sm);
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.k-bottom-nav::-webkit-scrollbar { display: none; }
.k-nav-item {
  flex: 0 0 72px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; padding: 12px 4px;
  min-height: 64px;
  cursor: pointer; border: none; background: transparent;
  font-family: var(--font-body); color: var(--text-faint); text-decoration: none;
  transition: color 0.15s;
}
.k-nav-item:hover { color: var(--ink); }
.k-nav-item.active { color: var(--accent); }
.k-nav-icon  { font-size: 22px; line-height: 1; }
.k-nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }

/* Animations */
@keyframes k-fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.k-fade-up { animation: k-fadeUp 0.3s ease both; }
