/**
 * Responsibility: Present a polished, reassuring login experience for the private study planner.
 * Implementation:
 * 1. Pair an editorial study story panel with a focused sign-in card.
 * 2. Reuse the planner's warm paper, deep teal, and coral visual language.
 * 3. Collapse cleanly into a single mobile login surface without decorative clutter.
 */

:root {
  --ink: #17302f;
  --muted: #6f807e;
  --paper: #f4f0e5;
  --white: #fffdf8;
  --teal: #0c625f;
  --teal-dark: #123d3b;
  --coral: #e8785d;
  --line: #dce3df;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}
button, input { font: inherit; }

.login-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); min-height: 100vh; }
.story-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(34px, 5vw, 76px);
  color: #f5f7f3;
  background:
    radial-gradient(circle at 78% 22%, rgba(232,120,93,.32), transparent 20rem),
    radial-gradient(circle at 10% 90%, rgba(117,190,181,.16), transparent 24rem),
    linear-gradient(145deg, #174b48 0%, #0a2f2e 100%);
}
.story-panel::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -160px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 110px rgba(255,255,255,.018);
}
.brand-mark { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.brand-mark i { width: 28px; height: 1px; background: var(--coral); }
.story-copy { position: relative; z-index: 1; width: min(650px, 95%); margin: auto 0; padding: 70px 0; }
.eyebrow, .welcome { margin: 0 0 14px; color: #8ccbc4; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(46px, 6vw, 78px); font-weight: 500; line-height: 1.2; letter-spacing: -.045em; }
.intro { width: min(500px, 92%); margin: 26px 0 0; color: #bed0cd; font-size: 16px; line-height: 1.9; }
.feature-row { position: relative; z-index: 1; display: flex; gap: clamp(24px, 4vw, 56px); color: #b8cdca; font-size: 12px; }
.feature-row span { display: flex; align-items: baseline; gap: 7px; }
.feature-row b { color: white; font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.quote-card { position: absolute; right: clamp(32px, 5vw, 72px); bottom: clamp(84px, 11vh, 130px); z-index: 1; transform: rotate(-4deg); padding: 16px 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.06); backdrop-filter: blur(10px); }
.quote-card span { position: absolute; top: -18px; left: 12px; color: var(--coral); font-family: Georgia, serif; font-size: 50px; }
.quote-card p { margin: 0; color: #d7e2df; font-family: Georgia, serif; font-size: 13px; font-style: italic; }

.form-panel { display: grid; place-items: center; padding: 42px; background: var(--white); }
.form-wrap { width: min(400px, 100%); }
.mobile-brand { display: none; }
.welcome { color: var(--teal); }
h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 38px; font-weight: 600; letter-spacing: -.04em; }
.subtitle { margin: 13px 0 32px; color: var(--muted); font-size: 13px; line-height: 1.7; }
form > label { display: block; margin: 18px 0 8px; color: #435755; font-size: 12px; font-weight: 800; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; top: 50%; left: 15px; width: 19px; transform: translateY(-50%); fill: none; stroke: #849592; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; pointer-events: none; }
input { width: 100%; height: 52px; padding: 0 50px 0 46px; border: 1px solid var(--line); border-radius: 14px; outline: none; color: var(--ink); background: #fff; transition: .2s ease; }
input::placeholder { color: #a7b2b0; }
input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(12,98,95,.10); }
.reveal-button { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 54px; margin-top: 28px; padding: 0 20px; border: 0; border-radius: 14px; color: white; background: var(--teal); box-shadow: 0 12px 25px rgba(12,98,95,.20); font-weight: 800; cursor: pointer; transition: .2s ease; }
.submit-button:hover:not(:disabled) { transform: translateY(-2px); background: #084f4d; box-shadow: 0 15px 30px rgba(12,98,95,.25); }
.submit-button:disabled { cursor: wait; opacity: .7; }
.notice { display: none; margin: 18px 0 0; padding: 11px 13px; border-radius: 11px; font-size: 12px; }
.notice.error { display: block; color: #963e2e; background: #fff0eb; }
.notice.success { display: block; color: #21635e; background: #e8f4f1; }
.privacy { margin: 20px 0 0; color: #8b9997; text-align: center; font-size: 11px; }
.privacy span { color: #63a49d; font-size: 8px; }
.account-entry { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.account-entry a { color: var(--teal); font-weight: 800; text-decoration: none; }
.account-entry a:hover { text-decoration: underline; text-underline-offset: 3px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 28px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--teal); }
.register-panel .subtitle { margin-bottom: 24px; }
.register-panel form > label { margin-top: 14px; }
.register-panel .submit-button { margin-top: 22px; }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; min-height: 100svh; }
  .story-panel { display: none; }
  .form-panel { padding: 28px 24px; background: radial-gradient(circle at 85% 10%, rgba(232,120,93,.10), transparent 18rem), var(--white); }
  .mobile-brand { display: block; margin-bottom: clamp(60px, 12vh, 110px); color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
  .mobile-brand span { color: var(--coral); }
  h2 { font-size: 34px; }
  .register-panel .mobile-brand { margin-bottom: 42px; }
}

@media (max-width: 420px) {
  .form-panel { align-items: start; padding-top: 26px; }
  .mobile-brand { margin-bottom: 64px; }
}
