body { background: #dde4ec; }
.navbar .nav-link { color: rgba(255, 255, 255, .78); }
.navbar .nav-link:hover { color: #fff; }
.card { border-color: #e3e6ea; }
.table > :not(caption) > * > * { padding: .5rem .65rem; }
h1.h3, h1.h4 { font-weight: 600; }
details summary { cursor: pointer; font-size: .8rem; }
label.form-label { font-size: .85rem; color: #495057; }
.form-text { font-size: .78rem; }

/* Forms. The surface a form sits on is a shade darker than the entry fields, so
   the white boxes read as boxes instead of blending into the card. The five
   record forms are <form class="card card-body">; the sign-in card carries
   .form-card because the form sits inside it. Tune the two greys here. */
form.card, .form-card .card-body { background-color: #e9eef4; }
.form-control, .form-select, .form-check-input { background-color: #fff; border-color: #a9b4c1; }

/* The four dashboard counters are links to their list pages: they keep the card
   look but lift slightly and pick up a darker edge on hover. */
a.stat-box { text-decoration: none; transition: box-shadow .12s ease, border-color .12s ease, transform .12s ease; }
a.stat-box:hover { border-color: #a9b4c1; box-shadow: 0 .15rem .4rem rgba(20, 30, 45, .12); transform: translateY(-1px); }
a.stat-box:focus-visible { outline: 2px solid #6ea8fe; outline-offset: 2px; }

/* Dark mode. base.html asks the browser whether the device is dark and puts the
   answer on data-bs-theme, which is all Bootstrap 5.3 needs to restyle itself.
   Only the colours this file picks by hand need dark twins, below. The form
   rule keeps the same relationship as the light one, just inverted: the entry
   fields stay a shade lighter than the surface they sit on, so they still read
   as boxes. Tune the four greys here. */
[data-bs-theme="dark"] body { background: #1b2129; }
[data-bs-theme="dark"] .card { border-color: #313b47; }
[data-bs-theme="dark"] label.form-label { color: #aeb9c5; }
[data-bs-theme="dark"] form.card,
[data-bs-theme="dark"] .form-card .card-body { background-color: #232b35; }
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-check-input { background-color: #2c3542; border-color: #55636f; color: #dfe5ec; }
[data-bs-theme="dark"] a.stat-box:hover { border-color: #55636f; box-shadow: 0 .15rem .4rem rgba(0, 0, 0, .5); }
