:root{--border:#e5e7eb;--muted:#6b7280;--ok:#0a7d28;--err:#a30000;--warn:#92400e;--warnbg:#fef3c7}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;background:#fff;color:#111}
.wrap{max-width:980px;margin:0 auto;padding:22px 26px}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.space-between{justify-content:space-between}
.end{justify-content:flex-end}
#map{min-height:480px;height:60vh;border:1px solid var(--border);border-radius:10px;width:90%;margin:0 auto}
.toolbar{display:flex;gap:8px;align-items:center;margin:8px 0;flex-wrap:wrap}
.ad{margin:16px 0;display:flex;justify-content:center}
button{padding:8px 12px;border:1px solid var(--border);background:#f8f9fa;border-radius:8px;cursor:pointer;transition:background .2s ease,box-shadow .2s ease}
button:hover{background:#f1f5f9;box-shadow:0 8px 18px rgba(15,23,42,.08)}
.btn{padding:8px 12px;border:1px solid var(--border);border-radius:8px;text-decoration:none;color:inherit;background:#fff;cursor:pointer;display:inline-block;transition:background .2s ease,box-shadow .2s ease,color .2s ease,border-color .2s ease}
.btn:hover{box-shadow:0 8px 18px rgba(15,23,42,.08)}
.btn-primary{background:#111;color:#fff;border-color:#111}
.btn-primary:hover{background:#000;color:#fff;border-color:#000}
.secondary{background:#fff}
form#addForm{margin-top:12px;display:grid;grid-template-columns:1fr;gap:8px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
label{font-size:12px;color:var(--muted)}
input[type=text], textarea{padding:10px;border:1px solid var(--border);border-radius:8px;font-size:14px;width:100%}
textarea{min-height:80px}
.hint{font-size:12px;color:var(--muted)}
.msg{margin-top:8px;padding:8px 10px;border-radius:8px;border:1px solid var(--border)}
.msg.ok{border-color:var(--ok);color:var(--ok)}
.msg.err{border-color:var(--err);color:var(--err)}
.coords{font-size:12px;color:var(--muted)}
.jump{display:flex;gap:8px;align-items:center}
.jump input{padding:6px 10px;border:1px solid var(--border);border-radius:8px}
.panel{margin:16px auto 0;width:90%}
.after{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}
.after a{padding:8px 12px;border:1px solid var(--border);border-radius:8px;text-decoration:none;color:inherit;background:#fff}
.table-wrapper{width:100%;overflow-x:auto;margin-top:12px;border-radius:18px;background:#fff;box-shadow:0 24px 50px rgba(15,23,42,.08)}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table thead tr{background:#f8fafc}
.table th,.table td{padding:12px 16px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top;font-size:14px}
.table th:first-child{border-top-left-radius:18px}
.table th:last-child{border-top-right-radius:18px}
.table th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.table tbody tr:hover{background:#f1f5f9}
.books-table td:first-child{font-weight:600;font-size:15px}
.books-table td:nth-child(2){color:var(--muted)}
.books-table td:last-child{text-align:right}
.books-table thead tr{background:#1d4ed8}
.books-table thead th{color:#fff}
.books-table tbody tr:nth-child(odd){background:#fff}
.books-table tbody tr:nth-child(even){background:#f0f7ff}
.books-toolbar{gap:12px;margin-top:12px}
.books-toolbar input[type=search]{min-width:180px;max-width:320px}
.books-toolbar select{min-width:120px}
.books-summary{margin:12px 0}
.books-total{margin:8px 0 20px;font-size:14px;color:var(--muted)}
.status-pill{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border-radius:999px;font-size:12px;background:#e2e8f0;color:#111}
.status-pill--active{background:#dcfce7;color:#166534}
.status-pill--closed{background:#fee2e2;color:#991b1b}
.pagination{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0;align-items:center}
.pagination button{padding:6px 10px;border:1px solid var(--border);border-radius:8px;background:#fff;cursor:pointer}
.pagination button:hover:not(:disabled){background:#f1f5f9}
.pagination button.active{background:#111;color:#fff;border-color:#111;cursor:default}
.pagination button:disabled{opacity:.5;cursor:default}
