﻿:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #fff;
  --text: #182028;
  --muted: #64707d;
  --line: rgba(41, 53, 66, .14);
  --accent: #0c8f7f;
  --accent-strong: #076b61;
  --gold: #c89d49;
  --danger: #b42331;
  --shadow: 0 24px 70px rgba(30, 42, 55, .16);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --surface: rgba(24, 34, 48, .84);
  --surface-solid: #172033;
  --text: #f5f7fb;
  --muted: #a9b4c2;
  --line: rgba(229, 231, 235, .14);
  --accent: #34d0b6;
  --accent-strong: #75ead8;
  --gold: #e7c875;
  --danger: #ff8a98;
  --shadow: 0 26px 80px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html.theme-transition,
  html.theme-transition body,
  html.theme-transition .login-card,
  html.theme-transition input,
  html.theme-transition .theme-toggle,
  html.theme-transition .primary-button,
  html.theme-transition .brand-mark,
  html.theme-transition .form-error,
  html.theme-transition .demo-logins button {
    transition:
      background-color 1.95s ease,
      background 1.95s ease,
      color 1.95s ease,
      border-color 1.2s ease,
      box-shadow .28s ease,
      opacity .28s ease;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(12, 143, 127, .12), transparent 34%),
    linear-gradient(315deg, rgba(200, 157, 73, .16), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.login-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
  font-weight: 850;
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: clamp(28px, 7vw, 96px);
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0;
}

.theme-toggle {
  position: absolute;
  top: 22px;
  right: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 950;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small,
.login-hero p,
label,
.demo-logins {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-hero h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: .94;
}

.login-hero p {
  max-width: 600px;
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 1.65;
}

.login-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
  backdrop-filter: blur(18px);
}

.login-card h2 {
  margin: 0;
  font-size: 28px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 850;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(12, 143, 127, .16);
}

.primary-button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.form-error {
  border-radius: 8px;
  background: rgba(180, 35, 49, .12);
  color: var(--danger);
  padding: 12px 14px;
  font-weight: 850;
  white-space: pre-line;
}

.demo-logins {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 13px;
}

.demo-logins strong {
  color: var(--text);
}

.demo-logins button {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 0;
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.demo-logins button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 840px) {
  .login-shell {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 78px 0 28px;
  }

  .brand-lockup {
    margin-bottom: 28px;
  }

  .login-hero h1 {
    font-size: clamp(36px, 12vw, 54px);
  }
}
