/* NeighbourHub — Keys & Access professional workspace enhancement */
#main-content:has(#nh-key-search) {--key-navy:#102640;--key-gold:#c49b50;--key-muted:#687b91;}
#main-content:has(#nh-key-search) > .panel {border:0;background:transparent;box-shadow:none;padding:0;max-width:none;}
#main-content:has(#nh-key-search) > .panel > h2 {margin:0;font-size:27px;line-height:1.25;letter-spacing:-.6px;color:var(--key-navy);font-weight:800;}
#main-content:has(#nh-key-search) > .panel > h2 + p {color:var(--key-muted);font-size:13px;margin:7px 0 25px;line-height:1.6;max-width:800px;}
#main-content:has(#nh-key-search) .toolbar {display:flex;align-items:flex-end;gap:15px;flex-wrap:wrap;padding:20px 22px;margin:0 0 17px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;box-shadow:0 5px 22px rgba(15,39,68,.045);}
#main-content:has(#nh-key-search) .toolbar label {flex:1;min-width:230px;max-width:650px;font-size:11px;text-transform:uppercase;letter-spacing:.085em;font-weight:800;color:#556a80;}
#main-content:has(#nh-key-search) #nh-key-search {display:block;width:100%;height:43px;box-sizing:border-box;margin-top:9px;border-radius:9px;border:1px solid #dce4ee;padding:0 15px;background:#f8fafc;color:#152d47;font-size:13px;font-weight:500;letter-spacing:0;text-transform:none;transition:border .18s,box-shadow .18s;}
#main-content:has(#nh-key-search) #nh-key-search:focus {outline:none;border-color:#b88b41;box-shadow:0 0 0 3px rgba(196,155,80,.15);}
#main-content:has(#nh-key-search) #nh-key-add {height:43px;border-radius:9px;background:var(--key-gold);color:#101e32;box-shadow:none;font-weight:800;padding:0 19px;white-space:nowrap;}
#main-content:has(#nh-key-search) .toolbar + .small-print {border:1px solid #e0e9f3;background:#f1f6fb;color:#4d6480;border-radius:9px;padding:12px 15px;margin:0 0 20px;font-size:12px;display:flex;align-items:center;line-height:1.4;}
#main-content:has(#nh-key-search) .toolbar + .small-print:before {content:"🔒";display:inline-block;margin-right:9px;font-size:13px;}
#main-content:has(#nh-key-search) .nh-key-import {border:1px solid #e1e8f0;background:#fff;border-radius:12px;padding:17px 20px;margin:0 0 22px;display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:9px 14px;align-items:end;}
#main-content:has(#nh-key-search) .nh-key-import label {font-size:12px;font-weight:750;color:#233b53;}
#main-content:has(#nh-key-search) .nh-key-import input[type=file] {margin-top:10px;display:block;width:100%;max-width:850px;border:1px dashed #c6d2df;border-radius:8px;background:#f8fafc;padding:9px;font-size:12px;color:#495e73;box-sizing:border-box;}
#main-content:has(#nh-key-search) .nh-key-import > button {height:40px;border-radius:8px;font-weight:750;}
#main-content:has(#nh-key-search) .nh-key-import .small-print {grid-column:1 / -1;margin:1px 0 0;color:#718096;font-size:11px;}
#main-content:has(#nh-key-search) .nh-keys-table {background:#fff;border:1px solid #e1e8ef;border-radius:14px;overflow:auto;box-shadow:0 8px 27px rgba(15,39,68,.04);}
#main-content:has(#nh-key-search) .nh-keys-table table {width:100%;border-collapse:separate;border-spacing:0;min-width:850px;}
#main-content:has(#nh-key-search) .nh-keys-table th {background:#f3f6fa;border-bottom:1px solid #e3eaf2;color:#62768b;font-size:10px;line-height:1.5;letter-spacing:.1em;text-transform:uppercase;font-weight:850;padding:17px 18px;text-align:left;white-space:nowrap;}
#main-content:has(#nh-key-search) .nh-keys-table td {font-size:12px;color:#30465a;padding:14px 18px;border-bottom:1px solid #eef2f6;line-height:1.5;vertical-align:middle;}
#main-content:has(#nh-key-search) .nh-keys-table tbody tr {transition:background .16s;}
#main-content:has(#nh-key-search) .nh-keys-table tbody tr:hover {background:#f8fafc;}
#main-content:has(#nh-key-search) .nh-keys-table tbody tr:last-child td {border-bottom:0;}
#main-content:has(#nh-key-search) .nh-keys-table td:first-child strong {display:inline-flex;min-width:38px;height:33px;padding:0 9px;box-sizing:border-box;align-items:center;justify-content:center;border:1px solid #e7dcc3;border-radius:8px;color:#795d2c;background:#fcf7ed;font-size:12px;font-weight:800;}
#main-content:has(#nh-key-search) .nh-keys-table td:nth-child(2) {color:#142d47;font-weight:750;}
#main-content:has(#nh-key-search) .nh-keys-table td:nth-child(4) {font-weight:750;}
#main-content:has(#nh-key-search) .nh-keys-table td:nth-child(4):not(:empty) {color:#67778a;}
#main-content:has(#nh-key-search) .nh-keys-table td:last-child {text-align:right;white-space:nowrap;}
#main-content:has(#nh-key-search) .nh-keys-table [data-key-edit] {border:1px solid #d8e1eb;border-radius:8px;background:white;color:#173553;font-weight:750;font-size:11px;padding:9px 12px;white-space:nowrap;}
#main-content:has(#nh-key-search) .nh-keys-table [data-key-edit]:hover {border-color:#b78b44;background:#fffaf1;}
#main-content:has(#nh-key-search) .nh-key-dashboard {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:20px;}
#main-content:has(#nh-key-search) .nh-key-stat {background:#fff;border:1px solid #e1e8ef;border-radius:12px;padding:17px 18px;box-shadow:0 4px 15px rgba(16,38,64,.03);}
#main-content:has(#nh-key-search) .nh-key-stat span {display:block;color:#78899c;font-size:10px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;margin-bottom:11px;}
#main-content:has(#nh-key-search) .nh-key-stat strong {display:block;font-size:28px;letter-spacing:-.6px;color:#142c46;line-height:1;}
#main-content:has(#nh-key-search) .nh-key-stat:first-child {background:linear-gradient(135deg,#112c4a,#183b5b);border-color:#183b5b;}
#main-content:has(#nh-key-search) .nh-key-stat:first-child span {color:#a9bfd5;}
#main-content:has(#nh-key-search) .nh-key-stat:first-child strong {color:#fff;}
#main-content:has(#nh-key-search) .nh-key-section-title {display:flex;justify-content:space-between;align-items:center;margin:8px 0 12px;}
#main-content:has(#nh-key-search) .nh-key-section-title strong {font-size:15px;color:#17314c;font-weight:800;}
#main-content:has(#nh-key-search) .nh-key-section-title span {font-size:11px;color:#7b8ba0;}
#main-content:has(#nh-key-search) .nh-key-import-toggle {border:0;background:transparent;color:#8b6a36;text-decoration:underline;text-underline-offset:3px;font-size:12px;font-weight:750;cursor:pointer;}
#main-content:has(#nh-key-search) .nh-key-import[hidden] {display:none!important;}
@media(max-width:950px){#main-content:has(#nh-key-search) .nh-key-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#main-content:has(#nh-key-search) .nh-key-import{grid-template-columns:1fr}#main-content:has(#nh-key-search) .nh-key-dashboard{gap:9px}#main-content:has(#nh-key-search) .nh-key-stat{padding:13px}#main-content:has(#nh-key-search) .nh-key-stat strong{font-size:23px}}

#main-content:has(#nh-key-search) .nh-key-status{display:inline-flex;align-items:center;gap:6px;border:1px solid #e4eaf0;border-radius:100px;padding:5px 11px;background:#f4f6f9;color:#64758a;font-size:11px;font-weight:800;white-space:nowrap;}
#main-content:has(#nh-key-search) .nh-key-status:before{content:"";height:6px;width:6px;border-radius:50%;background:#95a3b4;display:inline-block;}
#main-content:has(#nh-key-search) .nh-key-status[data-status="in office"],#main-content:has(#nh-key-search) .nh-key-status[data-status="returned"]{border-color:#c8e8da;background:#eaf8f1;color:#267450;}
#main-content:has(#nh-key-search) .nh-key-status[data-status="in office"]:before,#main-content:has(#nh-key-search) .nh-key-status[data-status="returned"]:before{background:#2f9868;}
#main-content:has(#nh-key-search) .nh-key-status[data-status="issued"]{border-color:#f3dfb7;background:#fff7e7;color:#987025;}
#main-content:has(#nh-key-search) .nh-key-status[data-status="issued"]:before{background:#cb9a3f;}
#main-content:has(#nh-key-search) .nh-key-status[data-status="missing"]{border-color:#f3cccc;background:#fff0f0;color:#aa3b3b;}
#main-content:has(#nh-key-search) .nh-key-status[data-status="missing"]:before{background:#d44c4c;}

#main-content:has(#nh-key-search) .nh-key-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;}
#main-content:has(#nh-key-search) .nh-key-filters button{border:1px solid #dce5ee;background:white;color:#5c7087;border-radius:18px;padding:8px 14px;font-size:11px;font-weight:750;cursor:pointer;}
#main-content:has(#nh-key-search) .nh-key-filters button.active{background:#183450;color:white;border-color:#183450;}
#main-content:has(#nh-key-search) .nh-key-row-actions{display:flex;gap:5px;justify-content:flex-end;flex-wrap:wrap;}
#main-content:has(#nh-key-search) .nh-keys-table{overflow-x:auto;}
#main-content:has(#nh-key-search) .nh-keys-table table{min-width:1080px;}
#main-content:has(#nh-key-search) .nh-keys-table td:last-child{min-width:275px;}
#main-content:has(#nh-key-search) .nh-key-status[data-status="available"]{color:#607188;background:#f3f5f9;}
#main-content:has(#nh-key-search) .nh-key-row-actions button{padding:6px 9px;font-size:10px;}
#main-content:has(#nh-key-search) .nh-key-row-actions [data-key-action="return"]{background:#eaf8f1;border-color:#b6dfcc;color:#1d7950;}
#main-content:has(#nh-key-search) .nh-key-row-actions [data-key-action="checkout"]{background:#fff8e9;border-color:#efd9aa;color:#84602c;}
