/* Admin panel additions on top of Limitless (D-004). */
.login-form { width: 100%; max-width: 22rem; }
.stats-table td, .stats-table th { white-space: nowrap; text-align: right; }
.stats-table td:first-child, .stats-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--card-bg, #fff); }
.stats-chart { height: 360px; }
/* Column explanations (assets/admin/admin.js): dotted underline marks a header with a tooltip. */
th.has-tip { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.tip-multiline .tooltip-inner { white-space: pre-line; text-align: left; max-width: 22rem; }
/* References to project documents open a popup with their text. */
a.doc-ref { text-decoration: underline dotted; text-underline-offset: 2px; white-space: nowrap; }
.doc-text h6:first-child { margin-top: 0 !important; }
.doc-text p, .doc-text ul, .doc-text ol { margin-bottom: .6rem; }
/* Layout: the window never scrolls as a whole — the navbar and the sidebar stay in place,
   only the page content (.content-inner) scrolls. Without this the body grew with a long
   page and the sidebar scrolled away together with it. */
@media (min-width: 992px) {
	html, body { height: 100%; }
	body { overflow: hidden; }
	.page-content { min-height: 0; flex: 1 1 auto; }
	.content-wrapper { min-height: 0; }
}
/* Sidebar: sections with 'bottom' => true (inc/menu.php) stay at the bottom, visible while scrolling. */
.sidebar-section-bottom { position: sticky; bottom: 0; background: var(--sidebar-bg); border-top: 1px solid rgba(255, 255, 255, .1); }
/* Page templates (D-026, assets/admin/layout.js): cards on a GridStack grid. Spacing comes
   from the grid margin, so cards drop their own; fill blocks (map, chart) stretch to the block. */
.grid-stack .card { margin-bottom: 0; }
.grid-stack .grid-stack-item-content { overflow: visible; }
.grid-stack .gs-fill .grid-stack-item-content { overflow: hidden; }
.grid-stack .gs-fill .card { height: 100%; display: flex; flex-direction: column; }
.grid-stack .gs-fill .gs-fill-body { flex: 1 1 auto; min-height: 0; }
.grid-stack .gs-fill .stats-chart { height: 100%; }
.grid-stack.layout-editing .card { outline: 2px dashed var(--primary, #0c83ff); outline-offset: -2px; }
.grid-stack.layout-editing .gs-handle { cursor: move; }
.grid-stack .grid-stack-item:focus-within { z-index: 5; }
/* Summary ↔ map: a hovered row highlights its route. */
.stats-table tr.route-hover > td { background: rgba(12, 131, 255, .08); }
