/* Design tokens — voir DESIGN.md (vault) pour le rationale complet */
:root {
  --bg: #14161A;
  --surface: #1E2126;
  --surface-2: #24282F;
  --border: #33383F;
  --text: #E9EAEC;
  --text-2: #9CA3AF;
  --text-3: #6B7280;
  --accent: #4FB8C4;

  --pt-neg2: #B33B30;
  --pt-neg1: #C9776A;
  --pt-pos1: #6FA87A;
  --pt-pos2: #3F9153;

  --status-pending: #D98F1F;
  --status-done: #4B6355;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  --font-ui: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

[x-cloak] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
}

.brand h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.pin-card {
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pin-card label {
  font-size: 13px;
  color: var(--text-2);
}

.pin-input {
  font-family: var(--font-data);
  font-size: 24px;
  letter-spacing: 0.4em;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 12px;
  border-radius: var(--radius-md);
  width: 100%;
}

.pin-input:focus {
  outline: none;
  border-color: var(--accent);
}

.pin-input.error {
  border-color: var(--pt-neg2);
}

.btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 0;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #0A2326;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.error-msg {
  font-size: 13px;
  color: var(--pt-neg2);
  text-align: center;
  min-height: 16px;
}

.connected-placeholder {
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  max-width: 280px;
  line-height: 1.6;
}

.connected-placeholder strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  margin-bottom: 8px;
}
