/* ---------------------------------------------------------
   NeoTrack UI – hospital-grade theme
   Clean cards, consistent inputs, sticky table header,
   and responsive modal sizes.
   --------------------------------------------------------- */

:root{
  --primary: #2563eb;           /* blue-600 */
  --primary-700:#1d4ed8;
  --surface:#ffffff;
  --surface-2:#f9fafb;
  --border:#e5e7eb;
  --radius:12px;
  --shadow-sm:0 1px 2px rgba(0,0,0,.06);
  --shadow-md:0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:0 10px 30px rgba(0,0,0,.18);
}

/* Slightly narrower max width for desktop readability */
.container{ max-width:1200px; }
@media (min-width:1536px){ .container{ max-width:1280px; } }

/* Smoother type */
html,body{ -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }

/* Cards */
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.card--elevated{ box-shadow:var(--shadow-md); }

/* Institution badge (header) */
.badge{ display:inline-flex; align-items:center; gap:.4rem; padding:.25rem .6rem; border-radius:9999px; background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.25); }

/* Buttons */
.btn-primary{
  background:var(--primary); color:#fff; font-weight:600;
  padding:.75rem 1.25rem; border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn-primary:hover{ background:var(--primary-700); transform:translateY(-1px); box-shadow:var(--shadow-md); }
.btn-primary:active{ transform:translateY(0); }
.btn-primary:disabled{ opacity:.6; cursor:not-allowed; }

.btn-secondary{
  background:#eef2ff; color:#1f2937; font-weight:600;
  padding:.5rem 1rem; border-radius:var(--radius);
  border:1px solid var(--border);
  transition:background-color .12s ease, box-shadow .12s ease;
}
.btn-secondary:hover{ background:#e5e7eb; box-shadow:var(--shadow-sm); }
.btn-secondary:disabled{ opacity:.6; cursor:not-allowed; }

/* Event tiles */
.btn-event{
  width:100%; padding:1rem; border-radius:var(--radius);
  background:#fff; border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  transition:transform .12s ease, box-shadow .12s ease;
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
}
.btn-event:hover{ transform:translateY(-1px); box-shadow:var(--shadow-md); }

/* Inputs – unify look without changing your markup */
input[type="text"],input[type="email"],input[type="password"],
input[type="number"],input[type="datetime-local"],select,textarea{
  width:100%; background:#fff; border:1px solid var(--border);
  border-radius:var(--radius); padding:.65rem .9rem; line-height:1.4;
  transition:border-color .12s ease, box-shadow .12s ease;
}
input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.18);
}

/* Tables – denser, sticky header, gentle row hover */
.table{ width:100%; border-collapse:separate; border-spacing:0; font-size:.95rem; }
.table thead th{
  position:sticky; top:0; z-index:1;
  background:#f3f4f6; border-bottom:1px solid var(--border);
}
.table th,.table td{ padding:.65rem .75rem; text-align:left; }
.table tbody tr{ border-bottom:1px solid var(--border); }
.table tbody tr:nth-child(even){ background:#fafafa; }
.table tbody tr:hover{ background:#f5f7ff; }

/* Modals – responsive sizes with clamp-like behavior */
.modal{ position:fixed; inset:0; background:rgba(2,6,23,.55); display:none; align-items:center; justify-content:center; padding:1rem; z-index:60; }
.modal.open{ display:flex; }
.modal-content{
  --modal-max:640px; /* default “md” */
  width:min(calc(100% - 2rem), var(--modal-max));
  background:var(--surface); border-radius:16px; padding:1.25rem 1.25rem;
  box-shadow:var(--shadow-lg); border:1px solid var(--border);
  max-height:90vh; overflow:auto;
}
.modal--sm .modal-content{ --modal-max:520px; }
.modal--md .modal-content{ --modal-max:640px; }
.modal--lg .modal-content{ --modal-max:840px; }
.modal--xl .modal-content{ --modal-max:1080px; }

/* Stats modal (keep large) */
#stats-modal.modal .modal-content{ --modal-max:1080px; }

/* Toast */
#toast{ z-index:70; border-radius:12px; box-shadow:var(--shadow-lg); }

/* Print */
.print-wrap{ font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji"; color:#111827; padding:16px; }
.print-header{ margin-bottom:12px; }
.print-title{ font-size:20px; font-weight:700; margin-bottom:4px; }
.print-meta{ font-size:14px; color:#374151; }
.print-table{ width:100%; border-collapse:collapse; margin-top:12px; font-size:13px; }
.print-table th,.print-table td{ border:1px solid #e5e7eb; padding:8px 10px; text-align:left; vertical-align:top; }
.print-table thead th{ background:#f3f4f6; font-weight:700; }
