@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;800&family=Roboto:wght@300;400;500;700;900&display=swap");

:root {
  --itl-magenta: #ff2a70;
  --itl-magenta-rgb: 255, 42, 112;
  --itl-cyan: #00e5ff;
  --itl-navy: #0a1128;
  --itl-void: #050814;
  --itl-ink: #ffffff;
  --itl-isotype-pink: #f05090;
  --itl-isotype-blue: #1850b0;
  --itl-magenta-800: #cc225a;
  --itl-magenta-300: #ff8bb1;
  --itl-surface-3: #23293e;
  --itl-surface-4: #2f3548;
  --itl-font: "Roboto", system-ui, sans-serif;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--itl-font);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(255,42,112,.18), transparent 50%),
              radial-gradient(900px 500px at -10% 110%, rgba(0,229,255,.12), transparent 45%),
              var(--itl-navy);
  color: var(--itl-ink);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
a { color: var(--itl-cyan); text-decoration: none; }
img { max-width: 100%; }

.wrap { width: min(720px, 100% - 2rem); margin: 0 auto; padding: 1.25rem 0 2rem; }
.wrap-wide { width: min(980px, 100% - 1.25rem); }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 0 1.1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 700; letter-spacing: .02em; }
.brand img { height: 36px; width: auto; }
.kicker { letter-spacing: .18em; text-transform: uppercase; font-size: .68rem; color: var(--itl-cyan); margin: 0 0 .4rem; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 .6rem; font-weight: 900; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .7rem; }
.lede { color: #b7c2d6; margin: 0 0 1.2rem; line-height: 1.5; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 999px; padding: .85rem 1.25rem; font-weight: 700;
  font-family: inherit; cursor: pointer; font-size: .95rem;
}
.btn-primary { background: var(--itl-magenta); color: #fff; box-shadow: 0 8px 28px rgba(255,42,112,.35); }
.btn-primary:hover { background: #ff4d87; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid #3a4560; }
.btn-cyan { background: var(--itl-cyan); color: #050814; }
.btn-block { width: 100%; }
.row-btns { display: flex; gap: .7rem; flex-wrap: wrap; }
.row-btns .btn { flex: 1; }

.card {
  background: linear-gradient(180deg, #121a2b, #0e1524);
  border: 1px solid #243049; border-radius: 1.15rem; padding: 1.15rem 1.2rem;
}
.flash { border-radius: 12px; padding: .75rem 1rem; margin: 0 0 1rem; font-size: .92rem; }
.flash-error { background: #3a1020; border: 1px solid #ff2a70; }
.flash-ok { background: #0d2a24; border: 1px solid #00e5ff; }
.flash-info { background: #141c33; border: 1px solid #3a4560; }

label { display: block; font-size: .78rem; color: #9aa8c0; margin: .85rem 0 .35rem; }
input, select, textarea {
  width: 100%; background: #070b16; color: #fff; border: 1px solid #2a3550;
  border-radius: 10px; padding: .75rem .85rem; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,229,255,.45); border-color: var(--itl-cyan); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0; }
.stat { background: #070b16; border: 1px solid #243049; border-radius: 12px; padding: .75rem; text-align: center; }
.stat b { display: block; font-size: 1.25rem; color: var(--itl-cyan); }
.stat span { font-size: .72rem; color: #9aa8c0; letter-spacing: .04em; text-transform: uppercase; }

.passport {
  background:
    linear-gradient(160deg, rgba(255,42,112,.16), transparent 40%),
    #0b1020;
  border: 1px solid #ff2a7040; border-radius: 1.4rem; padding: 1.2rem;
  position: relative; overflow: hidden;
}
.passport::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 140px; height: 140px;
  background: url("../brand/isotype.png") center/contain no-repeat; opacity: .16; pointer-events: none;
}
.passport-id { font-variant-numeric: tabular-nums; letter-spacing: .16em; color: var(--itl-magenta); font-weight: 700; }

.stamps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1rem;
}
.seal {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 2px dashed #3a4560; color: #5b6a86; font-size: .7rem; text-align: center;
  padding: .4rem; position: relative; background: #070b16;
}
.seal.got {
  border-style: solid; border-color: var(--c, var(--itl-magenta));
  color: #fff; box-shadow: inset 0 0 0 4px rgba(255,255,255,.06), 0 0 18px color-mix(in srgb, var(--c, #ff2a70) 40%, transparent);
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c, #ff2a70) 55%, #0a1128), #0a1128);
  transform: rotate(-8deg);
}
.seal small { display: block; font-size: .62rem; opacity: .85; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h);
  background: rgba(5,8,20,.92); backdrop-filter: blur(12px);
  border-top: 1px solid #243049; display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.nav a {
  color: #8b97ad; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .15rem; font-size: .68rem; font-weight: 500;
}
.nav a.on, .nav a:hover { color: var(--itl-cyan); }
.nav svg { width: 22px; height: 22px; }

.hero-logo { height: 52px; margin: 1.5rem 0 1rem; }
.hero-card { text-align: left; }

.iso {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: .85rem;
  align-items: stretch;
}
.iso-art {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #050814;
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.iso-art img {
  width: 100%;
  display: block;
  vertical-align: middle;
}
.iso-pin {
  position: absolute;
  width: 34px; height: 34px;
  margin: 0; padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff2a70;
  color: #fff;
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .02em;
  cursor: pointer;
  transform: translate(-50%, -100%);
  box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 16px rgba(255,42,112,.55);
  z-index: 2;
  animation: pin-bob 2.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 1) * .12s);
}
.iso-pin::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -7px;
  width: 2px; height: 8px;
  background: #fff;
  transform: translateX(-50%);
}
.iso-pin.got {
  background: #00e5ff;
  color: #050814;
  box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 16px rgba(0,229,255,.55);
}
.iso-pin.on {
  z-index: 5;
  transform: translate(-50%, -110%) scale(1.2);
  animation: none;
}
@keyframes pin-bob {
  50% { transform: translate(-50%, -112%); }
}
.you-here {
  position: absolute;
  left: 50%; top: 86%;
  transform: translateX(-50%);
  background: #fff;
  color: #0a1128;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .25rem .55rem;
  border-radius: 99px;
  z-index: 3;
  animation: you-pulse 2s ease-in-out infinite;
}
@keyframes you-pulse {
  50% { box-shadow: 0 0 0 8px rgba(255,255,255,.15); }
}
.iso-leg {
  background: #0b1020;
  border: 1px solid #ff2a7040;
  border-radius: 12px;
  padding: .75rem .7rem;
  overflow: auto;
}
.iso-leg p {
  margin: 0 0 .5rem;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #ff8bb1;
  font-weight: 700;
}
.leg-row {
  display: flex; align-items: center; gap: .45rem;
  width: 100%; margin: 0 0 .28rem; padding: .28rem .3rem;
  border: 0; border-radius: 8px;
  background: transparent; color: #e8eef8;
  font: inherit; text-align: left; cursor: pointer;
}
.leg-row b {
  flex: 0 0 1.7rem;
  background: #ff2a70; color: #fff;
  font-size: .65rem; text-align: center;
  border-radius: 99px; padding: .12rem 0;
}
.leg-row.got b { background: #00e5ff; color: #050814; }
.leg-row span { font-size: .78rem; font-weight: 600; }
.leg-row:hover, .leg-row.on { background: rgba(255,42,112,.14); }

.sheet[hidden] { display: none !important; }
.sheet {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.1rem 1.15rem;
  background: #0b1020;
  border: 1px solid #ff2a7040;
  border-radius: 1.4rem;
}
.sheet .seal { width: 72px; height: 72px; font-size: 1.1rem; font-weight: 800; }
.sheet h2 { margin: 0 0 .2rem; }
.sheet .btn { margin-top: .75rem; }

@media (max-width: 800px) {
  .iso { grid-template-columns: 1fr; }
  .iso-pin { width: 28px; height: 28px; font-size: .58rem; }
}
@media (prefers-reduced-motion: reduce) {
  .iso-pin, .you-here { animation: none !important; }
}

.q { display: none; }
.q.on { display: block; }
.options { display: grid; gap: .55rem; }
.options label {
  margin: 0; color: #fff; font-size: .95rem; background: #070b16; border: 1px solid #2a3550;
  border-radius: 12px; padding: .85rem 1rem; cursor: pointer; display: flex; gap: .6rem; align-items: flex-start;
}
.options input { width: auto; margin-top: .2rem; }
.options label:has(input:checked) { border-color: var(--itl-cyan); background: #0b2230; }

.progress { height: 6px; background: #1b2438; border-radius: 99px; overflow: hidden; margin: .8rem 0 1rem; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--itl-magenta), var(--itl-cyan)); }

.rank-row {
  display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .8rem; align-items: center;
  padding: .75rem 0; border-bottom: 1px solid #1c2438;
}
.rank-row.me { background: rgba(255,42,112,.08); margin: 0 -1.2rem; padding-left: 1.2rem; padding-right: 1.2rem; }
.rank-n { font-weight: 900; color: var(--itl-magenta); }
.muted { color: #9aa8c0; font-size: .85rem; }

table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid #1c2438; vertical-align: top; }
th { color: #9aa8c0; font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }

.admin-nav { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-nav a { color: #c5d0e4; font-size: .85rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid #2a3550; }
.admin-nav a.on { background: var(--itl-magenta); border-color: var(--itl-magenta); color: #fff; }

#reader { border-radius: 16px; overflow: hidden; }
.qr-box { background: #fff; padding: 1rem; border-radius: 16px; display: inline-block; }
.stamp-pop { animation: pop .6s cubic-bezier(.2,1.4,.3,1); }
@keyframes pop { from { transform: scale(.4) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }

body.staff { padding-bottom: 2rem; }
.wrap-staff { width: min(1180px, 100% - 2rem); }

.ops-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .4rem; }
.ops-live { display: flex; align-items: center; gap: .45rem; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 0 0 rgba(0,229,255,.7);
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  70% { box-shadow: 0 0 0 10px rgba(0,229,255,0); }
}
.ops-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .6rem;
  margin: 1rem 0 1.1rem;
}
.ops-kpi {
  background: #070b16;
  border: 1px solid #243049;
  border-radius: 14px;
  padding: .85rem .9rem;
  animation: rise .5s ease both;
  animation-delay: calc(var(--i, 0) * .07s);
}
.ops-kpi.hot { border-color: #ff2a7066; }
.ops-kpi b { display: block; font-size: 1.45rem; color: var(--itl-cyan); }
.ops-kpi span { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa8c0; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

.ops-grid {
  display: grid;
  grid-template-columns: 1.35fr .9fr .9fr;
  gap: .8rem;
  margin-bottom: 1rem;
}
.ops-map, .ops-now, .ops-feed { min-height: 280px; }
.ops-floor { position: relative; border-radius: 10px; overflow: hidden; background: #050814; }
.ops-floor img { width: 100%; display: block; opacity: .92; }
.ops-node {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}
.ops-node-lab {
  display: block;
  font-size: .58rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 4px #000;
  margin-bottom: 2px;
}
.ops-dots { display: flex; gap: 3px; justify-content: center; min-height: 8px; }
.ops-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff2a70;
  box-shadow: 0 0 8px #ff2a70;
  animation: bob 1.4s ease-in-out infinite;
}
.ops-dots i:nth-child(2) { animation-delay: .2s; background: #00e5ff; box-shadow: 0 0 8px #00e5ff; }
.ops-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes bob {
  50% { transform: translateY(-4px); }
}

.ops-person, .ops-evt {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: .65rem;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid #1c2438;
  text-decoration: none;
  color: inherit;
  animation: rise .4s ease both;
}
.ops-person strong, .ops-evt strong { display: block; font-size: .88rem; }
.ops-ava {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, #ff2a70) 55%, #0a1128);
  font-weight: 800; font-size: .8rem;
}
.ops-tag {
  font-size: .62rem; letter-spacing: .06em; text-transform: uppercase;
  color: #00e5ff; white-space: nowrap;
}
.ops-evt em { font-style: normal; color: #ff8bb1; }
.ops-evt.sello { border-left: 2px solid #00e5ff; padding-left: .5rem; }
.ops-evt.in { border-left: 2px solid #ff2a70; padding-left: .5rem; }
#ops-feed, #ops-now-list { max-height: 340px; overflow: auto; }
.ops-table-wrap { overflow: auto; }
.chip {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #ff2a70; color: #fff; font-size: .65rem; font-weight: 800;
  margin-right: 2px;
}

.rank-row, .ops-table tbody tr {
  animation: rise .45s ease both;
}

@media (max-width: 900px) {
  .ops-kpis { grid-template-columns: repeat(2, 1fr); }
  .ops-grid { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; color: #000; padding: 0; }
  .nav, .admin-nav, .no-print { display: none !important; }
}
