:root {
  --bg: #070707;
  --panel: #0e0e0f;
  --line: #2a2720;
  --gold: #d5ab58;
  --gold2: #8f6b2b;
  --text: #f4f2ec;
  --muted: #99968f;
  --ok: #9dd6aa;
  --danger: #f08f8f;
  --safe: env(safe-area-inset-top, 0px);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(
    circle at 50% -10%,
    #252015 0,
    #0a0a0a 36%,
    #050505 100%
  );
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
body {
  padding-top: var(--safe);
}
a {
  color: inherit;
  text-decoration: none;
}
.shell {
  width: min(1120px, calc(100% - 32px));
  margin: auto;
}
.landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.hero {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  padding: 54px 0;
}
.brand-logo {
  width: min(430px, 90vw);
  max-height: 300px;
  object-fit: contain;
  border-radius: 28px;
  box-shadow: 0 30px 80px #0008;
}
.eyebrow {
  margin-top: 28px;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  font-weight: 800;
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.95;
  margin: 18px 0 14px;
  letter-spacing: -0.055em;
}
.hero h1 span {
  color: var(--gold);
}
.lead {
  max-width: 740px;
  margin: 0 auto;
  color: #b8b5ad;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  line-height: 1.7;
}
.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.btn {
  border: 1px solid #403827;
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #111;
}
.btn.primary {
  background: linear-gradient(135deg, #e1bc72, #8b6527);
  color: #090806;
  border-color: #e3c47f;
}
.btn.ghost:hover,
.btn.primary:hover {
  transform: translateY(-1px);
}
.status-chip {
  margin-top: 22px;
  color: #b7b3aa;
  border: 1px solid #26231d;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}
.status-chip i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--ok);
  border-radius: 50%;
  margin-right: 8px;
}
footer {
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: #66645f;
  font-size: 0.78rem;
  border-top: 1px solid #151515;
}
.app-shell {
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(12px + var(--safe)) 18px 12px;
  background: #070707e8;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #1c1b18;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-mini {
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.topbar a {
  font-size: 0.85rem;
  color: #aaa;
}
.page {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 60px;
}
.page h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.045em;
}
.page .sub {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.card {
  grid-column: span 12;
  background: linear-gradient(180deg, #111, #0b0b0c);
  border: 1px solid #24211b;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 20px 45px #0005;
}
.card.half {
  grid-column: span 6;
}
.card.third {
  grid-column: span 4;
}
.card h2 {
  font-size: 1rem;
  margin: 0 0 12px;
  color: #e8d7b5;
}
.label {
  display: block;
  font-size: 0.72rem;
  color: #8e8a82;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 14px 0 7px;
}
.input,
.select {
  width: 100%;
  background: #090909;
  color: #eee;
  border: 1px solid #2d2a23;
  border-radius: 13px;
  padding: 13px 14px;
  outline: none;
}
.input:focus,
.select:focus {
  border-color: #81652f;
  box-shadow: 0 0 0 3px #81652f22;
}
.btn.wide {
  width: 100%;
  margin-top: 14px;
}
.metric {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.metric small {
  font-size: 0.75rem;
  color: #8a867f;
  letter-spacing: 0.08em;
  margin-left: 6px;
}
.muted {
  color: #87847d;
}
.state {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border-radius: 13px;
  background: #0a0a0a;
  border: 1px solid #24211b;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #777;
}
.dot.ok {
  background: var(--ok);
}
.dot.warn {
  background: var(--gold);
}
.dot.bad {
  background: var(--danger);
}
.terminal {
  min-height: 180px;
  background: #050505;
  border: 1px solid #24211b;
  border-radius: 14px;
  padding: 14px;
  font:
    12px/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: #b8b3a6;
  white-space: pre-wrap;
  overflow: auto;
  scrollbar-width: none;
}
.terminal::-webkit-scrollbar {
  display: none;
}
.nfc-stage {
  text-align: center;
  padding: 28px 14px;
}
.nfc-ring {
  width: 148px;
  height: 148px;
  border: 1px solid #6d5629;
  border-radius: 50%;
  margin: 8px auto 20px;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 0 35px #a37b2930,
    0 0 55px #a37b291b;
}
.nfc-ring span {
  font-size: 3.4rem;
  color: var(--gold);
}
.badge {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid #343026;
  border-radius: 999px;
  font-size: 0.72rem;
  color: #a8a39a;
}
.danger-note {
  color: #e0a0a0;
  font-size: 0.8rem;
  line-height: 1.5;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 14px;
}
.login-card {
  width: min(440px, 100%);
  background: #0c0c0d;
  border: 1px solid #28241c;
  border-radius: 24px;
  padding: 24px;
}
.login-card h1 {
  margin: 0;
  color: var(--gold);
}
.login-card p {
  color: #888;
}
.hidden {
  display: none !important;
}
@media (max-width: 720px) {
  .card.half,
  .card.third {
    grid-column: span 12;
  }
  .page {
    padding-top: 20px;
  }
  .hero {
    padding-top: 30px;
  }
  .brand-logo {
    max-height: 240px;
  }
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.link-button {
  border: 0;
  background: none;
  color: #aaa;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}
.login-back {
  display: block;
  text-align: center;
}
