/* besser-geschult — brand styling (Diagnostikum Oschatz)
   Font: Inter (self-hosted). Colors: orange #fc8544 / #fca06f, teal #3bafbf,
   light gray #e0dede. Base type is deliberately large: audience is 30-90. */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --orange: #fc8544;
  --orange-soft: #fca06f;
  --orange-press: #e06f33;
  --teal: #3bafbf;
  --gray-light: #e0dede;
  --text: #232d37;
  --muted: #6e7882;
  --bg: #f8f7f5;
  --ok: #1e8e3e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

header.site {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0 20px;
  border-bottom: 3px solid var(--teal);
  margin-bottom: 28px;
}
header.site img { height: 52px; }
header.site .name { font-weight: 700; font-size: 22px; }
header.site .sub { color: var(--muted); font-size: 16px; }
.grow { flex: 1; min-width: 0; }

.linklike {
  font-family: inherit;
  font-size: 17px;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}
.linklike:hover { color: var(--text); }

h1 { font-size: 30px; margin: 0 0 8px; }
h2 { font-size: 24px; margin: 24px 0 12px; }
p.lead { color: var(--muted); margin: 0 0 24px; }

.hidden { display: none !important; }

/* --- patient: code entry --- */

.code-form { margin-top: 20px; }
.code-input {
  width: 100%;
  font-family: inherit;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 18px 8px 18px calc(8px + 0.35em);
  border: 3px solid var(--gray-light);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}
.code-input:focus { outline: none; border-color: var(--teal); }

.btn {
  display: inline-block;
  width: 100%;
  margin-top: 18px;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  padding: 18px;
  border: none;
  border-radius: 14px;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
}
.btn:hover { background: var(--orange-soft); }
.btn:active { background: var(--orange-press); }
.btn.secondary {
  background: #fff;
  color: var(--text);
  border: 2px solid var(--gray-light);
  font-weight: 400;
}

.error {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fdecec;
  color: #a33;
}

/* --- patient: video list + player --- */

.video-list { list-style: none; padding: 0; margin: 0; }
.video-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 20px;
  background: #fff;
  border: 2px solid var(--gray-light);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  cursor: pointer;
}
.video-item:hover { border-color: var(--teal); }
.video-item .status {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: var(--gray-light);
  color: #fff;
}
.video-item.watched .status { background: var(--ok); }
.video-item .title { font-weight: 700; font-size: 22px; }
.video-item .meta { color: var(--muted); font-size: 17px; margin: 2px 0 8px; }

.progress {
  height: 8px;
  border-radius: 4px;
  background: var(--gray-light);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--teal);
  transition: width .3s;
}
.video-item.watched .progress-fill { background: var(--ok); }

.resume-card {
  background: #fff;
  border: 3px solid var(--orange);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 22px;
}
.resume-card .resume-label {
  color: var(--orange-press);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.resume-card .resume-title { font-size: 26px; font-weight: 700; margin: 6px 0 4px; }
.resume-card .btn { margin-top: 12px; }

video {
  width: 100%;
  border-radius: 14px;
  background: #000;
  margin-top: 12px;
}

.done-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #e8f5e9;
  color: var(--ok);
  font-weight: 700;
}

/* --- physician panel --- */

.panel { font-size: 17px; }
.panel h1 { font-size: 26px; }
.panel .btn { width: auto; font-size: 18px; padding: 12px 22px; margin-top: 10px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input[type="text"], .field input[type="password"], .field input[type="email"] {
  width: 100%;
  font-family: inherit;
  font-size: 18px;
  padding: 12px;
  border: 2px solid var(--gray-light);
  border-radius: 10px;
}
.field input:focus { outline: none; border-color: var(--teal); }
.field input:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.hint { color: var(--muted); font-size: 15px; margin-top: 6px; }

.diag-list { display: flex; flex-direction: column; gap: 8px; }
.diag-list label {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid var(--gray-light);
  border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.diag-list input { width: 22px; height: 22px; accent-color: var(--orange); }

.card {
  background: #fff;
  border: 2px solid var(--gray-light);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}

.result-code {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--orange);
}

/* email confirm view: large type so the screen can be turned to the patient */
.email-confirm {
  text-align: center;
  padding: 30px 10px;
}
.email-confirm .address {
  font-size: 34px;
  font-weight: 700;
  word-break: break-all;
  margin: 20px 0 30px;
}
.email-confirm .ask { font-size: 24px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gray-light); vertical-align: top; }
th { background: var(--bg); font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
td .ok { color: var(--ok); font-weight: 700; }
td .pending { color: var(--muted); }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 7px;
  border-radius: 13px; background: var(--orange); color: #fff;
  font-weight: 700; font-size: 15px;
  margin-left: 8px;
}
.badge.zero { background: var(--gray-light); }
.notif-item { padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.notif-item .when { color: var(--muted); font-size: 15px; }

/* patient certificate */
.urkunde-card {
  text-align: center;
  border: 3px solid var(--teal);
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 20px;
  background: #fff;
}
.urkunde-card .trophy { font-size: 44px; line-height: 1; }
.urkunde-card h2 { margin: 10px 0 8px; }
.urkunde-card p { color: var(--muted); margin: 0 0 16px; }
.manage-list .manage-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-light);
}
.manage-list .manage-item:last-child { border-bottom: none; }
.manage-list .meta { color: var(--muted); font-size: 15px; }
.linklike.danger { color: #b3261e; }
.linklike.danger:hover { color: #8c1d17; }

/* dashboard search */
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.search-bar input[type="search"] {
  flex: 1; min-width: 200px;
  font-family: inherit; font-size: 17px;
  padding: 10px 14px;
  border: 2px solid var(--gray-light); border-radius: 10px;
}
.search-bar input[type="search"]:focus { outline: none; border-color: var(--teal); }
.chip {
  font-family: inherit; font-size: 15px;
  padding: 8px 14px;
  border: 2px solid var(--gray-light); border-radius: 999px;
  background: #fff; cursor: pointer;
}
.chip.on { border-color: var(--teal); background: var(--teal); color: #fff; }

footer.base-url { margin-top: 40px; color: var(--muted); font-size: 14px; }

@media (max-width: 480px) {
  body { font-size: 18px; }
  .code-input { font-size: 34px; }
}
