/* ============================================================
   Visual theme for the patient pages - same look as the admin
   panel's theme.css (soft background, white cards, green accents).
   Loaded after patient-pages.css and before responsive.css; it only
   restyles and keeps each page's layout.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..800&display=swap');

:root {
  --font-body: 'Inter', 'Segoe UI', Roboto, sans-serif;
  --green-900: #1B5E20;
  --green-800: #2E7D32;
  --green-600: #43A047;
  --green-500: #4CAF50;
  --green-100: #E8F5E9;
  --green-50: #F3F9F4;
  --page-bg: #EEF3EF;
  --surface: #FFFFFF;
  --border: #E1E8E3;
  --text: #263238;
  --text-muted: #607D74;
  --danger: #C62828;
  --danger-bg: #FDECEA;
  /* Shared palette - use these instead of hex colors so every page
     matches. Status colors come in pairs: text color + light background. */
  --green-300: #A5D6A7;
  --green-200: #C8E6C9;
  --text-strong: #37474F;
  --text-secondary: #546E7A;
  --text-subtle: #90A4AE;
  --text-faint: #B0BEC5;
  --border-strong: #CFD8D3;
  --surface-muted: #F7F9F8;
  --surface-hover: #F1F4F2;
  --danger-500: #E53935;
  --danger-border: #F3C5C5;
  --warning: #B26A00;
  --warning-500: #FB8C00;
  --warning-bg: #FFF4E5;
  --warning-border: #FFE0B2;
  --info: #1565C0;
  --info-500: #1E88E5;
  --info-700: #0D47A1;
  --info-bg: #E3F2FD;
  --info-border: #BBDEFB;
  --purple: #7B1FA2;
  --purple-500: #8E44AD;
  --purple-bg: #F3E5F5;
  --teal: #00796B;
  --teal-500: #00897B;
  --teal-bg: #E0F2F1;
  --neutral: #546E7A;
  --neutral-500: #90A4AE;
  --neutral-600: #78909C;
  --neutral-bg: #ECEFF1;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 24, 0.06), 0 1px 3px rgba(16, 40, 24, 0.08);
  --shadow-md: 0 6px 16px rgba(16, 40, 24, 0.10), 0 2px 4px rgba(16, 40, 24, 0.05);
  --shadow-lg: 0 18px 40px rgba(16, 40, 24, 0.20);
  --focus-ring: 0 0 0 3px rgba(76, 175, 80, 0.25);
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---- The card ---- */
.container,
.dashboard-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dashboard-header h1,
.container > h1 {
  color: var(--green-900);
  font-size: 1.8em;
  letter-spacing: -0.01em;
}

/* ---- Dashboard: profile header ---- */
.profile-section {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Soft decorative circles in the header background */
.profile-section::before,
.profile-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.profile-section::before {
  width: 260px;
  height: 260px;
  right: -80px;
  top: -110px;
}

.profile-section::after {
  width: 160px;
  height: 160px;
  right: 120px;
  bottom: -90px;
}

.profile-picture-container,
.profile-info {
  position: relative;
  z-index: 1;
}

.profile-picture {
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.profile-placeholder {
  background: rgba(255, 255, 255, 0.18);
  border: 4px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.profile-info h3 {
  color: #fff;
  font-size: 1.7em;
  margin-bottom: 16px;
}

.profile-details {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.detail-item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  backdrop-filter: blur(4px);
}

.detail-item strong {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-item span {
  color: #fff;
  font-size: 1.35em;
}

.profile-info .live-status,
#liveStatus {
  color: rgba(255, 255, 255, 0.8);
}

.change-password-btn {
  background: rgba(255, 255, 255, 0.95);
  color: var(--green-800);
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s, transform 0.1s;
}

.change-password-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* ---- Dashboard: menu tiles ---- */
.nav-links {
  gap: 18px;
}

.nav-links a {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  height: 150px;
  font-size: 1.02em;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.nav-links a:hover {
  background: #fff;
  border-color: var(--green-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.nav-links svg {
  width: 30px;
  height: 30px;
  padding: 14px;
  box-sizing: content-box;
  margin-bottom: 12px;
  stroke: var(--green-800);
  background: var(--green-100);
  border-radius: 50%;
  transition: background-color 0.15s, stroke 0.15s;
}

.nav-links a:hover svg {
  background: var(--green-800);
  stroke: #fff;
}

/* ---- Log out ---- */
.logout-btn {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: 999px;
  transition: background-color 0.15s, color 0.15s;
}

.logout-btn:hover {
  background: var(--danger-500);
  color: #fff;
  border-color: var(--danger-500);
}

/* ---- Pop-ups (Profile Settings, picture editor) ---- */
.modal {
  background-color: rgba(20, 36, 26, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-content {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: patient-pop 0.18s ease-out;
}

@keyframes patient-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal-content h2 {
  color: var(--green-900);
}

.modal-content label {
  font-size: 0.92em;
  color: var(--text-strong);
}

.modal-content input[type="password"],
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"] {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.modal-content input:focus {
  border-color: var(--green-500);
  box-shadow: var(--focus-ring);
}

.modal-section-title {
  color: var(--green-800);
  border-bottom-color: var(--border);
}

.close {
  width: 34px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  font-size: 24px;
  transition: background-color 0.15s;
}

.close:hover,
.close:focus {
  background: var(--surface-hover);
  color: var(--text);
}

.submit-btn,
.cancel-btn,
.change-picture-btn,
.secondary-btn {
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.submit-btn:hover,
.change-picture-btn:hover {
  box-shadow: var(--shadow-md);
}

.cancel-btn {
  background-color: var(--neutral-bg);
  color: var(--text-strong);
}

.cancel-btn:hover {
  background-color: var(--border-strong);
}

.submit-btn:active,
.cancel-btn:active {
  transform: translateY(1px);
}

/* ---- Notification bell ---- */
.notif-bell {
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  .profile-section {
    padding: 24px 18px;
  }

  .profile-section::after {
    display: none;
  }

  .nav-links a {
    height: auto;
  }
}

/* Live dot on the dark green header */
.profile-info .live-status .live-dot {
  background: #B9F6CA;
}

.profile-info .live-status.offline .live-dot {
  background: #FFCC80;
}

/* Phones: the two stat boxes share the width instead of overflowing */
@media (max-width: 600px) {
  .profile-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-item {
    padding: 10px 12px;
  }

  .detail-item span {
    font-size: 1.1em;
  }
}

/* ============================================================
   Other patient pages (View Appointment, Book Appointment,
   My Medical Records, record details, Find a Clinic,
   Notifications) - same pieces as the admin panel theme.
   ============================================================ */

.container > h1,
.container > h2:first-child {
  color: var(--green-900);
}

/* ---- Top buttons: "Back to Dashboard", Logout ---- */
.back,
.top-actions a,
.top-actions button {
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.back:hover,
.top-actions a:hover,
.top-actions button:hover {
  box-shadow: var(--shadow-md);
}

.top-actions button.logout-btn,
.top-actions a.logout-btn {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.top-actions button.logout-btn:hover,
.top-actions a.logout-btn:hover {
  background: var(--danger-500);
  color: #fff;
  border-color: var(--danger-500);
}

.top-actions {
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ---- Form fields ---- */
.container input[type="text"],
.container input[type="email"],
.container input[type="password"],
.container input[type="number"],
.container input[type="date"],
.container input[type="time"],
.container input[type="tel"],
.container input:not([type]),
.container select,
.container textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.container input:focus,
.container select:focus,
.container textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: var(--focus-ring);
}

.container input[readonly],
.container input:disabled,
.container select:disabled,
.container textarea:disabled {
  background-color: var(--surface-muted);
}

#searchBar {
  padding-left: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23789' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
}

/* ---- Book Appointment buttons ---- */
.button-group button,
#appointmentForm button {
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.button-group button:hover,
#appointmentForm button:hover {
  box-shadow: var(--shadow-md);
}

/* ---- Tables (View Appointment) ---- */
.container table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.container th,
.container td {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 13px 16px;
}

.container th {
  background: var(--green-50);
  color: var(--green-900);
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.container tbody tr:last-child td {
  border-bottom: none;
}

.container tr:nth-child(even) {
  background: transparent;
}

.container tbody tr:hover {
  background: var(--green-50);
}

.container td button {
  border-radius: var(--radius-sm);
  font-family: inherit;
}

/* ---- My Medical Records list ---- */
.filter-section {
  background: var(--green-50);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}

.record-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green-500);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.record-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.record-date {
  color: var(--green-900);
}

.badge-recent {
  background: var(--green-100);
  color: var(--green-800);
}

.badge-past {
  background: var(--neutral-bg);
  color: var(--text-secondary);
}

.info-label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75em;
  letter-spacing: 0.04em;
}

.view-btn {
  background: var(--green-800);
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: background-color 0.15s, box-shadow 0.15s;
}

.view-btn:hover {
  background: var(--green-900);
  box-shadow: var(--shadow-md);
}

/* ---- Single record page ---- */
.record-summary {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px 24px;
}

.record-summary-title {
  color: #fff;
}

.record-summary-meta i {
  color: #B9F6CA;
}

.record-section h2 {
  color: var(--green-900);
  border-bottom: 1px solid var(--border);
}

.record-section h2 i {
  color: var(--green-500);
}

.record-grid > div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.record-grid dt {
  color: var(--text-muted);
}

/* ---- Tabs (record pop-up) ---- */
.tabs {
  border-bottom: 1px solid var(--border);
  gap: 4px;
}

.tabs button {
  color: var(--text-muted);
  border-radius: 8px 8px 0 0;
  font-family: inherit;
}

.tabs button:hover {
  background: var(--green-50);
  color: var(--green-800);
}

.tabs button.active {
  color: var(--green-800);
  border-bottom-color: var(--green-500);
}

.tab-content input,
.tab-content textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.close-btn {
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.no-records,
.loading {
  color: var(--text-muted);
}

/* ============================================================
   Log In / Register
   ============================================================ */
.login-container,
.register-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 5px 0 var(--green-500), var(--shadow-lg);
  animation: patient-pop 0.25s ease-out;
}

.login-container h2,
.register-container h2 {
  color: var(--green-900);
  letter-spacing: -0.01em;
}

.login-container h3,
.register-container h3 {
  color: var(--text-muted);
}

.login-container label,
.register-container label {
  color: var(--text-strong);
  font-size: 0.92em;
}

.login-container input,
.login-container select,
.register-container input,
.register-container select {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 0.95em;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-container input:focus,
.login-container select:focus,
.register-container input:focus,
.register-container select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: var(--focus-ring);
}

.login-container button[type="submit"],
.register-container button[type="submit"] {
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1em;
  padding: 13px;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.login-container button[type="submit"]:hover,
.register-container button[type="submit"]:hover {
  background-color: var(--green-900);
  box-shadow: var(--shadow-md);
}

.login-container button[type="submit"]:active,
.register-container button[type="submit"]:active {
  transform: translateY(1px);
}

.footer-text a {
  color: var(--green-800);
}

/* ---- Doctor's diagnosis (patient record page) ---- */
.dx-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: #fff;
}

.dx-card header {
  color: var(--text-muted);
  font-size: 0.88em;
  margin-bottom: 10px;
}

.dx-card header i {
  color: var(--info);
}

.dx-card header strong {
  color: var(--text);
}

.dx-card dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.dx-card dt {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.dx-card dd {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.dx-card .dx-main dd {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--info-700);
}

/* ============================================================
   Actions column buttons (View / Edit / Delete / Print / Save ...)
   <div class="actions"><button class="act act-edit"><i ...></i> Edit</button></div>
   ============================================================ */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.act i {
  font-size: 0.95em;
}

.act:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.act:active {
  transform: none;
}

.act:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.act.act-view { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.act.act-view:not(:disabled):hover { background: var(--info-500); color: #fff; border-color: var(--info-500); }

.act.act-edit { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.act.act-edit:not(:disabled):hover { background: var(--warning-500); color: #fff; border-color: var(--warning-500); }

.act.act-delete { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.act.act-delete:not(:disabled):hover { background: var(--danger-500); color: #fff; border-color: var(--danger-500); }

.act.act-print { background: var(--neutral-bg); color: var(--text-strong); border-color: var(--border-strong); }
.act.act-print:not(:disabled):hover { background: var(--text-secondary); color: #fff; border-color: var(--text-secondary); }

.act.act-save { background: var(--green-100); color: var(--green-800); border-color: var(--green-200); }
.act.act-save:not(:disabled):hover { background: var(--green-900); color: #fff; border-color: var(--green-900); }

.act.act-cancel { background: #fff; color: var(--text-secondary); border-color: var(--border-strong); }
.act.act-cancel:not(:disabled):hover { background: var(--neutral-bg); color: var(--text); }

/* Phones: icon only, the label is still read out / shown as tooltip */
@media (max-width: 600px) {
  .act {
    padding: 8px 10px;
  }

  .act .act-label {
    display: none;
  }
}

/* ============================================================
   Icons (Font Awesome everywhere)
   ============================================================ */

/* Icon chip before every page title */
.title-icon {
  display: inline-block;
  text-align: center;
  line-height: 1.7em;
  width: 1.7em;
  height: 1.7em;
  margin-right: 0.45em;
  border-radius: 0.45em;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.72em;
  vertical-align: 0.12em;
}

/* Icon + text inside buttons and links: same gap everywhere */
button > i.fa-solid,
.back > i.fa-solid,
.top-actions a > i.fa-solid,
.back-link > i.fa-solid {
  margin-right: 2px;
}

/* Profile picture placeholders (no photo yet) */
.modal-profile-placeholder,
.profile-placeholder,
.settings-picture-placeholder {
  color: var(--text-subtle);
  background: linear-gradient(135deg, var(--neutral-bg) 0%, var(--border-strong) 100%);
}

.modal-profile-placeholder i { font-size: 34px; }
.settings-picture-placeholder i { font-size: 28px; }
.profile-placeholder i { font-size: 52px; }

/* Warning icon in the clinics table ("archived" / "none") */
.archived-tag i,
td .fa-triangle-exclamation {
  color: var(--warning);
}

/* Dashboard menu tiles: Font Awesome icon in a soft circle */
.nav-links .nav-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 1.5em;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.nav-links a:hover .nav-icon {
  background: var(--green-800);
  color: #fff;
  transform: scale(1.06);
}

/* Patient profile placeholder on the dark green dashboard header */
.profile-section .profile-placeholder {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

/* Record date on My Medical Records cards */
.record-date i {
  color: var(--green-500);
  margin-right: 4px;
}

.no-records i {
  display: block;
  font-size: 2.2em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

/* Log In / Register buttons */
.login-container button[type="submit"] i,
.register-container button[type="submit"] i {
  margin-right: 4px;
}

/* No window scrollbar on the patient pages (a page taller than the
   window still scrolls with the mouse wheel, touchpad or touch). With no
   scrollbar, short and long pages are the same width, so nothing shifts
   when switching pages. */
html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

/* Centered "Loading..." / empty-message row inside a data table */
.table-status {
  text-align: center;
}

/* Digits line up in columns (amounts, dates, IDs) */
table {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Fixed page (patient): put "pt-fixed" on <body>, wrap the title row
   and filters in .pt-top and the list in .pt-scroll. The header never
   moves - only the list scrolls inside the card, which fills the window
   (body padding from patient-pages.css: 40px top and bottom; 76px top
   under 1100px for the notification bell; 20px bottom on phones).
   ============================================================ */
html:has(body.pt-fixed) {
  overflow: hidden;
}

body.pt-fixed {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.pt-fixed .container {
  height: calc(100vh - 80px);
  height: calc(100dvh - 80px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pt-top {
  flex-shrink: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Title on the left, Back button on the right */
.pt-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pt-title-row > h1 {
  margin: 0;
  text-align: left;
  color: var(--green-900);
  font-size: 1.5em;
  letter-spacing: -0.01em;
}

.pt-title-row .top-actions {
  margin: 0;
  padding: 0;
  border: none;
}

.pt-top .filter-section {
  margin-bottom: 0;
  padding: 10px 12px;
}

.pt-top #searchBar,
.pt-top .filter-section select {
  height: 40px;
  box-sizing: border-box;
  font-size: 0.95em;
}

/* Only the list scrolls; a little padding so hover lifts and shadows
   aren't clipped */
body.pt-fixed .pt-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 12px -6px 0;
  padding: 4px 6px 8px;
}

@media (max-width: 1100px) {
  body.pt-fixed .container {
    height: calc(100vh - 116px);
    height: calc(100dvh - 116px);
  }
}

@media (max-width: 600px) {
  body.pt-fixed .container {
    height: calc(100dvh - 96px);
  }
}

/* Medical Record page: the visit summary sits in the fixed header, so
   keep it compact */
.pt-top .record-summary {
  margin-bottom: 0;
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
}

.pt-top .record-summary-title {
  font-size: 1.1em;
}

.pt-top .record-summary-meta {
  font-size: 0.92em;
}

/* A header with just the title row (no filters under it) */
.pt-top-plain .pt-title-row {
  margin-bottom: 0;
}

/* A scrolling table: the wrapper draws the rounded border, since overflow
   on the table itself would stop the column headings from sticking */
body.pt-fixed .pt-table {
  margin: 14px 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}

body.pt-fixed .pt-table table {
  margin: 0;
  border: none;
  border-radius: 0;
  overflow: visible;
}

body.pt-fixed .pt-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ============================================================
   Patient Dashboard: roomier layout - a wider card, and bigger menu
   tiles with a short line on what each page is for
   ============================================================ */
.dashboard-container {
  max-width: 1100px;
}

/* Every patient page uses the same card: as wide as the Dashboard's and
   at least as tall as the fixed pages (window height minus the body
   padding from patient-pages.css), so it doesn't change size between
   pages. (Not the small Set Password card.) */
.container:not(.set-password),
.dashboard-container {
  max-width: 1100px;
  min-height: calc(100vh - 80px);
  min-height: calc(100dvh - 80px);
}

@media (max-width: 1100px) {
  .container:not(.set-password),
  .dashboard-container {
    min-height: calc(100vh - 116px);
    min-height: calc(100dvh - 116px);
  }
}

@media (max-width: 600px) {
  .container:not(.set-password),
  .dashboard-container {
    min-height: calc(100dvh - 96px);
  }
}

.dashboard-container .profile-section {
  padding: 32px 36px;
  margin-bottom: 28px;
}

.dashboard-container .nav-links {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 32px;
}

.dashboard-container .nav-links a {
  height: auto;
  min-height: 200px;
  padding: 28px 22px;
  gap: 6px;
}

.dashboard-container .nav-links .nav-icon {
  width: 68px;
  height: 68px;
  margin-bottom: 10px;
  font-size: 1.7em;
}

.nav-links .nav-title {
  font-size: 1.12em;
  font-weight: 700;
  color: var(--green-900);
}

.nav-links .nav-desc {
  max-width: 240px;
  font-size: 0.86em;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .dashboard-container .profile-section {
    padding: 24px 18px;
  }

  .dashboard-container .nav-links a {
    min-height: 0;
    padding: 20px 16px;
  }
}
