:root {
  --navy: #1A2B5E;
  --navy-light: #2c3f7c;
  --orange: #F47C20;
  --orange-light: #ffe6d1;
  --bg: #f4f6fb;
  --border: #e1e5ee;
  --text: #222b45;
  --muted: #6b7280;
  --success: #1d8a4d;
  --danger: #c0392b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar .brand-logo {
  height: 34px;
  width: auto;
  display: block;
  /* white pill behind the logo so it reads cleanly on the navy topbar */
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
}

.topbar .brand-tagline {
  font-weight: 400;
  font-size: 0.75rem;
  color: #c9d2ec;
}

.topbar .user-info {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar a.logout {
  color: #fff;
  background: var(--orange);
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
}

.nav {
  background: var(--navy-light);
  display: flex;
  gap: 4px;
  padding: 0 28px;
  overflow-x: auto;
}

.nav a {
  color: #dfe4f2;
  text-decoration: none;
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.nav a:hover, .nav a.active {
  color: #fff;
  border-bottom: 3px solid var(--orange);
  background: rgba(255,255,255,0.05);
}

.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 20px 40px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(26,43,94,0.05);
}

h1, h2, h3 { color: var(--navy); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-box {
  background: #fff;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(26,43,94,0.06);
}

.stat-box .num { font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.stat-box .label { color: var(--muted); font-size: 0.85rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f0f2f9;
  color: var(--navy);
  font-weight: 600;
}

tr:hover td { background: #fbfbfe; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.orange { background: var(--orange-light); color: #b35a12; }
.badge.green { background: #e3f6ea; color: var(--success); }
.badge.red { background: #fbe6e3; color: var(--danger); }
.badge.navy { background: #e5e9f5; color: var(--navy); }

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: #d9690f; }

.btn.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.btn.secondary:hover { background: #f0f2f9; }

form label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0 4px;
}

input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.92rem;
  font-family: inherit;
}

textarea { resize: vertical; }

.flash {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.flash.success { background: #e3f6ea; color: var(--success); border: 1px solid #b7e3c6; }
.flash.error { background: #fbe6e3; color: var(--danger); border: 1px solid #f0bdb4; }

.tabs-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, #101c40 100%);
}

.login-box {
  background: #fff;
  padding: 40px 36px;
  border-radius: 12px;
  width: 380px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.login-box .login-logo {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 0 auto 8px;
}
.login-box p.tagline { text-align: center; color: var(--muted); margin-top: 0; font-size: 0.85rem; }
.login-box .btn { width: 100%; margin-top: 16px; text-align: center; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.muted { color: var(--muted); font-size: 0.85rem; }
.small { font-size: 0.82rem; }

.patient-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.pill-nav a {
  background: #f0f2f9;
  color: var(--navy);
  padding: 7px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
}
.pill-nav a:hover, .pill-nav a.active { background: var(--orange); color: #fff; }

.video-mock {
  background: #0d1730;
  border-radius: 10px;
  color: #cfd8ee;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 30px;
}
