/* ============================================================
   NORTHCREST ID — dashboard.css
   Account hub, in the site's design language (ink / gold / steel,
   Bricolage Grotesque + Manrope, ridge motif). Standalone file.
   ============================================================ */

:root {
  --ink: #07090d;
  --bg: #0a0c10;
  --bg-alt: #10141b;
  --surface: #151a22;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f5;
  --muted: #8b95a5;
  --gold: #e8bf5a;
  --gold-dim: rgba(232, 191, 90, 0.12);
  --steel: #5b8aa6;
  --danger: #e05b5b;
  --ok: #6fbf8f;
  --font-display: 'Bricolage Grotesque', Arial, sans-serif;
  --font-body: 'Manrope', Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  display: flex;
  background: var(--ink); color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
a { color: inherit; }
button { font-family: inherit; }
::selection { background: var(--gold); color: var(--ink); }

/* ------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------ */
.sidebar {
  width: 260px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 26px 18px;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 10px 26px;
  text-decoration: none;
}
.sidebar .logo strong {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; font-size: .95rem;
}
.sidebar .logo small {
  display: block; font-size: .62rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--gold); font-weight: 700;
}
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--muted); text-decoration: none;
  font-size: .88rem; font-weight: 600; letter-spacing: .02em;
  transition: color .2s, background .2s;
  width: 100%;
}
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.side-link.is-active {
  color: var(--ink); background: var(--gold);
  font-weight: 700;
}
.side-link.is-active svg { stroke: var(--ink); }
.side-sep { height: 1px; background: var(--border); margin: 12px 6px; }
.side-link--logout { color: var(--danger); margin-top: auto; }
.side-link--logout:hover { color: #ff8080; background: rgba(224, 91, 91, .08); }

/* ------------------------------------------------------------
   Main area
   ------------------------------------------------------------ */
.main { flex: 1; min-width: 0; padding: clamp(26px, 4vw, 56px); position: relative; }
.main::before {                       /* faint ridge backdrop */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 320px;
  background:
    radial-gradient(80% 100% at 70% 0%, rgba(91, 138, 166, .10), transparent 70%),
    radial-gradient(50% 80% at 20% 0%, rgba(232, 191, 90, .05), transparent 70%);
  pointer-events: none;
}
.panel { display: none; position: relative; animation: panel-in .45s var(--ease-out); }
.panel.is-active { display: block; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .68rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--steel); font-weight: 600; margin-bottom: 14px;
}
.panel-kicker::before { content: ""; width: 28px; height: 1px; background: var(--steel); }
.panel-title {
  font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 800;
  letter-spacing: -.015em; text-transform: uppercase; line-height: 1;
}
.panel-lede { color: var(--muted); line-height: 1.7; margin: 14px 0 0; max-width: 60ch; }

/* ------------------------------------------------------------
   Overview
   ------------------------------------------------------------ */
.profile-head {
  display: flex; align-items: center; gap: 22px;
  margin-bottom: clamp(28px, 4vh, 44px);
}
.avatar {
  width: 84px; height: 84px; border-radius: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 2.1rem;
  color: var(--ink);
  background: linear-gradient(145deg, #f2d283, var(--gold) 55%, #b8933c);
  box-shadow: 0 12px 32px rgba(232, 191, 90, .25);
}
.profile-head h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.015em;
}
.profile-head p { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.badge {
  display: inline-block; margin-left: 10px; vertical-align: middle;
  font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; font-weight: 700;
}
.badge--ok { color: var(--ok); border: 1px solid rgba(111, 191, 143, .4); background: rgba(111, 191, 143, .08); }
.badge--warn { color: var(--gold); border: 1px solid rgba(232, 191, 90, .4); background: var(--gold-dim); }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: clamp(28px, 4vh, 44px);
}
.stat-card {
  position: relative; overflow: clip;
  background: linear-gradient(180deg, var(--bg-alt), var(--surface));
  border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px;
  transition: transform .3s var(--ease-out), border-color .3s;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(232, 191, 90, .35); }
.stat-card .label {
  font-size: .66rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.stat-card .value {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.1; margin-top: 8px;
}
.stat-card .value small {
  font-size: .45em; color: var(--gold); letter-spacing: .08em; font-weight: 700;
}
.stat-card--gold { border-color: rgba(232, 191, 90, .35); cursor: pointer; text-decoration: none; display: block; }
.stat-card--gold::after {
  content: "Open store →"; position: absolute; right: 18px; bottom: 16px;
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; opacity: 0; transition: opacity .25s;
}
.stat-card--gold:hover::after { opacity: 1; }

/* ------------------------------------------------------------
   Cards / games
   ------------------------------------------------------------ */
.card {
  background: linear-gradient(180deg, var(--bg-alt), var(--surface));
  border: 1px solid var(--border); border-radius: 14px;
  padding: clamp(22px, 3vw, 32px);
  margin-bottom: 18px;
}
.card h3 {
  font-size: 1.15rem; font-weight: 800; letter-spacing: .01em; text-transform: uppercase;
}
.card .hint { color: var(--muted); font-size: .86rem; line-height: 1.65; margin: 10px 0 0; max-width: 62ch; }

.game-tile {
  position: relative; overflow: clip;
  border: 1px solid var(--border); border-radius: 14px;
  background:
    radial-gradient(120% 140% at 85% -20%, rgba(91, 138, 166, .22), transparent 60%),
    radial-gradient(90% 120% at 10% 120%, rgba(232, 191, 90, .10), transparent 60%),
    var(--bg-alt);
  padding: clamp(26px, 3.4vw, 40px);
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px;
  transition: border-color .3s, transform .3s var(--ease-out);
}
.game-tile:hover { border-color: rgba(232, 191, 90, .4); transform: translateY(-4px); }
.game-tile .ridge {
  position: absolute; right: -20px; bottom: -14px; width: 260px; opacity: .5; pointer-events: none;
}
.game-tile .status {
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
  border: 1px solid rgba(232, 191, 90, .4); background: var(--gold-dim);
  padding: 5px 12px; border-radius: 999px; display: inline-block; margin-bottom: 14px;
}
.game-tile h3 {
  font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800;
  letter-spacing: -.015em; text-transform: uppercase;
}
.game-tile p { color: var(--muted); margin: 10px 0 0; max-width: 52ch; line-height: 1.7; font-size: .92rem; }

/* ------------------------------------------------------------
   Forms & buttons
   ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; max-width: 420px; }
.field label {
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.field input {
  padding: 14px 16px; border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--ink); color: var(--text);
  font-family: inherit; font-size: .95rem;
  transition: border-color .25s;
}
.field input:focus { outline: none; border-color: var(--gold); }
.field input[readonly] { color: var(--muted); cursor: default; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 8px; border: 0; cursor: pointer;
  font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s, opacity .2s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(232, 191, 90, .3); }
.btn-line { background: none; border: 1px solid var(--border-strong); color: var(--text); }
.btn-line:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-2px); }
.btn-danger { background: none; border: 1px solid rgba(224, 91, 91, .5); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: rgba(224, 91, 91, .1); transform: translateY(-2px); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* Linked accounts */
.provider {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.provider:last-child { border-bottom: 0; }
.provider .p-name { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: .95rem; }
.provider .p-name svg { width: 22px; height: 22px; }
.provider .p-state { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.provider .p-state.is-linked { color: var(--ok); }

.danger-zone { border-color: rgba(224, 91, 91, .35); }
.danger-zone h3 { color: var(--danger); }

/* ------------------------------------------------------------
   NC pill (injected by js/nc-counter.js)
   ------------------------------------------------------------ */
.nc-pill {
  position: fixed; top: 20px; right: clamp(18px, 3vw, 40px); z-index: 55;
  display: flex; align-items: center; gap: 10px;
  background: rgba(7, 9, 13, 0.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 8px 18px 8px 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  color: var(--text); text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: transform .3s var(--ease-out), border-color .3s;
}
.nc-pill:hover { border-color: rgba(232, 191, 90, .5); }
.nc-pill svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px rgba(232, 191, 90, .35)); }
.nc-pill .nc-amount { min-width: 2ch; text-align: right; }
.nc-pill .nc-unit {
  font-size: .62rem; letter-spacing: .22em; color: var(--muted);
  font-family: var(--font-body); font-weight: 700; align-self: flex-end; margin-bottom: 3px;
}
.nc-pill.is-bump { animation: nc-bump .5s var(--ease-out); }
@keyframes nc-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); border-color: var(--gold); }
  100% { transform: scale(1); }
}

/* ------------------------------------------------------------
   Toast
   ------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%);
  z-index: 65; max-width: min(92vw, 520px);
  background: var(--surface); border: 1px solid rgba(232, 191, 90, .45);
  border-radius: 10px; padding: 15px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  font-size: .9rem; line-height: 1.5;
  transition: transform .5s var(--ease-out);
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(224, 91, 91, .55); }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 860px) {
  body { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center; gap: 6px;
    overflow-x: auto; padding: 14px;
    border-right: 0; border-bottom: 1px solid var(--border);
  }
  .sidebar .logo { padding: 0 10px 0 4px; }
  .sidebar .logo small { display: inline; margin-left: 6px; }
  .sidebar nav { flex-direction: row; flex: 1; }
  .side-link { white-space: nowrap; padding: 10px 12px; }
  .side-link span { display: none; }         /* icons only on mobile */
  .side-link svg { width: 20px; height: 20px; }
  .side-sep { display: none; }
  .side-link--logout { margin-top: 0; }
  .nc-pill { top: auto; bottom: 18px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}
