:root {
  --ink: #11110f;
  --muted: #6e6c66;
  --line: #dedbd4;
  --paper: #fbfaf7;
  --warm: #f1eee7;
  --green: #0b8f6a;
  --green-soft: #e0f2eb;
  --danger: #c72c35;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
button, input { font: inherit; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(430px, .8fr); }
.story-panel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 34px clamp(36px, 5vw, 78px) 30px;
  background:
    radial-gradient(circle at 78% 72%, rgba(11, 143, 106, .13), transparent 28%),
    linear-gradient(145deg, #f4f2ed 0%, #eae7df 100%);
}
.story-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  pointer-events: none;
  background-image: radial-gradient(rgba(17, 17, 15, .18) .6px, transparent .6px);
  background-size: 9px 9px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
.login-brand, .mobile-brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 650; text-decoration: none; }
.login-brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: #fff; }
.login-brand-mark svg { width: 18px; height: 18px; }
.story-copy { position: relative; z-index: 2; max-width: 650px; margin-top: clamp(60px, 10vh, 112px); }
.eyebrow, .login-kicker { margin: 0 0 13px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.story-copy h1 { margin: 0; font-size: clamp(37px, 4.5vw, 66px); font-weight: 620; line-height: 1.12; letter-spacing: -.055em; }
.story-intro { max-width: 570px; margin: 24px 0 0; color: #5e5b55; font-size: 15px; line-height: 1.8; }

.product-visual { position: relative; z-index: 2; width: min(100%, 650px); height: 310px; margin-top: clamp(36px, 6vh, 68px); }
.visual-glow { position: absolute; width: 330px; height: 190px; left: 110px; top: 50px; border-radius: 50%; background: rgba(11,143,106,.2); filter: blur(60px); }
.sheet-card { position: absolute; left: 7%; top: 12px; width: 68%; min-width: 360px; overflow: hidden; border: 1px solid rgba(17,17,15,.12); border-radius: 19px; background: rgba(255,255,255,.84); box-shadow: 0 28px 70px rgba(54,51,43,.14); transform: rotate(-1.8deg); backdrop-filter: blur(14px); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.sheet-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: #fff; }
.sheet-icon svg { width: 17px; height: 17px; }
.sheet-head > span:nth-child(2) { display: flex; flex-direction: column; }
.sheet-head strong { font-size: 12px; }
.sheet-head small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.sheet-head i { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.sheet-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr .8fr; }
.sheet-grid > * { height: 31px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sheet-grid > :nth-child(4n) { border-right: 0; }
.sheet-grid b { height: 29px; background: #f0eee9; }
.sheet-grid span::after { content: ""; display: block; width: 58%; height: 4px; margin: 13px auto 0; border-radius: 4px; background: #dbd8d0; }
.floating-note { position: absolute; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid rgba(17,17,15,.1); border-radius: 13px; background: rgba(255,255,255,.92); box-shadow: 0 14px 38px rgba(52,49,42,.13); backdrop-filter: blur(12px); }
.floating-note > svg { width: 20px; height: 20px; color: var(--green); }
.floating-note > span:last-child { display: flex; flex-direction: column; }
.floating-note strong { font-size: 11px; }
.floating-note small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.note-one { right: 2%; top: 56px; transform: rotate(2deg); }
.note-two { left: 2%; bottom: 30px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.story-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 22px; margin-top: auto; color: #77746d; font-size: 11px; }
.story-foot span::before { content: "✓"; margin-right: 6px; color: var(--green); font-weight: 700; }

.login-panel { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 90px clamp(34px, 5vw, 76px) 45px; background: #fff; }
.login-top-note { position: absolute; top: 31px; right: 38px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.login-top-note svg { width: 17px; height: 17px; color: var(--green); }
.login-card { width: min(100%, 390px); }
.mobile-brand { display: none; margin-bottom: 52px; }
.login-card h2 { margin: 0; font-size: 29px; font-weight: 640; letter-spacing: -.04em; }
.login-subtitle { margin: 11px 0 31px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.field { display: block; margin-top: 18px; }
.field > span:first-child { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #aaa69e; }
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,17,15,.07); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 48px; }
.password-wrap button { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.password-wrap button:hover { background: var(--warm); color: var(--ink); }
.password-wrap svg { width: 18px; height: 18px; }
.eye-closed { display: none; }
.password-visible .eye-open { display: none; }
.password-visible .eye-closed { display: block; }
.remember-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 19px; cursor: pointer; user-select: none; }
.remember-row > input { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { width: 19px; height: 19px; flex: 0 0 19px; display: grid; place-items: center; margin-top: 1px; border: 1px solid #c8c4bc; border-radius: 6px; background: #fff; color: #fff; }
.checkmark svg { width: 13px; height: 13px; stroke-width: 2.3; opacity: 0; }
.remember-row > input:checked + .checkmark { border-color: var(--ink); background: var(--ink); }
.remember-row > input:checked + .checkmark svg { opacity: 1; }
.remember-row > input:focus-visible + .checkmark { box-shadow: 0 0 0 3px rgba(17,17,15,.1); }
.remember-row > span:last-child { display: flex; flex-direction: column; }
.remember-row strong { font-size: 12px; font-weight: 600; }
.remember-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.login-error { margin: 17px 0 -2px; padding: 10px 12px; border: 1px solid #f1cdd0; border-radius: 9px; background: #fff5f5; color: var(--danger); font-size: 12px; }
.login-button { width: 100%; height: 49px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 22px; border: 0; border-radius: 11px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.login-button:hover { transform: translateY(-1px); }
.login-button:disabled { opacity: .62; transform: none; cursor: wait; }
.login-button svg { width: 17px; height: 17px; }
.login-button.loading svg { animation: arrow-wait .8s ease-in-out infinite alternate; }
.login-security { margin: 20px auto 0; max-width: 320px; color: #9b978f; font-size: 10px; line-height: 1.6; text-align: center; }

@keyframes arrow-wait { to { transform: translateX(4px); } }

@media (max-width: 930px) {
  .login-layout { grid-template-columns: 1fr; }
  .story-panel { display: none; }
  .login-panel { min-height: 100vh; padding: 70px 24px 36px; }
  .mobile-brand { display: inline-flex; }
}

@media (max-width: 480px) {
  .login-top-note { top: 22px; right: 22px; }
  .login-panel { align-items: flex-start; padding-top: 80px; }
  .mobile-brand { margin-bottom: 62px; }
  .login-card h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
