body { background: #f5f6f8; }
.card { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.table td, .table th { vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.login-wrap { max-width: 420px; margin: 8vh auto; }

/* e-signing */
.pdf-pages { max-width: 900px; margin: 0 auto; }
.pdf-page { position: relative; margin: 0 auto 18px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); user-select: none; }
.pdf-page img { width: 100%; display: block; pointer-events: none; }
.pdf-page .page-label { position: absolute; top: -18px; right: 0; font-size: .75rem; color: #888; }
.sfield { position: absolute; border: 2px dashed; border-radius: 3px; font-size: 11px; overflow: hidden;
          display: flex; align-items: center; justify-content: center; cursor: move; background: rgba(255,255,255,.55); }
.sfield .del { position: absolute; top: -1px; right: 2px; cursor: pointer; font-weight: bold; }
.sfield .grip { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; cursor: nwse-resize; background: currentColor; opacity: .6; }
.sfield.selected { box-shadow: 0 0 0 2px #0d6efd; }
.sign-field { position: absolute; border: 2px solid #f0ad4e; background: rgba(255, 243, 205, .75); border-radius: 3px;
              cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #8a6d3b; }
.sign-field.done { border-color: #198754; background: rgba(209, 231, 221, .45); }
.sign-field img { max-width: 100%; max-height: 100%; }
.sign-field input { width: 100%; height: 100%; border: 0; background: transparent; font-size: 12px; padding: 0 3px; }
#sigCanvas { border: 1px solid #ccc; border-radius: 4px; touch-action: none; width: 100%; height: 200px; background: #fff; }
.sticky-bar { position: sticky; top: 0; z-index: 20; }
.user-picker .dropdown-toggle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* reserve an A4-shaped space before a lazily-loaded page image arrives (keeps layout and reading progress honest) */
.pdf-page img { aspect-ratio: auto 210 / 297; height: auto; }
/* accessibility */
.skip-link:focus { position: absolute; top: .5rem; left: .5rem; z-index: 2000; background: #fff; color: #000; padding: .5rem 1rem; border: 2px solid #0d6efd; border-radius: 4px; }
:focus-visible { outline: 3px solid #0d6efd; outline-offset: 2px; }
.text-muted { color: #5c636a !important; } /* 4.5:1 on white (WCAG 2.2 AA), Bootstrap's default is lighter */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.navbar-brand { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399.98px) { .navbar-expand-xl .navbar-nav .nav-link { padding-left: .4rem; padding-right: .4rem; } }

/* drag-and-drop uploads */
.file-drop { position: relative; border-radius: .375rem; transition: box-shadow .1s; }
.file-drop.drag-over { box-shadow: 0 0 0 3px var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.drop-overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center;
  background: rgba(13, 110, 253, .12); border: 4px dashed var(--bs-primary); font-size: 1.5rem; font-weight: 600; color: var(--bs-primary); pointer-events: none; }
.drop-overlay.show { display: flex; }
.drop-status { position: fixed; right: 1rem; bottom: 1rem; z-index: 2001; min-width: 280px; max-width: 420px; }
