/* Olita design tokens (design system apps v2), the same values as
   olita-guardian-app/src/theme/tokens.ts. No web fonts are loaded: a parent's
   first contact with Olita should not call a third party, so the page uses
   Inter or Manrope when the device has them and the system font otherwise. */
:root {
  --bg-page: #ffffff;
  --bg-subtle: #f6f3ef;
  --border: #dcd7ce;
  --border-strong: #c3bcb2;
  --text-primary: #1c1c24;
  --text-secondary: #363748;
  --text-muted: #65626c;
  --action: #285d5d;
  --action-pressed: #214b4b;
  --on-action: #ffffff;
  --focus: #3d7a74;
  --error-bg: #fbe9e6;
  --error-border: #eebcb3;
  --error-text: #a13125;
  --success-bg: #e9f3ec;
  --success-border: #c2e1cc;
  --success-text: #1c6e44;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: Manrope, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}
.brand img { width: 40px; height: 40px; }

.card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

h1 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
}

p { margin: 0 0 16px; color: var(--text-secondary); }
p.muted, .hint { color: var(--text-muted); font-size: 14px; }

form { margin-top: 20px; display: grid; gap: 16px; }

label { display: block; font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }

.field { position: relative; }

input[type='password'], input[type='text'] {
  width: 100%;
  height: 48px;
  padding: 0 84px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-primary);
  font: inherit;
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
input[aria-invalid='true'] { border-color: var(--error-text); }

.toggle {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--action);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.rules { margin: 0; padding: 0 0 0 18px; color: var(--text-muted); font-size: 14px; }
.rules li { margin: 2px 0; }
.rules li.met { color: var(--success-text); }

.field-error { margin: 6px 0 0; color: var(--error-text); font-size: 14px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--action);
  color: var(--on-action);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, .button:active { background: var(--action-pressed); }
.button[disabled] { opacity: 0.6; cursor: default; }
.button.secondary {
  background: var(--bg-page);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.button + .button { margin-top: 10px; }
.button + p, p + .button { margin-top: 14px; }

.notice {
  border: 1px solid var(--error-border);
  background: var(--error-bg);
  color: var(--error-text);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15px;
}
.notice.success {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
}
.notice strong { display: block; margin-bottom: 2px; }

ol.steps { margin: 16px 0 20px; padding-left: 20px; color: var(--text-secondary); }
ol.steps li { margin: 6px 0; }

footer { margin-top: 20px; color: var(--text-muted); font-size: 13px; text-align: center; max-width: 440px; }

[hidden] { display: none !important; }
