/* ==========================================================================
   TRUSOF DOCTOR - PATIENT ENTRY & OPD REGISTER STYLESHEET
   Banke Bihari Nishkam Charitable Healthcare Centre & Trusof Healthcare
   ========================================================================== */

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --border: #e2e8f0;
  --border-focus: #0d9488;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- TOP BANNER ---------------- */
.top-camp-banner {
  background: linear-gradient(135deg, #042f2e 0%, #115e59 100%);
  color: #f0fdfa;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.banner-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.camp-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.live-beacon {
  width: 8px;
  height: 8px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35);
  animation: pulseBeacon 2s infinite;
}

@keyframes pulseBeacon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.camp-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ccfbf1;
}

.camp-contacts .sep {
  opacity: 0.4;
}

.phone-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.phone-link:hover {
  text-decoration: underline;
  color: #5eead4;
}

/* ---------------- NAVBAR ---------------- */
.main-navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.caduceus-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

.caduceus-icon svg {
  width: 28px;
  height: 28px;
}

.brand-text .portal-badge {
  display: inline-block;
  background: #f0fdfa;
  color: #0d9488;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #99f6e4;
  margin-bottom: 2px;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.brand-text h1 span {
  color: #0d9488;
}

.brand-text .sub-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------------- BUTTONS ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-sheet {
  background: #0f9d58;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 157, 88, 0.3);
}

.btn-sheet:hover {
  background: #0b8043;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 157, 88, 0.4);
}

.sheet-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.sheet-status-pill:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.live-pulse-green {
  width: 7px;
  height: 7px;
  background-color: #16a34a;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.35);
  animation: pulseBeacon 2s infinite;
}

.btn-teal {
  background: #14b8a6;
  color: #ffffff;
}

.btn-teal:hover {
  background: #0d9488;
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #20ba59;
}

.btn-icon {
  background: #f1f5f9;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-text-danger {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
}

.btn-text-danger:hover {
  color: #b91c1c;
}

/* ---------------- PAGE CONTAINER ---------------- */
.page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------------- METRICS CARDS ---------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.metric-card.highlight-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fdba74;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.total-icon { background: #e0f2fe; }
.female-icon { background: #fce7f3; }
.male-icon { background: #e0e7ff; }
.dept-icon { background: #ccfbf1; }
.sugar-icon { background: #fed7aa; }

.metric-data .metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.metric-data .metric-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin: 2px 0;
}

.metric-data .metric-sub {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ---------------- EXPRESS REGISTER ENTRY BAR ---------------- */
.quick-entry-section {
  background: var(--bg-card);
  border: 1px solid #99f6e4;
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
}

.quick-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-entry-header .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f766e;
}

.tip-pill {
  font-size: 0.74rem;
  background: #f0fdfa;
  color: #0d9488;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #ccfbf1;
}

.quick-entry-grid {
  display: grid;
  grid-template-columns: 80px 2.2fr 90px 100px 1.4fr 1.5fr auto;
  gap: 10px;
  align-items: flex-end;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-field input,
.form-field select {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-field input[readonly] {
  background: #f8fafc;
  color: #0f766e;
  font-weight: 700;
  text-align: center;
}

.btn-add-row {
  background: #0d9488;
  color: #ffffff;
  font-weight: 700;
  padding: 9px 18px;
}

.btn-add-row:hover {
  background: #0f766e;
}

/* ---------------- TOOLBAR SECTION ---------------- */
.toolbar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 280px;
  max-width: 440px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  color: var(--text-light);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 9px 36px 9px 38px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.btn-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
}

.btn-clear:hover { color: var(--text-main); }

.filter-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.filter-group select {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

.filter-group select:focus {
  border-color: var(--border-focus);
}

.records-counter {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

/* ---------------- REGISTER TABLE CARD ---------------- */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header-bar {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.table-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-title .book-icon {
  font-size: 1.3rem;
}

.table-title h2 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.badge-teal { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }

.table-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-indicator {
  font-size: 0.74rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.refresh-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

.table-responsive {
  overflow-x: auto;
  max-height: 720px;
}

.opd-register-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.opd-register-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f1f5f9;
}

.opd-register-table th {
  padding: 11px 14px;
  font-weight: 700;
  color: #334155;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

.opd-register-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.opd-register-table tbody tr:hover {
  background-color: #f8fafc;
}

.th-sno, .td-sno {
  width: 60px;
  text-align: center;
  font-weight: 700;
  color: #475569;
}

.td-sno .sno-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f1f5f9;
  border-radius: 50%;
  font-weight: 700;
}

.td-name {
  font-weight: 700;
  color: #0f172a;
}

.td-name .patient-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-name .notes-indicator {
  font-size: 0.68rem;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.td-agesex {
  white-space: nowrap;
}

.sex-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.sex-f { background: #ffe4e6; color: #be123c; }
.sex-m { background: #dbeafe; color: #1d4ed8; }
.sex-o { background: #f3e8ff; color: #7e22ce; }

.td-phone {
  white-space: nowrap;
}

.phone-action-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wa-icon-link {
  color: #16a34a;
  text-decoration: none;
  font-size: 1.1rem;
  display: inline-flex;
  transition: transform 0.2s;
}

.wa-icon-link:hover {
  transform: scale(1.2);
}

/* Department Badge styles */
.dept-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.dept-phy { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.dept-eye { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.dept-dental { background: #fae8ff; color: #86198f; border: 1px solid #f5d0fe; }
.dept-ent { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.dept-mamo { background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8; }
.dept-lab { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.dept-sugar { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.dept-skin { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.dept-physio { background: #cffafe; color: #155e75; border: 1px solid #a5f3fc; }
.dept-stomach { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.dept-default { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }

.td-actions {
  white-space: nowrap;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action-slip {
  background: #0d9488;
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}

.btn-action-slip:hover {
  background: #0f766e;
}

.btn-action-sm {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-action-sm:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-action-danger {
  color: #ef4444;
}

.btn-action-danger:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.table-footer-bar {
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------------- MODALS ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.modal-card.print-slip-card {
  max-width: 820px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 1.6rem;
}

.modal-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-title-wrap p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-actions-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.btn-close-modal:hover {
  color: #0f172a;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #ccfbf1;
  padding-bottom: 4px;
  margin-top: 6px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.col-span-2 {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.investigations-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.check-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: #1e293b;
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  accent-color: #0d9488;
  width: 15px;
  height: 15px;
}

.modal-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   OFFICIAL BANKE BIHARI NISHKAM CHARITABLE HEALTHCARE PRESCRIPTION SLIP
   Exact Replica of Photos 3 & 5
   ========================================================================== */
.physical-prescription-slip {
  background: #ffffff;
  padding: 24px;
  color: #111827;
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  border: 2px solid #0f172a;
  border-radius: 4px;
  margin: 16px;
  position: relative;
  overflow: hidden;
}

.slip-header {
  display: grid;
  grid-template-columns: 54px 1fr 140px;
  gap: 12px;
  align-items: center;
  border-bottom: 2px solid #111827;
  padding-bottom: 12px;
}

.slip-caduceus svg {
  width: 50px;
  height: 50px;
}

.slip-centre-info {
  text-align: center;
}

.slip-centre-info h2 {
  font-family: 'Times New Roman', serif, var(--font-heading);
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #0f172a;
  text-transform: uppercase;
}

.slip-centre-info .address {
  font-size: 0.76rem;
  color: #374151;
  line-height: 1.3;
}

.slip-centre-info .contact {
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2px;
}

.slip-stamp-box {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.stamp-token {
  font-family: 'Courier New', monospace;
  font-size: 1.15rem;
  font-weight: 900;
  background: #f1f5f9;
  border: 2px solid #1e293b;
  padding: 2px 8px;
  border-radius: 4px;
  color: #0f172a;
}

.stamp-badge {
  font-size: 0.65rem;
  font-weight: 800;
  background: #0f172a;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.slip-patient-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #d1d5db;
  font-size: 0.88rem;
}

.patient-field .label {
  font-weight: 700;
  color: #374151;
  margin-right: 6px;
}

.patient-field .value {
  font-weight: 800;
  color: #000000;
  border-bottom: 1px dotted #4b5563;
  padding-bottom: 1px;
}

.slip-meta-bar {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.82rem;
  color: #4b5563;
  border-bottom: 2px solid #111827;
}

.slip-meta-bar strong {
  color: #111827;
}

.slip-body-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 480px;
  border-bottom: 2px solid #111827;
}

.slip-left-sidebar {
  border-right: 2px solid #111827;
  padding: 10px 10px 10px 0;
  font-size: 0.68rem;
}

.sidebar-block h3 {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #111827;
  border-bottom: 1px solid #111827;
  padding-bottom: 2px;
  margin-bottom: 4px;
}

.sidebar-block .sub-heading {
  font-weight: 700;
  font-style: italic;
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.test-item {
  line-height: 1.35;
  color: #374151;
}

.test-item.highlight-test {
  font-weight: 800;
  color: #111827;
}

.test-group-title {
  font-weight: 800;
  margin-top: 4px;
  text-transform: uppercase;
}

.facilities-list {
  list-style: none;
  line-height: 1.35;
}

.facilities-list li::before {
  content: '• ';
  color: #111827;
}

.slip-rx-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.rx-symbol {
  font-family: 'Times New Roman', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #111827;
  line-height: 1;
  margin-bottom: 8px;
}

.slip-vitals-box {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.vital-tag {
  font-size: 0.78rem;
  color: #475569;
}

.vital-tag strong {
  color: #0f172a;
}

.slip-prescribed-tests {
  font-size: 0.8rem;
  margin-bottom: 12px;
  background: #fffbeb;
  padding: 6px 10px;
  border-left: 3px solid #f59e0b;
}

.rx-doctor-notes-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.notes-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 6px;
}

.notes-content {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #1f2937;
  min-height: 80px;
}

.rx-ruled-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  min-height: 140px;
}

.rx-ruled-lines .line {
  border-bottom: 1px dashed #cbd5e1;
  width: 100%;
  height: 22px;
}

.rx-doctor-sign-area {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.sign-block {
  text-align: center;
  width: 220px;
}

.sign-line {
  border-bottom: 1px solid #111827;
  margin-bottom: 4px;
}

.sign-block p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #111827;
}

.sign-block span {
  font-size: 0.68rem;
  color: #6b7280;
}

.slip-bottom-banner {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  padding: 8px;
  background: #f3f4f6;
  letter-spacing: 0.3px;
}

/* ---------------- TOAST ---------------- */
.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 200;
  transition: opacity 0.3s, transform 0.3s;
}

.toast-popup.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* ==========================================================================
   PRINT MEDIA STYLES - CLEAN DEDICATED SLIP & REGISTER PRINTING
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .top-camp-banner,
  .main-navbar,
  .metrics-grid,
  .quick-entry-section,
  .toolbar-section,
  .table-actions-right,
  .no-print,
  .modal-header,
  .btn,
  .btn-icon,
  .btn-text-danger,
  .table-footer-bar,
  #patientFormModal {
    display: none !important;
  }

  /* When printing from the slip modal */
  body.printing-slip #prescriptionSlipModal {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }

  body.printing-slip .page-container,
  body.printing-slip .table-card {
    display: none !important;
  }

  body.printing-slip .modal-card {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
  }

  body.printing-slip .physical-prescription-slip {
    margin: 0 !important;
    padding: 12mm 15mm !important;
    border: 2px solid #000000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  /* When printing the full register table */
  body.printing-register .table-card {
    border: none !important;
    box-shadow: none !important;
  }

  body.printing-register .opd-register-table {
    border: 1px solid #000000 !important;
  }

  body.printing-register .opd-register-table th,
  body.printing-register .opd-register-table td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
}

/* ---------------- RESPONSIVE BREAKPOINTS ---------------- */
@media (max-width: 992px) {
  .quick-entry-grid {
    grid-template-columns: 80px 1.5fr 80px 90px 1fr 1fr;
  }
  .form-field.f-btn {
    grid-column: span 6;
  }
  .btn-add-row {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .navbar-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .quick-entry-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-field.f-sno { grid-column: span 1; }
  .form-field.f-name { grid-column: span 2; }
  .form-field.f-age { grid-column: span 1; }
  .form-field.f-sex { grid-column: span 1; }
  .form-field.f-phone { grid-column: span 2; }
  .form-field.f-dept { grid-column: span 2; }
  .form-field.f-btn { grid-column: span 2; }

  .slip-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .slip-caduceus { display: none; }
  .slip-stamp-box { align-items: center; }
  .slip-body-grid {
    grid-template-columns: 1fr;
  }
  .slip-left-sidebar {
    border-right: none;
    border-bottom: 2px solid #111827;
  }
}

/* ---------------- DATASET SWITCHER TABS ---------------- */
.dataset-switcher-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px 0;
  flex-wrap: wrap;
}

.dataset-switcher-tabs {
  display: inline-flex;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 12px;
  gap: 6px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.dataset-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: #475569;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.dataset-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.65);
}

.dataset-tab-btn.active {
  background: #ffffff;
  color: #0d9488;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-badge-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulse 2s infinite;
}

.sheet-direct-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-sheet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sheet-link:hover {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

