:root{
  --aic-dark-purple:#6A2875;
  --aic-medium-purple:#783184;
  --aic-light-mauve:#B081B9;
  --purple:#6A2875;
  --purple2:#783184;
  --teal:#B081B9;
  --bg:#f8f6fa;
  --text:#202033;
  --muted:#6b7280;
  --border:#eadff0;
  --card:#fff;
  --danger:#b42318;
  --success:#146c43;
  --warning:#8a5a00;
  --soft-purple:rgba(176,129,185,.18);
  --shadow:rgba(106,40,117,.08);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--aic-dark-purple);text-decoration:none;transition:color .18s ease,background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
a:hover{color:var(--aic-medium-purple);text-decoration:none}
.app-shell{display:flex;min-height:100vh;width:100%}
.sidebar{width:300px;background:linear-gradient(180deg,var(--aic-dark-purple),#3b1244)!important;color:white!important;position:fixed;left:0;top:0;bottom:0;overflow-y:auto;padding:18px 14px;z-index:50;box-shadow:12px 0 30px rgba(20,10,32,.10)}
.brand{display:flex;align-items:center;gap:12px;margin-bottom:18px;color:white}
.brand.large{color:var(--text);margin-bottom:20px}
.brand-mark{width:42px;height:42px;border-radius:13px;background:#fff;color:var(--aic-dark-purple);font-weight:800;display:grid;place-items:center;box-shadow:0 8px 22px rgba(0,0,0,.16);flex:0 0 auto;overflow:hidden;border:1px solid rgba(176,129,185,.38)}
.brand-logo{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit;background:#fff}
.brand-logo-large{width:64px;height:64px;border-radius:18px;border:1px solid var(--border);box-shadow:0 10px 28px rgba(106,40,117,.12)}
.brand strong{display:block;color:white;font-size:16px;line-height:1.1}.brand.large strong{color:var(--text)}
.brand small{display:block;color:#f3e8f6;opacity:.95;margin-top:4px}.brand.large small{color:var(--muted)}
.sidebar nav{display:block;margin-top:10px}
.nav-link{display:flex!important;align-items:center;gap:9px;width:100%;padding:10px 12px;border-radius:12px;color:#fbf6fd!important;margin:3px 0;font-size:14px;line-height:1.25;white-space:normal;transition:background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease}
.nav-link:before{content:"";width:7px;height:7px;border-radius:99px;background:rgba(255,255,255,.45);flex:0 0 auto;transition:background-color .18s ease,box-shadow .18s ease}
.nav-link:hover{background:rgba(176,129,185,.28);color:#fff!important;box-shadow:inset 3px 0 0 var(--aic-light-mauve)}
.nav-link.active{background:rgba(176,129,185,.34);color:#fff!important;box-shadow:inset 3px 0 0 var(--aic-light-mauve)}
.nav-link.active:before{background:var(--aic-light-mauve);box-shadow:0 0 0 3px rgba(176,129,185,.18)}
.main{margin-left:300px;flex:1;min-width:0;max-width:calc(100vw - 300px);overflow-x:hidden}
.topbar{height:72px;background:white;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:16px;padding:0 24px;position:sticky;top:0;z-index:30}
.menu-btn{display:none}.search{flex:1;min-width:120px}
.search input{width:100%;max-width:620px;border:1px solid var(--border);border-radius:14px;padding:12px 15px;font:inherit;background:#fff;transition:border-color .18s ease,box-shadow .18s ease}
.top-actions{display:flex;align-items:center;gap:14px;white-space:nowrap}.content{padding:28px;max-width:100%;overflow-x:hidden}
h1{margin:0 0 8px;font-size:30px}h2{margin-top:0;font-size:18px}.muted{color:var(--muted)}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:22px 0}.card{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:20px;box-shadow:0 10px 30px var(--shadow);transition:box-shadow .18s ease,border-color .18s ease}
.card:hover{border-color:rgba(176,129,185,.55);box-shadow:0 14px 34px rgba(106,40,117,.10)}
.metric span{display:block;color:var(--muted);font-size:13px}.metric strong{display:block;font-size:34px;margin-top:8px;color:var(--aic-dark-purple)}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0}.grid-2>.card{min-width:0;max-width:100%}.form{display:grid;gap:12px}.form label{display:grid;gap:6px;font-size:14px;color:var(--muted)}
input,textarea,select{border:1px solid var(--border);border-radius:12px;padding:11px 13px;font:inherit;background:#fff;transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease}
.form input,.form select,.form textarea{width:100%;max-width:100%}textarea{min-height:90px}
input:hover,textarea:hover,select:hover,.search input:hover{border-color:var(--aic-light-mauve)}
input:focus,textarea:focus,select:focus,.search input:focus{outline:none;border-color:var(--aic-medium-purple);box-shadow:0 0 0 3px rgba(176,129,185,.22)}
.btn,button,input[type="submit"],input[type="button"]{border:1px solid var(--border);background:#fff;color:var(--aic-dark-purple);border-radius:12px;padding:11px 15px;font-weight:700;cursor:pointer;transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.btn:hover,button:hover,input[type="submit"]:hover,input[type="button"]:hover{border-color:var(--aic-medium-purple);background:rgba(176,129,185,.14);color:var(--aic-dark-purple);box-shadow:0 8px 18px rgba(106,40,117,.12)}
.btn:active,button:active,input[type="submit"]:active,input[type="button"]:active{transform:translateY(1px)}
.btn.primary,button.primary,input[type="submit"].primary{background:var(--aic-dark-purple);border-color:var(--aic-dark-purple);color:white}
.btn.primary:hover,button.primary:hover,input[type="submit"].primary:hover{background:var(--aic-medium-purple);border-color:var(--aic-medium-purple);color:white}
.btn.secondary,.btn.edit{background:var(--aic-medium-purple);border-color:var(--aic-medium-purple);color:#fff}.btn.secondary:hover,.btn.edit:hover{background:var(--aic-dark-purple);border-color:var(--aic-dark-purple);color:#fff}
.btn.soft{background:rgba(176,129,185,.18);border-color:rgba(176,129,185,.55);color:var(--aic-dark-purple)}.btn.soft:hover{background:rgba(176,129,185,.30)}
.btn.danger,.btn.delete{background:#fff;border-color:#ffd3cf;color:var(--danger)}.btn.danger:hover,.btn.delete:hover{background:#fff1f0;color:var(--danger);border-color:#ffb4ac}
.btn[disabled],button[disabled],.btn.disabled{opacity:.55;cursor:not-allowed;box-shadow:none;transform:none}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px;border-bottom:1px solid var(--border);text-align:left}th{font-size:12px;color:var(--muted);text-transform:uppercase}tbody tr{transition:background-color .18s ease}tbody tr:hover{background:rgba(176,129,185,.08)}
.status,.badge{display:inline-block;border-radius:999px;padding:5px 10px;background:rgba(176,129,185,.20);color:var(--aic-dark-purple);font-size:12px;font-weight:700}.top-actions .badge{background:rgba(176,129,185,.24);color:var(--aic-dark-purple)}
.activity{padding-left:18px}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#fbf8fc,rgba(176,129,185,.28))}.login-card{width:min(460px,92vw);background:white;border-radius:24px;border:1px solid var(--border);box-shadow:0 24px 70px rgba(106,40,117,.16);padding:32px;display:grid;gap:14px}.alert.danger{background:#fff1f0;color:var(--danger);border:1px solid #ffd3cf;border-radius:12px;padding:10px}.alert.success{background:#f0fff7;color:var(--success);border:1px solid #bfebd3;border-radius:12px;padding:10px}.alert.warning{background:#fff8e8;color:var(--warning);border:1px solid #ffe0a3;border-radius:12px;padding:10px}canvas{width:100%;height:220px}
@media(max-width:1100px){.cards{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}}
@media(max-width:820px){.sidebar{transform:translateX(-103%);transition:.2s}.sidebar.open{transform:none}.main{margin-left:0;max-width:100vw}.menu-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:#fff;border-radius:10px;font-size:22px;width:42px;height:42px}.topbar{padding:0 14px}.top-actions span:not(.badge){display:none}.content{padding:18px}.cards{grid-template-columns:1fr}h1{font-size:24px}.search input{max-width:none}}

/* AIC sidebar/login logo safety fix - do not alter navigation or permissions */
.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#fbf8fc,rgba(176,129,185,.28));padding:24px}
.login-card{width:min(460px,92vw);background:#fff;border-radius:24px;border:1px solid var(--border);box-shadow:0 24px 70px rgba(106,40,117,.16);padding:32px;display:grid;gap:14px;position:relative;overflow:hidden}
.login-logo-wrap{width:86px;height:86px;border-radius:22px;background:#fff;border:1px solid var(--border);box-shadow:0 10px 28px rgba(106,40,117,.12);display:flex;align-items:center;justify-content:center;overflow:hidden;padding:6px;margin:0 0 4px}
.login-logo{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;position:static!important;transform:none!important;margin:0!important;padding:0!important;background:#fff!important}
.login-card .brand-logo,.login-page .brand-logo{max-width:86px!important;max-height:86px!important;object-fit:contain!important;position:static!important;transform:none!important;margin:0!important}
.login-brand-text strong{display:block;color:var(--text);font-size:18px;line-height:1.15}.login-brand-text small{display:block;color:var(--muted);margin-top:4px}
.login-card label{display:grid;gap:6px;color:var(--muted);font-size:14px}.login-card input{width:100%}.login-card .btn{width:100%}

/* AIC Services form alignment and NDIS-style section readability hotfix
   Scope: Users & Staff, Participants, Houses, Employment Documents, Shift Reports, Incident Reports.
   This is visual-only: no workflow, permission, database, sidebar, or navigation logic is changed. */
:root{
  --ndis-blue:#f0f7ff;
  --ndis-green:#f0fff7;
  --ndis-purple:#f8f1fb;
  --ndis-yellow:#fff9e9;
  --ndis-orange:#fff5ed;
  --ndis-grey:#f7f7fa;
  --ndis-cream:#fffdf5;
  --ndis-red:#fff1f0;
  --aic-section-border:#eadff0;
}

.content{line-height:1.45}
.content .card{overflow:hidden}
.content .card h2,.content .card h3{margin:0 0 14px;color:#111936;line-height:1.25}
.content .card p{line-height:1.55}

/* Keep all form controls aligned and readable without changing page workflows. */
.content form{max-width:100%}
.content form .form-row,
.content form .form-grid,
.content form .grid,
.content form .fields-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px 16px;
  align-items:start;
}
.content form label{min-width:0;line-height:1.35;font-weight:500;color:#4f5b6c}
.content form label > input,
.content form label > select,
.content form label > textarea{margin-top:6px}
.content input,
.content select,
.content textarea{min-height:44px;line-height:1.35;vertical-align:middle}
.content textarea{min-height:96px;resize:vertical}
.content input[type="checkbox"],
.content input[type="radio"]{min-height:auto;width:auto;margin-right:6px;vertical-align:middle}
.content input[type="file"]{padding:10px;background:#fff}
.content select{appearance:auto;background:#fff}
.content .btn,
.content button,
.content input[type="submit"],
.content input[type="button"]{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1.2;white-space:nowrap}
.content .actions,.content .form-actions,.content .button-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.content .alert{line-height:1.45}

/* Section style helpers used by current and future form blocks. */
.form-section,
.section-card,
.details-section,
.profile-section,
.report-section,
.upload-section,
.approval-section{
  border:1px solid var(--aic-section-border);
  border-radius:16px;
  padding:16px;
  margin:14px 0;
  box-shadow:0 8px 22px rgba(106,40,117,.05);
}
.form-section h3,.section-card h3,.details-section h3,.profile-section h3,.report-section h3,.upload-section h3,.approval-section h3{margin-top:0;color:#111936}
.form-section:nth-of-type(8n+1),.section-card:nth-of-type(8n+1),.details-section:nth-of-type(8n+1),.report-section:nth-of-type(8n+1){background:var(--ndis-blue)}
.form-section:nth-of-type(8n+2),.section-card:nth-of-type(8n+2),.details-section:nth-of-type(8n+2),.report-section:nth-of-type(8n+2){background:var(--ndis-green)}
.form-section:nth-of-type(8n+3),.section-card:nth-of-type(8n+3),.details-section:nth-of-type(8n+3),.report-section:nth-of-type(8n+3){background:var(--ndis-purple)}
.form-section:nth-of-type(8n+4),.section-card:nth-of-type(8n+4),.details-section:nth-of-type(8n+4),.report-section:nth-of-type(8n+4){background:var(--ndis-yellow)}
.form-section:nth-of-type(8n+5),.section-card:nth-of-type(8n+5),.details-section:nth-of-type(8n+5),.report-section:nth-of-type(8n+5){background:var(--ndis-orange)}
.form-section:nth-of-type(8n+6),.section-card:nth-of-type(8n+6),.details-section:nth-of-type(8n+6),.report-section:nth-of-type(8n+6),.upload-section{background:var(--ndis-grey)}
.form-section:nth-of-type(8n+7),.section-card:nth-of-type(8n+7),.details-section:nth-of-type(8n+7),.report-section:nth-of-type(8n+7){background:var(--ndis-cream)}
.form-section:nth-of-type(8n+8),.section-card:nth-of-type(8n+8),.details-section:nth-of-type(8n+8),.report-section:nth-of-type(8n+8),.approval-section{background:var(--ndis-purple)}

/* Apply soft backgrounds to form cards in the affected modules without editing their logic. */
.content > .grid-2 > .card:nth-child(1),
.content > .card:nth-of-type(1){background:linear-gradient(180deg,#fff,var(--ndis-blue))}
.content > .grid-2 > .card:nth-child(2),
.content > .card:nth-of-type(2){background:linear-gradient(180deg,#fff,var(--ndis-green))}
.content > .grid-2 > .card:nth-child(3),
.content > .card:nth-of-type(3){background:linear-gradient(180deg,#fff,var(--ndis-purple))}
.content > .grid-2 > .card:nth-child(4),
.content > .card:nth-of-type(4){background:linear-gradient(180deg,#fff,var(--ndis-yellow))}
.content > .grid-2 > .card:nth-child(5),
.content > .card:nth-of-type(5){background:linear-gradient(180deg,#fff,var(--ndis-orange))}

/* Improve dense generated forms that currently place controls on the same line. */
.content .card form:not(.inline-form){display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px 16px;align-items:start}
.content .card form:not(.inline-form) h2,
.content .card form:not(.inline-form) h3,
.content .card form:not(.inline-form) .alert,
.content .card form:not(.inline-form) .form-section,
.content .card form:not(.inline-form) .section-card,
.content .card form:not(.inline-form) .details-section,
.content .card form:not(.inline-form) .report-section,
.content .card form:not(.inline-form) .approval-section,
.content .card form:not(.inline-form) .upload-section,
.content .card form:not(.inline-form) textarea,
.content .card form:not(.inline-form) .full,
.content .card form:not(.inline-form) .full-width,
.content .card form:not(.inline-form) .actions,
.content .card form:not(.inline-form) .form-actions{grid-column:1/-1}
.content .card form:not(.inline-form) label{display:grid;gap:6px;margin:0}
.content .card form:not(.inline-form) label:has(textarea){grid-column:1/-1}

/* Required indicators and validation messages. */
.content label.required::after,
.content .required label::after{content:" *";color:var(--danger);font-weight:800}
.content .error,.content .validation-error,.content .alert.danger{background:var(--ndis-red);border-color:#ffccc7;color:#b42318}
.content .success,.content .alert.success{background:var(--ndis-green)}

/* Tables and lists across affected modules. */
.table-wrap{border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:0 8px 20px rgba(106,40,117,.04)}
.table-wrap table{min-width:760px}
table th{background:#fbf8fc;color:#546174;font-weight:800;letter-spacing:.02em;white-space:nowrap}
table td{vertical-align:top;line-height:1.45;word-break:normal;overflow-wrap:anywhere}
table td .btn,table td button{margin:2px;min-height:36px;padding:8px 12px}
tbody tr:hover{background:rgba(176,129,185,.10)}
.status.active,.badge.active,.status.approved,.badge.approved{background:#e8fff2;color:#106b3a}
.status.inactive,.status.deleted,.status.archived,.badge.inactive,.badge.deleted,.badge.archived{background:#f2f3f6;color:#596273}
.status.pending,.status.pending-approval,.badge.pending,.badge.pending-approval{background:#fff6df;color:#8a5a00}
.status.rejected,.status.expired,.badge.rejected,.badge.expired{background:var(--ndis-red);color:#b42318}

/* Readability for linked reports, uploads and profile blocks. */
.content ul{line-height:1.6}
.content .profile-summary,
.content .linked-reports,
.content .documents-panel,
.content .approval-panel{border:1px solid var(--border);border-radius:16px;padding:16px;background:var(--ndis-grey);margin:14px 0}
.content .linked-reports{background:var(--ndis-blue)}
.content .documents-panel{background:var(--ndis-grey)}
.content .approval-panel{background:var(--ndis-purple)}

/* Mobile/tablet: stack fields neatly and keep tables usable. */
@media(max-width:980px){
  .content .card form:not(.inline-form),
  .content form .form-row,
  .content form .form-grid,
  .content form .grid,
  .content form .fields-grid{grid-template-columns:1fr}
  .content .actions,.content .form-actions,.content .button-row{align-items:stretch}
  .content .actions .btn,.content .form-actions .btn,.content .button-row .btn,
  .content .actions button,.content .form-actions button,.content .button-row button{width:100%}
  .grid-2{grid-template-columns:1fr!important}
  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media(max-width:620px){
  .content{padding:16px}
  .content .card{padding:16px;border-radius:16px}
  input,textarea,select{font-size:16px}
  .content .btn,.content button,.content input[type="submit"],.content input[type="button"]{width:100%}
}

/* Medicine Chart layout emergency alignment fix
   Purpose: prevent the broad form readability rules above from overriding the
   scoped Medicine Chart grid/section layout. This changes Medicine Chart CSS only.
   No workflow, database, permission, sidebar, or navigation logic is changed. */
.content .medicine-page .card form.medicine-form,
.content .medicine-page form.medicine-form,
.content .medicine-page form#medicine-admin-form{
  display:block !important;
  grid-template-columns:none !important;
  gap:0 !important;
}
.content .medicine-page .medicine-two-column{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:18px !important;
  align-items:start !important;
  margin:18px 0 !important;
}
.content .medicine-page .medicine-card{
  overflow:hidden !important;
  background:#fff !important;
}
.content .medicine-page .medicine-section{
  display:block !important;
  border:1px solid #eadcf0 !important;
  border-radius:16px !important;
  padding:16px !important;
  margin:0 0 16px 0 !important;
  box-shadow:none !important;
}
.content .medicine-page .medicine-section.participant-details{background:#f3f8ff !important;}
.content .medicine-page .medicine-section.medication-details{background:#faf4fc !important;}
.content .medicine-page .medicine-section.admin-details{background:#f3fbf5 !important;}
.content .medicine-page .medicine-section.reason-details{background:#fff4f4 !important;border-color:#f5c7c7 !important;}
.content .medicine-page .medicine-section.notes-details{background:#fffdf7 !important;}
.content .medicine-page .medicine-section.actions-section{background:#fff !important;}
.content .medicine-page .medicine-section h3{
  margin:0 0 12px 0 !important;
  font-size:16px !important;
  color:#271033 !important;
}
.content .medicine-page .medicine-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:14px 16px !important;
  align-items:start !important;
}
.content .medicine-page .medicine-grid.grid-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
.content .medicine-page .medicine-grid.grid-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
.content .medicine-page .medicine-grid .full,
.content .medicine-page .medicine-form .full{
  grid-column:1/-1 !important;
}
.content .medicine-page label{
  display:block !important;
  margin:0 !important;
  min-width:0 !important;
  font-weight:600 !important;
  color:#3c3144 !important;
  line-height:1.35 !important;
}
.content .medicine-page input,
.content .medicine-page select,
.content .medicine-page textarea{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  min-height:46px !important;
  margin-top:6px !important;
  box-sizing:border-box !important;
}
.content .medicine-page textarea{
  min-height:92px !important;
  resize:vertical !important;
}
.content .medicine-page .medicine-actions,
.content .medicine-page .form-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
  margin-top:0 !important;
}
.content .medicine-page .medicine-actions .btn,
.content .medicine-page .medicine-section.actions-section .btn,
.content .medicine-page .medicine-section.actions-section button{
  width:auto !important;
}
.content .medicine-page .table-wrap{
  overflow:auto !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
.content .medicine-page .medicine-table{
  width:100% !important;
  min-width:980px !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
.content .medicine-page .medicine-table th{
  white-space:nowrap !important;
  background:#fbf7fc !important;
  color:#54405c !important;
}
.content .medicine-page .medicine-table th,
.content .medicine-page .medicine-table td{
  vertical-align:top !important;
  padding:12px 10px !important;
  border-bottom:1px solid #eee3f2 !important;
}
.content .medicine-page .medicine-table td.reason-notes{
  max-width:360px !important;
  white-space:normal !important;
  word-break:break-word !important;
}
.content .medicine-page .medicine-no-row{background:#fff1f1 !important;}
.content .medicine-page .medicine-no-row td{border-bottom-color:#f2c7c7 !important;}
.content .medicine-page .medicine-no-row .status{background:#ffe0e0 !important;color:#8a1111 !important;}
.content .medicine-page .status.medicine-status-yes{background:#e7f7ed !important;color:#136b2d !important;}
.content .medicine-page .status.medicine-status-na{background:#f2eff7 !important;color:#4b3c5e !important;}
.content .medicine-page .status.medicine-status-no{background:#ffe0e0 !important;color:#8a1111 !important;}
.content .medicine-page .small-form{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
  background:#fafafa !important;
  border:1px solid #eee3f2 !important;
  border-radius:12px !important;
  margin-top:10px !important;
  padding:12px !important;
  min-width:280px !important;
}
@media(max-width:1100px){
  .content .medicine-page .medicine-two-column{grid-template-columns:1fr !important;}
  .content .medicine-page .medicine-grid.grid-4{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .content .medicine-page .medicine-grid.grid-3{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media(max-width:700px){
  .content .medicine-page .medicine-grid,
  .content .medicine-page .medicine-grid.grid-3,
  .content .medicine-page .medicine-grid.grid-4{grid-template-columns:1fr !important;}
  .content .medicine-page .medicine-section{padding:14px !important;}
  .content .medicine-page .form-actions,
  .content .medicine-page .medicine-actions{flex-direction:column !important;align-items:stretch !important;}
  .content .medicine-page .form-actions .btn,
  .content .medicine-page .medicine-actions .btn,
  .content .medicine-page button.btn{width:100% !important;justify-content:center !important;}
  .content .medicine-page .table-wrap{overflow-x:auto !important;}
}

/* Medicine Chart Active Medications table layout fix - 20260710
   Scoped only to Medicine Chart pages. Prevents narrow columns from breaking
   medicine names, times and status text into individual characters while still
   allowing horizontal scrolling on smaller screens. */
.content .medicine-page .table-wrap,
.content .medicine-page .responsive-table,
.content .medicine-page .table-responsive{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
  -webkit-overflow-scrolling:touch !important;
}
.content .medicine-page table{
  width:max-content !important;
  min-width:1500px !important;
  max-width:none !important;
  table-layout:auto !important;
  border-collapse:collapse !important;
}
.content .medicine-page table th,
.content .medicine-page table td{
  padding:10px 12px !important;
  vertical-align:middle !important;
  line-height:1.35 !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
  white-space:normal !important;
}
.content .medicine-page table th{
  white-space:nowrap !important;
  text-align:left !important;
  letter-spacing:.02em !important;
}
/* Active Medications table columns: Participant, House, Time, Medication, Dose, Route,
   Frequency, PRN, Instructions, Created By, Created, Status, Actions. */
.content .medicine-page table th:nth-child(1),
.content .medicine-page table td:nth-child(1){min-width:130px !important;max-width:180px !important;}
.content .medicine-page table th:nth-child(2),
.content .medicine-page table td:nth-child(2){min-width:170px !important;max-width:230px !important;}
.content .medicine-page table th:nth-child(3),
.content .medicine-page table td:nth-child(3){min-width:78px !important;width:78px !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(4),
.content .medicine-page table td:nth-child(4){min-width:150px !important;max-width:210px !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(5),
.content .medicine-page table td:nth-child(5){min-width:100px !important;max-width:140px !important;}
.content .medicine-page table th:nth-child(6),
.content .medicine-page table td:nth-child(6){min-width:90px !important;max-width:120px !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(7),
.content .medicine-page table td:nth-child(7){min-width:105px !important;max-width:140px !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(8),
.content .medicine-page table td:nth-child(8){min-width:60px !important;width:60px !important;text-align:center !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(9),
.content .medicine-page table td:nth-child(9){min-width:260px !important;max-width:380px !important;white-space:normal !important;word-break:normal !important;overflow-wrap:normal !important;}
.content .medicine-page table th:nth-child(10),
.content .medicine-page table td:nth-child(10){min-width:150px !important;max-width:190px !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(11),
.content .medicine-page table td:nth-child(11){min-width:130px !important;width:130px !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(12),
.content .medicine-page table td:nth-child(12){min-width:95px !important;width:95px !important;text-align:center !important;white-space:nowrap !important;}
.content .medicine-page table th:nth-child(13),
.content .medicine-page table td:nth-child(13){min-width:96px !important;width:96px !important;text-align:center !important;white-space:nowrap !important;padding-right:16px !important;}
.content .medicine-page table td:nth-child(3),
.content .medicine-page table td:nth-child(11){font-variant-numeric:tabular-nums !important;}
.content .medicine-page .status,
.content .medicine-page .badge,
.content .medicine-page .pill,
.content .medicine-page table td:nth-child(12) span{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:70px !important;
  white-space:nowrap !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  text-align:center !important;
  padding:7px 12px !important;
  border-radius:999px !important;
  line-height:1.1 !important;
}
.content .medicine-page table .btn,
.content .medicine-page table a.btn,
.content .medicine-page table button{
  white-space:nowrap !important;
  min-width:62px !important;
  margin:0 !important;
  display:inline-flex !important;
  justify-content:center !important;
  align-items:center !important;
}
.content .medicine-page tr.medicine-no-row,
.content .medicine-page tr.no-row,
.content .medicine-page tr.not-given{
  background:#fff1f1 !important;
}
.content .medicine-page tr.medicine-no-row td,
.content .medicine-page tr.no-row td,
.content .medicine-page tr.not-given td{
  border-bottom-color:#f4caca !important;
}
@media (max-width: 1024px){
  .content .medicine-page table{min-width:1450px !important;}
  .content .medicine-page .table-wrap{border-radius:12px !important;}
}
@media (max-width: 640px){
  .content .medicine-page table{min-width:1380px !important;}
  .content .medicine-page table th,
  .content .medicine-page table td{padding:9px 10px !important;font-size:13px !important;}
}

/* Participants form overlap fix - 2026-07-10
   Keeps existing workflows unchanged. This fixes nested .grid-2 rows inside the
   Participant add/edit form so Date of Birth, Gender and all other controls
   cannot overlap at normal browser zoom or responsive widths. */
.content form#participantCreateForm{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
}
.content form#participantCreateForm h2,
.content form#participantCreateForm h3,
.content form#participantCreateForm .alert,
.content form#participantCreateForm #ndisDuplicateMessage{
  display:block !important;
  width:100% !important;
  clear:both !important;
}
.content form#participantCreateForm .grid-2{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(260px,1fr)) !important;
  gap:18px 24px !important;
  align-items:start !important;
  width:100% !important;
  max-width:100% !important;
  margin:18px 0 !important;
  clear:both !important;
}
.content form#participantCreateForm .grid-2 > label,
.content form#participantCreateForm > label{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:7px !important;
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  line-height:1.35 !important;
}
.content form#participantCreateForm input,
.content form#participantCreateForm select,
.content form#participantCreateForm textarea{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  display:block !important;
}
.content form#participantCreateForm input[type="date"],
.content form#participantCreateForm input[type="time"],
.content form#participantCreateForm select{
  min-height:46px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.content form#participantCreateForm textarea{
  min-height:96px !important;
  grid-column:auto !important;
}
.content form#participantCreateForm > label:has(textarea),
.content form#participantCreateForm .grid-2 > label:has(textarea){
  grid-column:1 / -1 !important;
}
.content form#participantCreateForm button,
.content form#participantCreateForm .btn{
  margin-top:12px !important;
  width:auto !important;
  max-width:max-content !important;
}
@media (max-width: 1180px){
  .content form#participantCreateForm .grid-2{
    grid-template-columns:repeat(2,minmax(220px,1fr)) !important;
    gap:16px 20px !important;
  }
}
@media (max-width: 900px){
  .content form#participantCreateForm .grid-2{
    grid-template-columns:1fr !important;
  }
  .content form#participantCreateForm button,
  .content form#participantCreateForm .btn{
    width:100% !important;
    max-width:none !important;
  }
}
@media (max-width: 640px){
  .content form#participantCreateForm .grid-2{
    grid-template-columns:1fr !important;
    gap:14px !important;
  }
  .content form#participantCreateForm input,
  .content form#participantCreateForm select,
  .content form#participantCreateForm textarea{
    font-size:16px !important;
  }
}


/* Shared compact Actions dropdown (Staff List pattern) */
.actions-menu{position:relative;display:inline-block;vertical-align:middle;line-height:1;}
.actions-toggle{width:32px;height:32px;min-width:32px;max-width:32px;border:1px solid #ddcfe2;background:#fff;border-radius:8px;cursor:pointer;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;color:#344054;padding:0;}
.actions-toggle:hover{background:#f7f1f8;}
.actions-toggle:focus-visible{outline:3px solid rgba(120,49,132,.22);outline-offset:2px;}
.actions-popover[hidden]{display:none!important;}
.actions-popover{position:fixed;display:block;min-width:210px;max-width:min(280px,calc(100vw - 16px));background:#fff;border:1px solid #dfd4e3;border-radius:9px;box-shadow:0 10px 28px rgba(42,20,48,.16);padding:6px;z-index:10000;box-sizing:border-box;}
.actions-menu:not(.open) .actions-popover{display:none!important;}
.actions-menu.open .actions-popover{display:block;}
.actions-popover a,.actions-popover button,.actions-popover summary{display:block;width:100%;box-sizing:border-box;text-align:left;border:0;background:transparent;padding:8px 9px;border-radius:6px;color:#344054;text-decoration:none;font-size:13px;line-height:1.35;cursor:pointer;font-family:inherit;}
.actions-popover a:hover,.actions-popover button:hover,.actions-popover summary:hover{background:#f7f1f8;}
.actions-popover a:focus-visible,.actions-popover button:focus-visible,.actions-popover summary:focus-visible{outline:2px solid #783184;outline-offset:1px;}
.actions-popover form{margin:0;}
.actions-popover details{margin:0;}
.actions-popover details > summary{list-style:none;}
.actions-popover details > summary::-webkit-details-marker{display:none;}
.actions-popover .actions-reject-form{padding:8px 9px 9px;min-width:210px;}
.actions-popover .actions-reject-form textarea{width:100%;min-height:70px;box-sizing:border-box;margin:0 0 7px;resize:vertical;}
.actions-popover .danger-action{color:#b42318;}
.actions-cell{width:68px;text-align:center;white-space:nowrap;overflow:visible!important;position:relative;}
 .actions-dropdown-table{overflow:visible;}
@media (max-width:1100px){
  .actions-dropdown-table{overflow-x:auto;overflow-y:visible;}
  .actions-popover{position:fixed;top:auto;right:auto;z-index:1000;}
  .actions-menu.open.drop-up .actions-popover{bottom:auto;}
}

/* Participants list: compact All Staff-aligned layout and participant report navigation. */
#participantListSection{min-width:0;overflow:visible}
#participantListSection .participant-list-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:12px}
#participantListSection .participant-list-heading h2{margin:0 0 4px}
#participantListSection .participant-list-toolbar{display:grid;grid-template-columns:minmax(280px,1.7fr) minmax(150px,.8fr) minmax(210px,1fr) 100px auto auto;gap:10px;align-items:end;margin-bottom:8px}
#participantListSection .participant-list-toolbar label{min-width:0;margin:0}
#participantListSection .participant-list-toolbar input,#participantListSection .participant-list-toolbar select{width:100%;max-width:100%;box-sizing:border-box}
#participantListSection .participant-result-count{margin:6px 0 12px}
#participantListSection .compact-participant-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;position:relative}
#participantListSection .compact-participant-table thead{display:table-header-group;position:static}
#participantListSection .compact-participant-table tbody{display:table-row-group;position:static}
#participantListSection .compact-participant-table tr{display:table-row;position:static;transform:none;margin:0}
#participantListSection .compact-participant-table thead th{position:static;background:#faf7fb;font-size:12px;text-transform:uppercase;letter-spacing:.02em;color:#667085;padding:9px;line-height:1.25;border-bottom:1px solid #dfd4e3;vertical-align:middle}
#participantListSection .compact-participant-table thead th a{color:inherit;text-decoration:none}
#participantListSection .compact-participant-table tbody td{padding:8px 9px;vertical-align:middle;border-top:1px solid #eee5f1;font-size:13px;line-height:1.3;height:auto;min-height:48px;min-width:0;box-sizing:border-box}
#participantListSection .compact-participant-table tbody tr:first-child td{border-top:0}
#participantListSection .compact-participant-table th:nth-child(1){width:31%}
#participantListSection .compact-participant-table th:nth-child(2){width:18%}
#participantListSection .compact-participant-table th:nth-child(3){width:10%}
#participantListSection .compact-participant-table th:nth-child(4){width:15%}
#participantListSection .compact-participant-table th:nth-child(5),#participantListSection .compact-participant-table th:nth-child(6){width:10%}
#participantListSection .compact-participant-table th:nth-child(7){width:6%}
/* Participants reuse the proven Users list identity and row-interaction pattern. */
#participantListSection .staff-row-clickable{cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}
#participantListSection .staff-row-clickable:hover,
#participantListSection .staff-row-clickable:focus-visible{background:#fbf7fc;outline:2px solid rgba(106,40,117,.22);outline-offset:-2px}
#participantListSection .staff-identity{display:flex;align-items:center;gap:9px;min-width:0}
#participantListSection .staff-avatar{width:32px;height:32px;min-width:32px;border-radius:50%;background:#f0e5f3;color:#6A2875;display:flex;align-items:center;justify-content:center;font-weight:700;flex:0 0 auto;font-size:12px;line-height:1;white-space:nowrap}
#participantListSection .staff-name-email{min-width:0;max-width:100%}
#participantListSection .staff-name-email strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25}
#participantListSection .staff-name-email small{display:block;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25;margin-top:2px}
#participantListSection .participant-count-link{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:30px;padding:0 9px;border:1px solid #d9c8de;border-radius:999px;background:#f7f1f8;color:#6a2875;font-weight:700;text-decoration:underline;text-underline-offset:2px;transition:background-color .16s,color .16s,border-color .16s,transform .16s}
#participantListSection .participant-count-link:hover{background:#783184;color:#fff;border-color:#783184;transform:translateY(-1px)}
#participantListSection .incident-count-link:hover{background:#3f7f78;border-color:#3f7f78}
#participantListSection .participant-count-link:focus-visible{outline:3px solid rgba(120,49,132,.28);outline-offset:2px}
#participantListSection .actions-menu{display:inline-block;position:relative}
#participantListSection .participant-pagination{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px;align-items:center}
.participant-documents-anchor{scroll-margin-top:24px}
.participant-documents-anchor:focus{outline:none}
.participant-section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-top:8px}
.participant-section-heading h3{margin:0 0 4px}
.participant-report-page{width:100%;max-width:1480px;margin-left:auto;margin-right:auto;box-sizing:border-box}
@media(max-width:1180px){#participantListSection .participant-list-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}#participantListSection .compact-participant-table{min-width:980px}#participantListSection .participant-list-wrap{overflow-x:auto;overflow-y:visible}}
@media(max-width:760px){#participantListSection .participant-list-toolbar{grid-template-columns:1fr}#participantListSection .compact-participant-table{min-width:900px}#participantListSection{padding:12px}.participant-section-heading .btn{width:100%;text-align:center}}

/*
 * AIC Services Medicine Chart responsive layout standard.
 * Do not replace with fixed-width controls, absolute field positioning,
 * negative margins or page-specific non-responsive overrides.
 */
.medicine-chart-page,
.medicine-chart-page *{box-sizing:border-box}
.medicine-chart-page{width:100%;max-width:100%;min-width:0;overflow-x:clip}
.medicine-chart-page .card,
.medicine-chart-page form,
.medicine-chart-page label,
.medicine-chart-page .grid-2,
.medicine-chart-page .grid-3,
.medicine-chart-page .form-grid,
.medicine-chart-page .medicine-form-section{min-width:0;max-width:100%}
.medicine-chart-page input,
.medicine-chart-page select,
.medicine-chart-page textarea,
.medicine-chart-page input[type=file]{width:100%;max-width:100%;min-width:0}
.medicine-chart-page textarea{resize:vertical;min-height:92px;overflow-wrap:anywhere}
.medicine-chart-page .table-wrap{width:100%;max-width:100%;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}
.medicine-chart-page table{min-width:980px}
.medicine-chart-page th,.medicine-chart-page td{vertical-align:top;overflow-wrap:anywhere;word-break:normal}
.medicine-chart-page .medicine-add-form{display:block}
.medicine-chart-page .medicine-form-section{margin:0 0 1rem}
.medicine-chart-page .medicine-form-grid{display:grid;gap:.85rem 1rem;align-items:start}
.medicine-chart-page .medicine-form-grid-1{grid-template-columns:minmax(0,1fr)}
.medicine-chart-page .medicine-form-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.medicine-chart-page .medicine-section-title{margin:1rem 0 .65rem;font-size:1rem}
.medicine-chart-page .medicine-reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem 1rem;margin:0 0 .75rem}
.medicine-chart-page .medicine-reference-grid label{min-width:0}
.medicine-chart-page .medicine-span-2{grid-column:1 / -1}
.medicine-chart-page #medicine-reference-widget{position:relative;min-width:0}
.medicine-chart-page .medicine-search-wrap{position:relative;min-width:0}
.medicine-chart-page .medicine-search-wrap input{padding-right:9rem}
.medicine-chart-page .medicine-change-btn{position:absolute;right:.35rem;top:.35rem;z-index:3;white-space:nowrap}
.medicine-chart-page .medicine-suggestions{position:absolute;left:0;right:0;top:calc(100% + .25rem);z-index:10050;background:#fff;border:1px solid #d7c4dc;border-radius:8px;box-shadow:0 12px 28px rgba(48,25,55,.18);max-height:min(320px,50vh);overflow-y:auto;overflow-x:hidden}
.medicine-chart-page .medicine-suggestions[hidden]{display:none!important}
.medicine-chart-page .medicine-option{display:block;width:100%;max-width:100%;padding:.7rem .8rem;border:0;border-bottom:1px solid #eee;background:#fff;text-align:left;cursor:pointer;white-space:normal}
.medicine-chart-page .medicine-option:last-child{border-bottom:0}
.medicine-chart-page .medicine-option:hover,
.medicine-chart-page .medicine-option.is-active,
.medicine-chart-page .medicine-option:focus-visible{background:#f5eef7;outline:2px solid #783184;outline-offset:-2px}
.medicine-chart-page .medicine-option-main{display:block;font-weight:700;overflow-wrap:anywhere}
.medicine-chart-page .medicine-option-meta{display:block;font-size:.85rem;color:#5f5f69;margin-top:.15rem;overflow-wrap:anywhere}
.medicine-chart-page .medicine-search-status{min-height:1.25rem;margin-top:.25rem;overflow-wrap:anywhere}
.medicine-chart-page .medicine-manual-panel{margin:.25rem 0 .75rem;min-width:0}
.medicine-chart-page .medicine-helper{padding:.65rem .75rem;background:#f7f3f8;border-left:4px solid #783184;border-radius:6px;overflow-wrap:anywhere}
.medicine-chart-page .medicine-form-actions{display:flex;gap:.65rem;flex-wrap:wrap;margin-top:1rem}
.medicine-chart-page .medicine-duplicate-warning .inline-check{display:flex;gap:.5rem;align-items:flex-start;margin-top:.5rem}
.medicine-chart-page .medicine-duplicate-warning input{width:auto;flex:0 0 auto;margin-top:.2rem}
@media (max-width:1180px){
  .medicine-chart-page > .grid-2{grid-template-columns:1fr}
  .medicine-chart-page .medicine-reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:768px){
  .medicine-chart-page .grid-2,
  .medicine-chart-page .grid-3,
  .medicine-chart-page .form-grid,
  .medicine-chart-page .medicine-form-grid-2,
  .medicine-chart-page .medicine-reference-grid{grid-template-columns:1fr!important}
  .medicine-chart-page .medicine-span-2{grid-column:auto}
  .medicine-chart-page .medicine-search-wrap input{padding-right:.75rem}
  .medicine-chart-page .medicine-change-btn{position:static;margin-top:.45rem;width:auto;max-width:100%}
  .medicine-chart-page .medicine-suggestions{max-height:44vh}
  .medicine-chart-page .medicine-form-actions .btn{width:100%}
  .medicine-chart-page input,
  .medicine-chart-page select,
  .medicine-chart-page textarea{font-size:16px}
}

/*
 * AIC Services Medicine Chart strong responsive form patch.
 * Keep Add Medication full-width. Do not restore side-by-side card compression,
 * fixed field widths, overlapping controls, absolute action buttons, or narrow
 * non-responsive medication grids.
 */
.medicine-chart-page .medicine-workflow-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
  align-items:start;
}
.medicine-chart-page .medicine-add-card{
  grid-column:1 / -1;
  width:100%;
  min-width:0;
}
.medicine-chart-page .medicine-add-form{
  width:100%;
  max-width:100%;
  min-width:0;
}
.medicine-chart-page .medicine-add-form > *{
  min-width:0;
  max-width:100%;
}
.medicine-chart-page .medicine-participant-grid{
  grid-template-columns:repeat(2,minmax(240px,1fr));
}
.medicine-chart-page .medicine-reference-grid{
  grid-template-columns:repeat(5,minmax(150px,1fr));
  align-items:start;
}
.medicine-chart-page .medicine-prescribed-grid{
  grid-template-columns:repeat(4,minmax(180px,1fr));
  align-items:start;
}
.medicine-chart-page .medicine-prescribed-grid .medicine-span-2{
  grid-column:span 2;
}
.medicine-chart-page .medicine-form-wide{
  width:100%;
  max-width:100%;
  min-width:0;
}
.medicine-chart-page .medicine-search-wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.6rem;
  align-items:center;
  position:relative;
}
.medicine-chart-page .medicine-search-wrap input{
  padding-right:.75rem;
}
.medicine-chart-page .medicine-change-btn{
  position:static;
  inset:auto;
  width:auto;
  max-width:100%;
  min-height:42px;
  white-space:nowrap;
}
.medicine-chart-page .medicine-manual-panel{
  display:flex;
  align-items:flex-start;
  gap:.75rem;
  flex-wrap:wrap;
}
.medicine-chart-page .medicine-manual-panel > .btn{
  width:auto;
  max-width:100%;
  flex:0 1 auto;
  white-space:normal;
}
.medicine-chart-page #medicine-manual-reason-wrap{
  flex:1 1 320px;
  min-width:240px;
}
.medicine-chart-page .medicine-helper{
  margin:.5rem 0 1rem;
}
.medicine-chart-page .medicine-section-title{
  clear:both;
}
.medicine-chart-page .medicine-form-actions{
  grid-column:1 / -1;
  width:100%;
  justify-content:flex-start;
  align-items:center;
}
.medicine-chart-page .medicine-form-actions .btn{
  width:auto;
  min-width:150px;
}
.medicine-chart-page .medicine-add-form label{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  line-height:1.35;
}
.medicine-chart-page .medicine-add-form input,
.medicine-chart-page .medicine-add-form select,
.medicine-chart-page .medicine-add-form textarea{
  min-height:44px;
}
.medicine-chart-page .medicine-add-form textarea{
  min-height:100px;
}
@media (max-width:1320px){
  .medicine-chart-page .medicine-reference-grid{
    grid-template-columns:repeat(3,minmax(180px,1fr));
  }
  .medicine-chart-page .medicine-prescribed-grid{
    grid-template-columns:repeat(3,minmax(180px,1fr));
  }
}
@media (max-width:1024px){
  .medicine-chart-page .medicine-workflow-grid{
    grid-template-columns:1fr;
  }
  .medicine-chart-page .medicine-participant-grid,
  .medicine-chart-page .medicine-reference-grid,
  .medicine-chart-page .medicine-prescribed-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .medicine-chart-page .medicine-prescribed-grid .medicine-span-2{
    grid-column:1 / -1;
  }
}
@media (max-width:640px){
  .medicine-chart-page .medicine-participant-grid,
  .medicine-chart-page .medicine-reference-grid,
  .medicine-chart-page .medicine-prescribed-grid{
    grid-template-columns:1fr!important;
  }
  .medicine-chart-page .medicine-prescribed-grid .medicine-span-2{
    grid-column:auto;
  }
  .medicine-chart-page .medicine-search-wrap{
    grid-template-columns:1fr;
  }
  .medicine-chart-page .medicine-change-btn,
  .medicine-chart-page .medicine-manual-panel > .btn,
  .medicine-chart-page .medicine-form-actions .btn{
    width:100%;
  }
  .medicine-chart-page #medicine-manual-reason-wrap{
    flex-basis:100%;
    min-width:0;
  }
}

/* Authenticated account dropdown and self-service password page */
.account-menu{position:relative;display:flex;align-items:center}
.account-trigger{display:flex;align-items:center;gap:9px;min-height:42px;max-width:280px;padding:6px 10px;border:1px solid transparent;border-radius:12px;background:#fff;color:var(--text);font:inherit;font-weight:700;box-shadow:none}
.account-trigger:hover,.account-trigger:focus-visible,.account-menu.open .account-trigger{border-color:rgba(120,49,132,.35);background:rgba(176,129,185,.14);color:var(--aic-dark-purple);box-shadow:0 0 0 3px rgba(176,129,185,.16)}
.account-avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:var(--aic-dark-purple);color:#fff;font-size:13px}
.account-name{display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-chevron{font-size:16px;line-height:1;transition:transform .18s ease}.account-menu.open .account-chevron{transform:rotate(180deg)}
.account-dropdown{position:fixed;right:auto;top:auto;left:auto;z-index:10050;width:210px;padding:7px;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 18px 45px rgba(40,20,50,.18)}
.account-dropdown[hidden]{display:none!important}
.account-dropdown a{display:flex;align-items:center;width:100%;padding:11px 12px;border-radius:10px;color:var(--text);font-weight:700}
.account-dropdown a:hover,.account-dropdown a:focus-visible{outline:none;background:rgba(176,129,185,.18);color:var(--aic-dark-purple)}
.account-password-page{display:flex;justify-content:center;padding:8px 0}
.account-password-card{width:min(620px,100%);display:grid;gap:18px}
.account-password-card h1{margin-bottom:4px}
.account-password-form{gap:16px}
.password-input-wrap{position:relative;display:block}
.password-input-wrap input{width:100%;padding-right:74px}
.password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);min-width:58px;padding:7px 9px;border-radius:9px;font-size:12px}
.password-toggle:active{transform:translateY(-50%)}
.account-password-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}
@media(max-width:820px){
  .top-actions{gap:8px}.top-actions .badge{display:none}
  .account-name{display:block!important;max-width:120px}
  .account-trigger{max-width:190px;padding:5px 8px}
  .account-dropdown{width:min(240px,calc(100vw - 24px))}
}
@media(max-width:390px){.account-name{max-width:82px}.account-avatar{width:28px;height:28px}.account-password-actions .btn,.account-password-actions button{width:100%;text-align:center}}

/* Keep account trigger content visible despite the legacy mobile top-actions span rule. */
@media(max-width:820px){.top-actions .account-trigger .account-avatar,.top-actions .account-trigger .account-name,.top-actions .account-trigger .account-chevron{display:grid}.top-actions .account-trigger .account-name{display:block}.top-actions .account-trigger .account-chevron{display:inline-block}}


/* Team Leader dashboard: live House leadership assignments. */
.team-leader-houses{margin-top:18px;min-width:0;overflow:hidden}
.team-leader-houses__header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.team-leader-houses__header h2{margin:0 0 5px}
.team-leader-houses__header .muted{margin:0}
.team-leader-houses__count{display:flex;align-items:baseline;gap:7px;flex:0 0 auto;padding:10px 14px;border:1px solid var(--border);border-radius:12px;background:rgba(176,129,185,.12);color:var(--aic-dark-purple)}
.team-leader-houses__count strong{font-size:28px;line-height:1}
.team-leader-houses__count span{font-weight:700}
.team-leader-house-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:18px 0 0;padding:0;list-style:none}
.team-leader-house-list li{min-width:0;padding:11px 13px;border:1px solid var(--border);border-radius:11px;background:#fff;font-weight:700;overflow-wrap:anywhere}
.team-leader-houses__empty{margin:18px 0 0;padding:12px 14px;border:1px dashed var(--border);border-radius:11px;background:rgba(176,129,185,.08)}
@media(max-width:600px){.team-leader-houses__header{flex-direction:column}.team-leader-houses__count{width:100%;justify-content:center}.team-leader-house-list{grid-template-columns:1fr}}


/* Add Medication approved form controls: inline required markers, one-hour schedule and PRN warning. */
.medicine-chart-page .medicine-add-form label{
  align-content:start;
}
.medicine-chart-page .medicine-add-form label > .required{
  display:inline;
  width:auto;
  margin-left:.18rem;
  line-height:inherit;
  vertical-align:baseline;
}
.medicine-chart-page .medicine-add-form label{
  position:relative;
}
.medicine-chart-page .medicine-add-form label > input,
.medicine-chart-page .medicine-add-form label > select,
.medicine-chart-page .medicine-add-form label > textarea{
  margin-top:.35rem;
}
.medicine-chart-page .medicine-prn-field{
  border:1px solid transparent;
  border-radius:8px;
  padding:.35rem;
  transition:border-color .15s ease,background-color .15s ease;
}
.medicine-chart-page .medicine-prn-field.is-warning-danger{
  border-color:var(--danger);
  background:#fff1f2;
}
.medicine-chart-page .medicine-prn-field.is-warning-danger select{
  border-color:var(--danger);
  box-shadow:0 0 0 2px rgba(198,40,40,.10);
}
.medicine-chart-page .medicine-prn-field.is-warning-danger::after{
  content:"PRN medication — verify the authorised PRN instructions.";
  display:block;
  margin-top:.35rem;
  color:var(--danger);
  font-size:.82rem;
  font-weight:700;
}

.medicine-chart-page .medicine-add-form .medicine-label-text{
  display:inline-flex;
  align-items:baseline;
  gap:.18rem;
  min-height:1.35em;
  line-height:1.35;
}
.medicine-chart-page .medicine-add-form .medicine-label-text .required{
  display:inline;
  margin:0;
  width:auto;
}

.medicine-chart-page .medicine-prescribed-grid .medicine-instructions-field{grid-column:1 / -1;}
@media (min-width:1025px){
  .medicine-chart-page .medicine-prescribed-grid .medicine-scheduled-field{grid-column:1 / 2;}
  .medicine-chart-page .medicine-prescribed-grid .medicine-prn-grid-field{grid-column:2 / 3;}
}

/* Dynamic medication schedule fields */
.medicine-schedule-wrapper{grid-column:1/-1;min-width:0}
.medicine-schedule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;width:100%}
.medicine-schedule-slot,.medicine-custom-schedule{min-width:0}
.medicine-schedule-slot[hidden],.medicine-custom-schedule[hidden],#medicine-numbered-schedules[hidden]{display:none!important}
.medicine-custom-schedule{display:block;width:100%}
.medicine-custom-schedule textarea,.medicine-schedule-slot select{width:100%;max-width:100%;box-sizing:border-box}
#medicine-schedule-error{display:block;color:var(--danger,#b42318);margin-top:6px}
@media(max-width:768px){.medicine-schedule-grid{grid-template-columns:1fr}}


/* Canonical house relationship and participant medication presentation */
.participant-house-readonly input[readonly] {
  background: var(--surface-muted, #f1f3f5);
  color: var(--text-color, #1f2933);
  cursor: not-allowed;
  opacity: 1;
}
.participant-medications-section { margin-top: 1.25rem; }
.participant-medications-table { width: 100%; border-collapse: collapse; }
.participant-medications-table th,
.participant-medications-table td { vertical-align: top; }
.participant-medications-table td small { display: block; margin-top: .2rem; }
.current-team-leader-name{color:var(--aic-purple,var(--primary,#6A2875));}
@media (max-width: 768px) {
  .participant-medications-table { min-width: 760px; }
}

/* Participant profile medication list */
.participant-medications-section{min-width:0;margin-top:20px}.participant-medications-wrap{max-width:100%;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.participant-medications-table{width:100%;min-width:980px}.participant-medications-table td small{display:block;margin-top:3px;color:#667085}.participant-medications-table .actions-cell{width:72px;min-width:72px;overflow:visible}

/* Employment Documents Approval Queue responsive table correction.
   Layout only: no document workflow, permissions, status, files or actions changed. */
.employment-documents-card{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:visible;
}
.employment-documents-table-wrap{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  padding-bottom:4px;
}
.employment-documents-table{
  width:100%;
  min-width:1180px;
  table-layout:fixed;
  border-collapse:collapse;
}
.employment-documents-table th,
.employment-documents-table td{
  min-width:0;
  vertical-align:top;
}
.employment-documents-table th:nth-child(1),
.employment-documents-table td:nth-child(1){width:24%;}
.employment-documents-table th:nth-child(2),
.employment-documents-table td:nth-child(2){width:26%;}
.employment-documents-table th:nth-child(3),
.employment-documents-table td:nth-child(3){width:7.5%;min-width:104px;}
.employment-documents-table th:nth-child(4),
.employment-documents-table td:nth-child(4){width:7.5%;min-width:104px;}
.employment-documents-table th:nth-child(5),
.employment-documents-table td:nth-child(5){width:8%;min-width:108px;}
.employment-documents-table th:nth-child(6),
.employment-documents-table td:nth-child(6){width:12%;min-width:150px;}
.employment-documents-table th:nth-child(7),
.employment-documents-table td:nth-child(7){width:12%;min-width:160px;}
.employment-documents-table th:nth-child(8),
.employment-documents-table td:nth-child(8){width:64px;min-width:64px;padding-left:10px;padding-right:10px;}
.employment-documents-table .table-primary-text{
  font-weight:600;
  color:var(--text);
  line-height:1.35;
  overflow-wrap:anywhere;
}
.employment-documents-table .table-secondary-text{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-weight:400;
  line-height:1.35;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.employment-documents-table .employment-email,
.employment-documents-table .employment-file-name{
  max-width:100%;
}
.employment-documents-table .table-date-value,
.employment-documents-table .table-date-time{
  display:inline-block;
  white-space:nowrap;
  word-break:normal;
  overflow-wrap:normal;
}
.employment-documents-table .employment-status-cell{
  vertical-align:middle;
}
.employment-documents-table .employment-status-cell .status,
.employment-documents-table .employment-status-cell .badge{
  display:inline-flex;
  align-items:center;
  width:auto;
  max-width:100%;
  white-space:nowrap;
  word-break:normal;
  overflow-wrap:normal;
  line-height:1.2;
}
.employment-documents-table .actions-cell{
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;
  overflow:visible!important;
}
.employment-documents-table .actions-toggle{
  margin-inline:auto;
}
@media (max-width:1280px){
  .employment-documents-table{min-width:1120px;}
}
@media (max-width:820px){
  .employment-documents-card{padding-left:16px;padding-right:16px;}
  .employment-documents-table{min-width:1080px;}
}

/* AICS USERS STAFF LAYOUT STRONG V2.1 START 2026-08-25 */
/*
 * Strong V2.1 fallback for Users & Staff / Employees with highlighted Staff tabs.
 * Intentionally stored in app.css so it does not depend on page-key detection.
 * Every selector is scoped to Users-specific IDs/classes. Presentation only.
 */

/* ---------- Staff directory shell + filters ---------- */
html body #staffListSection{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
html body #staffListSection #staffSearchForm.staff-filter-toolbar{
  display:grid!important;
  grid-template-columns:minmax(170px,.8fr) repeat(5,minmax(160px,1fr))!important;
  gap:12px 16px!important;
  align-items:end!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  position:static!important;
}
html body #staffListSection #staffSearchForm.staff-filter-toolbar > label{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  gap:6px!important;
}
html body #staffListSection #staffSearchForm.staff-filter-toolbar :where(input,select){
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  box-sizing:border-box!important;
}
html body #staffListSection #staffSearchForm .staff-search-toggle{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
html body #staffListSection #staffSearchForm .staff-search-panel{
  grid-column:1/-1!important;
  width:100%!important;
  min-width:0!important;
}
html body #staffListSection #staffSearchForm > .btn.primary{
  grid-column:1!important;
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  margin:0!important;
}
html body #staffListSection #staffFilterStatus{
  grid-column:2/-1!important;
  min-width:0!important;
  align-self:center!important;
}
html body #staffListSection .staff-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  min-width:0!important;
  max-width:100%!important;
  margin:8px 0 12px!important;
}
html body #staffListSection .staff-tabs > a.staff-tab{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  min-height:42px!important;
  padding:8px 14px!important;
  border:1px solid #d5b8dc!important;
  border-radius:999px!important;
  background:#efe2f2!important;
  color:#5b2b68!important;
  text-decoration:none!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  box-shadow:0 1px 2px rgba(106,40,117,.08)!important;
}
html body #staffListSection .staff-tabs > a.staff-tab strong{
  color:#6A2875!important;
  font-weight:800!important;
}
html body #staffListSection .staff-tabs > a.staff-tab:hover,
html body #staffListSection .staff-tabs > a.staff-tab:focus-visible{
  background:#dfc7e5!important;
  border-color:#a96db5!important;
  color:#4f1f5a!important;
  outline:none!important;
  box-shadow:0 0 0 3px rgba(106,40,117,.13)!important;
}
html body #staffListSection .staff-tabs > a.staff-tab.active,
html body #staffListSection .staff-tabs > a.staff-tab[aria-selected="true"]{
  background:#6A2875!important;
  border-color:#6A2875!important;
  color:#fff!important;
  box-shadow:0 4px 12px rgba(106,40,117,.22)!important;
}
html body #staffListSection .staff-tabs > a.staff-tab.active strong,
html body #staffListSection .staff-tabs > a.staff-tab[aria-selected="true"] strong{
  color:#fff!important;
}

/* ---------- Desktop/tablet staff table: never crush clinical/workforce fields ---------- */
@media (min-width:768px){
  html body #staffListSection .staff-table-scroll{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-gutter:stable!important;
  }
  html body #staffListSection table.compact-staff-table.aics-directory-table{
    display:table!important;
    width:1640px!important;
    min-width:1640px!important;
    max-width:none!important;
    table-layout:fixed!important;
    border-collapse:separate!important;
    border-spacing:0!important;
    margin:0!important;
  }
  html body #staffListSection table.compact-staff-table thead{display:table-header-group!important;}
  html body #staffListSection table.compact-staff-table tbody{display:table-row-group!important;}
  html body #staffListSection table.compact-staff-table tr{display:table-row!important;}
  html body #staffListSection table.compact-staff-table :where(th,td){
    display:table-cell!important;
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:none!important;
    vertical-align:middle!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
  }
  html body #staffListSection table.compact-staff-table th:nth-child(1),
  html body #staffListSection table.compact-staff-table td:nth-child(1){width:340px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(2),
  html body #staffListSection table.compact-staff-table td:nth-child(2){width:150px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(3),
  html body #staffListSection table.compact-staff-table td:nth-child(3){width:155px!important;white-space:nowrap!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(4),
  html body #staffListSection table.compact-staff-table td:nth-child(4){width:180px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(5),
  html body #staffListSection table.compact-staff-table td:nth-child(5){width:140px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(6),
  html body #staffListSection table.compact-staff-table td:nth-child(6){width:120px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(7),
  html body #staffListSection table.compact-staff-table td:nth-child(7){width:100px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(8),
  html body #staffListSection table.compact-staff-table td:nth-child(8){width:130px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(9),
  html body #staffListSection table.compact-staff-table td:nth-child(9){width:105px!important;white-space:nowrap!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(10),
  html body #staffListSection table.compact-staff-table td:nth-child(10){width:145px!important;}
  html body #staffListSection table.compact-staff-table th:nth-child(11),
  html body #staffListSection table.compact-staff-table td:nth-child(11){width:75px!important;text-align:center!important;white-space:nowrap!important;}

  html body #staffListSection .staff-identity{
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr)!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
  }
  html body #staffListSection .staff-avatar{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    border-radius:50%!important;
    background:#f0e5f3!important;
    color:#6A2875!important;
    font-size:12px!important;
    font-weight:800!important;
    line-height:1!important;
    overflow:hidden!important;
  }
  html body #staffListSection .staff-name-email{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  html body #staffListSection .staff-name-email strong,
  html body #staffListSection .staff-name-email small{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
  }
  html body #staffListSection .staff-name-email strong{line-height:1.3!important;}
  html body #staffListSection .staff-name-email small{margin-top:3px!important;line-height:1.25!important;color:#667085!important;}
  html body #staffListSection table.compact-staff-table td:nth-child(2){white-space:normal!important;overflow-wrap:break-word!important;}
  html body #staffListSection table.compact-staff-table td:nth-child(3){font-variant-numeric:tabular-nums!important;}
  html body #staffListSection .working-restrictions-badge,
  html body #staffListSection .staff-award-list-badge,
  html body #staffListSection span.status{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    line-height:1.2!important;
    max-width:100%!important;
  }
  html body #staffListSection span.status{min-width:68px!important;}
  html body #staffListSection .staff-last-update{white-space:normal!important;}
  html body #staffListSection .staff-last-update-date,
  html body #staffListSection .staff-last-update-time{display:block!important;white-space:nowrap!important;}
  html body #staffListSection .compact-staff-table .actions-toggle{
    width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;padding:0!important;margin:0 auto!important;
  }
  html body #staffListSection .staff-mobile-list{display:none!important;}
}

/* ---------- Add Staff: forced 4 / 2 / 1 column structure ---------- */
html body .add-staff-layout,
html body .add-staff-card,
html body .add-staff-collapsible,
html body .add-staff-collapsible-content{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
html body #createUserForm.add-staff-form{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:20px 22px!important;
  align-items:start!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin:0!important;
}
html body #createUserForm > label.add-staff-field{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  box-sizing:border-box!important;
}
html body #createUserForm > label.add-staff-field :where(input,select){
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
html body #createUserForm > #createUserErrors,
html body #createUserForm > #emailDuplicateBox,
html body #createUserForm > .working-restrictions-info,
html body #createUserForm > section.award-classification-panel,
html body #createUserForm > .creation-confirmation-box,
html body #createUserForm > .add-staff-action-row{
  grid-column:1/-1!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
html body #createUserForm > #createUserErrors:empty{display:none!important;}
html body #createUserForm .email-check-loading,
html body #createUserForm .email-check-ok,
html body #createUserForm .mobile-validation-message,
html body #createUserForm .working-restrictions-help{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
html body #createUserForm > #emailDuplicateBox{
  padding:14px 16px!important;
  border-radius:12px!important;
}
html body #createUserForm #emailDuplicateBox .email-duplicate-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  align-items:center!important;
  margin-top:10px!important;
}
html body #createUserForm #emailDuplicateBox .email-duplicate-actions :where(a,button){
  width:auto!important;
  max-width:100%!important;
  white-space:normal!important;
}
html body #createUserForm > .working-restrictions-info{
  padding:14px 16px!important;
  line-height:1.55!important;
}
html body #createUserForm > section.award-classification-panel{
  display:block!important;
  padding:18px!important;
  margin:0!important;
  overflow:hidden!important;
}
html body #createUserForm .award-classification-heading{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:14px!important;
  width:100%!important;
  min-width:0!important;
  margin-bottom:14px!important;
}
html body #createUserForm .award-classification-heading > div{flex:1 1 480px!important;min-width:0!important;}
html body #createUserForm .award-classification-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px 18px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
html body #createUserForm .award-classification-grid > label{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
}
html body #createUserForm .award-classification-grid :where(input,select){
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  box-sizing:border-box!important;
}
html body #createUserForm .password-field-wrap{
  position:relative!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
html body #createUserForm .password-field-wrap > input{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding-right:54px!important;
  box-sizing:border-box!important;
}
html body #createUserForm .password-field-wrap > .password-toggle{
  position:absolute!important;
  right:4px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:42px!important;
  height:38px!important;
  min-width:42px!important;
  max-width:42px!important;
  min-height:38px!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  z-index:2!important;
}
html body #createUserForm > .creation-confirmation-box label{
  display:grid!important;
  grid-template-columns:22px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  min-width:0!important;
}
html body #createUserForm > .creation-confirmation-box input[type="checkbox"]{
  width:20px!important;height:20px!important;min-width:20px!important;margin-top:2px!important;
}
html body #createUserForm > .add-staff-action-row{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
}
html body #createUserForm > .add-staff-action-row .btn{width:auto!important;min-width:150px!important;}

@media (max-width:1279px){
  html body #staffListSection #staffSearchForm.staff-filter-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  html body #staffListSection #staffSearchForm > .btn.primary{grid-column:1!important;}
  html body #staffListSection #staffFilterStatus{grid-column:2/-1!important;}
  html body #createUserForm.add-staff-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html body #createUserForm .award-classification-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

@media (max-width:767px){
  html body #staffListSection #staffSearchForm.staff-filter-toolbar{grid-template-columns:1fr!important;}
  html body #staffListSection #staffSearchForm > .btn.primary,
  html body #staffListSection #staffFilterStatus{grid-column:1!important;}
  html body #staffListSection .staff-table-scroll{display:none!important;}
  html body #staffListSection .staff-mobile-list{display:grid!important;gap:12px!important;}
  html body #createUserForm.add-staff-form{grid-template-columns:1fr!important;gap:16px!important;}
  html body #createUserForm > *{grid-column:1!important;}
  html body #createUserForm .award-classification-grid{grid-template-columns:1fr!important;}
  html body #createUserForm #emailDuplicateBox .email-duplicate-actions{display:grid!important;grid-template-columns:1fr!important;}
  html body #createUserForm #emailDuplicateBox .email-duplicate-actions :where(a,button){width:100%!important;justify-content:center!important;}
  html body #createUserForm > .add-staff-action-row{display:grid!important;grid-template-columns:1fr!important;}
  html body #createUserForm > .add-staff-action-row .btn{width:100%!important;}
}
/* AICS USERS STAFF LAYOUT STRONG V2.1 END 2026-08-25 */

/* AICS USERS STAFF MOBILE CARD STRONG V2.2 START 2026-08-25 */
@media (max-width:767px){
  html body #staffListSection{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  html body #staffListSection .staff-table-scroll{display:none!important;}
  html body #staffListSection .staff-mobile-list{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }
  html body #staffListSection article.staff-mobile-card.aics-directory-card{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:14px!important;
    border:1px solid #ddcce3!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 4px 14px rgba(61,32,70,.07)!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  html body #staffListSection .staff-mobile-card-header.aics-directory-card-header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 44px!important;
    gap:12px!important;
    align-items:start!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  html body #staffListSection .staff-mobile-card .staff-identity{
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  html body #staffListSection .staff-mobile-card .staff-avatar{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0!important;
    border-radius:50%!important;
    background:#efe2f2!important;
    color:#6A2875!important;
    font-size:12px!important;
    font-weight:800!important;
    line-height:1!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  html body #staffListSection .staff-mobile-card .staff-name-email{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:2px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html body #staffListSection .staff-mobile-card .staff-name-email strong,
  html body #staffListSection .staff-mobile-card .staff-name-email strong a{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    color:#6A2875!important;
    font-size:15px!important;
    font-weight:800!important;
    line-height:1.3!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
    text-decoration:none!important;
  }
  html body #staffListSection .staff-mobile-position{
    display:block!important;
    width:100%!important;
    margin:1px 0 0!important;
    color:#344054!important;
    font-size:13px!important;
    font-weight:600!important;
    line-height:1.35!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  html body #staffListSection .staff-mobile-card .staff-name-email small{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:2px 0 0!important;
    color:#667085!important;
    font-size:12px!important;
    line-height:1.35!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
  }
  html body #staffListSection .staff-mobile-card-header .actions-menu{
    position:relative!important;
    display:flex!important;
    justify-content:flex-end!important;
    width:44px!important;
    min-width:44px!important;
    margin:0!important;
  }
  html body #staffListSection .staff-mobile-card-header .actions-toggle{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #ddcce3!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#6A2875!important;
    font-size:20px!important;
    line-height:1!important;
    box-sizing:border-box!important;
  }
  html body #staffListSection .staff-mobile-grid.aics-directory-card-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    margin:14px 0 0!important;
  }
  html body #staffListSection .staff-mobile-field.aics-directory-field{
    display:grid!important;
    grid-template-columns:minmax(118px,42%) minmax(0,1fr)!important;
    column-gap:12px!important;
    row-gap:5px!important;
    align-items:start!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:10px 12px!important;
    border:1px solid #eee5f1!important;
    border-radius:10px!important;
    background:#faf8fb!important;
    box-sizing:border-box!important;
  }
  html body #staffListSection .staff-mobile-label.aics-directory-label{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    color:#667085!important;
    font-size:11px!important;
    font-weight:800!important;
    line-height:1.35!important;
    letter-spacing:.03em!important;
    text-transform:uppercase!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
  }
  html body #staffListSection .staff-mobile-value.aics-directory-value{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    color:#101828!important;
    font-size:14px!important;
    line-height:1.4!important;
    text-align:left!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
  }
  html body #staffListSection .staff-mobile-field .working-restrictions-badge,
  html body #staffListSection .staff-mobile-field .staff-award-list-badge,
  html body #staffListSection .staff-mobile-field span.status{
    display:inline-flex!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:26px!important;
    align-items:center!important;
    justify-content:flex-start!important;
    margin:0!important;
    padding:4px 8px!important;
    border-radius:999px!important;
    line-height:1.2!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
    box-sizing:border-box!important;
  }
  html body #staffListSection .staff-mobile-field span.status.active{
    background:#e5f9ee!important;
    color:#087443!important;
  }
  html body #staffListSection .staff-mobile-field .compliance-bar{
    grid-column:1/-1!important;
    width:100%!important;
    height:6px!important;
    margin:3px 0 0!important;
    border-radius:999px!important;
    background:#eee7f0!important;
    overflow:hidden!important;
  }
  html body #staffListSection .staff-mobile-field .compliance-bar > span{
    display:block!important;
    height:100%!important;
    border-radius:inherit!important;
    background:#6A2875!important;
  }
  html body #staffListSection .staff-mobile-field.staff-last-update{
    white-space:normal!important;
  }
  html body #staffListSection .staff-mobile-field .staff-last-update-date,
  html body #staffListSection .staff-mobile-field .staff-last-update-time{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    white-space:normal!important;
  }
  html body #staffListSection .staff-mobile-field .staff-last-update-time{
    margin-top:2px!important;
    color:#667085!important;
    font-size:12px!important;
  }
  html body #staffListSection .staff-mobile-actions.aics-directory-card-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    margin:14px 0 0!important;
  }
  html body #staffListSection .staff-mobile-actions.aics-directory-card-actions > .btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    margin:0!important;
    padding:10px 12px!important;
    border-radius:10px!important;
    box-sizing:border-box!important;
    text-align:center!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }
  html body #staffListSection .staff-mobile-actions > .btn:not(.primary){
    border:1px solid #d8c5de!important;
    background:#fff!important;
    color:#6A2875!important;
  }
  html body #staffListSection .staff-mobile-actions > .btn.primary{
    border-color:#6A2875!important;
    background:#6A2875!important;
    color:#fff!important;
  }
}
@media (max-width:390px){
  html body #staffListSection article.staff-mobile-card.aics-directory-card{padding:12px!important;}
  html body #staffListSection .staff-mobile-field.aics-directory-field{
    grid-template-columns:1fr!important;
    gap:4px!important;
  }
  html body #staffListSection .staff-mobile-actions.aics-directory-card-actions{
    grid-template-columns:1fr!important;
  }
}
/* AICS USERS STAFF MOBILE CARD STRONG V2.2 END 2026-08-25 */


/* ==========================================================================
   AICS USERS & STAFF DETAILS MOBILE STRONG V2.3 - 2026-08-25
   Scope: .staff-details-page only. Presentation only.
   Guarantees clean label/value separation on Staff Details mobile screens.
   ========================================================================== */
@media (max-width: 767px) {
  body .staff-details-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body .staff-details-page .staff-details-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body .staff-details-page .staff-details-header > div {
    width: 100% !important;
    min-width: 0 !important;
  }

  body .staff-details-page .staff-details-header h1 {
    margin: 0 0 4px !important;
    overflow-wrap: anywhere !important;
  }

  body .staff-details-page .staff-details-header > .btn {
    display: flex !important;
    width: 100% !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  body .staff-details-page > .card {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body .staff-details-page .staff-summary-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body .staff-details-page .staff-summary-item {
    display: grid !important;
    grid-template-columns: minmax(132px, 40%) minmax(0, 1fr) !important;
    column-gap: 12px !important;
    row-gap: 4px !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 1px solid #eadcef !important;
    border-radius: 12px !important;
    background: #fbf7fc !important;
    color: #171425 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }

  body .staff-details-page .staff-summary-item > strong {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: #5f2669 !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }

  body .staff-details-page .staff-summary-item > span {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body .staff-details-page .staff-summary-item > br {
    display: none !important;
  }

  body .staff-details-page .staff-summary-item > .status {
    display: inline-flex !important;
    width: max-content !important;
    max-width: 100% !important;
    min-height: 28px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  body .staff-details-page .staff-summary-item > .staff-summary-report-link {
    grid-column: 2 !important;
    display: block !important;
    min-width: 0 !important;
    margin: 2px 0 0 !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
  }

  body .staff-details-page .staff-summary-report-card {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    background: #f8f0fa !important;
    border-color: #dfc7e5 !important;
  }

  body .staff-details-page .staff-summary-report-card > strong {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body .staff-details-page .staff-summary-report-card > .staff-summary-report-count {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    display: inline-flex !important;
    min-width: 34px !important;
    min-height: 28px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    background: #6A2875 !important;
    color: #fff !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  body .staff-details-page .staff-summary-report-card > .staff-summary-report-link {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-top: 3px !important;
    color: #6A2875 !important;
    font-weight: 600 !important;
  }

  body .staff-details-page .approved-doc-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body .staff-details-page .approved-doc-toolbar > div,
  body .staff-details-page .approved-doc-search,
  body .staff-details-page .approved-doc-search label,
  body .staff-details-page .approved-doc-search input,
  body .staff-details-page .approved-doc-search select,
  body .staff-details-page .approved-doc-search button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body .staff-details-page .approved-doc-search {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body .staff-details-page .approved-doc-search label {
    display: grid !important;
    gap: 6px !important;
  }

  body .staff-details-page .approved-doc-search input,
  body .staff-details-page .approved-doc-search select,
  body .staff-details-page .approved-doc-search button {
    min-height: 44px !important;
  }

  body .staff-details-page .approved-doc-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 390px) {
  body .staff-details-page .staff-summary-item:not(.staff-summary-report-card) {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 5px !important;
  }

  body .staff-details-page .staff-summary-item:not(.staff-summary-report-card) > .staff-summary-report-link {
    grid-column: 1 !important;
  }
}
/* END AICS USERS & STAFF DETAILS MOBILE STRONG V2.3 */

/* AICS USERS STAFF EDIT SAME SCREEN STRONG V2.4 START 2026-08-25 */
@media (max-width: 767px) {
  body.aics-staff-edit-mobile-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .aics-staff-edit-mobile-panel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147482000 !important;
    width: 100vw !important;
    max-width: none !important;
    min-height: 100dvh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px calc(env(safe-area-inset-bottom, 0px) + 28px) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f7f3f8 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .aics-staff-edit-mobile-toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    margin: -2px -2px 14px;
    padding: 8px;
    border: 1px solid #e4d4e8;
    border-radius: 14px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 8px 22px rgba(78,32,88,.12);
    backdrop-filter: blur(8px);
  }

  .aics-staff-edit-mobile-back {
    flex: 0 0 auto;
    min-height: 44px !important;
    padding: 10px 14px !important;
    border: 1px solid #d9bddf !important;
    border-radius: 11px !important;
    background: #efe2f2 !important;
    color: #6a2875 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    white-space: nowrap;
  }

  .aics-staff-edit-mobile-back:hover,
  .aics-staff-edit-mobile-back:focus-visible {
    background: #dfc7e5 !important;
    outline: 3px solid rgba(106,40,117,.18) !important;
    outline-offset: 2px;
  }

  .aics-staff-edit-mobile-context {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .aics-staff-edit-mobile-context strong {
    color: #17152d;
    font-size: .95rem;
    line-height: 1.2;
  }
  .aics-staff-edit-mobile-context span {
    color: #675d70;
    font-size: .78rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .aics-staff-edit-mobile-panel > h2 {
    margin: 0 0 12px !important;
    padding: 0 2px !important;
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }

  .aics-staff-edit-mobile-panel > form.form {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .aics-staff-edit-mobile-panel > form.form > label,
  .aics-staff-edit-mobile-panel > form.form > section,
  .aics-staff-edit-mobile-panel .award-classification-grid > label,
  .aics-staff-edit-mobile-panel .award-change-reason {
    min-width: 0 !important;
    width: 100% !important;
  }

  .aics-staff-edit-mobile-panel input,
  .aics-staff-edit-mobile-panel select,
  .aics-staff-edit-mobile-panel textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }

  .aics-staff-edit-mobile-panel .award-classification-panel {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 2px 0 !important;
    padding: 14px !important;
    border: 1px solid #dfcde3 !important;
    border-radius: 14px !important;
    background: #fff !important;
  }
  .aics-staff-edit-mobile-panel .award-classification-heading,
  .aics-staff-edit-mobile-panel .award-classification-grid {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 10px !important;
  }
  .aics-staff-edit-mobile-panel .award-classification-heading .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .aics-staff-edit-mobile-panel > form.form > button.btn,
  .aics-staff-edit-mobile-panel > form.form > a.btn {
    width: 100% !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .aics-staff-edit-mobile-panel #assigned-participants {
    margin-top: 18px !important;
    padding-top: 4px !important;
  }
  .aics-staff-edit-mobile-panel #assigned-participants .table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 768px) {
  .aics-staff-edit-mobile-toolbar { display: none !important; }
}
/* AICS USERS STAFF EDIT SAME SCREEN STRONG V2.4 END 2026-08-25 */\n\n/* AICS USERS STAFF EDIT + PAGINATION MOBILE STRONG V2.5 START 2026-08-25 */
@media (max-width: 767px) {
  /* Assigned Participants is an operational list inside Edit Staff. Keep it readable
     as native mobile cards rather than forcing an 8-column desktop table sideways. */
  html body .aics-staff-edit-mobile-panel #assigned-participants {
    width: 100% !important;
    min-width: 0 !important;
    margin: 20px 0 0 !important;
    padding: 14px !important;
    border: 1px solid #dfcde3 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants > h3 {
    margin: 0 0 6px !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    color: #17152d !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants > p.muted {
    margin: 0 0 12px !important;
    line-height: 1.45 !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table,
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table tbody > tr {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 1px solid #e4d4e8 !important;
    border-radius: 14px !important;
    background: #fbf9fc !important;
    overflow: hidden !important;
    box-shadow: 0 4px 14px rgba(78,32,88,.05) !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table tbody > tr:last-child {
    margin-bottom: 0 !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 9px 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #eee5f0 !important;
    background: transparent !important;
    color: #17152d !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:last-child {
    border-bottom: 0 !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td::before {
    display: block !important;
    margin: 0 0 3px !important;
    color: #685873 !important;
    font-size: .68rem !important;
    font-weight: 900 !important;
    letter-spacing: .045em !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(1)::before { content: "Participant"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(2)::before { content: "House / Location"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(3)::before { content: "Assignment Type"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(4)::before { content: "Start"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(5)::before { content: "End"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(6)::before { content: "Medicine Chart"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(7)::before { content: "Status"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-table td:nth-child(8)::before { content: "Actions"; }

  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participant-action {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 8px !important;
    background: #fff !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participant-action details,
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participant-action form {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participant-action summary.btn,
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participant-action > form > button.btn {
    width: 100% !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participant-edit-form {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 10px !important;
    margin-top: 10px !important;
    padding: 12px !important;
    border: 1px solid #e4d4e8 !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  /* Assigned Participants pagination: server remains authoritative at 10 per page. */
  html body .aics-staff-edit-mobile-panel #assigned-participants .assigned-participants-pagination {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 12px !important;
    padding: 12px !important;
    border: 1px solid #e4d4e8 !important;
    border-radius: 14px !important;
    background: #f8f4f9 !important;
    box-sizing: border-box !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-summary {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    color: #4f3159 !important;
    font-size: .86rem !important;
    font-weight: 850 !important;
    line-height: 1.35 !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-summary::after { content: " Participants"; }
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 1px 0 4px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  /* Mobile keeps Previous / page numbers / Next. First, Last, page-position and jump are redundant here. */
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-controls > :first-child,
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-controls > :nth-last-child(3),
  html body .aics-staff-edit-mobile-panel #assigned-participants .page-position,
  html body .aics-staff-edit-mobile-panel #assigned-participants .page-jump-form {
    display: none !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-controls > a,
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-controls > .pagination-disabled {
    flex: 0 0 auto !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 9px 12px !important;
    border: 1px solid #d9bddf !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #6a2875 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-controls > a.active {
    border-color: #6a2875 !important;
    background: #6a2875 !important;
    color: #fff !important;
  }
  html body .aics-staff-edit-mobile-panel #assigned-participants .pagination-controls > .pagination-disabled {
    opacity: .42 !important;
  }

  /* Main Staff list pagination gets the same readable mobile treatment. */
  html body #staffListSection .staff-pagination {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    margin-top: 14px !important;
    padding: 12px !important;
    border: 1px solid #e4d4e8 !important;
    border-radius: 14px !important;
    background: #f8f4f9 !important;
    box-sizing: border-box !important;
  }
  html body #staffListSection .staff-pagination-summary {
    width: 100% !important;
    white-space: normal !important;
    color: #4f3159 !important;
    font-weight: 850 !important;
  }
  html body #staffListSection .staff-pagination .page-links {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 1px 0 4px !important;
  }
  html body #staffListSection .staff-pagination .page-links > :first-child,
  html body #staffListSection .staff-pagination .page-links > :nth-last-child(3),
  html body #staffListSection .staff-pagination .page-position,
  html body #staffListSection .staff-pagination .page-jump-form {
    display: none !important;
  }
  html body #staffListSection .staff-pagination .page-links > a,
  html body #staffListSection .staff-pagination .page-links > .pagination-disabled {
    flex: 0 0 auto !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 9px 12px !important;
    border: 1px solid #d9bddf !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #6a2875 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }
  html body #staffListSection .staff-pagination .page-links > a.active {
    border-color: #6a2875 !important;
    background: #6a2875 !important;
    color: #fff !important;
  }
  html body #staffListSection .staff-pagination .page-links > .pagination-disabled { opacity: .42 !important; }
}
/* AICS USERS STAFF EDIT + PAGINATION MOBILE STRONG V2.5 END 2026-08-25 */


/* ==========================================================================
   AICS STAFF DETAILS DESKTOP/TABLET LAYOUT FIX V1 - 2026-08-26
   Scope: .staff-details-page only, min-width 768px. Presentation only.
   Restores structured label/value cards when route-specific legacy CSS is
   unavailable or not applied. Mobile V2.3 rules remain authoritative <768px.
   ========================================================================== */
@media (min-width: 768px) {
  html body .staff-details-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html body .staff-details-page .staff-details-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    margin-bottom: 16px !important;
  }

  html body .staff-details-page .staff-details-header > div {
    flex: 1 1 420px !important;
    min-width: 0 !important;
  }

  html body .staff-details-page .staff-details-header > .btn {
    flex: 0 0 auto !important;
    min-height: 42px !important;
  }

  html body .staff-details-page .staff-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 12px !important;
  }

  html body .staff-details-page .staff-summary-item {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 13px 14px !important;
    border: 1px solid #eadcef !important;
    border-radius: 12px !important;
    background: #fbf7fc !important;
    color: #171425 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
  }

  html body .staff-details-page .staff-summary-item > strong {
    display: block !important;
    margin: 0 0 5px !important;
    color: #6A2875 !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }

  html body .staff-details-page .staff-summary-item > span {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
  }

  html body .staff-details-page .staff-summary-item > br {
    display: none !important;
  }

  html body .staff-details-page .staff-summary-item > .staff-summary-report-link {
    display: inline-block !important;
    margin-top: 6px !important;
    color: #6A2875 !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }

  html body .staff-details-page .staff-summary-item > .status {
    display: inline-flex !important;
    width: max-content !important;
    max-width: 100% !important;
    min-height: 28px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  html body .staff-details-page .staff-summary-report-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 112px !important;
    background: #f8f0fa !important;
    border-color: #dfc7e5 !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease !important;
  }

  html body .staff-details-page .staff-summary-report-card:hover,
  html body .staff-details-page .staff-summary-report-card:focus-visible {
    border-color: #7b2d87 !important;
    box-shadow: 0 8px 20px rgba(106,40,117,.12) !important;
    transform: translateY(-1px) !important;
    outline: none !important;
  }

  html body .staff-details-page .staff-summary-report-card > .staff-summary-report-count {
    display: block !important;
    margin: 2px 0 7px !important;
    color: #6A2875 !important;
    font-size: 30px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  html body .staff-details-page .approved-doc-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin: 18px 0 12px !important;
  }

  html body .staff-details-page .approved-doc-search {
    display: flex !important;
    gap: 8px !important;
    align-items: flex-end !important;
    flex-wrap: wrap !important;
  }

  html body .staff-details-page .approved-doc-search label {
    display: grid !important;
    gap: 6px !important;
    margin: 0 !important;
    min-width: 180px !important;
  }

  html body .staff-details-page .approved-doc-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  html body .staff-details-page .staff-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
/* END AICS STAFF DETAILS DESKTOP/TABLET LAYOUT FIX V1 */

/* AICS Users Edit + Team Leader Dependency V1 — desktop/tablet only. */
@media (min-width: 768px) {
  html body .users-single-column-fix {
    width: 100% !important;
    max-width: none !important;
  }
  html body .users-single-column-fix > .card {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  html body #editUserForm.users-edit-form {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px 20px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: none !important;
  }
  html body #editUserForm.users-edit-form > label {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  html body #editUserForm.users-edit-form > label > input,
  html body #editUserForm.users-edit-form > label > select {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  html body #editUserForm.users-edit-form .working-restrictions-help {
    display: block !important;
    margin-top: 2px !important;
    line-height: 1.4 !important;
  }
  html body #editUserForm.users-edit-form > .award-classification-panel.form-full-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 2px 0 0 !important;
    box-sizing: border-box !important;
  }
  html body #editUserForm.users-edit-form .award-classification-heading {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
  }
  html body #editUserForm.users-edit-form .award-classification-heading > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  html body #editUserForm.users-edit-form .award-classification-heading strong,
  html body #editUserForm.users-edit-form .award-classification-heading span {
    display: block !important;
  }
  html body #editUserForm.users-edit-form .award-classification-heading span {
    margin-top: 4px !important;
    line-height: 1.45 !important;
  }
  html body #editUserForm.users-edit-form .award-classification-heading > .btn {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 240px !important;
  }
  html body #editUserForm.users-edit-form .award-classification-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px 16px !important;
    width: 100% !important;
  }
  html body #editUserForm.users-edit-form .award-classification-grid > label {
    min-width: 0 !important;
    margin: 0 !important;
  }
  html body #editUserForm.users-edit-form .award-classification-grid input,
  html body #editUserForm.users-edit-form .award-classification-grid select {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  html body #editUserForm.users-edit-form .award-change-reason {
    grid-column: 1 / -1 !important;
  }
  html body #editUserForm.users-edit-form .users-edit-actions {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    padding-top: 2px !important;
  }
  html body #editUserForm.users-edit-form .users-edit-actions > .btn {
    width: auto !important;
    min-width: 170px !important;
  }

  html body #teamLeaderDependencyModal .confirm-modal {
    max-width: 760px !important;
  }
  html body #teamLeaderDependencyModal .team-leader-house-list {
    display: grid !important;
    gap: 10px !important;
    list-style: none !important;
    margin: 12px 0 16px !important;
    padding: 0 !important;
  }
  html body #teamLeaderDependencyModal .team-leader-house-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding: 12px 14px !important;
    border: 1px solid #eadcef !important;
    border-radius: 12px !important;
    background: #fbf7fc !important;
  }
  html body #teamLeaderDependencyModal .team-leader-house-copy {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  html body #teamLeaderDependencyModal .team-leader-house-copy strong,
  html body #teamLeaderDependencyModal .team-leader-house-copy span {
    display: block !important;
    overflow-wrap: anywhere !important;
  }
  html body #teamLeaderDependencyModal .team-leader-house-copy strong {
    color: #3f1b47 !important;
  }
  html body #teamLeaderDependencyModal .team-leader-house-copy span {
    margin-top: 3px !important;
    color: #667085 !important;
    font-size: 13px !important;
  }
  html body #teamLeaderDependencyModal .team-leader-open-house {
    width: auto !important;
    min-width: 112px !important;
    flex: 0 0 auto !important;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  html body #editUserForm.users-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body #editUserForm.users-edit-form .award-classification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  html body #teamLeaderDependencyModal .team-leader-house-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 12px 0 16px;
    padding: 0;
  }
  html body #teamLeaderDependencyModal .team-leader-house-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #eadcef;
    border-radius: 12px;
    background: #fbf7fc;
  }
  html body #teamLeaderDependencyModal .team-leader-house-copy strong,
  html body #teamLeaderDependencyModal .team-leader-house-copy span {
    display: block;
    overflow-wrap: anywhere;
  }
  html body #teamLeaderDependencyModal .team-leader-house-copy span {
    margin-top: 3px;
    color: #667085;
    font-size: 13px;
  }
  html body #teamLeaderDependencyModal .team-leader-open-house {
    width: 100%;
    min-height: 44px;
  }
}

