:root {
  color-scheme: light;
  font-family: "Manrope", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --ink: #112332;
  --muted: #6b7c8a;
  --line: #e4e9ec;
  --panel: #ffffff;
  --accent: #20a09e;
  --accent-soft: #e8f6f5;
  --accent-dark: #17807e;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(17, 35, 50, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 35, 50, 0.035) 1px, transparent 1px),
    #f8f9fa;
  background-size: 28px 28px, 28px 28px, auto;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 960px) {
  .auth-layout { grid-template-columns: 1.08fr 0.92fr; }
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(17, 35, 50, 0.06);
  padding: 28px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -90px;
  right: -50px;
  border-radius: 999px;
  background: rgba(32, 160, 158, 0.14);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  margin-top: 48px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #b7e0df;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 18px 0 0;
  max-width: 12em;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.02;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #4a5d6b;
}

.feature-grid {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.feature-card {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.feature-card strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}

.feature-card span {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}

.form-panel {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 28px rgba(17, 35, 50, 0.06);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.muted-label {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.form-lead {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

.access-form {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.field-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #3d5160;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #c9d3da;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(32, 160, 158, 0.16);
}

textarea.field-input {
  min-height: 110px;
  resize: vertical;
}

.button-primary {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(32, 160, 158, 0.24);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  width: 100%;
  border: 1px solid #c9d3da;
  border-radius: 10px;
  padding: 12px 18px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.form-footnote {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
  font-family: var(--mono);
}

.links {
  margin-top: 16px;
  text-align: center;
  font-size: 0.88rem;
}

.links a { color: var(--accent-dark); font-weight: 650; text-decoration: none; }

.err {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #f0c2c7;
  background: #fff5f6;
  color: #a02836;
  font-size: 0.86rem;
  font-weight: 600;
}

.ok {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #b7e0df;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 600;
}

details {
  margin-top: 16px;
  font-size: 0.88rem;
}

details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

details .access-form {
  margin-top: 14px;
}

/* Admin SaaS shell */
.admin-frame {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.admin-side {
  background: var(--ink);
  color: #e8eef2;
  padding: 20px 14px;
}
.admin-side .brand {
  color: #fff;
  font-weight: 750;
  letter-spacing: -0.01em;
  padding: 4px 10px 18px;
}
.admin-side a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(232,238,242,0.82);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.admin-side a:hover,
.admin-side a.active {
  background: rgba(32,160,158,0.18);
  color: #fff;
}
.admin-main {
  padding: 28px 28px 48px;
}
.admin-main .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(17, 35, 50, 0.05);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 800; letter-spacing: -0.01em; }
.muted { color: var(--muted); font-size: 0.9rem; }

main.simple {
  max-width: 960px;
  margin: 48px auto;
  padding: 0 20px 48px;
}

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(17, 35, 50, 0.05);
}

h1 { margin: 0 0 8px; font-size: 1.35rem; }
p { margin: 0 0 16px; }

button,
.btn {
  margin-top: 16px;
  width: 100%;
  padding: 11px 18px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
}

.btn.secondary {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #c9d3da;
}

.field { margin-bottom: 14px; }

@media (max-width: 800px) {
  .admin-frame { grid-template-columns: 1fr; }
  .admin-side { display: flex; gap: 8px; overflow-x: auto; padding: 12px; }
  .admin-side .brand { display: none; }
  .admin-side a { white-space: nowrap; margin: 0; }
}
