/* Sign-in page of the web version. Same design as the other ARES apps' sign-in pages
   (FacturAres): a brand panel beside a light form panel. Self-contained: no app.css. */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg-tint: #f1f2f6;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --primary: #2c6fc2;
  --primary-hover: #245ea6;
  --primary-ring: rgba(57, 135, 229, .25);
  --danger: #dc2626;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .04), 0 1px 1px rgba(17, 24, 39, .03);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, .06), 0 2px 4px rgba(17, 24, 39, .04);
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1 { margin: 0 0 .35rem; font-size: 1.6rem; letter-spacing: -.015em; font-weight: 650; line-height: 1.25; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* layout */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-aside { background: linear-gradient(150deg, #0f2a4d 0%, #2c6fc2 55%, #3987e5 100%); color: #dbeafe; padding: 3rem 3.25rem;
  display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: rgba(255, 255, 255, .07); }
.auth-logo { height: 64px; width: auto; align-self: flex-start; position: relative; z-index: 1; }
.auth-copy { position: relative; z-index: 1; }
.auth-aside h2 { color: #fff; font-size: 1.85rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -.02em; font-weight: 700; }
.auth-aside p { margin: 0 0 1.5rem; color: #bfdbfe; font-size: 1.02rem; max-width: 30rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.auth-points li { display: flex; gap: .7rem; align-items: flex-start; color: #dbeafe; }
.auth-points svg { flex: none; margin-top: 2px; }
.auth-foot { font-size: .8rem; color: #93c5fd; position: relative; z-index: 1; }
.auth-main { display: flex; flex-direction: column; padding: 1.5rem 2rem 2.5rem; }
.auth-panel { width: 100%; max-width: 420px; margin: auto; padding-top: 1.5rem; }
.auth-panel > form > p, .auth-panel > div > p.lead { margin: 0 0 1.25rem; }

/* card and form */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1.5rem; box-shadow: var(--shadow-md); }
.form-row { margin-bottom: 1.1rem; }
.label { display: block; font-size: .82rem; color: var(--text-soft); margin-bottom: .35rem; font-weight: 500; }
input[type=text], input[type=password] { width: 100%; padding: .6rem .8rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease; }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
input::placeholder { color: #9aa1b3; }
input.code { font: 600 1.5rem var(--mono); letter-spacing: .3rem; text-align: center; }
.errors { color: var(--danger); font-size: .82rem; margin: -.4rem 0 1rem; }
.errors:empty { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--primary); color: #fff; cursor: pointer; font: inherit; font-size: .92rem; font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .08); transition: background .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { background: var(--primary-hover); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn-secondary { background: var(--surface); color: var(--text-soft); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-tint); color: var(--text); }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.check { display: flex; gap: .5rem; align-items: center; margin-bottom: 1.1rem; color: var(--text-soft); font-size: .92rem; }
.center { text-align: center; }
.foot-note { text-align: center; margin-top: 1.25rem; }
details summary { cursor: pointer; color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
details[open] summary { margin-bottom: .6rem; }

/* demo notice (ARES standard §14) */
.demo-notice { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1.25rem; border-color: #fcd34d; background: #fffbeb;
  box-shadow: var(--shadow-sm); padding: 1rem 1.1rem; }
.demo-chip { flex: none; font: 800 .8rem/1 system-ui, sans-serif; letter-spacing: .12em; color: #fff; background: #d97706;
  border-radius: 6px; padding: .4rem .55rem; }
.demo-notice div { font-size: .95rem; color: var(--text-soft); }

/* two-step verification set-up */
.qr { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; width: 210px; height: 210px; margin: 0 auto 1rem; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { font: 600 .95rem var(--mono); letter-spacing: .08em; text-align: center; word-break: break-all; color: var(--text);
  background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: .5rem; margin-bottom: 1.1rem; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; font: .95rem var(--mono); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1rem; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { padding: 1.5rem 1.5rem 1.75rem; }
  .auth-aside h2 { font-size: 1.35rem; margin-top: 1rem; }
  .auth-points, .auth-foot { display: none; }
  .auth-aside p { margin-bottom: 0; }
}
