/* Cancer Protocol Machine — clinical login wall.
   External stylesheet (CSP style-src 'self'). No inline styles anywhere. */

:root {
  --primary: #0d5c63;
  --primary-lt: #1a7a8c;
  --accent: #0e7c86;
  --bg: #f4f7fa;
  --panel: #ffffff;
  --ink: #172a33;
  --muted: #5b6b73;
  --line: #d6dfe4;
  --danger: #c62828;
  --ok: #2e7d32;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── login view ── */
#login-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(1100px 620px at 50% -10%, #e3eef1 0%, var(--bg) 60%),
    linear-gradient(180deg, #eef4f6 0%, var(--bg) 40%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(13, 92, 99, 0.10), 0 2px 6px rgba(23, 42, 51, 0.06);
  padding: 30px 28px;
}

.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.brand-mark {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-lt) 100%);
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
}
.brand-text h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.2px; color: var(--ink); }
.brand-text p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  color: var(--ink);
  background: #fbfdfe;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.14);
  background: #fff;
}

.btn-primary {
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 650;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn-primary:hover { background: #0a4b51; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #7fa6ab; cursor: default; }

.login-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--danger);
  background: #fdecec;
  border: 1px solid #f4c9c9;
  border-radius: 8px;
}
.login-status { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

.login-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.login-foot p { margin: 0 0 6px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.login-foot strong { color: var(--ink); }

.page-foot { font-size: 11px; color: #8a9aa1; text-align: center; }

/* ── app view ── */
#app-view { position: fixed; inset: 0; background: var(--bg); }
#cpm_canvas { position: absolute; inset: 0; width: 100vw; height: 100vh; display: block; }
.boot-note {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted);
  z-index: 1; pointer-events: none;
}

[hidden] { display: none !important; }
