:root {
  color-scheme: dark;
  --bg: #06090c;
  --bg-panel: rgba(11, 15, 20, 0.94);
  --line: rgba(122, 139, 158, 0.16);
  --text: #edf3f8;
  --text-soft: #c0ccd8;
  --text-muted: #778494;
  --accent: #69caf7;
  --accent-line: rgba(105, 202, 247, 0.26);
  --danger: #ff7889;
  --shadow-lg: 0 28px 76px rgba(0, 0, 0, 0.3);
  --radius-xl: 16px;
  --radius: 8px;
  --font-ui:
    "Segoe UI Variable Display", "Segoe UI Variable Text", "SF Pro Display", "Segoe UI", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    linear-gradient(135deg, #06090c 0%, #0b1015 52%, #0e141a 100%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.008) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 70%);
  opacity: 0.24;
}

body::after {
  background:
    radial-gradient(circle at 100% 0, rgba(105, 202, 247, 0.11), transparent 24%),
    radial-gradient(circle at 0 100%, rgba(105, 202, 247, 0.05), transparent 24%);
}

h1,
h2,
p {
  margin: 0;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(420px, 100%);
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 18%),
    var(--bg-panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 0, rgba(105, 202, 247, 0.14), transparent 28%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.panel-brand,
.panel-head,
.login-form {
  position: relative;
  z-index: 1;
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(105, 202, 247, 0.16), rgba(105, 202, 247, 0.03)),
    rgba(255, 255, 255, 0.018);
  font-size: 16px;
  font-weight: 800;
}

.eyebrow {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1 {
  margin-top: 6px;
  font-size: 26px;
  line-height: 1;
}

h2 {
  font-size: 24px;
  line-height: 1.1;
}

.panel-head {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.panel-head p,
label span,
.message {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

label {
  display: grid;
  gap: 8px;
}

input,
button {
  height: 46px;
  border-radius: var(--radius);
  font: inherit;
}

input {
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text);
}

input:focus,
button:focus-visible {
  outline: none;
  border-color: rgba(127, 212, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(127, 212, 255, 0.08);
}

button {
  border: 1px solid rgba(105, 202, 247, 0.3);
  background: linear-gradient(180deg, #a9e9ff, #68caf7);
  color: #061019;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(105, 202, 247, 0.18);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.message {
  min-height: 22px;
}

.message.error {
  color: var(--danger);
}

@media (max-width: 640px) {
  .login-shell {
    padding: 14px;
  }

  .login-panel {
    padding: 20px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 22px;
  }
}
