:root {
  color-scheme: dark;
  --bg0: #050505;
  --bg1: #0a0a0a;
  --bg2: #121212;
  --card: rgba(12, 12, 12, 0.88);
  --cardBorder: rgba(255, 255, 255, 0.12);
  --cardBorderSoft: rgba(255, 255, 255, 0.08);
  --text: rgba(244, 244, 244, 0.96);
  --muted: rgba(168, 172, 178, 0.82);
  --danger: #e06c75;
  --green: #3ecf8e;
  --green-dim: #2aa86f;
  --green-soft: rgba(62, 207, 142, 0.14);
  --green-ring: rgba(62, 207, 142, 0.22);
  --accent: var(--green);
  --accent2: var(--green-dim);
  --accent3: #6ee7a8;
  --online: #3ecf8e;
  --maintenance: #d4b06a;
  --maintenanceGlow: rgba(212, 176, 106, 0.18);
  --shadow: rgba(0, 0, 0, 0.62);
  --radius: 0;
  --radius-sm: 0;
  --font-body: "Outfit", sans-serif;
  --font-display: "Syne", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: clip;
}

/* Prevent ascender/descender clipping on labels & display fonts (Syne). */
label,
.label,
h1, h2, h3, h4,
.moduleName,
.sectionTitle,
.settingLabel,
.fieldLabel,
.pubFieldLabel,
.acctSubhead {
  overflow: visible !important;
  text-overflow: clip;
  line-height: 1.35;
}

h1, h2, h3,
.brand h1,
.brandLogin h1,
.title,
.loaderTitle,
.sectionTitle,
.pubBrandHero,
.loginPanel h1 {
  line-height: 1.25 !important;
  overflow: visible !important;
  padding-top: 0.05em;
  padding-bottom: 0.08em;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  /* Flat site black — avoid document-tall gradient banding on long pages */
  background: #050505;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
input[type="submit"],
.btnPrimary,
.btnGhost,
.sideBtn {
  appearance: none;
  -webkit-appearance: none;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.glowOrb,
.watermark {
  display: none !important;
}

.page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 16px 40px;
  position: relative;
  z-index: 1;
}

.panel {
  width: min(420px, 100%);
  background: #080808;
  border: 1px solid var(--cardBorderSoft);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px var(--shadow);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  animation: riseIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel::before {
  display: none;
}

.brand,
.brandLogin {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.brandLogin img,
.brand .logoImg {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--green), var(--green-dim));
  box-shadow: 0 4px 16px rgba(62, 207, 142, 0.22);
}

.brand h1,
.brandLogin h1,
.title,
.loaderTitle {
  line-height: 1.2;
  overflow: visible;
}

.brand h1,
.brandLogin h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.03em;
  font-weight: 800;
  padding-bottom: 0.05em;
}

.brand p,
.brandLogin p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  color: var(--text);
  padding-bottom: 0.04em;
}

.subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
  overflow: visible;
  padding-top: 1px;
}

input[type="email"],
input[type="text"],
input[type="password"] {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  line-height: 1.4;
  overflow: visible;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="email"]:hover,
input[type="text"]:hover,
input[type="password"]:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(62, 207, 142, 0.55);
  background: rgba(0, 0, 0, 0.46);
  box-shadow: 0 0 0 3px var(--green-ring);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

button[type="submit"],
.btnPrimary {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-weight: 700;
  color: #04140c;
  background: linear-gradient(180deg, #4ee09a, var(--green));
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(62, 207, 142, 0.18);
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

button[type="submit"]::after,
.btnPrimary::after {
  display: none;
}

button[type="submit"]:hover,
.btnPrimary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(62, 207, 142, 0.24);
}

button[type="submit"]:active,
.btnPrimary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30);
}

button[type="submit"]:disabled,
.btnPrimary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.error {
  display: none;
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(224, 108, 117, 0.28);
  background: rgba(224, 108, 117, 0.08);
}

.loaderPage {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

.loaderCard {
  width: min(520px, 100%);
  padding: 30px 26px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 40%),
    var(--card);
  border: 1px solid var(--cardBorderSoft);
  box-shadow: 0 28px 80px var(--shadow);
  backdrop-filter: blur(16px);
  text-align: center;
  animation: riseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.loaderIcon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.loaderIcon svg {
  width: 34px;
  height: 34px;
  stroke: var(--green);
}

.loaderTitle {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text);
}

.loaderText {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.loaderCode {
  display: inline-block;
  margin: 8px 0 0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.28);
  font-family: Consolas, monospace;
  letter-spacing: 0.14em;
  color: var(--accent3);
}

.loaderActions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btnGhost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btnGhost:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.btnGhost.btnPrimary {
  color: #04140c;
  border: 0;
  background: linear-gradient(180deg, #4ee09a, var(--green));
}

.anim-rise { animation: riseIn 0.65s ease both; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .panel, .loaderCard { padding: 22px 16px; }
  .title, .loaderTitle { font-size: 22px; }
  .brandLogin h1, .brand h1 { font-size: 28px; }
}

.loaderMaintenance {
  position: relative;
}

.maintenanceBadge {
  display: inline-block;
  margin: 0 auto 14px;
  padding: 6px 12px;
  border: 1px solid rgba(212, 176, 106, 0.42);
  background: rgba(212, 176, 106, 0.10);
  color: var(--maintenance);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 8px;
}

.loaderMaintenance .loaderIcon {
  border-color: rgba(212, 176, 106, 0.34);
  background: rgba(212, 176, 106, 0.08);
  box-shadow: 0 0 28px var(--maintenanceGlow);
}

.loaderMaintenance .loaderIcon svg {
  stroke: var(--maintenance);
}

.loaderMaintenance .loaderTitle {
  letter-spacing: 0.02em;
}

/* Kill any gradient / mask text fades — solid opaque type only */
h1, h2, h3, h4, p, label, .title, .subtitle, .loaderTitle {
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: unset !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}
h1, h2, h3, .title, .loaderTitle { color: #f2f2f2; opacity: 1; background-image: none !important; }