/* Sign-in page (item 163). Uses the app's tokens from im.css, so light and dark follow
   data-theme like every other page. The left side is a grey skeleton of the Overview's
   server cards: shapes only, never data. */

.lg-body { --lg-show: #f1f3f5; --lg-card: #ffffff; --lg-card-line: #e3e8ec; --lg-card-edge: #d3d9df;
  --lg-sk-1: #edf0f3; --lg-sk-2: #e3e8ec; --lg-sk-3: #d3d9df; --lg-sk-4: #c3cbd3; --lg-spark: #b3bcc5; --lg-icon: #aab3bc;
  --lg-field: #c3cbd3; }
:root[data-theme="dark"] .lg-body { --lg-show: #0b1116; --lg-card: #18212a; --lg-card-line: #24303b; --lg-card-edge: #33414e;
  --lg-sk-1: #222d37; --lg-sk-2: #2b3743; --lg-sk-3: #33414e; --lg-sk-4: #3d4a57; --lg-spark: #4f5e6c; --lg-icon: #5c6b79;
  --lg-field: #3a4856; }

.lg-body { background: var(--panel); }
.lg { position: relative; min-height: 100vh; display: flex; flex-wrap: wrap; }
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- left: skeleton cards ---- */
.lg-show { flex: 1 1 560px; min-width: 0; min-height: 100vh; box-sizing: border-box; padding: 2.5rem 2.5rem 2.75rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem; background: var(--lg-show); overflow: hidden; }
.lg-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lg-card { display: flex; flex-direction: column; gap: 9px; padding: 11px 12px 10px; background: var(--lg-card);
  border: 1px solid var(--lg-card-line); border-left: 3px solid var(--lg-card-edge); border-radius: 6px; min-width: 0; }
.lg-fade-1 { opacity: 0.8; } .lg-fade-2 { opacity: 0.55; }
.lg-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lg-grow { flex-grow: 1; }
.lg-bar { display: block; height: 6px; border-radius: 3px; background: var(--lg-sk-2); flex: none; }
.lg-led { width: 9px; height: 9px; border-radius: 2px; background: var(--lg-sk-4); flex: none; }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lg-sk-4); flex: none; }
.lg-name { height: 9px; background: var(--lg-sk-4); flex: 0 1 auto; }
.lg-ago { width: 30px; }
.lg-meta { background: var(--lg-sk-1); max-width: 100%; }
.lg-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lg-meter { display: flex; flex-direction: column; gap: 5px; }
.lg-label { width: 22px; height: 5px; }
.lg-value { width: 26px; height: 8px; background: var(--lg-sk-3); }
.lg-track { display: flex; height: 4px; border-radius: 2px; background: var(--lg-sk-1); }
.lg-track > span { border-radius: 2px; background: var(--lg-sk-4); }
.lg-spark { flex-grow: 1; min-width: 0; height: 22px; }
.lg-spark polyline { fill: none; stroke: var(--lg-spark); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lg-spike { display: flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--lg-sk-2); color: var(--ink-3); flex: none; }
.lg-spike .lg-bar { width: 12px; height: 4px; background: var(--lg-spark); }
.lg-tools { gap: 10px; padding-top: 8px; border-top: 1px solid var(--lg-sk-1); color: var(--lg-icon); }
.lg-tools > span { display: flex; align-items: center; gap: 4px; }
.lg-tools .lg-bar { height: 4px; }

.lg-pitch { display: flex; flex-direction: column; gap: 1rem; max-width: 34rem; }
.lg-pitch .brand { padding: 0; font-size: 1.25rem; }
.lg-pitch .brand-mark { width: 1.75rem; height: 1.75rem; }
.lg-pitch h2 { margin: 0; font-family: var(--font-cond); font-size: 2.375rem; line-height: 1.1; font-weight: 600; color: var(--ink); }
.lg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-chips > span { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); }

/* ---- right: the form ---- */
.lg-main { flex: 0 1 30rem; min-height: 100vh; box-sizing: border-box; padding: 5.5rem 1.5rem 2rem;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2rem;
  background: var(--panel); border-left: 1px solid var(--line); }
.lg-top { position: absolute; top: 1.25rem; right: 1.5rem; z-index: 1; display: flex; align-items: center; gap: 0.75rem; }
.lg-brand-small { display: none; padding: 0; margin-right: auto; }
.lg-theme { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--ink); cursor: pointer; }
.lg-theme:hover { background: var(--panel-2); }
.lg-theme:focus-visible, .lg-eye:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lg-theme .lg-sun { display: none; }
:root[data-theme="dark"] .lg-theme .lg-sun { display: block; }
:root[data-theme="dark"] .lg-theme .lg-moon { display: none; }

.lg-form-wrap { width: 100%; max-width: 23.75rem; display: flex; flex-direction: column; gap: 1.375rem; margin-top: auto; }
.lg-app { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.25rem; }
.lg-app-icon { width: 64px; height: 64px; border-radius: 16px; flex: none; display: block; }
:root[data-theme="dark"] .lg-app-icon { outline: 1px solid var(--line); outline-offset: -1px; }
.lg-app-name { font-family: var(--font-cond); font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.lg-head h1 { margin: 0; font-family: var(--font-cond); font-size: 2.125rem; font-weight: 600; line-height: 1.15; }
.lg-head p { margin: 0.375rem 0 0; font-size: var(--t-md); color: var(--ink-2); }
.lg-flash { margin: 0; justify-content: flex-start; align-items: flex-start; font-size: 0.9375rem; font-weight: 600; }
.lg-flash .ic { margin-top: 1px; }
.lg-form { display: flex; flex-direction: column; gap: 1.375rem; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-field label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.lg-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.lg-label-row span { font-size: var(--t-sm); color: var(--ink-3); }
.lg-form .input { height: 48px; padding: 0 14px; font-size: 1rem; border-color: var(--lg-field); background: var(--panel); }
.lg-pass { position: relative; }
.lg-pass .input { padding-right: 48px; }
.lg-eye { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer; border-radius: 6px; }
.lg-eye[aria-pressed="true"] { color: var(--accent); }
.lg-code { font-family: var(--font-cond); font-size: 1.375rem !important; letter-spacing: 0.4em; font-variant-numeric: tabular-nums; }
.lg-code::placeholder { color: var(--lg-sk-4); }
.lg-submit { width: 100%; height: 50px; justify-content: center; font-size: 1.0625rem; font-weight: 600; }
.lg-note { margin: 0; display: flex; gap: 8px; align-items: center; font-size: var(--t-sm); color: var(--ink-3); }
.lg-foot { margin-top: auto; display: flex; gap: 8px; font-size: var(--t-sm); color: var(--ink-3); }
.lg-foot a { color: var(--ink-2); }

/* ---- narrower screens ---- */
@media (max-width: 1100px) {
  .lg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-card:nth-child(n+7) { display: none; }
}
@media (max-width: 900px) {
  /* phone and small tablet: a short strip of two cards and the chips above the form */
  .lg { flex-direction: column; flex-wrap: nowrap; }
  .lg-top { position: static; padding: 0.875rem 1rem 0.75rem; background: var(--lg-show); }
  .lg-brand-small { display: flex; }
  .lg-app { display: none; }   /* the top bar already shows the name */
  .lg-show { flex: none; min-height: 0; padding: 0 1rem 1rem; gap: 0.75rem; border-bottom: 1px solid var(--line); }
  .lg-main { flex: 1 0 auto; min-height: 0; border-left: 0; padding: 1.5rem 1.5rem 1.25rem; gap: 1.5rem; }
  .lg-chips { gap: 6px; }
  .lg-chips > span { height: 26px; padding: 0 10px; gap: 5px; font-size: var(--t-sm); border-radius: 13px; }
  .lg-chips .ic { width: 13px; height: 13px; }
  .lg-card:nth-child(n+3) { display: none; }
  .lg-cards { gap: 8px; }
  .lg-pitch .brand, .lg-pitch h2 { display: none; }
  .lg-form-wrap { gap: 1.125rem; }
  .lg-form { gap: 1rem; }
  .lg-head h1 { font-size: 1.75rem; }
}
/* ---- shorter screens (laptops, a browser with toolbars): everything stays on one screen ---- */
@media (min-width: 901px) {
  .lg { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; flex-wrap: nowrap; }
  .lg-show { flex: 1 1 0; }                                      /* side by side down to 901px */
  .lg-main { flex: 0 0 min(30rem, 46vw); }
  .lg-show, .lg-main { min-height: 0; height: 100%; }
  .lg-main { overflow-y: auto; }
}
@media (min-width: 901px) and (max-height: 860px) {
  .lg-show { padding: 1.75rem 2rem 1.75rem; gap: 1.25rem; }
  .lg-main { padding: 4.25rem 1.5rem 1rem; gap: 1rem; }
  .lg-top { top: 0.875rem; right: 1rem; }
  .lg-form-wrap { gap: 1rem; }
  .lg-form { gap: 0.875rem; }
  .lg-app-icon { width: 48px; height: 48px; border-radius: 12px; }
  .lg-app-name { font-size: 1.5rem; }
  .lg-head h1 { font-size: 1.875rem; }
  .lg-head p { margin-top: 0.125rem; }
  .lg-form .input { height: 44px; }
  .lg-submit { height: 46px; }
  .lg-pitch h2 { font-size: 1.875rem; }
  .lg-cards .lg-card:nth-child(n+7) { display: none; }          /* two rows of cards */
}
@media (min-width: 901px) and (max-height: 680px) {
  .lg-main { padding-top: 3.75rem; gap: 0.75rem; }
  .lg-app { gap: 0.75rem; margin: 0; }
  .lg-app-icon { width: 40px; height: 40px; border-radius: 10px; }
  .lg-app-name { font-size: 1.375rem; }
  .lg-head h1 { font-size: 1.625rem; }
  .lg-head p { display: none; }                                  /* the icon and name already say it */
  .lg-form-wrap { gap: 0.75rem; }
  .lg-form { gap: 0.75rem; }
  .lg-field { gap: 4px; }
  .lg-form .input { height: 42px; }
  .lg-code { font-size: 1.25rem !important; }
  .lg-submit { height: 44px; }
  .lg-pitch h2 { font-size: 1.5rem; }
}
@media (min-width: 901px) and (max-height: 520px) {
  .lg-cards .lg-card:nth-child(n+4) { display: none; }           /* one row */
}
@media (min-width: 901px) and (max-width: 1100px) and (max-height: 860px) {
  .lg-cards .lg-card:nth-child(n+5) { display: none; }           /* two columns: two rows */
}
@media (min-width: 901px) and (max-width: 1100px) and (max-height: 520px) {
  .lg-cards .lg-card:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .lg-theme, .lg-eye { transition: background-color 0.15s ease, color 0.15s ease; }
}
