/* Q1 Paper Writer — the sign-in page. The house sign-in layout (as in Cloud Accountant): the brand on the
   left, one card on the right; in this app's colours. A public file: it loads before anyone signs in. */
:root {
  --green: #2ca01c;
  --green-dark: #108000;
  --ink: #1f2124;
  --ink-soft: #5d6066;
  --line: #dfe2e6;
  --canvas: #f4f5f8;
  --blue: #0077c5;
  --red: #b42318;
  --font: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }

.login { display: grid; grid-template-columns: 55fr 45fr; min-height: 100vh; }

.login-side {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  padding: 48px clamp(28px, 7vw, 120px); color: #fff;
  background: radial-gradient(ellipse 70% 55% at 38% 42%, #24452c 0%, #18251c 48%, #111614 100%);
}
.login-side::after {            /* a field of dots fading upward: the house panel's texture */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none;
  background-image: radial-gradient(rgba(117, 214, 96, .5) 1px, transparent 1.6px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .9), transparent);
          mask-image: linear-gradient(to top, rgba(0, 0, 0, .9), transparent);
}
.brandmark { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.brandmark .logo {
  width: 72px; height: 72px; border-radius: 16px; background: var(--green); display: grid; place-items: center;
  font-size: 30px; font-weight: 800; letter-spacing: -.02em; box-shadow: 0 8px 24px rgba(44, 160, 28, .35);
}
.bm-text { border-left: 1px solid rgba(255, 255, 255, .28); padding-left: 18px; }
.bm-name { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -.01em; }
.bm-tag { margin-top: 4px; font-size: 15px; color: rgba(255, 255, 255, .72); }
.login-pitch {
  position: relative; z-index: 1; max-width: 470px; margin: 26px 0 0;
  font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, .86);
}

.login-main { display: grid; place-items: center; padding: 32px 16px; }
.login-card {
  width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px 26px; box-shadow: 0 12px 40px rgba(16, 24, 40, .08);
}
.login-card h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.note { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.stack { display: grid; gap: 14px; margin-top: 22px; }
.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; }
.input {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid #cdd1d7; border-radius: 10px; background: #fff;
  font: inherit; font-size: 15px; font-weight: 400; color: var(--ink);
}
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(44, 160, 28, .18); }
.hint { margin: -4px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.btn {
  height: 46px; border: 0; border-radius: 10px; background: var(--green); color: #fff; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700;
}
.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible, .linkish:focus-visible { outline: 3px solid rgba(0, 119, 197, .35); outline-offset: 2px; }
.alert { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.alert.error { background: #fdecea; border: 1px solid #f6c7c1; color: var(--red); }
.alert.info { margin-top: 16px; background: #eef6fb; border: 1px solid #cfe4f2; color: #0b4f7c; }
.login-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 16px; font-size: 13.5px; }
.linkish {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--blue); text-decoration: underline; text-underline-offset: 2px;
}

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 28px 16px 30px; }
  .login-side::after { height: 70%; }
  .brandmark { gap: 14px; }
  .brandmark .logo { width: 52px; height: 52px; border-radius: 12px; font-size: 22px; }
  .bm-text { padding-left: 14px; }
  .login-pitch { margin-top: 14px; font-size: 15px; }
  .login-main { place-items: start center; padding: 24px 16px 40px; }
  .login-card { padding: 24px 20px 22px; }
}
