:root {
  color-scheme: light;
  --primary: #1476ff;
  --primary-dark: #0f172a;
  --bg: #f6f8fb;
  --card: #ffffff;
  --border: #dfe7f2;
  --muted: #64748b;
  --text: #0f172a;
  --success: #16a34a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  text-decoration: none;
}

.brand small,
.muted {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--primary), #75b8ff);
  color: white;
  font-weight: 900;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

.hero,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.hero {
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.hero h1,
.card h2,
.card h3 {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 1.5rem;
}

.patient-list {
  display: grid;
  gap: 0.75rem;
}

.patient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: white;
  text-decoration: none;
}

.patient-row:hover {
  border-color: var(--primary);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #eaf3ff;
  color: #0757bd;
  font-size: 0.82rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.8rem 0.9rem;
  font: inherit;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: var(--primary);
  color: white;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  border-left: 3px solid var(--primary);
  padding: 0.8rem 1rem;
  background: #f8fbff;
  border-radius: 0 1rem 1rem 0;
}

.alert {
  padding: 1rem;
  border-radius: 1rem;
  background: #fff7ed;
  color: #9a3412;
}

@media (max-width: 760px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
