/* IMMYStore — "Sleek Dark"
   Dark navy ground, glassy panels, soft IMMY-blue glow. The IMMY logo is the coin.
   Type: Space Grotesk (display) · Space Mono (coin values / ledgers) · Inter (body) */
:root {
  --bg: #0A0F1E;
  --bg-2: #0E1525;
  --panel: rgba(255,255,255,.05);
  --panel-2: rgba(255,255,255,.08);
  --solid: #141B2E;
  --line: rgba(255,255,255,.10);
  --line-2: rgba(255,255,255,.16);
  --ink: #EAF0FF;
  --soft: #8A97B5;
  --faint: #5C6B8A;
  --blue: #4D8DFF;
  --blue-press: #3A7AF0;
  --blue-soft: rgba(77,141,255,.15);
  --glow: rgba(77,141,255,.5);
  --red: #E0506A;
  --ok: #34D399;
  --danger: #FF6B6B;
  --radius: 16px;
  --radius-lg: 20px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
::selection { background: var(--blue); color: #fff; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 460px at 85% -8%, rgba(77,141,255,.20), transparent 60%),
    radial-gradient(700px 460px at -5% 105%, rgba(166,25,46,.12), transparent 55%);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--soft); }
.right { text-align: right; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; border: 3px solid var(--bg); }

/* ---------- IMMYCoin token = the IMMY logo ---------- */
.coin {
  display: inline-block;
  width: 1em; height: 1em;
  background: url("immy-coin.svg") center / contain no-repeat;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 1px 3px rgba(0,0,0,.4);
  flex: none;
  vertical-align: -0.16em;
}

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%; max-width: 400px;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 60px -20px var(--glow) inset;
}
.login-card .coin { font-size: 60px; margin: 0 auto 18px; }
.login-card h1 { font-family: var(--display); font-weight: 700; font-size: 27px; margin: 0 0 6px; letter-spacing: -.01em; }
.login-card .lede { color: var(--soft); margin: 0 0 26px; font-size: 15px; }
.login-card label { display: block; text-align: left; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.login-card select { width: 100%; }
.login-card .btn { width: 100%; margin-top: 18px; }
.ms-btn { display: flex; align-items: center; justify-content: center; gap: 9px; }
.ms-btn::before {
  content: ""; width: 16px; height: 16px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='1' y='1' width='8' height='8' fill='%23F25022'/%3E%3Crect x='11' y='1' width='8' height='8' fill='%237FBA00'/%3E%3Crect x='1' y='11' width='8' height='8' fill='%2300A4EF'/%3E%3Crect x='11' y='11' width='8' height='8' fill='%23FFB900'/%3E%3C/svg%3E") center / contain no-repeat;
}
.dev-note { font-size: 12px; color: var(--faint); margin: 14px 0 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 26px;
  padding: 0 28px; height: 62px;
  background: rgba(10,15,30,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .coin { font-size: 25px; }
.brand .word { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand .word b { color: var(--blue); }
.tabs { display: flex; gap: 2px; margin-left: 6px; }
.tab {
  font-family: var(--body); background: none; border: none; cursor: pointer;
  color: var(--soft); padding: 8px 15px; border-radius: 9px; font-size: 14.5px; font-weight: 500;
}
.tab:hover { color: var(--ink); background: var(--panel); }
.tab.active { color: #fff; background: var(--panel-2); }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.wallet {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line-2);
  padding: 7px 14px; border-radius: 999px;
}
.wallet .coin { font-size: 17px; }
.wallet .amt { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--ink); }
.who { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.who .name { font-size: 13.5px; font-weight: 600; }
.who .role { font-size: 11px; color: var(--faint); text-transform: capitalize; }
.icon-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--soft);
  cursor: pointer; border-radius: 9px; padding: 7px 11px; font-size: 13px; font-family: var(--body);
}
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }

/* ---------- Section heads ---------- */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin: 0 0 6px; }
h2.section { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.01em; margin: 0 0 4px; }
.section-sub { color: var(--soft); margin: 0 0 22px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(540px 320px at 92% -40%, rgba(77,141,255,.4), transparent 62%),
    linear-gradient(135deg, var(--bg-2), #0c1430);
  backdrop-filter: blur(14px);
  padding: 42px 46px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  margin-bottom: 30px;
  box-shadow: 0 0 70px -24px var(--glow) inset, 0 20px 50px rgba(0,0,0,.35);
}
.hero-text { position: relative; z-index: 1; }
.hero-eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); margin: 0 0 12px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 14px; max-width: 17ch; }
.hero p { color: var(--soft); margin: 0 0 22px; max-width: 46ch; font-size: 15.5px; }
.hero-balance { display: flex; align-items: baseline; gap: 12px; }
.hero-balance .figure { font-family: var(--mono); font-weight: 700; font-size: 46px; color: #fff; line-height: 1; }
.hero-balance .coin { font-size: 36px; align-self: center; }
.hero-balance .label { font-size: 13px; color: var(--soft); }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-size: 13.5px; color: var(--soft);
  background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px;
}
.hero-tag code { font-family: var(--mono); color: var(--blue); font-size: 13px; }
.hero-coin { width: 200px; height: 200px; position: relative; }
.hero-coin-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 14px 30px rgba(0,0,0,.5)); }
.hero-coin .gleam {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.5) 48%, transparent 60%);
  mix-blend-mode: screen; transform: translateX(-120%);
}
.hero-coin.animate .gleam { animation: sweep 1.5s ease-out .35s 1 both; }
@keyframes sweep { to { transform: translateX(120%); } }

/* ---------- Category chips ---------- */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-family: var(--body); cursor: pointer;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--soft); padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(77,141,255,.5); box-shadow: 0 0 34px -12px var(--glow); transform: translateY(-3px); }
.card .thumb {
  position: relative; aspect-ratio: 1 / 1;
  background: #fff; border-radius: 12px; margin: 10px 10px 0;
  display: grid; place-items: center; padding: 18px; overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.045); }
.card .thumb .placeholder { font-size: 44px; color: #C7D0DE; }
.card-badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 70%; }
.badge {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 7px; border-radius: 6px; cursor: help;
  background: rgba(20,40,80,.6); color: #BcD3FF; backdrop-filter: blur(4px);
}
.card-body { padding: 13px 15px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .cat { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.card h4 { font-family: var(--display); font-weight: 600; font-size: 16px; margin: 0; letter-spacing: -.01em; }
.card .desc { color: var(--soft); font-size: 13px; flex: 1; }
.price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.price { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--ink); }
.price .coin { font-size: 18px; }
.buy-btn { white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--body); font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 9px 16px; border-radius: 10px; transition: background .15s, border-color .15s, transform .1s, color .15s;
}
.btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn.primary, .btn.gold { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover, .btn.gold:hover { background: var(--blue-press); border-color: var(--blue-press); }
.btn.danger { background: #A6192E; border-color: #A6192E; color: #fff; }
.btn.danger:hover { background: #8a1426; border-color: #8a1426; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
/* "Redeem" on cards: soft blue that fills on hover */
.buy-btn.primary { background: var(--blue-soft); border-color: rgba(77,141,255,.4); color: #9DC0FF; }
.buy-btn.primary:hover { background: var(--blue); color: #fff; }
.btn:disabled { background: rgba(255,255,255,.03); border-color: var(--line); color: var(--faint); cursor: not-allowed; }

input, select {
  font-family: var(--body); font-size: 14px; color: var(--ink);
  background: var(--solid); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77,141,255,.2); }
select option { background: var(--solid); color: var(--ink); }

/* ---------- Account / wallet ---------- */
.account-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.wallet-card {
  background: radial-gradient(420px 300px at 20% -30%, rgba(77,141,255,.35), transparent 60%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px;
  backdrop-filter: blur(14px); position: relative; overflow: hidden;
  box-shadow: 0 0 60px -24px var(--glow) inset;
}
.wallet-card .coin { font-size: 40px; margin-bottom: 16px; }
.wallet-card .figure { font-family: var(--mono); font-weight: 700; font-size: 44px; line-height: 1; color: #fff; }
.wallet-card .label { font-size: 13px; color: var(--soft); margin-top: 8px; }
.wallet-card .hint { margin-top: 18px; font-size: 13px; color: var(--soft); border-top: 1px solid var(--line); padding-top: 14px; }
.wallet-card .hint code { font-family: var(--mono); color: var(--blue); }

/* ---------- Panels / ledger / tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; backdrop-filter: blur(10px); }
.panel h3 { font-family: var(--display); font-weight: 600; font-size: 17px; margin: 0 0 4px; }
.panel .sub { color: var(--soft); font-size: 13.5px; margin: 0 0 16px; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 700; text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.ledger tr:last-child td { border-bottom: none; }
.ledger .when { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.ledger .amt { font-family: var(--mono); font-weight: 700; text-align: right; white-space: nowrap; }
.amt.pos { color: var(--ok); }
.amt.neg { color: var(--danger); }
.pill { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: var(--soft); border: 1px solid var(--line); }
.pill.praise { background: rgba(52,211,153,.14); color: #5BE0AE; border-color: transparent; }
.pill.hr_grant { background: rgba(77,141,255,.16); color: #9DC0FF; border-color: transparent; }
.pill.purchase { background: rgba(255,107,107,.14); color: #FF9090; border-color: transparent; }
.pill.adjustment { background: var(--panel-2); color: var(--soft); }

.row-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-form select, .row-form input { flex: 1; min-width: 140px; }
.status { margin-top: 12px; font-size: 13.5px; min-height: 18px; font-weight: 500; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }

/* ---------- Manage Store ---------- */
.item-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.item-form .field { display: flex; flex-direction: column; gap: 6px; }
.item-form .field.span-2 { grid-column: 1 / -1; }
.item-form label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.item-form input[type="file"] { padding: 9px; background: rgba(255,255,255,.03); border-style: dashed; color: var(--soft); }
.form-actions { flex-direction: row !important; align-items: center; gap: 14px; }
.manage-table td { vertical-align: middle; }
.item-cell { display: flex; align-items: center; gap: 12px; }
.item-name { font-weight: 600; }
.mini-thumb { width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.mini-thumb img { width: 100%; height: 100%; object-fit: contain; }
input.mini { width: 84px; padding: 7px 9px; font-family: var(--mono); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
tr.is-hidden { opacity: .5; }

.stat-strip { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 18px; }
.stat .n { font-family: var(--mono); font-weight: 700; font-size: 24px; color: #fff; }
.stat .k { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.empty { color: var(--faint); padding: 18px 12px; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; gap: 14px; }
.footer-inner .coin { font-size: 30px; }
.footer-text { display: flex; flex-direction: column; line-height: 1.3; }
.footer-text strong { font-family: var(--display); font-size: 15px; }
.footer-text span { font-size: 13px; color: var(--soft); }
.footer-note { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.footer-note code { font-family: var(--mono); color: var(--blue); font-size: 12px; }
@media (max-width: 640px) { .footer-note { display: none; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(8px);
  display: flex; align-items: center; gap: 10px;
  background: var(--solid); color: #fff; padding: 13px 20px; border-radius: 12px;
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 40px rgba(0,0,0,.5); font-size: 14px; font-weight: 500; z-index: 50;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(255,107,107,.6); }
.toast .coin { font-size: 18px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-coin { width: 150px; height: 150px; justify-self: start; }
  .account-grid { grid-template-columns: 1fr; }
  .tabs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-coin.animate .gleam { animation: none; }
  .card, .card .thumb img { transition: none; }
}
