:root {
  --sidebar-width: 270px;
  --app-bg: #f4f7fb;
  --card-radius: 18px;
  --brand: #1f4fa3;
  --brand-dark: #173c7c;
  --accent: #0ea5e9;
}
html, body { height: 100%; }
body {
  background: var(--app-bg);
  color: #1f2937;
  font-size: .96rem;
}
.app-shell { min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--brand-dark), var(--brand));
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  overflow-y: auto;
}
.sidebar .brand { padding: 1.2rem 1.25rem .8rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand-title { font-size: 1.25rem; font-weight: 700; letter-spacing: .3px; }
.sidebar .brand-subtitle { font-size: .82rem; color: rgba(255,255,255,.8); }
.sidebar .nav-link {
  color: rgba(255,255,255,.86);
  border-radius: 12px;
  margin: .2rem .8rem;
  padding: .75rem .95rem;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar .sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,.1); margin-top: 1rem; }
.main-content { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); }
.topbar {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.content-wrapper { padding: 1.25rem; }
.card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 10px 28px rgba(15,23,42,.06);
}
.table-card .table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stat-card .stat-label { color: #64748b; font-size: .82rem; }
.stat-card .stat-value { font-size: 1.65rem; font-weight: 700; }
.badge-soft { background: #e0f2fe; color: #075985; }
.record-photo-preview {
  width: 100%; max-width: 260px; height: 220px; object-fit: cover;
  border-radius: 16px; border: 1px solid #dbe4f0; background: #fff;
}
.search-suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1200;
  background: #fff; border: 1px solid #dbe4f0; border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15,23,42,.12); overflow: hidden;
}
.search-suggestions a {
  display: block; padding: .8rem .95rem; text-decoration: none; color: #0f172a;
  border-bottom: 1px solid #eef2f7;
}
.search-suggestions a:last-child { border-bottom: 0; }
.search-suggestions a:hover { background: #f8fafc; }
pre.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.login-page { min-height: 100vh; background: radial-gradient(circle at top right, #bfdbfe, #eff6ff 45%, #f8fafc 100%); }
.login-card { max-width: 440px; }
.pagination .page-link { border-radius: 10px; margin: 0 .15rem; border: none; color: #334155; }
.pagination .active .page-link { background: var(--brand); }
.mobile-menu-btn { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; }
  .mobile-menu-btn { display: inline-flex; }
}
