html, body { margin: 0; min-height: 100%; }
body { font-family: var(--cs-font-family-text, "Google Sans Flex", system-ui, sans-serif); font-size: 14px; line-height: 1.5;
  background: var(--cs-background-surface-subtle); color: var(--cs-text-content-bold); }
.wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; }
.card { width: 100%; max-width: 400px; background: var(--cs-background-container-subtlest); border: 1px solid var(--cs-border-container-subtle); border-radius: 16px; padding: 32px 24px; box-sizing: border-box; }
.logo { margin-bottom: 24px; line-height: 0; }
.logo img { height: 28px; width: auto; }
.logo .on-light { display: none; }
:root[data-theme="light"] .logo .on-dark { display: none; } :root[data-theme="light"] .logo .on-light { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .logo .on-dark, :root[data-theme="system"] .logo .on-dark { display: none; }
  :root:not([data-theme]) .logo .on-light, :root[data-theme="system"] .logo .on-light { display: inline; }
}
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; font-weight: 600; }
p.sub { margin: 0 0 24px; color: var(--cs-text-content-muted); }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input { width: 100%; box-sizing: border-box; height: 36px; padding: 0 var(--cs-padding-x-control-lg); border-radius: var(--cs-radius-component-field); font: inherit; color: inherit;
  background: var(--cs-background-field-subtle-default); border: 1px solid var(--cs-border-field-standard-default); }
input:focus { outline: none; border-color: var(--cs-border-field-standard-focused); }
button.primary { width: 100%; height: 36px; margin-top: 24px; border: 0; border-radius: var(--cs-radius-component-button); font: inherit; font-weight: 600; cursor: pointer;
  background: var(--cs-background-control-accent-default); color: #fff; }
button.primary:hover { background: var(--cs-background-control-accent-hover); }
button.primary:disabled { background: var(--cs-background-control-accent-disabled); cursor: default; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--cs-text-feedback-brand); cursor: pointer; text-decoration: underline; }
a { color: var(--cs-text-feedback-brand); }
.msg { margin-top: 16px; padding: 10px 12px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.err { background: var(--cs-background-feedback-error); color: var(--cs-text-feedback-error); }
.msg.ok { background: var(--cs-background-feedback-success); color: var(--cs-text-feedback-success); }
.foot { margin-top: 24px; color: var(--cs-text-content-muted); }
.foot a { margin-left: 4px; }
button.google { width: 100%; height: 36px; margin-top: 12px; border-radius: var(--cs-radius-component-button); font: inherit; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--cs-text-content-bold); border: 1px solid var(--cs-border-field-standard-default); }
button.google:hover { background: var(--cs-background-field-subtle-hover); }
.or { text-align: center; color: var(--cs-text-content-muted); margin: 16px 0 0; }

/* Optical alignment: labels move down by --cs-optical-offset; icons stay put (see shell.css). */
input, button.primary, button.google { box-sizing: border-box; padding-top: calc(var(--cs-optical-offset) * 2); }
button.google svg { position: relative; top: calc(var(--cs-optical-offset) * -1); }

/* Phones: iOS zooms into any text field under 16px when it gets focus, and double-tap zooms on buttons.
   Fields are 16px on phones and touch screens; taps don't wait for a double-tap. Pinch zoom still works. */
@media (max-width: 767px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea { font-size: 16px !important; }
}
a, button, input, select, textarea, label, summary, [role="button"], [role="tab"] { touch-action: manipulation; }
