/*
 * web/src/login.css – styles for login.html only.
 * Split layout: animated navy brand panel (left) + clean form card (right).
 * All motion respects "prefers-reduced-motion".
 */
body.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; background: #f4f7fb; }

/* ---------------- left: brand panel */
.hero-side { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 48px 56px;
  background: radial-gradient(1200px 700px at 15% 10%, #1b3a6b 0%, #0b1f3a 45%, #07152a 100%); }
#motion { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 1; max-width: 560px; }
.hero-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 20px;
  animation: rise .7s ease both; }
.hero-brand small { display: block; font-weight: 600; font-size: 11px; letter-spacing: .18em; color: #9fb3d1; }
.logo-tile { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.logo-tile img { width: 42px; height: 42px; }
.hero-title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; margin: 34px 0 14px; letter-spacing: -0.02em; }
.hero-title .line { display: block; animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.hero-title .line:nth-child(2) { animation-delay: .12s; }
.hero-title .line:nth-child(3) { animation-delay: .24s; }
.hero-title .accent { background: linear-gradient(90deg, #4ade80, #22c55e 40%, #a3e635); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { font-weight: 600; letter-spacing: .22em; text-transform: uppercase; font-size: 13px; color: #c9d6ea; margin: 0 0 26px; }
.tagline span { display: inline-block; animation: rise .6s ease both; }
.tagline span:nth-child(1) { animation-delay: .45s; } .tagline span:nth-child(2) { animation-delay: .6s; } .tagline span:nth-child(3) { animation-delay: .75s; }
.tagline .g { color: #4ade80; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: center; color: #dbe5f3; animation: slideIn .6s ease both; }
.features li:nth-child(1) { animation-delay: .9s; } .features li:nth-child(2) { animation-delay: 1.05s; } .features li:nth-child(3) { animation-delay: 1.2s; }
.features i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(74,222,128,.15); color: #4ade80; font-weight: 800; }
.float-cards { position: relative; height: 150px; margin-top: 34px; }
.fcard { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.25);
  animation: rise .8s ease both, bob 6s ease-in-out infinite; }
.fcard b { color: #fff; } .fcard b.ok { color: #4ade80; }
.fcard .dot { width: 8px; height: 8px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 10px #60a5fa; }
.fcard .dot.ok { background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.fcard.c1 { left: 0; top: 0; animation-delay: 1.3s, 1.3s; }
.fcard.c2 { left: 190px; top: 52px; animation-delay: 1.45s, 2.4s; }
.fcard.c3 { left: 40px; top: 104px; animation-delay: 1.6s, 3.6s; }
.hero-foot { position: absolute; bottom: 18px; left: 56px; z-index: 1; font-size: 12px; color: #7f93b3; margin: 0; }

/* ---------------- right: form */
.form-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(440px, 100%); background: #fff; border-radius: 20px; padding: 34px 34px 28px; box-shadow: 0 20px 60px rgba(11,31,58,.10); border: 1px solid #e8edf4; }
.view { animation: viewIn .35s cubic-bezier(.2,.8,.2,1); }
.view h2 { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 28px; margin: 0 0 6px; letter-spacing: -0.02em; }
.view .sub { color: var(--grey); margin: 0 0 18px; }
.auth-card .field input { padding: 12px 14px; border-radius: 12px; border: 1.5px solid #dbe3ee; transition: border-color .15s, box-shadow .15s; font-size: 15px; }
.auth-card .field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(29,138,58,.12); }
.auth-card .field input[aria-invalid=true] { border-color: var(--red); }
.optional { color: var(--grey); font-weight: 400; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.auth-card .field input { width: 100%; min-width: 0; box-sizing: border-box; }
.pw { position: relative; }
.pw input { width: 100%; padding-right: 44px !important; }
.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 16px; opacity: .55; }
.meter { height: 4px; background: #edf1f6; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s, background .25s; }
.row-between { display: flex; justify-content: space-between; font-size: 13.5px; margin: 2px 0 12px; }
.btn.block { width: 100%; justify-content: center; padding: 13px; font-size: 15px; border-radius: 12px; margin-top: 6px; position: relative; overflow: hidden; }
.btn.primary { background: linear-gradient(135deg, #1d8a3a, #22a049); }
.btn.loading span { opacity: 0; }
.btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.form-err { color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 0 12px; font-size: 14px; max-height: 0; overflow: hidden; transition: max-height .2s, padding .2s; }
.form-err.show { max-height: 120px; padding: 10px 12px; margin-top: 8px; }
.form-ok { color: #1d6b32; background: var(--green-soft); }
.switch { text-align: center; color: var(--grey); font-size: 14px; margin: 18px 0 0; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--grey); margin: 8px 0; }
.legal { margin-top: 18px; font-size: 13px; color: var(--grey); }
.legal a { color: var(--grey); }
.icon-circle { width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 26px; margin-bottom: 12px; animation: pulseRing 2s infinite; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 8px 0 6px; }
.otp input { text-align: center; font: 700 22px "Plus Jakarta Sans", sans-serif; padding: 12px 0; border: 1.5px solid #dbe3ee; border-radius: 12px; width: 100%; }
.otp input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(29,138,58,.12); }
.otp.shake { animation: shake .4s; }
.mobile-brand { display: none; align-items: center; gap: 10px; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; margin-bottom: 18px; }
.mobile-brand img { width: 34px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(29,138,58,.35); } 70% { box-shadow: 0 0 0 14px rgba(29,138,58,0); } 100% { box-shadow: 0 0 0 0 rgba(29,138,58,0); } }

@media (max-width: 960px) {
  body.auth { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .mobile-brand { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-side *, .view, .icon-circle { animation: none !important; }
}

/* ---- "Install Chrome extension" links (install-link.js sets the URL / installed state) ---- */
.ext-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 11px 18px; border-radius: 12px;
  background: #0f3a2f; border: 1px solid rgba(74,222,128,.45); color: #e6fff0; font-weight: 600; text-decoration: none;
  animation: slideIn .6s ease 1.35s both; transition: background .2s, transform .2s; position: relative; z-index: 2; }
.ext-cta:hover { background: #145040; transform: translateY(-1px); }
.ext-cta .arrow { transition: transform .2s; } .ext-cta:hover .arrow { transform: translateX(3px); }
.ext-cta.installed { background: #13284a; border-color: rgba(255,255,255,.2); color: #b9c7dc; }
.ext-cta.installed .arrow { display: none; }
.ext-mini { display: block; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e5eaf1; text-align: center; font-size: 13.5px; font-weight: 600; color: #15803d; text-decoration: none; }
.ext-mini:hover { text-decoration: underline; }
.ext-mini.installed { color: #64748b; font-weight: 500; }
