:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6b7c;
  --line: #9aa5b5;
  --accent: #0f766e;
  --accent-dark: #0b5c56;
  --indigo: #253b80;
  --panel: #ffffff;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(37, 59, 128, 0.16), rgba(15, 118, 110, 0.18)),
    #eef2f7;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 480px);
  gap: 28px;
  align-items: center;
  padding: 36px;
}

.brand-panel, .login-card {
  background: var(--panel);
  border: 2px solid #c7d0dd;
  border-radius: 12px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.14);
}

.brand-panel {
  min-height: 520px;
  display: grid;
  align-content: center;
  padding: 42px;
}

.login-logo {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #334155;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--indigo), var(--accent));
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  margin-bottom: 20px;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1;
  font-weight: 950;
}

h2 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 950;
}

.summary {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.5;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.quick-links a, button {
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.quick-links button, .primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.primary:hover, .quick-links button:hover {
  background: var(--accent-dark);
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-card {
  padding: 26px;
}

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

.mfa-panel {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 2px solid #d7dee8;
}

.mfa-panel p {
  margin: -8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.mfa-secret-wrap {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 2px solid #d7dee8;
  border-radius: 8px;
  background: #f5f8fb;
  color: #415065;
  font-size: 13px;
  font-weight: 800;
}

.mfa-secret-wrap code {
  overflow-wrap: anywhere;
  color: var(--indigo);
  font-size: 15px;
  letter-spacing: 1px;
}

.mfa-secret-wrap small {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.4;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 22px;
  border: 0;
  background: rgba(9, 24, 42, .62);
  backdrop-filter: blur(8px);
}

.login-modal[hidden] { display: none; }
.login-modal-card {
  width: min(100%, 500px);
  max-height: 92vh;
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #f2f8fb);
  box-shadow: 0 28px 80px rgba(4, 18, 35, .34);
}
.login-modal-card h2 { color: #111; }
.action-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.action-buttons button { flex: 1 1 150px; }

label {
  display: grid;
  gap: 7px;
  color: #415065;
  font-size: 14px;
  font-weight: 850;
}

input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 750;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.password-input-wrap { position: relative; display: block; }
.password-input-wrap input { padding-right: 46px; }
.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #526579;
  transform: translateY(-50%);
  cursor: pointer;
}
.password-visibility-toggle:hover { background: #edf3f8; color: var(--accent-dark); }
.password-visibility-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.password-eye-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-result {
  min-height: 130px;
  margin: 18px 0 0;
  padding: 14px;
  border-radius: 8px;
  background: #111827;
  color: #e5edf7;
  overflow: auto;
  font-size: 13px;
}

.login-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 460px;
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 160ms ease;
  font-weight: 850;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  z-index: 2147483647 !important;
}

.login-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.login-toast.error { background: var(--danger); }

/* Lighter, compact typography to match the operations console. */
:root { --ink:#26384c; --muted:#718096; --line:#e3eaf2; --accent:#4b83b6; --accent-dark:#356f9f; --indigo:#527da5; }
body { font-size:10.4px; background:linear-gradient(135deg,#fbfcfe,#f2f6fa); }
h1 { font-size:22.1px; }
h2 { font-size:18.2px; }
.eyebrow,label { font-size:9.1px; }
.summary { font-size:12.35px; }
.hint,.mfa-secret-wrap,.login-result { font-size:8.45px; }
.mfa-secret-wrap code { font-size:9.75px; }
button,input,.quick-links a { font-size:10.4px; }
.login-logo { font-size:18.2px; }
.login-shell { gap:20px; }
.brand-panel,.login-card { box-shadow:0 12px 34px rgba(37,59,85,.08); }

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .brand-panel {
    min-height: 0;
    padding: 26px;
  }

  h1 {
    font-size: 22.1px;
  }
}
