/* Страница для врача и ситтера.
   Ни одной внешней загрузки: шрифты системные, картинок в оформлении нет.
   Человек открывает её в чужой клинике на чужом телефоне — страница должна
   показаться на плохой связи и не тянуть ничего лишнего. */

:root {
  --bg: #ffffff;
  --fg: #16181d;
  --muted: #5c6370;
  --line: #e3e6ec;
  --accent: #1f6feb;
  --warn-bg: #fff6e5;
  --warn-fg: #7a4b00;
  --card: #f7f8fa;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #eceef2;
    --muted: #9aa1ad;
    --line: #2a2e36;
    --accent: #6ea8ff;
    --warn-bg: #3a2f16;
    --warn-fg: #f0d9a8;
    --card: #1c1f25;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 32px 0 8px; }
h3 { font-size: 15px; margin: 0 0 4px; }
p { margin: 0 0 12px; }

.muted { color: var(--muted); font-size: 14px; }

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 16px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.state.done .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.pill {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  margin: 0 6px 6px 0;
}

.notice {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  margin: 16px 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.card .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.doc-pages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.doc-pages img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
td.abnormal { color: #c0392b; font-weight: 600; }
@media (prefers-color-scheme: dark) { td.abnormal { color: #ff8a80; } }

.section { margin-bottom: 20px; }
.section p { white-space: pre-wrap; }

.cites { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cite {
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  background: none;
  color: var(--accent);
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
}

input[type="text"], input[type="password"] {
  font-size: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  width: 100%;
  max-width: 280px;
}

a { color: var(--accent); }

.footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
