:root {
  color-scheme: light;
  --ink: #162522;
  --ink-soft: #33443f;
  --muted: #62716d;
  --line: #d8dfd8;
  --paper: #f7f6f1;
  --panel: #ffffff;
  --field: #fbfcfa;
  --teal: #007f7a;
  --teal-strong: #0f3f3b;
  --mint: #dff7ee;
  --amber: #f5b342;
  --coral: #e76f51;
  --danger: #b42318;
  --warning: #8a5a00;
  --shadow: 0 22px 65px rgba(22, 37, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(223, 247, 238, 0.82), rgba(247, 246, 241, 0.92) 44%, rgba(255, 244, 232, 0.96)),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 100vh;
}

.brand-stage {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px;
  background:
    linear-gradient(160deg, rgba(15, 63, 59, 0.98), rgba(21, 92, 84, 0.98) 58%, rgba(245, 179, 66, 0.22)),
    #0f3f3b;
  color: #f7f6f1;
}

.brand-stage::after {
  position: absolute;
  inset: auto -90px -130px auto;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(247, 246, 241, 0.2);
  border-radius: 50%;
  content: "";
}

.brand-lockup {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: max-content;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(247, 246, 241, 0.94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
}

.stage-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 44px 0 22px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-stage .eyebrow {
  color: #f5d18b;
}

.stage-copy h1 {
  margin: 0;
  max-width: 12ch;
  color: #ffffff;
  font-size: 3.35rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.stage-copy p:last-child {
  max-width: 520px;
  margin: 22px 0 0;
  color: rgba(247, 246, 241, 0.82);
  font-size: 1.08rem;
}

.console-frame {
  position: relative;
  z-index: 2;
  width: min(680px, 94%);
  margin-top: 10px;
  border: 1px solid rgba(247, 246, 241, 0.26);
  border-radius: 8px;
  background: rgba(247, 246, 241, 0.1);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.22);
}

.console-frame img {
  width: 100%;
  border-radius: 8px;
}

.signal-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.signal-tile {
  min-height: 82px;
  padding: 16px;
  border: 1px solid rgba(247, 246, 241, 0.2);
  border-radius: 8px;
  background: rgba(247, 246, 241, 0.1);
  backdrop-filter: blur(10px);
}

.signal-tile span {
  display: block;
  color: rgba(247, 246, 241, 0.7);
  font-size: 0.82rem;
  font-weight: 700;
}

.signal-tile strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.25;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 42px;
}

.auth-card {
  width: min(100%, 454px);
  padding: 42px;
  border: 1px solid rgba(216, 223, 216, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.mobile-logo {
  display: none;
  width: max-content;
  margin-bottom: 28px;
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2.1rem;
  line-height: 1.12;
}

.notice {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 700;
}

.notice-error {
  border-color: rgba(180, 35, 24, 0.26);
  background: #fff1ee;
  color: var(--danger);
}

.notice-warning {
  border-color: rgba(138, 90, 0, 0.26);
  background: #fff8e7;
  color: var(--warning);
}

.notice-info {
  border-color: rgba(0, 127, 122, 0.24);
  background: #eefaf6;
  color: #075e59;
}

.notice-success {
  border-color: rgba(0, 127, 122, 0.24);
  background: #eefaf6;
  color: #075e59;
}

.login-form {
  display: grid;
  gap: 20px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="text"] {
  width: 100%;
  height: 52px;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  outline: none;
  padding: 0 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-group input:focus {
  border-color: var(--teal);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 127, 122, 0.14);
}

.login-form.was-validated input:invalid {
  border-color: var(--danger);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--mint);
  color: var(--teal-strong);
  outline: none;
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle[data-visible="true"] {
  color: var(--coral);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.check-control {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 700;
}

.check-control input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--teal);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button:focus-visible {
  outline: 4px solid rgba(0, 127, 122, 0.18);
  outline-offset: 2px;
}

.button-primary {
  width: 100%;
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 127, 122, 0.24);
}

.button-primary:hover {
  background: #006f69;
}

.button-primary.is-submitting {
  opacity: 0.82;
  transform: none;
}

.button-secondary {
  min-width: 150px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--teal);
}

.auth-footnote {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-shell {
  display: grid;
  place-items: center;
  padding: 32px;
}

.dashboard-empty {
  display: grid;
  width: min(100%, 620px);
  gap: 18px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dashboard-empty h1 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.15;
}

.dashboard-empty p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.85fr);
  }

  .brand-stage,
  .auth-panel {
    padding: 30px;
  }

  .stage-copy h1 {
    font-size: 2.7rem;
  }
}

@media (max-width: 900px) {
  body {
    background: var(--paper);
  }

  .auth-shell {
    display: block;
  }

  .brand-stage {
    min-height: auto;
    padding: 28px;
  }

  .brand-lockup,
  .console-frame,
  .signal-grid {
    display: none;
  }

  .stage-copy {
    padding: 8px 0 0;
  }

  .stage-copy h1 {
    max-width: 620px;
    font-size: 2.35rem;
  }

  .stage-copy p:last-child {
    max-width: 660px;
  }

  .auth-panel {
    align-items: flex-start;
    min-height: auto;
    padding: 24px;
  }

  .auth-card {
    width: 100%;
    padding: 30px;
  }

  .mobile-logo {
    display: block;
  }
}

@media (max-width: 560px) {
  .brand-stage {
    padding: 24px 20px;
  }

  .stage-copy h1 {
    font-size: 2rem;
  }

  .stage-copy p:last-child {
    font-size: 1rem;
  }

  .auth-panel {
    padding: 18px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-heading h2,
  .dashboard-empty h1 {
    font-size: 1.72rem;
  }

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