/* ZL Context shared design tokens + entry-card components (family style: 知了OS / 中标通).
   Canonical and only copy. The web server serves it at /shared/tokens.css through an
   exact-filename allowlist (apps/web/src/server.mjs); / and /me/ link it before their own
   stylesheets so page CSS can still override. T42/T50 reuse these tokens. */
:root {
  --zl-bg: #f3f4f6;
  --zl-surface: #ffffff;
  --zl-border: #e5e7eb;
  --zl-text: #1f2937;
  --zl-text-strong: #0a0f0d;
  --zl-text-muted: #6b7280;
  --zl-primary: #059669;
  --zl-primary-hover: #047857;
  --zl-primary-text: #ffffff;
  --zl-radius-card: 16px;
  --zl-radius-control: 12px;
  --zl-shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --zl-font: -apple-system, system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --zl-logo-gradient: linear-gradient(135deg, #10b981, #8b5cf6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Centered single card (~420px, 16px radius, soft shadow) with one full-width primary action. */
.zl-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--zl-bg); font-family: var(--zl-font); }
.zl-card { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 28px; text-align: center; background: var(--zl-surface); border: 1px solid var(--zl-border); border-radius: var(--zl-radius-card); box-shadow: var(--zl-shadow-card); }
.zl-logo { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--zl-logo-gradient); color: #fff; font-size: 22px; font-weight: 700; }
.zl-product { margin: 4px 0 0; font-family: var(--zl-font); font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--zl-text-strong); }
.zl-subtitle { margin: 0; font-size: 13px; line-height: 1.6; color: var(--zl-text-muted); }
.zl-primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: var(--zl-radius-control); background: var(--zl-primary); color: var(--zl-primary-text); font-family: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.zl-primary:hover { background: var(--zl-primary-hover); }
.zl-primary:disabled { opacity: .6; cursor: default; }
.zl-password { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; }
.zl-password input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--zl-border); border-radius: var(--zl-radius-control); background: var(--zl-surface); color: var(--zl-text); font: inherit; }
.zl-password .zl-primary { margin-top: 0; }
.zl-foot { margin: 4px 0 0; font-size: 12px; line-height: 1.7; color: var(--zl-text-muted); }

/* While an entry card is shown the signed-in chrome must not peek through. */
#auth:not([hidden]) + #console-shell { display: none; }
#signin:not([hidden]) ~ .app-header,
#signin:not([hidden]) ~ .workspace-shell { display: none !important; }
