:root { --brand: #0d6efd; }
body { background: #f4f6f9; }
.app-nav { background: linear-gradient(90deg, #0d3b66, #0d6efd); }
.app-nav .navbar-brand { letter-spacing: .3px; }

.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0d3b66, #0d6efd); }
.login-card { background: #fff; padding: 2.2rem; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.25); width: 100%; max-width: 380px; }
.login-logo { width: 64px; height: 64px; line-height: 64px; margin: 0 auto .6rem; font-size: 30px; color: #fff; background: var(--brand); border-radius: 50%; text-align: center; }

.card { border-radius: 10px; }
.stat-card .h3 { font-size: 1.7rem; }
.sticky-save { position: sticky; top: 1rem; }
.med-row td, .item-row td { vertical-align: middle; }
.dose-input { width: 50px; text-align: center; }

.lab-chip { display: inline-flex; align-items: center; gap: 6px; background: #e7f1ff; color: #0a58ca; border-radius: 16px; padding: 3px 10px; margin: 0 6px 6px 0; font-size: 13px; }
.lab-chip .x { cursor: pointer; font-weight: 700; }
.lab-chip .lab-note { border: 1px solid #b6d4fe; background: #fff; border-radius: 10px; font-size: 12px; padding: 1px 8px; min-width: 120px; color: #212529; }
.lab-chip .lab-note:focus { outline: none; border-color: var(--brand); }
.ui-autocomplete { z-index: 2000 !important; max-height: 280px; overflow-y: auto; }

/* Month calendar grid (calendar + dashboard mini) */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { margin-bottom: 4px; }
.cal-grid + .cal-grid { margin-top: 4px; }
.cal-cell { position: relative; display: block; min-height: 78px; border-radius: 8px; padding: 4px 6px; text-decoration: none; color: inherit; background: #fff; transition: background .12s; }
.cal-cell:hover { background: #eef4ff; }
.cal-cell.cal-out { background: #f7f8fa; }
.cal-cell.cal-today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-day { font-weight: 600; font-size: .9rem; }
.cal-closed { color: #c0c4cc; }
.cal-count { position: absolute; left: 6px; bottom: 6px; }
@media (max-width: 575.98px) {
  .cal-cell { min-height: 52px; padding: 3px 4px; }
  .cal-day { font-size: .78rem; }
  .cal-count { font-size: .65rem; left: 4px; bottom: 4px; }
}

@media print {
  .app-nav, footer, .no-print { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { background: #fff; }
}
