/* WindWatch Unison sign-in (V36): a night-sky brand panel beside a glass sign-in card, in the web app's colours.
   Light is the default; the choice is shared with the app (windtree-ui-color-mode). */
:root {
  --bg: #edf2f8; --card: rgba(255, 255, 255, .8); --edge: rgba(255, 255, 255, .95); --ink: #0a1828; --muted: #5a6b80;
  --line: #d5dfe9; --field: #f6f9fc; --accent: #2a7bff; --accent-2: #13b6a8; --ring: rgba(42, 123, 255, .22);
  --shadow: 0 1px 2px rgba(10, 30, 60, .06), 0 24px 60px -18px rgba(10, 30, 60, .28);
  --glow: radial-gradient(60% 50% at 100% 0%, rgba(42, 123, 255, .12), transparent 70%), radial-gradient(50% 45% at 0% 100%, rgba(19, 182, 168, .12), transparent 70%);
  --error-bg: #fdecec; --error: #b42318; --info-bg: #e8f3ff; --info: #0b5cad;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #060d18; --card: rgba(14, 27, 46, .74); --edge: rgba(255, 255, 255, .08); --ink: #e8f0fa; --muted: #8ea2b8;
  --line: #1f344d; --field: #0a1627; --accent: #4c9bff; --accent-2: #2dd4bf; --ring: rgba(76, 155, 255, .28);
  --shadow: 0 30px 70px -20px rgba(0, 0, 0, .65);
  --glow: radial-gradient(60% 50% at 100% 0%, rgba(76, 155, 255, .14), transparent 70%), radial-gradient(50% 45% at 0% 100%, rgba(45, 212, 191, .1), transparent 70%);
  --error-bg: rgba(239, 68, 68, .14); --error: #fecaca; --info-bg: rgba(76, 155, 255, .14); --info: #cfe3ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--glow), var(--bg); color: var(--ink);
  font: 15px/1.5 Pretendard, Inter, system-ui, -apple-system, "Segoe UI", "Noto Sans KR", sans-serif; -webkit-font-smoothing: antialiased; }
svg { fill: currentColor; }

/* ---------- brand panel: always night sky */
.hero { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: max(36px, env(safe-area-inset-top)) 48px 32px; color: #e7eef8; background: linear-gradient(150deg, #040c19 0%, #0a1d38 52%, #06182c 100%); }
.aurora { position: absolute; inset: -20%; z-index: -1; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 55%; height: 45%; left: 5%; top: 8%; background: #1f6bff; }
.aurora i:nth-child(2) { width: 45%; height: 40%; right: 0; top: 40%; background: #0fb3a3; animation-duration: 22s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 40%; height: 35%; left: 25%; bottom: 0; background: #7c4dff; opacity: .35; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift { to { transform: translate3d(8%, -6%, 0) scale(1.12); } }
.wind { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; fill: none; stroke: rgba(160, 210, 255, .18); stroke-width: 1.2;
  stroke-dasharray: 90 260; animation: gust 9s linear infinite; }
.wind path:nth-child(2) { animation: gust 12s linear infinite reverse; stroke: rgba(127, 240, 224, .14); }
.wind path:nth-child(3) { animation: gust 15s linear infinite; }
@keyframes gust { to { stroke-dashoffset: -700; } }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #2a7bff 18%, #13b6a8 45%, #8b5cf6 72%, transparent);
  background-size: 200% 100%; animation: line 12s linear infinite; opacity: .85; }
@keyframes line { to { background-position: -200% 0; } }
.logo { height: 28px; width: auto; opacity: .95; align-self: flex-start; }
.hero-mid { display: flex; flex-direction: column; align-items: flex-start; max-width: 460px; }
.hero-mid > * { animation: rise .8s cubic-bezier(.2, .75, .25, 1) both; }
.hero-mid > :nth-child(2) { animation-delay: .08s; } .hero-mid > :nth-child(3) { animation-delay: .14s; }
.hero-mid > :nth-child(4) { animation-delay: .22s; } .hero-mid > :nth-child(5) { animation-delay: .3s; }
.mark { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2a7bff, #13b6a8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px -12px rgba(42, 123, 255, .9); margin-bottom: 26px; }
.mark svg { width: 38px; height: 38px; }
.mark .rotor { animation: spin 7s linear infinite; transform-origin: 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: #8fb3d9; }
.name { margin: 2px 0 14px; font-size: clamp(54px, 6vw, 84px); line-height: 1; font-weight: 800; letter-spacing: -.045em;
  background: linear-gradient(90deg, #fff, #cfe6ff 55%, #7ff0e0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { margin: 0 0 22px; font-size: 17px; line-height: 1.55; color: #b8c9dc; max-width: 400px; }
.feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feats li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #d5e2f0; }
.feats li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 4px rgba(45, 212, 191, .16), 0 0 12px rgba(45, 212, 191, .8); flex: none; }
.hero-foot { margin: 0; font-size: 12px; color: #6f86a0; }

/* ---------- sign-in side */
.side { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 72px 24px 28px; min-height: 100%; }
.tools { position: absolute; top: max(18px, env(safe-area-inset-top)); right: 18px; display: flex; gap: 8px; }
.tools button { height: 36px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: border-color .2s, transform .15s; }
.tools button:hover { border-color: var(--accent); transform: translateY(-1px); }
.card { position: relative; width: min(100%, 410px); padding: 32px 30px 26px; border-radius: 28px; background: var(--card); border: 1px solid var(--edge);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  animation: rise .7s .1s cubic-bezier(.2, .75, .25, 1) both; }
[data-theme="dark"] .card { box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06); }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(42, 123, 255, .55), transparent 35%, transparent 65%, rgba(19, 182, 168, .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.mark.sm { width: 40px; height: 40px; border-radius: 12px; margin: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 20px -8px rgba(42, 123, 255, .85); }
.mark.sm svg { width: 24px; height: 24px; }
.card-name { display: flex; flex-direction: column; line-height: 1.15; }
.card-name b { font-size: 16px; letter-spacing: -.02em; }
.card-name small { font-size: 12px; color: var(--muted); }
h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.03em; }
.sub { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input { width: 100%; height: 48px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font-size: 16px; font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.reveal { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--accent);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; }
.reveal:hover { background: var(--ring); }
button.primary { position: relative; overflow: hidden; width: 100%; height: 50px; margin-top: 22px; border: 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font: inherit; font-size: 16px; font-weight: 700; line-height: 1;
  background: linear-gradient(100deg, #2a7bff, #1b9bd8 55%, #13b6a8); box-shadow: 0 12px 28px -10px rgba(42, 123, 255, .75), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .15s, box-shadow .2s; }
button.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s cubic-bezier(.3, .6, .3, 1); }
button.primary:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(42, 123, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .3); }
button.primary:hover::after { transform: translateX(120%); }
button.primary:disabled { cursor: wait; opacity: .8; transform: none; }
.spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
button.primary:disabled .spin { display: block; }
.switch { display: block; margin: 16px auto 0; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch:hover { background: var(--ring); }
.msg { margin-top: 14px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; display: none; }
.msg.error { display: block; background: var(--error-bg); color: var(--error); }
.msg.info { display: block; background: var(--info-bg); color: var(--info); }
.foot { max-width: 410px; margin: 0; text-align: center; color: var(--muted); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- tablets and phones: the brand panel becomes a band above the card */
@media (max-width: 960px) {
  body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hero { padding: max(20px, env(safe-area-inset-top)) 22px 22px; gap: 14px; }
  .hero-mid { flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
  .mark { width: 48px; height: 48px; border-radius: 15px; margin: 0; } .mark svg { width: 28px; height: 28px; }
  .kicker { font-size: 11px; } .name { font-size: 40px; margin: 0; }
  .tag { flex-basis: 100%; margin: 4px 0 0; font-size: 14.5px; }
  .feats, .hero-foot { display: none; }
  .logo { height: 22px; }
  .side { position: static; padding: 28px 16px 24px; justify-content: flex-start; }
  .tools { top: max(16px, env(safe-area-inset-top)); right: 16px; }   /* on the brand band, beside the logo */
  .card-head { display: none; }
}
@media (max-width: 960px) and (min-height: 820px) { .side { justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  .aurora i, .wind, .wind path, .hero::after, .mark .rotor, .hero-mid > *, .card, .spin { animation: none !important; }
  button.primary::after { transition: none; }
}
@media (prefers-reduced-transparency: reduce) { .card { background: var(--field); -webkit-backdrop-filter: none; backdrop-filter: none; } }
