.admin-shell{--navy:#0c2340;--blue:#1268c5;--line:#e2eaf5;--muted:#52647c;min-height:100vh;background:#f3f7fd}
.admin-sidebar{position:fixed;inset:0 auto 0 0;width:248px;display:flex;flex-direction:column;gap:24px;padding:22px 16px;background:var(--navy);color:white;overflow:auto}
.admin-brand{display:block;margin:0;background:white;border-radius:12px;padding:8px}
.admin-brand img{display:block;width:100%;height:auto}
.admin-sidebar nav{display:grid;gap:6px}
.admin-sidebar nav a{display:flex;align-items:center;gap:12px;min-height:44px;margin:0;padding:8px 12px;color:#e9f3ff;text-decoration:none;border-radius:8px}
.admin-sidebar nav a:hover{background:#173d65}
.admin-sidebar nav a[aria-current=page]{background:var(--blue);color:white;font-weight:700}
.admin-sidebar nav span{width:20px;text-align:center;font-size:1.15rem}
.admin-account{margin-top:auto;padding:16px 8px 0;border-top:1px solid #36526d;overflow-wrap:anywhere}
.admin-mobile{display:none}
.admin-content{margin:0 0 0 248px;max-width:none;min-width:0;padding:clamp(14px,2.2vw,32px)}
.admin-content h1{font-size:clamp(1.5rem,2.6vw,1.875rem);line-height:1.3;margin:0 0 4px}
.admin-content h2{font-size:1.16rem;line-height:1.4;margin:0 0 12px}
.admin-page-heading p{margin:0 0 16px;color:var(--muted)}
.admin-content article,.admin-content fieldset,.admin-content .reception-panel{border-color:var(--line);border-radius:14px;background:white;box-shadow:0 3px 12px #0c234009}
.admin-content button,.admin-content input,.admin-content select{border-radius:8px}
.admin-content button:not(.secondary){background:var(--blue)}
.admin-content button:not(.secondary):hover{background:#0b549f}
.admin-kpis,.admin-dashboard-grid,.admin-actions{display:grid;gap:16px}
.admin-kpis{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(200px,1.3fr);margin:16px 0}
.admin-kpis article{margin:0;min-width:0}
.admin-kpis strong{display:block;font-size:2rem;line-height:1.3}
.admin-kpis strong span{font-size:.9rem}
.admin-kpis small,.admin-visit-table small,.admin-event small{display:block;color:var(--muted)}
.admin-bars{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center;font-size:.74rem}
.admin-bars progress{display:block;width:14px;height:38px;margin:auto;writing-mode:vertical-lr;direction:rtl;accent-color:#4b92dc}
.admin-bars .is-today progress{accent-color:#0b62bf}
.admin-dashboard-grid.has-context{grid-template-columns:minmax(0,1.75fr) minmax(250px,1fr)}
.admin-dashboard-grid article{margin:0 0 16px;min-width:0}
.admin-dashboard-primary,.admin-dashboard-context{min-width:0}
.admin-card-heading,.admin-facility-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.admin-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px}
.admin-visit-table{width:100%;border-collapse:collapse;font-size:.9rem;min-width:620px;text-align:left}
.admin-visit-table :is(td,th){padding:10px;border-bottom:1px solid var(--line)}
.admin-visit-table thead{background:#edf4fe}
.admin-visit-table tr:last-child td,.admin-visit-table tr:last-child th[scope=row]{border-bottom:0}
.admin-facility-row,.admin-event{padding:10px 0;border-bottom:1px solid var(--line);margin:0}
.admin-facility-row span{white-space:nowrap}
.admin-facility-row small{color:var(--muted)}
.admin-event{display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:start;gap:8px;font-size:.86rem;overflow-wrap:anywhere}
.admin-actions{grid-template-columns:repeat(auto-fit,minmax(125px,1fr))}
.admin-actions a{display:flex;align-items:center;padding:12px;margin:0;min-height:58px;border:1px solid var(--line);border-radius:10px;background:#f5f9ff;font-weight:700}
@media(max-width:1150px){.admin-dashboard-grid.has-context{grid-template-columns:minmax(0,1fr)}.admin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.admin-sidebar{position:static;width:auto;display:grid;grid-template-columns:minmax(0,180px) 1fr;align-items:center;gap:10px;padding:10px 16px}.admin-content{margin:0}.admin-desktop{display:none}.admin-mobile{display:block}.admin-mobile summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:end}.admin-mobile[open]{grid-column:1/-1;grid-row:2}.admin-account{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:0 8px}.admin-account button{margin:0}}
@media(max-width:540px){.admin-kpis{grid-template-columns:minmax(0,1fr)}.admin-card-heading{flex-wrap:wrap}}

.admin-overview-heading,.admin-top-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.admin-overview-heading{justify-content:space-between;margin-bottom:12px}
.admin-overview-heading .admin-page-heading p{margin:3px 0 0}
.admin-top-controls select,.admin-date{padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:white;font-weight:650}
.admin-top-controls select{max-width:100%}
.admin-filter-panel{margin:0 0 12px}
.admin-filter-panel summary{cursor:pointer;color:var(--blue);font-weight:650;padding:5px 0}
.admin-visit-table{min-width:0}
.admin-visit-table :is(td,th){padding:8px;overflow-wrap:anywhere}
.admin-visit-table td:first-child{white-space:nowrap}
.admin-visit-table td button{min-height:32px;padding:3px 9px;font-size:.82rem}
.admin-actions a{justify-content:flex-start;gap:10px;text-align:left;min-height:75px;background:white;text-decoration:none}
.admin-actions a:hover{background:#edf5ff;border-color:#9ec8f3}
.admin-actions svg{flex:0 0 36px;width:36px;height:36px;padding:6px;border-radius:9px;background:#eaf3ff;color:var(--blue);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.admin-actions span{min-width:0;overflow-wrap:anywhere}
.admin-kpis article{border-top:3px solid #d4e7ff}
@media(min-width:1040px){
  .admin-dashboard-grid.has-context{grid-template-columns:minmax(0,1.8fr) minmax(265px,1fr)}
  .admin-kpis{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(175px,1.2fr)}
}
@media(max-width:700px){.admin-visit-table{min-width:560px}.admin-date{font-size:.85rem}}

.admin-kpi-icon{position:relative;padding-left:68px;padding-block:18px}
.admin-kpi-icon svg{position:absolute;left:15px;top:18px;width:39px;height:39px;padding:8px;border-radius:12px;background:#eaf3ff;color:#1268c5}
.admin-kpi-icon small:first-of-type{font-weight:700;color:#14243d}
.admin-dashboard-context article{padding:14px}
@media(min-width:1180px){.admin-sidebar{width:248px}.admin-content{margin-left:248px}.admin-kpis article{min-height:112px}}
.admin-sidebar nav .admin-qr-summary{display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 12px;border-radius:8px;color:#e9f3ff;cursor:pointer;list-style:none;white-space:nowrap;font-size:.9rem}
.admin-sidebar nav .admin-qr-summary::marker{content:""}
.admin-sidebar nav .admin-qr-summary::-webkit-details-marker{display:none}
.admin-sidebar nav .admin-qr-summary:hover{background:#173d65}
