:root {
  --primary: #c62828;
  --primary-hover: #b71c1c;
  --primary-light: #ffebee;
  --primary-glow: rgba(198, 40, 40, 0.2);
  --secondary: #1c1c1e;
  --accent: #d32f2f;
  --bg-page: #f2f2f7; /* iOS grouped background */
  --bg-card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --border-focus: #c62828;
  --text-main: #1c1c1e;
  --text-muted: #8e8e93;
  --success: #34c759;
  --success-bg: #e8f8ed;
  --warning: #ff9500;
  --danger: #ff3b30;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ====================================================================
   RESET & MOBILE RESTRICTIONS (RESTRICT ZOOM & IOS APP FEEL)
   ==================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

/* ====================================================================
   IOS BLUR HEADER
   ==================================================================== */
.app-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 580px;
  margin: 0 auto;
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  user-select: none;
  cursor: pointer;
}

.drop-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #e53935, #b71c1c);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--primary-glow);
  flex-shrink: 0;
}

.brand-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--primary);
  text-transform: uppercase;
  display: block;
  line-height: 1.1;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.camp-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ====================================================================
   BUTTONS (NATIVE TOUCH FEEL)
   ==================================================================== */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform 0.1s ease, background-color 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  touch-action: manipulation;
  user-select: none;
}

button:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.78rem;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #f8fafc;
}

.btn-icon {
  background: #ffffff;
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.78rem;
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  font-weight: 600;
}

.btn-close {
  background: rgba(0, 0, 0, 0.06);
  font-size: 1.25rem;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  line-height: 1;
}

.btn-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-main);
}

/* ====================================================================
   MAIN CONTAINER & HERO (IOS GROUPED STYLE & TIGHT MARGINS)
   ==================================================================== */
.main-container {
  max-width: 580px;
  width: 100%;
  margin: 0.5rem auto 1.5rem auto;
  padding: 0 0.75rem;
  flex: 1;
}

.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
  border: 1px solid #ffd4d4;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.65rem;
}

.hero-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

.hero-highlight-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
  color: #b71c1c;
  border: 1.5px solid #fca5a5;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(183, 28, 28, 0.08);
  user-select: none;
}

.heart-pulse-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e53935;
  animation: heart-pulse 1.8s ease-in-out infinite;
}

@keyframes heart-pulse {
  0% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.18); }
  70% { transform: scale(1); }
}

.highlight-caption-text {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #b71c1c;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-stats {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stat-box {
  background: white;
  border: 1px solid #ffcdd2;
  border-radius: var(--radius-md);
  padding: 0.4rem 1.1rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(198, 40, 40, 0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Status Banner */
.status-banner {
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-banner.success {
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.status-banner.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.status-banner.warning {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ====================================================================
   FORM CARD & COMPACT IOS INPUTS
   ==================================================================== */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.75rem;
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.form-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.form-title-group p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Toggle Switch */
.toggle-container {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
}

.toggle-container input {
  display: none;
}

.toggle-slider {
  width: 36px;
  height: 20px;
  background-color: #d1d5db;
  border-radius: 20px;
  position: relative;
  transition: 0.25s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  top: 2px;
  left: 2px;
  transition: 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-container input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-container input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.toggle-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Grid & Groups */
.grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.required {
  color: var(--primary);
  font-weight: bold;
}

.helper-text {
  font-size: 0.7rem;
  font-weight: normal;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  color: #9ca3af;
  pointer-events: none;
}

/* 16px Font Size RESTRICTS IOS ZOOM COMPLETELY */
input[type="text"],
input[type="tel"],
input[type="url"],
select {
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 2.3rem;
  font-size: 16px !important; /* Prevents auto-zoom on iOS */
  font-family: inherit;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.sub-input {
  margin-top: 0.4rem;
  padding-left: 0.75rem !important;
}

.error-msg {
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.25rem;
  display: none;
}

.has-error input,
.has-error select {
  border-color: var(--danger);
  background-color: #fffaf0;
}

.has-error .error-msg {
  display: block;
}

/* ====================================================================
   BLOOD GROUP RADIO BADGES (TOUCH TARGETS)
   ==================================================================== */
.blood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.blood-card {
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.blood-card input[type="radio"] {
  display: none;
}

.blood-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.3rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  background: white;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.blood-badge.subtle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.blood-card:hover .blood-badge {
  border-color: #fca5a5;
  background-color: #fff8f8;
}

.blood-card:active .blood-badge {
  transform: scale(0.95);
}

.blood-card input[type="radio"]:checked + .blood-badge {
  background: linear-gradient(135deg, #e53935, #b71c1c);
  color: white;
  border-color: #b71c1c;
  box-shadow: 0 3px 8px var(--primary-glow);
}

/* Checkbox */
.form-group-checkbox {
  margin: 0.75rem 0 1rem 0;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.78rem;
  color: var(--text-main);
}

.checkbox-container input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.checkbox-label {
  line-height: 1.35;
}

/* Form Actions */
.form-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.form-actions .btn-primary {
  flex: 1;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====================================================================
   DONOR TABLE (IOS GROUPED)
   ==================================================================== */
.recent-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.section-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

#searchDonors {
  padding: 0.35rem 0.65rem;
  font-size: 16px !important;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-xs);
  width: 140px;
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid #f1f5f9;
}

.donors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.donors-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.donors-table td {
  padding: 0.65rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
  vertical-align: middle;
}

.donors-table tr:hover td {
  background-color: #fafbfc;
}

.token-badge {
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.blood-cell-badge {
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-block;
  font-size: 0.75rem;
}

/* Live Sync Badge & Pulsing Dot */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-badge.disconnected {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.live-badge.disconnected .live-dot {
  background-color: #e11d48;
  box-shadow: none;
  animation: none;
}

.btn-sync {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-sync.is-syncing svg {
  animation: spin 0.8s linear infinite;
  color: var(--primary);
}

.btn-delete-row {
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.4rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-delete-row:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.empty-row td {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
}

/* ====================================================================
   MODALS & DONOR PASS SLIP
   ==================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0.85rem;
}

.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalEnter 0.22s ease-out;
}

@keyframes modalEnter {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.modal-header-simple h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pass-header {
  text-align: center;
  margin-bottom: 1.15rem;
}

.pass-icon {
  width: 42px;
  height: 42px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.pass-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.pass-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* DONOR SLIP STYLING */
.donor-slip {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.15rem;
}

.slip-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(198, 40, 40, 0.04);
  pointer-events: none;
  white-space: nowrap;
}

.slip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
}

.slip-camp-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.slip-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.slip-token {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid #ffcdd2;
}

.slip-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slip-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.slip-row.highlight {
  padding-top: 0.35rem;
  border-top: 1px dashed #e2e8f0;
  margin-top: 0.15rem;
}

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

.slip-row .value {
  color: var(--text-main);
  font-weight: 700;
}

.blood-group-tag {
  background: var(--primary);
  color: white !important;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
}

.slip-footer {
  margin-top: 0.85rem;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
}

.modal-actions.center {
  justify-content: center;
}

/* QR Card */
.qr-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
}

.qr-hint {
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 0.85rem;
}

/* Admin PIN & Security Styles */
.pin-modal-card {
  max-width: 380px;
}

.lock-icon-badge {
  width: 36px;
  height: 36px;
  background: #fee2e2;
  color: #b71c1c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pin-input-group {
  margin: 1rem 0 0.4rem 0;
}

.pin-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 0.35rem;
}

.pin-input-wrapper input {
  font-size: 1.4rem !important;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 0.55rem 2.6rem 0.55rem 0.85rem !important;
  font-weight: 700;
  font-family: monospace;
}

.btn-eye {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.6;
}

.admin-pin-settings-box {
  background: #fff8f8;
  border: 1px dashed #fca5a5;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  margin: 1rem 0;
}

/* Secret Admin Button in Footer */
.secret-admin-btn {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  opacity: 0.25;
  cursor: pointer;
  padding: 0 0.3rem;
  vertical-align: middle;
  transition: opacity 0.2s;
}

.secret-admin-btn:hover {
  opacity: 0.9;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.25rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 0.5px solid var(--border);
  background: white;
  margin-top: auto;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Admin Access Bar */
.admin-access-bar {
  text-align: center;
  margin: 1.25rem 0 0.75rem 0;
}

.btn-admin-link {
  background: white;
  color: var(--text-muted);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-admin-link:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: #fca5a5;
}

/* ====================================================================
   PRINT STYLES FOR DONOR PASS
   ==================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  #donorSlip, #donorSlip * {
    visibility: visible;
  }
  #donorSlip {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 2px solid black;
    box-shadow: none;
    padding: 2rem;
  }
  .modal-overlay {
    background: transparent;
    position: static;
  }
}

/* ====================================================================
   MOBILE RESPONSIVENESS (< 640px)
   ==================================================================== */
@media (max-width: 640px) {
  .grid-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hero-card {
    padding: 0.75rem 0.85rem;
    gap: 0.55rem;
  }
  .highlight-caption-text {
    font-size: 0.92rem;
  }
  .hero-highlight-badge {
    padding: 0.4rem 0.85rem;
  }
  .stat-box {
    padding: 0.35rem 0.9rem;
    min-width: 120px;
  }
  .header-container {
    padding: 0.5rem 0.75rem;
  }
  .blood-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
