:root{
  --adm-bg:#f4f6fb;
  --adm-card:#ffffff;
  --adm-text:#0f172a;
  --adm-muted:#64748b;
  --adm-border:#e2e8f0;
  --adm-border-soft:rgba(15,23,42,.12);
  --adm-primary:#6b2c91;
  --adm-primary-dark:#4c1d73;
  --adm-success:#166534;
  --adm-warning:#92400e;
  --adm-danger:#991b1b;
  --adm-radius:18px;
  --adm-shadow:0 18px 45px rgba(15,23,42,.08);
}
*{box-sizing:border-box}
body{margin:0;background:var(--adm-bg);color:var(--adm-text);font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:var(--adm-primary);text-decoration:none}a:hover{text-decoration:underline}
.adm-shell{min-height:100vh;display:grid;grid-template-columns:280px 1fr}
.adm-sidebar{background:#111827;color:white;padding:24px;position:sticky;top:0;height:100vh}
.adm-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.adm-brandMark{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,var(--adm-primary),#a855f7);display:grid;place-items:center;font-weight:900}.adm-brand strong{display:block;font-size:16px}.adm-brand span{display:block;color:#cbd5e1;font-size:13px}
.adm-sideNav{display:grid;gap:8px}.adm-sideNav a{color:#e5e7eb;padding:11px 12px;border-radius:12px}.adm-sideNav a:hover{background:rgba(255,255,255,.08);text-decoration:none}
.adm-main{padding:28px;min-width:0}.adm-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}.adm-topbar h1{margin:0;font-size:28px;letter-spacing:-.03em}.adm-pageHint{margin:4px 0 0;color:var(--adm-muted)}
.adm-alert{padding:12px 14px;border-radius:14px;margin-bottom:16px;border:1px solid}.adm-alert--success{background:#ecfdf5;border-color:#bbf7d0;color:#166534}.adm-alert--error{background:#fef2f2;border-color:#fecaca;color:#991b1b}.adm-alert--info{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.adm-card,.adm-formCard,.adm-tableCard,.adm-detailCard,.adm-filtersCard{background:var(--adm-card);border:1px solid var(--adm-border-soft);border-radius:var(--adm-radius);box-shadow:var(--adm-shadow);padding:20px;margin-bottom:18px;min-width:0}.adm-card h2,.adm-formCard h2{margin:0 0 14px;font-size:19px}.adm-grid{display:grid;gap:18px}.adm-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}.adm-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.adm-stat{display:grid;gap:4px}.adm-stat strong{font-size:32px;letter-spacing:-.04em}.adm-stat span{color:var(--adm-muted);font-weight:700}
.adm-formGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.adm-formRow{display:grid;gap:6px}.adm-field--full,.adm-formRow--full{grid-column:1/-1}.adm-formLabel,.adm-fieldLabel{font-weight:800;color:#1f2937}.adm-required{color:var(--adm-danger)}.adm-input,input.adm-input,select.adm-input,textarea.adm-input{width:100%;border:1px solid var(--adm-border-soft);border-radius:12px;background:white;padding:11px 12px;min-height:44px;color:var(--adm-text);font:inherit}textarea.adm-input{min-height:120px;resize:vertical}.adm-input:focus{outline:none;border-color:rgba(107,44,145,.42);box-shadow:0 0 0 4px rgba(107,44,145,.10)}
.adm-formActions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:8px}.adm-btnPrimary,.adm-btnGhost,.adm-btnDanger,.adm-btnSmall{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;border:1px solid transparent;padding:11px 16px;font-weight:850;cursor:pointer;text-decoration:none;font:inherit}.adm-btnPrimary{background:var(--adm-primary);color:white}.adm-btnPrimary:hover{background:var(--adm-primary-dark);text-decoration:none}.adm-btnGhost{background:white;color:var(--adm-text);border-color:var(--adm-border)}.adm-btnGhost:hover{text-decoration:none;background:#f8fafc}.adm-btnDanger{background:#fee2e2;color:var(--adm-danger)}.adm-btnSmall{font-size:13px;padding:8px 10px;background:#f1f5f9;color:#0f172a}.adm-btnSmall:hover{text-decoration:none;background:#e2e8f0}
.adm-tableWrap{width:100%;overflow:auto}.adm-table{width:100%;border-collapse:collapse;table-layout:auto}.adm-table th,.adm-table td{padding:12px;border-bottom:1px solid var(--adm-border);text-align:left;vertical-align:top}.adm-table th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--adm-muted);background:#f8fafc}.adm-table tr:last-child td{border-bottom:0}.adm-tableMeta{color:var(--adm-muted);font-size:13px}.adm-link{font-weight:800;color:var(--adm-primary)}
.adm-statusPill{display:inline-flex;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:850;background:#e2e8f0;color:#334155}.adm-status--active,.adm-status--low{background:#dcfce7;color:#166534}.adm-status--draft,.adm-status--not-set{background:#e2e8f0;color:#334155}.adm-status--medium,.adm-status--review-due{background:#fef3c7;color:#92400e}.adm-status--high,.adm-status--critical{background:#fee2e2;color:#991b1b}.adm-status--archived,.adm-status--inactive{background:#f1f5f9;color:#475569}
.adm-navSub{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.adm-subItem{display:inline-flex;padding:10px 12px;border-radius:12px;border:1px solid var(--adm-border);background:white;color:#0f172a;font-weight:800}.adm-subItem.is-active{background:#111827;color:white;border-color:#111827}.adm-subItem:hover{text-decoration:none;background:#f8fafc}.adm-subItem.is-active:hover{background:#111827}
.adm-sectionBuilder{display:grid;gap:14px}.adm-builderSection{border:1px solid var(--adm-border);border-radius:16px;padding:14px;background:#fbfdff}.adm-builderQuestions{display:grid;gap:10px;margin-top:12px}.adm-builderQuestion{display:grid;grid-template-columns:1.2fr .6fr 1fr auto;gap:8px;align-items:end;padding:10px;border:1px solid var(--adm-border);border-radius:14px;background:white}.adm-checkGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.adm-checkGrid label{background:#f8fafc;border:1px solid var(--adm-border);border-radius:12px;padding:8px 10px}.adm-questionBlock{border:1px solid var(--adm-border);border-radius:16px;padding:16px;margin-top:14px;background:#fbfdff}.adm-questionBlock h3{margin:0 0 12px;font-size:17px}.adm-kv{display:grid;grid-template-columns:190px 1fr;gap:10px}.adm-kv div{padding:10px;border-bottom:1px solid var(--adm-border)}.adm-kv strong{color:#334155}
.adm-auth{min-height:100vh;display:grid;place-items:center;padding:24px}.adm-authCard{width:min(520px,100%);background:white;border:1px solid var(--adm-border);border-radius:24px;box-shadow:var(--adm-shadow);padding:26px}.adm-authCard h1{margin:0 0 6px}.adm-authCard p{color:var(--adm-muted);margin:0 0 20px}
@media(max-width:1000px){.adm-shell{grid-template-columns:1fr}.adm-sidebar{height:auto;position:relative}.adm-main{padding:18px}.adm-grid--2,.adm-grid--3,.adm-formGrid{grid-template-columns:1fr}.adm-builderQuestion{grid-template-columns:1fr}.adm-checkGrid{grid-template-columns:1fr}}
.adm-grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1000px){.adm-grid--4{grid-template-columns:1fr}}
.adm-grid--5{grid-template-columns:repeat(5,minmax(0,1fr))}
.adm-priceCard{display:grid;gap:10px}.adm-price{font-size:34px;font-weight:900;letter-spacing:-.04em}.adm-price span{font-size:14px;color:var(--adm-muted);font-weight:800}.adm-priceCard ul{margin:0;padding-left:18px;color:#334155}.adm-priceCard button[disabled]{opacity:.55;cursor:not-allowed}
.adm-autosave{display:inline-flex;margin:0 0 14px;padding:7px 10px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-weight:800;font-size:12px}
.adm-cqcBanner{margin:16px 0 0;padding:12px 14px;border-radius:14px;border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a}
.adm-miniMeta{font-size:12px;color:var(--adm-muted);font-weight:700;margin-top:3px}.adm-json{max-width:520px;white-space:pre-wrap;background:#0f172a;color:#e5e7eb;border-radius:12px;padding:12px;overflow:auto}.adm-inlineForm{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.adm-inputSmall{min-height:36px;padding:7px 9px;max-width:160px}.adm-status--paid,.adm-status--trialing{background:#dcfce7;color:#166534}.adm-status--past-due,.adm-status--unpaid,.adm-status--incomplete,.adm-status--payment-failed,.adm-status--suspended{background:#fee2e2;color:#991b1b}.adm-status--general,.adm-status--activity,.adm-status--family,.adm-status--review,.adm-status--health,.adm-status--medication,.adm-status--incident{background:#e0f2fe;color:#075985}
@media(max-width:1200px){.adm-grid--5{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.adm-grid--5{grid-template-columns:1fr}}

/* Responsive improvements */
.adm-spaceBetween{justify-content:space-between}.adm-filterGrid{display:grid;grid-template-columns:2fr repeat(5,minmax(130px,1fr)) auto;gap:12px;align-items:end}.adm-reportFilters .adm-input{max-width:220px}.adm-inlineLabel{display:grid;gap:6px;font-weight:800;color:#1f2937}.adm-statText{font-size:18px!important;letter-spacing:0!important}.adm-reportBars{display:grid;gap:10px}.adm-reportBar{display:grid;grid-template-columns:80px 1fr 42px;gap:10px;align-items:center}.adm-reportBar span{font-weight:800;color:#334155}.adm-reportBar div{height:12px;border-radius:999px;background:#e2e8f0;overflow:hidden}.adm-reportBar i{display:block;height:100%;border-radius:999px;background:var(--adm-primary)}
.adm-status--open,.adm-status--investigating,.adm-status--actions-required{background:#fef3c7;color:#92400e}.adm-status--closed{background:#dcfce7;color:#166534}.adm-status--notifiable{background:#fee2e2;color:#991b1b}.adm-status--fall,.adm-status--medication,.adm-status--safeguarding,.adm-status--behaviour,.adm-status--accident-injury,.adm-status--infection-control,.adm-status--property-damage,.adm-status--near-miss,.adm-status--other{background:#e0f2fe;color:#075985}
@media(max-width:1200px){.adm-filterGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.adm-filterGrid .adm-formActions{grid-column:1/-1}.adm-shell{grid-template-columns:240px 1fr}.adm-sidebar{padding:18px}.adm-main{padding:22px}}
@media(max-width:860px){body{font-size:15px}.adm-shell{display:block}.adm-sidebar{position:relative;height:auto;padding:14px}.adm-brand{margin-bottom:12px}.adm-sideNav{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity}.adm-sideNav a{white-space:nowrap;scroll-snap-align:start;background:rgba(255,255,255,.06)}.adm-main{padding:14px}.adm-topbar{display:block}.adm-topbar h1{font-size:23px}.adm-card,.adm-formCard,.adm-tableCard,.adm-detailCard,.adm-filtersCard{padding:15px;border-radius:15px;margin-bottom:14px}.adm-formGrid,.adm-grid--2,.adm-grid--3,.adm-grid--4,.adm-grid--5{grid-template-columns:1fr}.adm-filterGrid{grid-template-columns:1fr}.adm-formActions{align-items:stretch}.adm-formActions .adm-btnPrimary,.adm-formActions .adm-btnGhost,.adm-formActions .adm-btnDanger,.adm-formActions .adm-btnSmall,.adm-formActions button{width:100%}.adm-navSub{overflow-x:auto;flex-wrap:nowrap;padding-bottom:6px}.adm-subItem{white-space:nowrap}.adm-kv{grid-template-columns:1fr;gap:0}.adm-kv strong{padding:10px 10px 0}.adm-kv div{padding:4px 10px 10px}.adm-reportBar{grid-template-columns:68px 1fr 34px}.adm-auth{padding:14px}.adm-authCard{padding:20px;border-radius:18px}}
@media(max-width:700px){.adm-table--responsive{border-collapse:separate;border-spacing:0 10px}.adm-table--responsive thead{display:none}.adm-table--responsive tr{display:block;border:1px solid var(--adm-border);border-radius:14px;background:white;padding:8px}.adm-table--responsive td{display:grid;grid-template-columns:120px 1fr;gap:10px;border:0!important;padding:8px!important}.adm-table--responsive td::before{content:attr(data-label);font-weight:850;color:var(--adm-muted);font-size:12px;text-transform:uppercase;letter-spacing:.04em}.adm-tableWrap{overflow:visible}.adm-table:not(.adm-table--responsive){min-width:680px}.adm-json{max-width:100%;font-size:12px}.adm-btnPrimary,.adm-btnGhost,.adm-btnDanger,.adm-btnSmall{min-height:42px}.adm-input,input.adm-input,select.adm-input,textarea.adm-input{font-size:16px}.adm-builderQuestion{grid-template-columns:1fr}.adm-checkGrid{grid-template-columns:1fr}}
@media(max-width:430px){.adm-main{padding:10px}.adm-card,.adm-formCard,.adm-tableCard,.adm-detailCard,.adm-filtersCard{padding:12px}.adm-stat strong{font-size:27px}.adm-table--responsive td{grid-template-columns:1fr}.adm-table--responsive td::before{margin-bottom:-4px}.adm-brand strong{font-size:14px}.adm-brand span{font-size:12px}}
.adm-status--not_set{background:#e2e8f0;color:#334155}.adm-status--review_due{background:#fef3c7;color:#92400e}.adm-status--past_due,.adm-status--payment_failed{background:#fee2e2;color:#991b1b}.adm-status--actions_required{background:#fef3c7;color:#92400e}.adm-status--accident_injury,.adm-status--infection_control,.adm-status--property_damage,.adm-status--near_miss{background:#e0f2fe;color:#075985}
