/*
 * Landing page visual system.
 * Editorial, trust-first and deliberately separate from the signed-in dashboard.
 */
:root {
  --landing-canvas: #f1f4f1;
  --landing-panel: #fbfcfa;
  --landing-paper: #ffffff;
  --landing-ink: #14231f;
  --landing-copy: #43544f;
  --landing-muted: #6f7f7a;
  --landing-faint: #8b9793;
  --landing-line: #d6ded9;
  --landing-line-strong: #c3cec8;
  --landing-accent: #167b68;
  --landing-accent-deep: #0d6253;
  --landing-accent-soft: #e0eee9;
  --landing-field: #ffffff;
  --landing-danger: #98473f;
  --landing-shadow: 0 20px 60px rgba(25, 45, 38, 0.1);
}

.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(420px, 0.84fr);
  position: relative;
  overflow: hidden;
  background: var(--landing-canvas);
  color: var(--landing-ink);
  font-family: "MiSans", "HarmonyOS Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", sans-serif;
  font-feature-settings: "kern" 1;
  letter-spacing: 0;
  isolation: isolate;
}

.auth-screen button,
.auth-screen input,
.auth-screen select {
  font-family: "MiSans", "HarmonyOS Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", sans-serif !important;
}

.auth-screen::before {
  content: none;
}

.auth-screen.hidden {
  display: none;
}

.app.auth-locked {
  display: none !important;
}

.auth-brand {
  position: absolute;
  z-index: 3;
  top: 30px;
  left: clamp(32px, 5.5vw, 82px);
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--landing-ink);
  border-radius: 9px;
  background: var(--landing-ink);
  color: var(--landing-paper);
  box-shadow: none;
  transform: none;
  font-size: 18px;
  line-height: 1;
}

.auth-brand strong {
  color: var(--landing-ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.auth-brand span {
  padding-left: 11px;
  border-left: 1px solid var(--landing-line-strong);
  color: var(--landing-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.auth-showcase {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: none;
  padding: 112px clamp(42px, 5.5vw, 82px) 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-showcase .eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0;
  color: var(--landing-accent);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.auth-showcase .eyebrow::before {
  content: none;
}

.auth-showcase h1 {
  max-width: 680px;
  margin: 16px 0 14px;
  color: var(--landing-ink);
  font-size: clamp(42px, 4.15vw, 62px);
  font-weight: 780;
  line-height: 1.14;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.auth-showcase > p {
  max-width: 590px;
  margin: 0;
  color: var(--landing-copy);
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.8;
}

.auth-visual {
  width: min(100%, 720px);
  margin: clamp(24px, 3.4vh, 38px) 0 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 2.32 / 1;
  object-fit: cover;
  object-position: 50% 54%;
  border: 1px solid rgba(20, 35, 31, 0.11);
  border-radius: 16px;
  filter: saturate(0.78) contrast(0.98);
  box-shadow: 0 18px 44px rgba(24, 43, 37, 0.12);
  transition: filter 260ms ease, transform 260ms ease, box-shadow 260ms ease;
}

.auth-visual:hover img {
  filter: saturate(0.9) contrast(1);
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(24, 43, 37, 0.15);
}

.auth-visual figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 2px 0;
  color: var(--landing-muted);
  font-size: 11px;
  line-height: 1.6;
}

.auth-visual figcaption strong {
  flex: 0 0 auto;
  color: var(--landing-ink);
  font-size: 12px;
  font-weight: 700;
}

.auth-proof {
  width: min(100%, 720px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 22px 0 0;
  padding: 13px 0;
  border-top: 1px solid var(--landing-line);
  border-bottom: 1px solid var(--landing-line);
  color: var(--landing-muted);
  font-size: 11px;
  line-height: 1.5;
}

.auth-proof span {
  padding: 0 16px;
}

.auth-proof span:first-child {
  padding-left: 0;
}

.auth-proof span + span {
  border-left: 1px solid var(--landing-line);
}

.auth-panel {
  min-height: 100dvh;
  max-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  padding: 72px clamp(34px, 4.5vw, 70px) 42px;
  border-left: 1px solid var(--landing-line);
  background: var(--landing-panel);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-card-head h2 {
  margin: 0;
  color: var(--landing-ink);
  font-size: 29px;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.auth-card-head p {
  margin: 9px 0 28px;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.7;
}

.auth-tabs {
  display: flex;
  gap: 24px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--landing-line);
  border-radius: 0;
  background: transparent;
}

.auth-tabs button {
  min-height: 40px;
  position: relative;
  flex: 0 0 auto;
  padding: 0 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--landing-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 620;
  cursor: pointer;
  transition: color 180ms ease;
}

.auth-tabs button::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: -1px;
  left: 50%;
  height: 2px;
  background: var(--landing-accent);
  transition: right 180ms ease, left 180ms ease;
}

.auth-tabs button:hover {
  color: var(--landing-ink);
}

.auth-tabs button.active {
  border: 0;
  background: transparent;
  color: var(--landing-accent-deep);
}

.auth-tabs button.active::after {
  right: 0;
  left: 0;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form > label,
.auth-grid label {
  display: block;
  margin: 15px 0 7px;
  color: var(--landing-copy);
  font-size: 12px;
  font-weight: 620;
}

.auth-form input,
.auth-form select,
.phone-input span,
.code-input button {
  min-height: 48px;
  height: 48px;
  box-sizing: border-box;
  border: 1px solid var(--landing-line-strong);
  border-radius: 8px;
  background: var(--landing-field);
  color: var(--landing-ink);
  font-family: inherit;
  font-size: 13px;
}

.auth-screen .auth-form input,
.auth-screen .auth-form select {
  border-color: var(--landing-line-strong) !important;
  border-radius: 8px !important;
  background: var(--landing-field) !important;
  color: var(--landing-ink) !important;
  outline: 0 !important;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 0 13px;
  outline: 0;
}

.auth-form input::placeholder {
  color: var(--landing-faint);
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--landing-accent) !important;
  box-shadow: 0 0 0 3px rgba(22, 123, 104, 0.13) !important;
}

.phone-input,
.code-input {
  display: flex;
  gap: 8px;
}

.phone-input span {
  width: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  color: var(--landing-copy);
  font-size: 12px;
}

.code-input input {
  min-width: 0;
}

.code-input button {
  width: 118px;
  flex: 0 0 118px;
  padding: 0 10px;
  background: var(--landing-accent-soft);
  border-color: transparent;
  color: var(--landing-accent-deep);
  font-weight: 650;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.code-input button:hover {
  background: #d2e7df;
}

.code-input button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.auth-form .agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  color: var(--landing-muted) !important;
  font-size: 10px;
  font-weight: 450;
  line-height: 1.6;
}

.agree input {
  width: 15px !important;
  min-height: 15px !important;
  height: 15px !important;
  margin: 1px 0 0;
  accent-color: var(--landing-accent);
}

.auth-submit,
.sso-submit {
  width: 100%;
  min-height: 49px;
  height: 49px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.auth-submit {
  margin-top: 20px;
  border: 1px solid var(--landing-accent);
  background: var(--landing-accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(22, 123, 104, 0.18);
}

.auth-submit:hover {
  border-color: var(--landing-accent-deep);
  background: var(--landing-accent-deep);
  box-shadow: 0 13px 28px rgba(22, 123, 104, 0.22);
  transform: translateY(-1px);
}

.sso-submit {
  margin-top: 9px;
  border: 1px solid var(--landing-line-strong);
  background: transparent;
  color: var(--landing-copy);
  box-shadow: none;
}

.sso-submit:hover {
  border-color: var(--landing-accent);
  color: var(--landing-accent-deep);
  transform: translateY(-1px);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-row a {
  color: var(--landing-accent);
  font-size: 10px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 9px;
}

.demo-entry {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--landing-line);
  color: var(--landing-faint);
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
}

.demo-entry button {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--landing-accent);
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.auth-tabs button:focus-visible,
.code-input button:focus-visible,
.auth-submit:focus-visible,
.sso-submit:focus-visible,
.demo-entry button:focus-visible {
  outline: 3px solid rgba(22, 123, 104, 0.24);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .auth-visual img,
  .auth-tabs button,
  .auth-tabs button::after,
  .code-input button,
  .auth-submit,
  .sso-submit {
    scroll-behavior: auto;
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --landing-canvas: #111a18;
    --landing-panel: #17211e;
    --landing-paper: #f4f7f5;
    --landing-ink: #edf4f1;
    --landing-copy: #bdcac5;
    --landing-muted: #98aaa3;
    --landing-faint: #7f918a;
    --landing-line: #30403a;
    --landing-line-strong: #40524b;
    --landing-accent: #55b9a5;
    --landing-accent-deep: #79cdbb;
    --landing-accent-soft: #213e37;
    --landing-field: #111a18;
  }

  .auth-logo {
    border-color: var(--landing-paper);
    background: var(--landing-paper);
    color: #14231f;
  }

  .auth-submit {
    border-color: #287f6d;
    background: #287f6d;
  }

  .auth-submit:hover {
    border-color: #32937f;
    background: #32937f;
  }
}

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

  .auth-brand {
    left: 42px;
  }

  .auth-showcase {
    padding-right: 42px;
    padding-left: 42px;
  }

  .auth-showcase h1 {
    font-size: clamp(40px, 5vw, 52px);
  }

  .auth-visual img {
    aspect-ratio: 2.05 / 1;
  }

  .auth-panel {
    padding-right: 34px;
    padding-left: 34px;
  }
}

@media (max-width: 820px) {
  .auth-screen {
    display: block;
    overflow: visible;
  }

  .auth-brand {
    position: relative;
    top: auto;
    left: auto;
    padding: 24px 22px 0;
  }

  .auth-showcase {
    padding: 58px 22px 34px;
  }

  .auth-showcase h1 {
    max-width: 620px;
    font-size: clamp(38px, 9vw, 52px);
  }

  .auth-visual {
    width: 100%;
    max-width: 680px;
  }

  .auth-visual img {
    aspect-ratio: 16 / 9;
  }

  .auth-panel {
    min-height: auto;
    max-height: none;
    padding: 48px 22px 44px;
    border-top: 1px solid var(--landing-line);
    border-left: 0;
  }

  .auth-card {
    max-width: 620px;
  }
}

@media (max-width: 520px) {
  .auth-brand span {
    display: none;
  }

  .auth-showcase {
    padding-top: 48px;
  }

  .auth-showcase h1 {
    font-size: clamp(35px, 10.5vw, 44px);
    letter-spacing: -0.04em;
  }

  .auth-showcase > p {
    font-size: 14px;
  }

  .auth-visual figcaption {
    display: block;
  }

  .auth-visual figcaption span {
    display: block;
    margin-top: 2px;
  }

  .auth-proof {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .auth-proof span,
  .auth-proof span:first-child {
    padding: 0;
  }

  .auth-proof span + span {
    border-left: 0;
  }

  .auth-tabs {
    gap: 18px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* 2026-08 product entry redesign: calm, compact, trust-first. */
.auth-screen {
  --landing-canvas: #f5f7f6;
  --landing-panel: #fbfcfb;
  --landing-paper: #ffffff;
  --landing-ink: #14231f;
  --landing-copy: #43544f;
  --landing-muted: #6f7f7a;
  --landing-faint: #8b9793;
  --landing-line: #d6ded9;
  --landing-line-strong: #c3cec8;
  --landing-accent: #167b68;
  --landing-accent-deep: #0d6253;
  --landing-accent-soft: #e0eee9;
  --landing-field: #ffffff;
  grid-template-columns: minmax(0, 1.08fr) minmax(480px, .92fr);
  background: #f5f7f6;
}
.auth-brand { top: 24px; left: clamp(28px, 4vw, 64px); }
.auth-logo { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #176f63; font-size: 15px; }
.auth-brand strong { font-size: 16px; font-weight: 720; }
.auth-brand span { font-size: 10px; }
.auth-showcase {
  justify-content: center;
  padding: 88px clamp(28px, 4vw, 64px) 34px;
}
.auth-showcase .eyebrow { font-size: 11px; letter-spacing: .04em; }
.auth-showcase h1 {
  max-width: 600px;
  margin: 12px 0 12px;
  font-size: clamp(36px, 3.1vw, 48px);
  font-weight: 760;
  line-height: 1.18;
  letter-spacing: -.035em;
  text-wrap: pretty;
}
.auth-showcase > p { max-width: 520px; font-size: 15px; line-height: 1.7; }
.auth-visual { width: min(100%, 610px); margin-top: clamp(20px, 3vh, 28px); }
.auth-visual img {
  aspect-ratio: 16 / 8.5;
  height: clamp(300px, 45vh, 460px);
  object-fit: cover;
  border-color: #d7dfdb;
  border-radius: 12px;
  filter: saturate(.7) contrast(.98);
  box-shadow: 0 14px 36px rgba(29, 51, 45, .1);
}
.auth-visual:hover img { transform: none; filter: saturate(.78) contrast(1); box-shadow: 0 14px 36px rgba(29, 51, 45, .1); }
.auth-visual figcaption { padding-top: 9px; font-size: 10px; }
.auth-proof { width: min(100%, 610px); margin-top: 14px; padding: 10px 0; font-size: 10px; }
.auth-panel {
  padding: 64px clamp(36px, 4vw, 68px) 38px;
  background: #fbfcfb;
}
.auth-card { max-width: 500px; }
.auth-card-head h2 { font-size: 25px; letter-spacing: -.025em; }
.auth-card-head p { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.auth-tabs { margin-top: 22px; }
.auth-tabs button { min-height: 42px; font-size: 13px; }
.auth-form { padding-top: 22px; }
.auth-form > label:not(.agree) { margin-top: 13px; margin-bottom: 6px; font-size: 12px; }
.auth-form input,
.auth-form select,
.phone-input,
.code-input > input { min-height: 44px; font-size: 13px; }
.phone-input > span { min-width: 62px; font-size: 13px; }
.code-input { grid-template-columns: minmax(0, 1fr) 132px; gap: 8px; }
.code-input button { min-height: 44px; font-size: 12px; }
.agree { margin-top: 15px; color: #586862; font-size: 11px; line-height: 1.55; }
.auth-submit { min-height: 46px; margin-top: 20px; border-radius: 8px; font-size: 14px; box-shadow: none; }
.demo-entry { margin-top: 20px; padding-top: 16px; font-size: 11px; }
.auth-screen :is(button, input, select) { transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .08s ease; }
.auth-screen button:active { transform: translateY(1px); }

@media (max-width: 960px) {
  .auth-screen { grid-template-columns: minmax(0, 1fr) 420px; }
  .auth-showcase { padding-inline: 32px; }
  .auth-showcase h1 { font-size: 38px; }
  .auth-panel { padding-inline: 28px; }
}

@media (max-width: 820px) {
  .auth-screen { display: block; }
  .auth-showcase { padding: 42px 22px 30px; }
  .auth-showcase h1 { font-size: clamp(32px, 8vw, 40px); }
  .auth-visual { max-width: 620px; }
  .auth-visual img { height: clamp(260px, 52vw, 390px); }
  .auth-proof { max-width: 620px; }
  .auth-panel { padding: 36px 22px 44px; }
}

@media (max-width: 520px) {
  .auth-brand { padding-top: 18px; }
  .auth-showcase { padding-top: 34px; }
  .auth-visual figcaption,
  .auth-proof { display: none; }
  .auth-visual img { height: 240px; }
  .auth-panel { padding-inline: 16px; }
  .code-input { grid-template-columns: minmax(0, 1fr) 112px; }
}
