/* Login — Ossie Betting Command Center (self-contained, matches styles.css tokens) */
:root {
  --bg: #04070d;
  --panel: rgba(12, 19, 33, .66);
  --elev: #101a2e;
  --border: rgba(126, 164, 224, .14);
  --border-strong: rgba(126, 164, 224, .28);
  --text: #e7f0ff;
  --muted: #8ea2c6;
  --dim: #596c8f;
  --accent: #2ee6a8;
  --accent2: #4dabf7;
  --accent-d: rgba(46, 230, 168, .12);
  --accent-glow: rgba(46, 230, 168, .30);
  --danger: #ff5d73;
  --r: 12px;
  --r-lg: 18px;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans TC', 'PingFang HK', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body.login-body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(126, 164, 224, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 164, 224, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 15%, transparent 72%);
  animation: grid-drift 26s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 44px 44px, 44px 44px; }
}

.login-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(46, 230, 168, .045) 50%, transparent 100%);
  background-size: 100% 220px;
  animation: scan-sweep 7s linear infinite;
}

@keyframes scan-sweep {
  from { background-position: 0 -220px; }
  to { background-position: 0 110vh; }
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: .45;
}

.login-glow-a {
  width: 500px;
  height: 500px;
  background: rgba(46, 230, 168, .20);
  top: -170px;
  left: -110px;
  animation: glow-float 11s ease-in-out infinite;
}

.login-glow-b {
  width: 420px;
  height: 420px;
  background: rgba(77, 171, 247, .15);
  bottom: -130px;
  right: -90px;
  animation: glow-float 13s ease-in-out infinite reverse;
}

@keyframes glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(26px, 18px) scale(1.06); }
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(410px, 100%);
  animation: login-in .5s cubic-bezier(.22, 1, .36, 1);
}

@keyframes login-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card {
  background: linear-gradient(165deg, rgba(16, 25, 44, .92) 0%, rgba(8, 13, 24, .96) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 34px 30px 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 36px 72px -16px rgba(0, 0, 0, .66),
    0 0 90px rgba(46, 230, 168, .05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.login-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--accent-d);
  border: 1px solid rgba(46, 230, 168, .35);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px -6px rgba(46, 230, 168, .22);
}

.login-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 5px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px var(--accent-d), 0 0 20px var(--accent-glow);
}

.logo-mark {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--accent);
  text-transform: uppercase;
}

.login-title {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 10px;
  letter-spacing: -.02em;
  background: linear-gradient(120deg, #fff, #a9c0e4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.55;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.login-field span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--elev);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}

.login-field input::placeholder { color: var(--dim); }

.login-field input:hover { border-color: rgba(46, 230, 168, .25); }

.login-field input:focus {
  outline: none;
  border-color: rgba(46, 230, 168, .55);
  box-shadow: 0 0 0 3px rgba(46, 230, 168, .12);
  background: rgba(18, 28, 48, .95);
}

.login-err {
  font-size: 12px;
  color: var(--danger);
  background: rgba(255, 93, 115, .08);
  border: 1px solid rgba(255, 93, 115, .30);
  border-radius: var(--r);
  padding: 10px 13px;
  line-height: 1.45;
}

.login-btn {
  width: 100%;
  margin-top: 4px;
  padding: 13px 16px;
  border: none;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--accent), #1fbf8d);
  color: #03130c;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, opacity .15s;
  box-shadow: 0 5px 20px -4px rgba(46, 230, 168, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px -4px rgba(46, 230, 168, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.login-btn:active:not(:disabled) { transform: translateY(0); }

.login-btn:disabled { opacity: .65; cursor: not-allowed; }

.login-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--dim);
}

@media (max-width: 440px) {
  .login-card { padding: 26px 20px 20px; }
  .login-title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
