html, body { min-height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; background: #f6f7f9; }
main { flex: 1 0 auto; }
.login-shell { display: grid; place-items: center; padding: 1rem; background: linear-gradient(135deg, #f6f7f9, #ffffff); }
.login-card { width: min(100%, 420px); border-radius: 8px; }
.card { border-radius: 8px; }
.stat-card { min-height: 120px; }
.nav-tabs { scrollbar-width: thin; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.upload-item { display: grid; gap: .5rem; color: inherit; text-decoration: none; word-break: break-word; }
.upload-item a { color: inherit; text-decoration: none; display: grid; gap: .5rem; }
.upload-item-card { border: 1px solid #dee2e6; border-radius: 8px; padding: .75rem; background: #fff; }
.upload-item img, .pdf-tile { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; }
.pdf-tile { display: grid; place-items: center; font-weight: 700; color: #b02a37; }
.action-buttons { white-space: nowrap; }
input[type="number"] { min-width: 0; }
.record-map { width: 100%; min-height: 340px; border-radius: 8px; border: 1px solid #dee2e6; overflow: hidden; }
.map-coordinate { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.app-footer { flex-shrink: 0; border-top: 1px solid #e2e5e9; background: #f8f9fa; color: #8a929c; font-size: .82rem; line-height: 1.35; }
.footer-brand { color: #747c86; font-weight: 600; letter-spacing: .02em; }
.footer-tagline { margin-top: .15rem; }
.footer-meta { margin-top: .15rem; font-size: .76rem; color: #9aa1aa; }
@media (max-width: 576px) {
    .action-buttons { white-space: normal; }
    .action-buttons .btn, .action-buttons form { margin-top: .25rem; }
    .nav-tabs .nav-link { padding: .65rem .75rem; }
    .d-flex.gap-2 { flex-wrap: wrap; }
    .table { font-size: .92rem; }
    .record-map { min-height: 280px; }
    .app-footer { font-size: .78rem; }
}
@media print {
    .no-print, .navbar, .app-footer { display: none !important; }
    body { background: #fff; }
    .container { max-width: none; }
    .upload-grid { grid-template-columns: repeat(3, 1fr); }
}
