/* Result Record - Variable Solutions */
:root {
  --rr-primary: #1f3a5f;
  --rr-accent: #2f6fb3;
  --bs-primary: #2f6fb3;
  --bs-primary-rgb: 47, 111, 179;
}
body { background: #f3f5f8; font-size: .95rem; }
.btn-primary { --bs-btn-bg: var(--rr-accent); --bs-btn-border-color: var(--rr-accent); --bs-btn-hover-bg: #275e98; --bs-btn-hover-border-color: #275e98; --bs-btn-active-bg: #214f80; }
.btn-outline-primary { --bs-btn-color: var(--rr-accent); --bs-btn-border-color: var(--rr-accent); --bs-btn-hover-bg: var(--rr-accent); --bs-btn-hover-border-color: var(--rr-accent); }
a { color: var(--rr-accent); }

.app-nav { background: var(--rr-primary); }
.app-nav .nav-link { color: rgba(255,255,255,.8); }
.app-nav .nav-link.active, .app-nav .nav-link:hover { color: #fff; }
.app-nav .navbar-brand { font-weight: 600; }

.card { border-color: #e3e7ee; }
.card-header { background: #fafbfd; }

/* login */
.login-body { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(160deg, #1f3a5f 0%, #2f6fb3 100%); }
.login-wrap { width: 100%; max-width: 400px; margin: 0 auto; padding: 16px; }
.login-wrap .text-muted.small.mt-3 { color: rgba(255,255,255,.75) !important; }
.brand-mark { width: 56px; height: 56px; border-radius: 14px; background: var(--rr-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }

/* dashboard */
.stat-card .stat-label { font-size: .78rem; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: var(--rr-primary); line-height: 1.2; }

/* scan */
.pick-btn { font-size: 1rem; line-height: 1.2; }
.preview-box { border: 1px dashed #c4ccd8; border-radius: 8px; background: #fff; overflow: hidden; }
.preview-box img { display: block; max-width: 100%; max-height: 360px; margin: 0 auto; }
.busy-overlay { position: fixed; inset: 0; background: rgba(15, 30, 50, .82); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }

/* review / view */
.preview-pane { background: #e9edf2; max-height: 80vh; overflow: auto; }
.pdf-frame { width: 100%; height: 78vh; border: 0; display: block; }
.zoomable { cursor: zoom-in; }
.zoomable.zoomed { max-width: none; width: 220%; cursor: zoom-out; }
@media (min-width: 992px) {
  .sticky-preview { position: sticky; top: 72px; }
}
@media (max-width: 991.98px) {
  .preview-pane { max-height: 55vh; }
  .pdf-frame { height: 55vh; }
}
.edit-table .form-control-sm, .edit-table .form-select-sm { padding: .2rem .35rem; font-size: .82rem; min-width: 0; }
.edit-table td, .edit-table th { padding: .25rem .25rem; font-size: .8rem; white-space: nowrap; }
.edit-table td:nth-child(3) .form-control-sm { min-width: 220px; }
.edit-table .form-select-sm { padding-right: 1.4rem; background-position: right .3rem center; }
.sticky-actions { position: sticky; bottom: 0; background: #f3f5f8; padding: 10px 0; z-index: 5; }

/* floating scan button on phones */
.fab-scan { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: var(--rr-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 1030; }
.fab-scan:hover { color: #fff; background: #275e98; }

@media print {
  .app-nav, footer, .fab-scan, .btn, form .sticky-actions { display: none !important; }
}
