:root { --green: #58cc02; --green-d: #58a700; --blue: #1cb0f6; --red: #ea2b2b; --ink: #3c3c3c; --mute: #777; --line: #e5e5e5; --soft: #f7f7f7; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Nunito, "Segoe UI", system-ui, sans-serif; font-weight: 700; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
input { -webkit-appearance: none; appearance: none; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

.page { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

.hero { background: linear-gradient(155deg, #6fdc12 0%, var(--green) 45%, #3fa500 100%); color: #fff; display: grid; place-items: center; padding: 48px; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.hero::before { width: 420px; height: 420px; top: -150px; right: -130px; }
.hero::after { width: 300px; height: 300px; bottom: -110px; left: -90px; }
.hero-inner { max-width: 420px; position: relative; z-index: 1; }
.fox { width: 120px; height: 120px; display: block; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .12)); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h2 { font-size: 36px; font-weight: 900; line-height: 1.15; margin: 22px 0 10px; }
.hero p { font-size: 18px; line-height: 1.5; margin: 0 0 26px; opacity: .95; }
.hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.hero li span { width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 20px; }

.panel { display: grid; place-items: center; padding: 32px 24px; }
.card { width: 100%; max-width: 380px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 18px; color: var(--green); margin-bottom: 34px; }
.logo { font-size: 26px; }
h1 { font-size: 30px; font-weight: 900; margin: 0; }
.sub { color: var(--mute); margin: 6px 0 26px; font-size: 16px; }
label { display: block; font-size: 13px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: #555; margin: 16px 0 6px; }
input { width: 100%; border: 2px solid var(--line); border-radius: 14px; background: var(--soft); padding: 13px 16px; font-size: 17px; outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(28, 176, 246, .15); }
.pwrap { position: relative; }
.pwrap input { padding-right: 76px; }
.toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--blue); font-weight: 900; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.toggle:hover, .toggle:focus-visible { background: #ddf4ff; outline: none; }
.submit { width: 100%; margin-top: 26px; border: 0; border-radius: 16px; padding: 15px; background: var(--green); color: #fff; font-weight: 900; font-size: 16px; letter-spacing: 1px; box-shadow: 0 4px 0 var(--green-d); cursor: pointer; transition: filter .1s; }
.submit:hover:not(:disabled) { filter: brightness(1.06); }
.submit:active:not(:disabled) { transform: translateY(4px); box-shadow: none; }
.submit:focus-visible { outline: 3px solid rgba(28, 176, 246, .5); outline-offset: 3px; }
.submit:disabled { background: var(--line); color: #afafaf; box-shadow: none; cursor: default; }
.alert { background: #ffdfe0; color: var(--red); border-radius: 12px; padding: 11px 14px; font-size: 15px; line-height: 1.35; }
.card.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.foot { text-align: center; color: var(--mute); font-size: 13px; margin: 22px 0 0; }

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hero { padding: 28px 24px; }
  .hero-inner { display: flex; align-items: center; gap: 16px; max-width: 380px; width: 100%; }
  .fox { width: 64px; height: 64px; flex: none; }
  .hero h2 { font-size: 22px; margin: 0; }
  .hero p, .hero ul { display: none; }
  .panel { place-items: start center; padding-top: 36px; }
  .brand { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* The sign-in page follows the theme chosen inside the app (saved on this device). */
.hero { background: linear-gradient(155deg, var(--green), var(--green-d)); }
.hero h2, .hero p, .hero li { color: var(--pri-ink, #fff); }
.submit { color: var(--pri-ink, #fff); }
html[data-theme="dark"] { --ink: #eef4f7; --mute: #9db0ba; --line: #33434c; --soft: #212e35; }
html[data-theme="dark"] body { background: #111b20; }
html[data-theme="dark"] label { color: #cdd9df; }
html[data-theme="dark"] input:focus { background: #1a252b; }
html[data-theme="dark"] .alert { background: #472223; color: #ff9a9a; }
html[data-theme="dark"] .toggle:hover, html[data-theme="dark"] .toggle:focus-visible { background: #22323b; }
html[data-theme="dark"] .submit:disabled { background: #212e35; color: #6a7c86; }