:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(15, 20, 29, 0.82);
  --panel-strong: rgba(22, 30, 43, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #eef4ff;
  --muted: #9ba9bd;
  --faint: #68778d;
  --blue: #63b3ff;
  --green: #49d49d;
  --amber: #e8b45f;
  --red: #fb7185;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(99, 179, 255, 0.2), transparent 38rem),
    radial-gradient(circle at 85% 5%, rgba(73, 212, 157, 0.12), transparent 34rem),
    linear-gradient(135deg, #07090d 0%, #0b1018 55%, #080b11 100%);
}

a { color: inherit; }
.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 30px 0 44px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: end;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(14, 20, 31, 0.92), rgba(11, 16, 24, 0.76));
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}
h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}
.lede {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}
.lede.small { font-size: 0.96rem; margin-top: 12px; }
.status-card {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}
.status-card small { display: block; color: var(--muted); margin-top: 3px; }
.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 24px rgba(73, 212, 157, 0.9);
}
.category-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 9px;
  margin: 22px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(7, 9, 13, 0.84);
  backdrop-filter: blur(18px);
  overflow-x: auto;
}
.tab, .submit, .keypad button {
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.tab {
  white-space: nowrap;
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.tab.active {
  color: #061018;
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-weight: 800;
}
.quick-grid, .app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.quick-card, .app-card, .login-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}
.quick-card {
  padding: 18px;
  text-decoration: none;
}
.quick-card.primary { background: linear-gradient(145deg, rgba(99, 179, 255, 0.24), rgba(73, 212, 157, 0.1)); }
.quick-card span { color: var(--muted); font-size: 0.86rem; }
.quick-card strong { display: block; margin-top: 8px; font-size: 1.35rem; }
.app-grid { margin-top: 16px; }
.app-card {
  position: relative;
  min-height: 258px;
  padding: 22px;
  overflow: hidden;
}
.app-card::after {
  content: '';
  position: absolute;
  inset: auto -20% -45% 35%;
  height: 180px;
  background: radial-gradient(circle, rgba(99, 179, 255, 0.13), transparent 65%);
  pointer-events: none;
}
.card-topline, .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pill, .status, .meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}
.pill {
  color: var(--blue);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(99, 179, 255, 0.09);
}
.status { color: var(--green); }
.app-card h2 { margin: 26px 0 10px; font-size: 1.45rem; letter-spacing: -0.03em; }
.app-card p { min-height: 66px; color: var(--muted); line-height: 1.5; }
.open-link {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  display: block;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
  text-decoration: none;
  font-weight: 850;
}
.open-link:hover { background: rgba(99, 179, 255, 0.16); }
.footer { color: var(--faint); text-align: center; padding: 0 0 24px; }

.login-body {
  display: grid;
  place-items: center;
  padding: 18px;
}
.login-shell { width: min(430px, 100%); }
.login-card { padding: 28px; background: var(--panel-strong); }
.login-form { margin-top: 22px; }
#passcode {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.keypad button {
  min-height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 1.22rem;
  font-weight: 850;
}
.keypad button.pressed { background: rgba(99, 179, 255, 0.24); }
.turnstile-box {
  min-height: 74px;
  display: grid;
  place-items: center;
  margin: 18px 0 12px;
}
.submit {
  width: 100%;
  padding: 15px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #061018;
  font-weight: 900;
}
.login-message { min-height: 24px; color: var(--muted); text-align: center; }
.login-message[data-type="error"] { color: var(--red); }
.login-message[data-type="success"] { color: var(--green); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .quick-grid, .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 18px, 1180px); padding-top: 10px; }
  .hero { padding: 20px; border-radius: 26px; }
  .quick-grid, .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 240px; }
}
