:root {
  color-scheme: dark;
  --ink: #061014;
  --text: #f8fbf8;
  --muted: #b1c0bd;
  --panel: rgba(248, 251, 248, 0.08);
  --line: rgba(248, 251, 248, 0.18);
  --line-strong: rgba(248, 251, 248, 0.28);
  --green: #a7ff3f;
  --teal: #28e0c8;
  --orange: #ff6b35;
  --blue: #0aa2ff;
  --field: rgba(6, 16, 20, 0.72);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(126deg, rgba(167, 255, 63, 0.1), transparent 28%),
    linear-gradient(245deg, rgba(255, 107, 53, 0.11), transparent 27%),
    linear-gradient(180deg, #061014 0%, #0d2027 50%, #050b0e 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    repeating-linear-gradient(110deg, transparent 0 64px, rgba(248, 251, 248, 0.045) 65px 66px),
    linear-gradient(90deg, rgba(40, 224, 200, 0.09), transparent 44%, rgba(10, 162, 255, 0.08));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), transparent 90%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(380px, 460px);
  align-items: center;
  gap: clamp(34px, 7vw, 104px);
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
}

.dashboard-shell h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.admin-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.admin-title::before {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--teal), var(--blue));
  content: "";
}

.mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green), var(--teal) 58%, #0aa2ff);
  color: var(--ink);
  font-weight: 950;
}

.login-logo {
  display: block;
  width: min(460px, 100%);
  height: auto;
  margin: 0 0 34px;
}

.eyebrow,
.form-head p {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lede {
  max-width: 520px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.65;
}

.portal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.portal-strip span {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(248, 251, 248, 0.08), rgba(248, 251, 248, 0.025));
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(248, 251, 248, 0.14), rgba(248, 251, 248, 0.05)),
    rgba(6, 16, 20, 0.62);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.34);
}

.login-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--teal), var(--blue), var(--orange));
  content: "";
}

form {
  display: grid;
  gap: 17px;
  padding: clamp(26px, 4vw, 40px);
}

.form-head h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 2.55rem);
  line-height: 1;
  letter-spacing: 0;
}

label,
.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(248, 251, 248, 0.22);
  border-radius: 8px;
  outline: 0;
  background: var(--field);
  color: var(--text);
  font: inherit;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(40, 224, 200, 0.16);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 58px;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.icon-button:hover,
.icon-button.is-active {
  border-color: var(--line);
  background: rgba(248, 251, 248, 0.08);
  color: var(--text);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.captcha-card {
  display: grid;
  grid-template-columns: 1fr minmax(104px, 0.42fr);
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(248, 251, 248, 0.18);
  border-radius: 8px;
  background: rgba(248, 251, 248, 0.055);
}

.captcha-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.captcha-card strong {
  display: block;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
}

button:not(.icon-button),
.logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  text-decoration: none;
}

.submit-button {
  min-height: 54px;
  margin-top: 4px;
  box-shadow: 0 18px 40px rgba(40, 224, 200, 0.16);
}

.submit-button:hover {
  filter: brightness(1.06);
}

.alert {
  padding: 13px 15px;
  border: 1px solid rgba(255, 107, 53, 0.42);
  border-radius: 8px;
  background: rgba(255, 107, 53, 0.12);
  color: #ffd8ca;
  font-weight: 750;
}

.dashboard-shell {
  width: min(1040px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.logout.secondary {
  background: rgba(248, 251, 248, 0.1);
  color: var(--text);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.status-grid article {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-grid span {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.status-grid strong {
  font-size: 1.3rem;
}

.compact {
  width: min(720px, calc(100% - 40px));
}

.settings-panel {
  margin-top: 34px;
}

.notice {
  padding: 12px 14px;
  border: 1px solid rgba(40, 224, 200, 0.42);
  border-radius: 8px;
  background: rgba(40, 224, 200, 0.12);
  color: #d9fffa;
  font-weight: 750;
}

@media (max-width: 820px) {
  .login-shell,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .login-shell,
  .dashboard-shell {
    width: min(100% - 28px, 680px);
  }

  .login-shell {
    gap: 28px;
    padding: 28px 0;
  }

  .login-logo {
    width: min(380px, 100%);
    margin-bottom: 24px;
  }

  .admin-title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .login-shell,
  .dashboard-shell {
    width: min(100% - 24px, 680px);
  }

  form {
    padding: 24px 18px;
  }

  .captcha-card {
    grid-template-columns: 1fr;
  }

  .portal-strip span {
    flex: 1 1 100%;
    text-align: center;
  }
}
