/* Traffic Gems Gateway — shared styles for the admin panel, login, and
   landing pages. Token values echo traffic-gems-demo/css/styles.css so the
   gateway reads as the same product, not a bolted-on admin tool. */

:root {
  --tg-midnight: #0a0e1a;
  --tg-charcoal: #151b30;
  --tg-bg: var(--tg-midnight);
  --tg-surface: var(--tg-charcoal);
  --tg-surface-raised: #1c2340;
  --tg-fg: #f3f6ff;
  --tg-fg-muted: #9aa6c4;
  --tg-border: #262f4d;
  --tg-diamond-blue: #3dd6ff;
  --tg-gold: #e3b24a;
  --tg-gold-bright: #ffd877;
  --tg-signal-green: #22dd8f;
  --tg-signal-red: #c0414f;
  --tg-accent-text: var(--tg-diamond-blue);
  --tg-positive-text: var(--tg-signal-green);
  --tg-negative-text: #ff7a85;
  --tg-font-display: 'Orbitron', system-ui, sans-serif;
  --tg-font-body: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* A <table> wider than its .tg-gw-table-wrap (overflow-x: auto)
   container scrolls correctly within that wrapper on its own, but on
   narrow viewports its un-scrolled-into-view width still inflates the
   root scrolling box's scrollWidth, making the whole page pan
   horizontally. html, not body, is the standards-mode scrolling element,
   so the backstop has to go there: the page itself never scrolls
   sideways, regardless of what a descendant's own scroll container does
   internally. */
html, body { overflow-x: hidden; }

body {
  background: var(--tg-bg);
  color: var(--tg-fg);
  font-family: var(--tg-font-body);
  margin: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
}

.tg-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1, h2, h3 { font-family: var(--tg-font-display); letter-spacing: 0.01em; }
.tg-gw-headline { font-family: var(--tg-font-body); font-weight: 800; }

a { color: var(--tg-accent-text); }

.tg-gw-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tg-positive-text);
  background: color-mix(in srgb, var(--tg-signal-green) 16%, var(--tg-surface));
  border: 1px solid color-mix(in srgb, var(--tg-signal-green) 40%, transparent);
  border-radius: 999px;
  padding: 6px 12px;
}

.tg-gw-card {
  max-width: 420px;
  margin: 10vh auto 0;
  background: var(--tg-surface-raised);
  border: 1px solid var(--tg-border);
  border-radius: 12px;
  padding: 28px;
}

/* Public-facing disclosure that the product is a non-wagering
   demonstration. Must stay legible/visible without scrolling right under
   the logo on every viewport, so it gets its own high-contrast treatment
   rather than the smaller .tg-gw-badge pill used elsewhere. */
.tg-demo-disclaimer {
  margin: 0 0 20px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--tg-signal-red) 14%, var(--tg-surface));
  border: 1px solid color-mix(in srgb, var(--tg-signal-red) 45%, transparent);
  border-radius: 8px;
  color: var(--tg-fg);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}
.tg-demo-disclaimer strong {
  display: block;
  margin-block-end: 2px;
  color: var(--tg-gold-bright);
  letter-spacing: 0.02em;
}
@media (max-width: 420px) {
  .tg-gw-card { margin-top: 6vh; }
  .tg-demo-disclaimer { font-size: 0.75rem; padding: 8px 10px; }
}

.tg-gw-field { display: block; margin-block-end: 14px; color: var(--tg-fg-muted); }
.tg-gw-field input {
  display: block;
  width: 100%;
  margin-block-start: 6px;
  padding: 10px 12px;
  background: var(--tg-surface);
  border: 1px solid var(--tg-border);
  border-radius: 6px;
  color: var(--tg-fg);
  font: inherit;
}

.tg-gw-btn {
  display: inline-block;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: linear-gradient(180deg, var(--tg-gold-bright), var(--tg-gold));
  color: #241703;
}

.tg-gw-btn--secondary { background: transparent; border: 1px solid var(--tg-border); color: var(--tg-fg); }
.tg-gw-btn--danger { background: var(--tg-negative-text); color: #2a0608; }

.tg-gw-error {
  color: var(--tg-negative-text);
  font-size: 0.85rem;
  margin-block-start: 8px;
}

.tg-gw-table-wrap { overflow-x: auto; margin-block-start: 12px; }
.tg-gw-table { width: 100%; min-width: 480px; border-collapse: collapse; }
.tg-gw-table th, .tg-gw-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--tg-border);
  font-size: 0.9rem;
}
.tg-gw-table th { color: var(--tg-fg-muted); font-weight: 600; }

.tg-gw-section { max-width: 900px; margin-inline: auto; padding-block: 24px; }

:focus-visible { outline: 2px solid var(--tg-diamond-blue); outline-offset: 2px; }
