/* Base containers */
.cea-employee-list{max-width:var(--cea-container-max-width,1000px);margin:var(--cea-container-margin,0 auto);padding:16px;width:100%;box-sizing:border-box;}
.cea-profile{display:block;width:var(--cea-prof-container-width,100%) !important;max-width:var(--cea-prof-container-max-width,1000px) !important;margin:var(--cea-prof-container-margin,0 auto) !important;padding:16px;box-sizing:border-box;flex:1 1 auto;min-width:0;}
.cea-wrap.cea-dashboard{max-width:var(--cea-dash-container-max-width,1000px);margin:var(--cea-dash-container-margin,0 auto);padding:16px;width:100%;box-sizing:border-box;}
.cea-wrap{max-width:var(--cea-container-max-width,1000px);margin:var(--cea-container-margin,0 auto);padding:16px;width:100%;box-sizing:border-box;}

/* Permissions card should be full-width (within the page content area) and never overflow the viewport. */
.cea-wrap.cea-permissions-card{max-width:100%;width:100%;margin:0 auto;padding:0;min-width:0;flex:1 1 auto;}
.cea-permissions-shell{max-width:100%;width:100%;overflow:hidden;min-width:0;}
.cea-permissions-page .cea-permissions-shell{
  background: var(--bsd-surface, #fff);
  border: 1px solid var(--bsd-border, rgba(0,0,0,0.12));
  border-radius: var(--bsd-radius, 16px);
  box-shadow: var(--bsd-shadow, 0 1px 3px rgba(0,0,0,0.08));
}

/* Permissions page: prevent any page-level horizontal scroll caused by theme flex wrappers */
.cea-no-x, .cea-no-x body{overflow-x:hidden;}
/* Permissions page wrapper: must never exceed its parent content width.
   Avoid 100vw (includes scrollbars and can overflow in dashboard shells). */
.cea-permissions-page{width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden;}
.cea-permissions-page .cea-wrap.cea-permissions-card{width:100%;max-width:100%;box-sizing:border-box;margin-left:auto;margin-right:auto;min-width:0;}
.cea-permissions-page .cea-permissions-shell{width:100%;max-width:100%;box-sizing:border-box;min-width:0;}

/*
 * Theme compatibility: some dashboard themes implement card "bleed" effects
 * (negative margins / wider-than-parent widths). Clamp those within the
 * Permissions page so the card never extends beyond the content column.
 */
.cea-permissions-page .bsd-card,
.cea-permissions-page .cea-card{
  width:100% !important;
  max-width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}
/* Permissions Card: ensure nothing can force horizontal overflow */
.cea-wrap.cea-permissions-card,
.cea-permissions-shell{box-sizing:border-box;max-width:100%;width:100%;}
.cea-permissions-shell *{box-sizing:border-box;}
.cea-perm-section-head{flex-wrap:wrap;}
.cea-perm-item{min-width:0;max-width:100%;}
.cea-perm-item-label,
.cea-perm-item-help{overflow-wrap:anywhere;word-break:break-word;}
.cea-perm-role-select{margin:12px 0 18px 0;}
.cea-perm-role-select select{width:100%;max-width:520px;box-sizing:border-box;}

.cea-perm-section{margin-top:14px;}
.cea-perm-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.cea-perm-section-head h3{margin:0;}
.cea-perm-selectall{display:flex;align-items:center;gap:6px;white-space:nowrap;font-weight:600;}
.cea-perm-note{margin:8px 0 0 0;opacity:0.85;}

.cea-perm-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;min-width:0;}
.cea-perm-item{flex:1 1 260px;min-width:0;}
.cea-perm-item{display:block;border:1px solid var(--bsd-border,var(--cea-prof-border,#ddd));background:var(--bsd-surface,transparent);padding:10px;border-radius:12px;}
.cea-perm-item-row{display:flex;gap:10px;align-items:flex-start;}
.cea-perm-item input[type="checkbox"]{margin-top:3px;}
.cea-perm-item-label{font-weight:600;}
.cea-perm-item-help{font-size:0.92em;opacity:0.85;}

.cea-perm-actions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap;}

/* Make sure long content can't push the page horizontally */
.cea-permissions-card, .cea-permissions-card *{box-sizing:border-box;}
.cea-permissions-shell{overflow-x:hidden;}
.cea-perm-item,.cea-perm-item-row,.cea-perm-item-label,.cea-perm-item-help{min-width:0;}
.cea-perm-item-help{overflow-wrap:anywhere;}

/* Very small screens: let permission tiles stack without forcing horizontal scroll */
@media (max-width: 560px){
  .cea-perm-item{flex:1 1 100%;min-width:0;}
}

/* If the legacy File Manager permissions UI is still present on the page, prevent it from causing
   a page-level horizontal scrollbar by containing overflow within its own wrapper. */
.bsfm-perms-tablewrap,
.bsfm-perms-table-wrap,
.bsfm-perms-table-wrap *{box-sizing:border-box;}
.bsfm-perms-tablewrap,
.bsfm-perms-table-wrap{max-width:100%;overflow-x:auto;}
.bsfm-perms-table{max-width:100%;width:100%;}

/* Breakout mode: span full viewport width (helps when themes constrain content width). */
.cea-employee-list.cea-breakout{max-width:calc(100vw - (2 * var(--cea-side-margin,0px))) !important;width:calc(100vw - (2 * var(--cea-side-margin,0px))) !important;margin-left:calc(50% - 50vw + var(--cea-side-margin,0px)) !important;margin-right:0 !important;}
/* Breakout mode for profile.
   Use a transform-based centering technique. This survives more parent layout constraints
   than margin-left calc() and is less likely to collapse inside "app-shell" themes.
*/
.cea-profile.cea-breakout{
  position:relative !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  margin-left:0 !important;
  margin-right:0 !important;
  max-width:none !important;
  width:calc(100vw - (2 * var(--cea-prof-side-margin,0px))) !important;
}
.cea-wrap.cea-dashboard.cea-breakout{max-width:calc(100vw - (2 * var(--cea-dash-side-margin,0px))) !important;width:calc(100vw - (2 * var(--cea-dash-side-margin,0px))) !important;margin-left:calc(50% - 50vw + var(--cea-dash-side-margin,0px)) !important;margin-right:0 !important;}

/* Memberlite/Memberlite Child can apply max-width constraints to inner blocks.
   Force our breakout containers to truly span the viewport. */
/* Keep these selectors for older cached styles; breakout behavior is now the default above. */
.memberlite .cea-profile.cea-breakout,
.memberlite-child .cea-profile.cea-breakout,
body[class*="memberlite"] .cea-profile.cea-breakout{ }

/* Ensure transform doesn't cause blurriness on some browsers */
.cea-profile.cea-breakout{will-change:transform;}
.cea-profile{display:block;}
.cea-profile form{width:100%;max-width:none;}
.cea-profile-top{width:100%;}
.cea-profile-top-left,.cea-profile-top-right{min-width:0;}

/* Profile top section: some themes apply narrow widths to forms; force full-width grid. */
.cea-profile-top{display:block !important;width:100% !important;max-width:none !important;}

/* Employee list page shell */
.cea-employee-list-page{width:100%;max-width:100%;box-sizing:border-box;}
.cea-wrap.cea-employee-list-wrap{width:calc(100% - 7%) !important;max-width:calc(100% - 7%) !important;min-width:0;margin:0 3.5% !important;padding:0;box-sizing:border-box;}
.cea-employee-list-shell{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow:hidden;margin:0;}
.cea-employee-list-shell *{box-sizing:border-box;}
.cea-employee-list-shell .cea-table-wrap{display:block;}
.cea-employee-list-shell .cea-filter label{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;}
.cea-employee-list-shell .cea-table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.cea-employee-list-shell .cea-table{width:100%;min-width:620px;}
.cea-employee-list-shell .cea-table thead th{background:var(--cea-el-header-bg,#f1f1f1) !important;color:var(--cea-el-header-text,#111) !important;text-align:left;padding:10px;border:1px solid var(--cea-el-border,#ddd) !important;}
.cea-employee-list-shell .cea-table tbody td{padding:10px;border:1px solid var(--cea-el-border,#ddd) !important;}
.cea-employee-list-shell .cea-table tbody tr:hover td{background:var(--cea-el-row-hover,#fafafa);}
.cea-employee-list-actions{display:flex;justify-content:flex-start;align-items:center;margin-top:20px;}
.cea-employee-list-actions .button{margin:0;}
@media (max-width: 900px){
  .cea-wrap.cea-employee-list-wrap{width:100% !important;max-width:100% !important;margin:0 !important;padding:0;}
}
@media (max-width: 640px){
  .cea-employee-list-shell .cea-table{min-width:0;}
  .cea-employee-list-shell .cea-filter label{display:flex;align-items:flex-start;}
  .cea-employee-list-shell .cea-filter select{width:100%;}
  .cea-employee-list-actions .button{width:100%;text-align:center;}
}

.cea-profile-form{display:block;width:100% !important;max-width:none !important;box-sizing:border-box;}
.cea-profile-top-grid{display:grid;grid-template-columns:240px minmax(0,1fr);gap:16px;align-items:start;width:100%;max-width:none;box-sizing:border-box;}
.cea-profile-sections{width:100%;max-width:none;box-sizing:border-box;}
.cea-profile-top-left,.cea-profile-top-right{min-width:0;}
.cea-profile-top-right .cea-card,.cea-profile-top-left .cea-card{max-width:100%;box-sizing:border-box;}
.cea-profile-top-right{overflow-wrap:anywhere;}
@media (max-width: 800px){.cea-profile-top-grid{grid-template-columns:1fr !important;}}

.cea-card{border:1px solid var(--bsd-border,var(--cea-el-border,#ddd));border-radius:var(--bsd-radius,10px);padding:16px;margin:16px 0;background:var(--bsd-surface,var(--cea-el-bg,#fff));color:var(--bsd-text,inherit);box-shadow:var(--bsd-shadow,none);}

/* Profile header (name + meta + termination badge) */
.cea-profile-header{margin:0 0 12px 0;}
.cea-profile-header-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.cea-profile-name{margin:0;line-height:1.2;}
.cea-profile-meta{color:#666;margin-top:4px;}
.cea-badge{display:inline-block;font-size:12px;line-height:1;border-radius:999px;padding:6px 10px;border:1px solid transparent;}
.cea-badge-terminated{background:#ffe6e6;border-color:#ffb3b3;color:#7a0000;}

/* Collapsible cards */
.cea-collapsible{padding:0;}
.cea-collapsible > summary{cursor:pointer;list-style:none;padding:16px;}
.cea-collapsible > summary::-webkit-details-marker{display:none;}
.cea-collapsible[open] > summary{border-bottom:1px solid var(--cea-el-border,#ddd);} 
.cea-collapsible .cea-notes,.cea-collapsible .cea-note-add,.cea-collapsible p{padding:16px;margin:0;}
.cea-note{border:1px solid var(--cea-el-border,#ddd);border-radius:8px;padding:10px 12px;margin:0 0 10px 0;background:#fafafa;}
.cea-note-meta{font-size:12px;color:#555;margin-bottom:6px;}
.cea-note-body{white-space:pre-wrap;}
.cea-note-add textarea{width:100%;box-sizing:border-box;min-height:80px;}
.cea-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;min-width:0;}
/* In the profile details panel, keep fields in a single column to prevent overflow in narrow panes. */
.cea-profile-top-right .cea-grid{grid-template-columns:repeat(2,minmax(220px,1fr));}
.cea-grid-2{grid-template-columns:repeat(2,minmax(220px,1fr));}

@media (max-width: 720px){
  .cea-profile-top-right .cea-grid,
  .cea-grid-2{grid-template-columns:1fr;}
}
.cea-profile-top-right .cea-grid label,.cea-profile-top-right .cea-grid input,.cea-profile-top-right .cea-grid select{min-width:0;max-width:100%;box-sizing:border-box;}

/* Profile layout: photo left + details right; training/forms full-width below */
/* Two-column layout is controlled by .cea-profile-form. Keep .cea-profile-top as a block wrapper. */
.cea-photo-wrap{margin-bottom:10px;}
.cea-photo-upload input[type=file]{max-width:100%;}
.cea-profile-bottom{margin-top:16px;}
.cea-profile-photo.placeholder{width:96px;height:96px;border-radius:14px;background:#f3f3f3;border:1px solid #ddd;}
.cea-profile-photo{border-radius:14px;}
.cea-notice{padding:10px 12px;border-radius:8px;margin:12px 0;}
.cea-notice.cea-error{background:#fff1f0;border:1px solid #ffa39e;}
.cea-notice.cea-success{background:#f6ffed;border:1px solid #b7eb8f;}
.cea-table{width:100%;border-collapse:collapse;}
/* Default table style (employee list) */
.cea-employee-list .cea-table th{background:var(--cea-el-header-bg,#f1f1f1);color:var(--cea-el-header-text,#111);text-align:left;padding:10px;border:1px solid var(--cea-el-border,#ddd);}
.cea-employee-list .cea-table td{padding:10px;border:1px solid var(--cea-el-border,#ddd);}
.cea-employee-list .cea-table tr:hover td{background:var(--cea-el-row-hover,#fafafa);}
.cea-employee-list .cea-table a{color:var(--cea-el-link,#2271b1);text-decoration:none;}

/* Profile table style */
.cea-profile .cea-table th{background:var(--cea-prof-header-bg,#f1f1f1);color:var(--cea-prof-header-text,#111);text-align:left;padding:10px;border:1px solid var(--cea-prof-border,#ddd);}
.cea-profile .cea-table td{padding:10px;border:1px solid var(--cea-prof-border,#ddd);}
.cea-profile .cea-table tr:hover td{background:var(--cea-prof-row-hover,#fafafa);}
.cea-profile .cea-table a{color:var(--cea-prof-link,#2271b1);text-decoration:none;}

/* Dashboard table style */
.cea-dashboard .cea-table th{background:var(--cea-dash-header-bg,#f1f1f1);color:var(--cea-dash-header-text,#111);text-align:left;padding:10px;border:1px solid var(--cea-dash-border,#ddd);}
.cea-dashboard .cea-table td{padding:10px;border:1px solid var(--cea-dash-border,#ddd);}
.cea-dashboard .cea-table tr:hover td{background:var(--cea-dash-row-hover,#fafafa);}
.cea-dashboard .cea-table a{color:var(--cea-dash-link,#2271b1);text-decoration:none;}

.cea-table a:hover{text-decoration:underline;}
.cea-actions .button{margin-right:6px;}
.cea-pagination{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;}
.cea-page{display:inline-block;padding:6px 10px;border:1px solid var(--cea-el-border,#ddd);border-radius:8px;text-decoration:none;}
.cea-page-active{font-weight:600;background:#f6f7f7;}
.cea-list{margin:0;padding-left:18px;}
.cea-muted{color:#666;}
.cea-login-card{max-width:420px;margin:40px auto;padding:22px;border:1px solid #ddd;border-radius:14px;background:#fff;}
.cea-login-header{display:flex;align-items:center;gap:12px;margin-bottom:14px;}
.cea-login-header img{width:40px;height:40px;}
.cea-login-title{font-size:22px;margin:0;}
.cea-login-sub{color:#555;margin:0 0 12px 0;}
.cea-login-card input[type=text],.cea-login-card input[type=password]{width:100%;padding:10px;border:1px solid #ccc;border-radius:8px;}
.cea-login-row{margin:12px 0;}
.cea-login-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;}

/* Login branding */
.cea-login-brand{display:flex;align-items:center;justify-content:center;margin-bottom:14px;}
.cea-login-logo{display:block;max-width:240px;width:auto;height:auto;margin:0 auto;}

/* v1.3.7 layout + spacing fixes */

/* Ensure dashboard form fields have breathing room and never overlap (theme CSS can interfere). */
.cea-dashboard .cea-grid{gap:12px;}
.cea-dashboard .cea-grid label{display:block;min-width:0;}
.cea-dashboard .cea-grid input,.cea-dashboard .cea-grid select{width:100%;box-sizing:border-box;}
.cea-dashboard form p{margin-top:18px;}
.cea-dashboard form p .button{margin-top:12px;}

/* Profile: the form wraps the two top columns; make the form itself the grid container. */
.cea-profile{width:100% !important;box-sizing:border-box;}
.cea-profile-top form{display:grid;grid-template-columns:240px 1fr;gap:16px;align-items:start;width:100%;}
@media (max-width: 800px){.cea-profile-top form{grid-template-columns:1fr;}}
.cea-profile-top-left,.cea-profile-top-right{min-width:0;}
.cea-profile .cea-grid label{display:block;min-width:0;}
.cea-profile .cea-grid input,.cea-profile .cea-grid select{width:100%;box-sizing:border-box;}

/* Memberlite Child theme: profile breakout inside constrained .row container.
   Use a margin-based full-viewport breakout that tends to survive more theme constraints. */
body[class*="memberlite"] .row .cea-profile.cea-breakout,
.memberlite .row .cea-profile.cea-breakout,
.memberlite-child .row .cea-profile.cea-breakout{
  position:relative !important;
  left:0 !important;
  transform:none !important;
  width:calc(100vw - (2 * var(--cea-prof-side-margin,0px))) !important;
  max-width:none !important;
  margin-left:calc(50% - 50vw + var(--cea-prof-side-margin,0px)) !important;
  margin-right:0 !important;
  display:block !important;
}

/* Ensure the grid/form uses the full available width in Memberlite layouts. */
body[class*="memberlite"] .row .cea-profile.cea-breakout form,
.memberlite .row .cea-profile.cea-breakout form,
.memberlite-child .row .cea-profile.cea-breakout form{
  width:100% !important;
  max-width:none !important;
}

/* Build Safe Dashboard theme (and similar app-shell layouts):
   If the profile is inside a main content pane (e.g., <main class="bsd-content">),
   viewport breakout (100vw) can be clipped by parent overflow/sidebars.
   In that case, treat "100%" as "fill the content pane" instead of full viewport.
*/
.bsd-content .cea-profile,
.bsd-content .cea-profile form,
.bsd-content .cea-profile-top,
.bsd-content .cea-profile-top form{
  max-width:none !important;
  width:100% !important;
}

/* Note: We no longer disable breakout inside .bsd-content.
   Instead we ensure wrappers allow overflow (see rules below),
   so breakout can render correctly in app-shell layouts. */
/* If the theme wraps content in a card/article with a max-width or overflow clipping,
   breakout needs those wrappers to allow overflow. This is common in dashboard layouts.
   Keep the scope narrow to bsd-* wrappers. */
.bsd-content,
.bsd-main,
.bsd-content article,
.bsd-content .bsd-card,
.bsd-content .bsd-entry-content{
  max-width:none !important;
  width:100% !important;
  overflow:visible !important;
}

/* Phase 1/2 profile layout refinements */
.cea-profile-form{box-sizing:border-box;}
.cea-profile-fullwidth{grid-column:1 / -1; width:100%; box-sizing:border-box; display:block;}
.cea-full{width:100%; box-sizing:border-box;}

/* Collapsible summary with clear toggle */
.cea-collapsible-summary{display:flex;align-items:center;gap:10px;}
.cea-caret{display:inline-block;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:8px solid currentColor;opacity:.7;transition:transform .15s ease;}
.cea-collapsible[open] .cea-caret{transform:rotate(90deg);} 
.cea-collapsible-title{font-weight:600;}
.cea-collapsible-hint{margin-left:auto;font-size:12px;opacity:.65;}

/* Training snapshot */
.cea-training-snapshot .cea-snapshot-lines{display:flex;flex-direction:column;gap:6px;margin-top:8px;}
.cea-training-snapshot .cea-snapshot-line{font-size:14px;}

/* Credentials */
.cea-creds-list{display:flex;flex-direction:column;gap:12px;margin-top:10px;}
.cea-cred{border:1px solid var(--cea-el-border,#ddd);border-radius:10px;padding:12px;}
.cea-cred-top{display:flex;align-items:center;gap:10px;justify-content:space-between;}
.cea-cred-name{font-weight:700;}
.cea-cred-meta{display:flex;gap:18px;flex-wrap:wrap;margin-top:6px;font-size:13px;}
.cea-cred-actions{margin-top:10px;}
.cea-cred-add{margin-top:14px;border-top:1px solid var(--cea-el-border,#ddd);padding-top:14px;}

.cea-pill{display:inline-block;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:700;line-height:1;white-space:nowrap;}
.cea-pill-ok{background:#e7f7ee;color:#126b2f;}
.cea-pill-warn{background:#fff4d6;color:#8a5a00;}
.cea-pill-danger{background:#fde2e2;color:#8a1f1f;}
.cea-pill-neutral{background:#f1f3f5;color:#444;}

/* Ensure details grid doesn't overflow */
.cea-profile-top-right .cea-grid{min-width:0;}
.cea-profile-top-right input,.cea-profile-top-right select,.cea-profile-top-right textarea{max-width:100%;box-sizing:border-box;}



/* --- CEA profile layout hardening (v1.6.3) --- */
.cea-profile-form{width:100% !important;max-width:none !important;display:block !important;}
.cea-profile-top-grid{width:100% !important;max-width:none !important;display:grid !important;grid-template-columns:240px minmax(0,1fr) !important;gap:16px !important;align-items:start !important;}
.cea-profile-top-left,.cea-profile-top-right{min-width:0 !important;max-width:none !important;display:block !important;}
.cea-profile-sections{width:100% !important;max-width:none !important;display:block !important;}
/* Ensure details card cannot disappear due to overflow */
.cea-profile-top-right .cea-card{max-width:100% !important;overflow:visible !important;}

/* --- Permissions Card hard clamp (page-scoped) --- */
.cea-permissions-page, .cea-permissions-page * { max-width: 100%; }
.cea-permissions-page .cea-permissions-shell { overflow:hidden !important; }
.cea-permissions-page .cea-wrap.cea-permissions-card { padding: 0 !important; }
.cea-permissions-page .cea-permissions-shell { margin: 0 !important; }
.cea-permissions-page .cea-perm-section, 
.cea-permissions-page .cea-perm-section-head, 
.cea-permissions-page .cea-perm-items { width:100% !important; max-width:100% !important; }
.cea-permissions-page .cea-perm-items { display:flex !important; flex-wrap:wrap !important; gap:12px !important; }
.cea-permissions-page .cea-perm-item { flex: 1 1 320px !important; }
@media (max-width: 700px){
  .cea-permissions-page .cea-perm-item { flex-basis: 100% !important; }
}


/* Employee management layout + theme compatibility */
.cea-employee-management-page{width:100%;max-width:100%;box-sizing:border-box;}
.cea-wrap.cea-employee-management-wrap{
  width:calc(100% - 3.5%) !important;
  max-width:calc(100% - 3.5%) !important;
  min-width:0;
  margin:0 3.5% 0 0;
  padding:0;
}
.cea-employee-management-shell{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  overflow:hidden;
  margin:0;
}
.bsd-content .cea-employee-management-page,
.bsd-content .cea-wrap.cea-employee-management-wrap,
.bsd-content .cea-employee-management-shell{max-width:100% !important;}
.cea-employee-management-shell .cea-card{max-width:100%;min-width:0;box-sizing:border-box;}
.cea-employee-management-shell .cea-profile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;min-width:0;}
.cea-employee-management-shell .cea-profile-grid label{display:block;min-width:0;}
.cea-employee-management-shell .cea-profile-grid input,
.cea-employee-management-shell .cea-profile-grid select{width:100%;max-width:100%;box-sizing:border-box;min-width:0;}
.cea-employee-management-shell .cea-filters label{min-width:0;flex:1 1 220px;}
.cea-employee-management-shell .cea-filters input,
.cea-employee-management-shell .cea-filters select{width:100%;max-width:100%;box-sizing:border-box;min-width:0;}
.cea-employee-management-shell .cea-table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.cea-employee-management-shell .cea-table{min-width:760px;}
.cea-employee-management-shell .cea-table th,
.cea-employee-management-shell .cea-table td{vertical-align:middle;}
.cea-employee-list .cea-table a.button,
.cea-employee-list .cea-table a.button-small,
.cea-employee-management-shell .button,
.cea-employee-management-shell .button-small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--bsd-button-text,#fff) !important;
  text-decoration:none !important;
  white-space:nowrap;
}
.cea-employee-management-shell .button:hover,
.cea-employee-management-shell .button-small:hover{
  color:var(--bsd-button-text,#fff) !important;
}
@media (max-width: 900px){
  .cea-wrap.cea-employee-management-wrap{width:100% !important;max-width:100% !important;margin:0;padding:0;}
}

.cea-employee-management-shell .cea-employee-management-actions{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin:16px 0 0;}
.cea-employee-management-shell .cea-employee-management-actions .button{margin:0;}
.cea-employee-management-shell .cea-employee-management-actions .cea-save-button{order:1;}
.cea-employee-management-shell .cea-employee-management-actions .cea-close-button{order:2;margin-left:auto;}
@media (max-width: 640px){
  .cea-employee-management-shell .cea-employee-management-actions{justify-content:flex-start;align-items:stretch;}
  .cea-employee-management-shell .cea-employee-management-actions .cea-save-button,
  .cea-employee-management-shell .cea-employee-management-actions .cea-close-button{width:100%;margin-left:0;}
}


/* Org hierarchy shortcode */
.cea-org-hierarchy-page{width:100%;max-width:100%;box-sizing:border-box;}
.cea-wrap.cea-org-hierarchy-wrap{width:calc(100% - 7%) !important;max-width:calc(100% - 7%) !important;min-width:0;margin:0 3.5% !important;padding:0;box-sizing:border-box;}
.cea-org-hierarchy-card{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow:hidden;margin:0;}
.cea-org-hierarchy-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:16px;}
.cea-org-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.cea-org-controls .button{margin:0;}
.cea-org-viewport{width:100%;max-width:100%;overflow:auto;padding:8px 4px 16px;-webkit-overflow-scrolling:touch;border-radius:12px;}
.cea-org-canvas{min-width:100%;transform:scale(var(--cea-org-scale,1));transform-origin:top center;transition:transform .18s ease;}
.cea-org-tree-roots{display:flex;gap:24px;align-items:flex-start;justify-content:center;flex-wrap:wrap;}
.cea-org-branch{display:flex;flex-direction:column;align-items:flex-start;gap:14px;position:relative;min-width:280px;max-width:340px;flex:0 0 auto;}
.cea-org-children{display:flex;flex-direction:column;gap:14px;margin-left:28px;padding-left:18px;border-left:2px solid rgba(127,127,127,.22);}
.cea-org-node-card{width:100%;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 16px;border:1px solid rgba(127,127,127,.18);border-radius:16px;background:var(--cea-card-bg,var(--bsd-surface,#fff));box-shadow:0 6px 18px rgba(0,0,0,.06);box-sizing:border-box;}
.cea-org-node-main{display:flex;gap:12px;align-items:center;min-width:0;flex:1 1 auto;}
.cea-org-node-photo-wrap{flex:0 0 auto;}
.cea-org-node-photo{width:54px;height:54px;border-radius:999px;object-fit:cover;display:block;border:1px solid rgba(127,127,127,.22);background:#f3f3f3;}
.cea-org-node-photo-placeholder{background:rgba(127,127,127,.15);}
.cea-org-node-content{min-width:0;display:flex;flex-direction:column;gap:4px;}
.cea-org-node-name{font-weight:700;line-height:1.25;}
.cea-org-node-job{font-size:.95em;line-height:1.25;opacity:.9;}
.cea-org-node-job,.cea-org-node-name{word-break:break-word;}
.cea-org-node-actions{flex:0 0 auto;}
.cea-org-toggle{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;border:1px solid rgba(127,127,127,.22);background:transparent;cursor:pointer;}
.cea-org-toggle:before{content:'+';font-weight:700;line-height:1;}
.cea-org-node.is-expanded > .cea-org-node-card .cea-org-toggle:before{content:'−';}
.cea-org-node.is-expanded > .cea-org-node-card .cea-org-toggle .cea-org-toggle-text{content:'Collapse';}
@media (max-width: 900px){
  .cea-wrap.cea-org-hierarchy-wrap{width:100% !important;max-width:100% !important;margin:0;padding:0;}
  .cea-org-tree-roots{flex-direction:column;}
  .cea-org-branch{min-width:0;max-width:none;width:100%;}
}
@media (max-width: 640px){
  .cea-org-node-card{flex-direction:column;align-items:flex-start;}
  .cea-org-node-actions{width:100%;}
  .cea-org-toggle{width:100%;justify-content:center;}
  .cea-org-controls .button{flex:1 1 140px;}
.cea-org-children{margin-left:12px;padding-left:12px;}
}

/* Mobile hardening for profile layout and Recent Forms actions */
@media (max-width: 900px){
  .cea-profile-top-grid,
  .cea-profile-top form,
  .cea-profile-form .cea-profile-top-grid{
    grid-template-columns:1fr !important;
  }

  .cea-profile-top-left,
  .cea-profile-top-right,
  .cea-profile-top-right .cea-card,
  .cea-profile-top-right .cea-grid{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .cea-profile-top-right .cea-grid,
  .cea-profile-top-right .cea-grid-2{
    grid-template-columns:1fr !important;
  }
}

.cea-profile .cea-profile-top-right,
.cea-profile .cea-profile-top-right *{
  min-width:0;
}

.cea-profile .cea-profile-top-right a,
.cea-profile .cea-profile-top-right .cea-card,
.cea-profile .cea-profile-top-right .cea-grid label,
.cea-profile .cea-profile-top-right .cea-grid div{
  overflow-wrap:anywhere;
  word-break:break-word;
}

.cea-profile .cea-recent-forms .cea-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.cea-profile .cea-recent-forms .cea-actions .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--bsd-button-text,#fff) !important;
  background:var(--bsd-button-bg,#1e73be) !important;
  border:1px solid transparent !important;
  text-decoration:none !important;
  white-space:nowrap;
}

.cea-profile .cea-recent-forms .cea-actions .button:hover,
.cea-profile .cea-recent-forms .cea-actions .button:focus{
  color:var(--bsd-button-text,#fff) !important;
  text-decoration:none !important;
  filter:brightness(0.95);
}

@media (max-width: 640px){
  .cea-profile .cea-recent-forms .cea-table{
    min-width:0;
  }

  .cea-profile .cea-recent-forms .cea-actions .button{
    width:100%;
  }
}


.cea-org-controls .button,
.cea-org-toggle{
  color: var(--cea-org-button-text, #1f2937);
  background: var(--cea-org-button-bg, rgba(255,255,255,.92));
  border-color: var(--cea-org-button-border, rgba(31,41,55,.22));
}
.cea-org-controls .button:hover,
.cea-org-controls .button:focus,
.cea-org-toggle:hover,
.cea-org-toggle:focus{
  color: var(--cea-org-button-text, #111827);
  background: var(--cea-org-button-bg-hover, rgba(255,255,255,1));
}
.cea-org-toggle .cea-org-toggle-text,
.cea-org-toggle .cea-org-toggle-count{
  color: inherit;
}
@media (prefers-color-scheme: dark){
  .cea-org-controls .button,
  .cea-org-toggle{
    color: var(--cea-org-button-text-dark, #f9fafb);
    background: var(--cea-org-button-bg-dark, rgba(17,24,39,.92));
    border-color: var(--cea-org-button-border-dark, rgba(255,255,255,.18));
  }
}
body.theme-dark .cea-org-controls .button,
body.theme-dark .cea-org-toggle,
html[data-theme="dark"] .cea-org-controls .button,
html[data-theme="dark"] .cea-org-toggle,
[data-bs-theme="dark"] .cea-org-controls .button,
[data-bs-theme="dark"] .cea-org-toggle{
  color: var(--cea-org-button-text-dark, #f9fafb);
  background: var(--cea-org-button-bg-dark, rgba(17,24,39,.92));
  border-color: var(--cea-org-button-border-dark, rgba(255,255,255,.18));
}

.cea-org-hierarchy-page [hidden]{display:none !important;}
.cea-org-controls .button,
.cea-org-toggle{
  color:#fff !important;
  background:#1E73BE !important;
  border-color:#1E73BE !important;
}
.cea-org-controls .button:hover,
.cea-org-controls .button:focus,
.cea-org-toggle:hover,
.cea-org-toggle:focus{
  color:#fff !important;
  background:#1E73BE !important;
  border-color:#1E73BE !important;
  filter:brightness(.96);
}
.cea-org-node-card[data-cea-profile-url]{cursor:pointer;}
.cea-org-node-card[data-cea-profile-url]:hover{box-shadow:0 8px 22px rgba(0,0,0,.10);}


/* v2.5.19 overflow hardening for employee list */
.cea-employee-list-page,
.cea-employee-list-page .cea-wrap,
.cea-employee-list-page .cea-card,
.cea-employee-list-page .cea-table-wrap{min-width:0;max-width:100%;box-sizing:border-box;}
.cea-employee-list-page .cea-card{overflow-x:hidden;}
.cea-employee-list-page .cea-table-wrap{overflow-x:auto;}
.cea-employee-list-page .cea-table{table-layout:auto;}


/* v2.5.20 employee list width fix: disable breakout behavior and clamp to parent */
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap,
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap.cea-breakout{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  min-width:0 !important;
}
.cea-employee-list-page .cea-card.cea-employee-list-shell{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
}
.cea-employee-list-page .cea-table-wrap{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
}


/* v2.5.21 employee list containment + centered top-level org nodes */
.cea-employee-list.cea-employee-list-page{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
  overflow-x:hidden !important;
}
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap,
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap.cea-breakout{
  display:block !important;
  width:calc(100% - 7%) !important;
  max-width:calc(100% - 7%) !important;
  margin:0 3.5% !important;
  padding:0 !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.cea-employee-list-page .cea-card.cea-employee-list-shell{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
.cea-employee-list-page .cea-table-wrap{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:auto !important;
  box-sizing:border-box !important;
}
.cea-employee-list-page .cea-table{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
@media (max-width: 900px){
  .cea-employee-list-page .cea-wrap.cea-employee-list-wrap,
  .cea-employee-list-page .cea-wrap.cea-employee-list-wrap.cea-breakout{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
  }
}


/* v2.5.24 employee list full-width containment fix */
.cea-employee-list-page,
.cea-employee-list-page .cea-wrap,
.cea-employee-list-page .cea-card,
.cea-employee-list-page .cea-table-wrap,
.cea-employee-list-page .cea-table,
.cea-employee-list-page .cea-table th,
.cea-employee-list-page .cea-table td{
  box-sizing:border-box !important;
}
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap,
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap.cea-breakout{
  display:block !important;
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
}
.cea-employee-list-page .cea-card.cea-employee-list-shell{
  display:block !important;
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:16px !important;
  overflow:hidden !important;
}
.cea-employee-list-page .cea-table-wrap{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
}
.cea-employee-list-page .cea-table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.cea-employee-list-page .cea-table th,
.cea-employee-list-page .cea-table td{
  min-width:0 !important;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.cea-employee-list-page .cea-table a{
  overflow-wrap:anywhere;
  word-break:break-word;
}


/* v2.5.25 employee list viewport-fit fix */
.cea-employee-list-page{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  overflow-x:clip !important;
  box-sizing:border-box !important;
}
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap,
.cea-employee-list-page .cea-wrap.cea-employee-list-wrap.cea-breakout{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
}
.cea-employee-list-page .cea-card.cea-employee-list-shell{
  display:block !important;
  width:calc(100% - 32px) !important;
  max-width:calc(100% - 32px) !important;
  min-width:0 !important;
  margin:16px auto !important;
  padding:16px !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
.cea-employee-list-page .cea-filter,
.cea-employee-list-page .cea-table-wrap,
.cea-employee-list-page .cea-table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.cea-employee-list-page .cea-table-wrap{
  overflow-x:auto !important;
  overflow-y:hidden !important;
}
.cea-employee-list-page .cea-table{
  table-layout:fixed !important;
  border-collapse:collapse !important;
}
.cea-employee-list-page .cea-table th,
.cea-employee-list-page .cea-table td,
.cea-employee-list-page .cea-table a{
  min-width:0 !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}
@media (max-width: 640px){
  .cea-employee-list-page .cea-card.cea-employee-list-shell{
    width:calc(100% - 16px) !important;
    max-width:calc(100% - 16px) !important;
    margin:8px auto !important;
    padding:12px !important;
  }
}


/* v2.5.26 Build Safe theme employee list fit */
.bsd-content .cea-employee-list.cea-employee-list-page{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  min-width:0 !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;
}
.bsd-content .cea-employee-list-page .cea-wrap.cea-employee-list-wrap,
.bsd-content .cea-employee-list-page .cea-wrap.cea-employee-list-wrap.cea-breakout{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.bsd-content .cea-employee-list-page .cea-card.cea-employee-list-shell{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:16px !important;
  min-width:0 !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}
.bsd-content .cea-employee-list-page .cea-filter,
.bsd-content .cea-employee-list-page .cea-table-wrap,
.bsd-content .cea-employee-list-page .cea-table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.bsd-content .cea-employee-list-page .cea-table-wrap{
  overflow-x:auto !important;
  overflow-y:hidden !important;
}
.bsd-content .cea-employee-list-page .cea-table{
  table-layout:fixed !important;
  border-collapse:collapse !important;
}
.bsd-content .cea-employee-list-page .cea-table th,
.bsd-content .cea-employee-list-page .cea-table td,
.bsd-content .cea-employee-list-page .cea-table a{
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}


/* v2.5.27 final Build Safe employee list width fix */
main.bsd-content > .cea-employee-list.cea-employee-list-page{
  display:block !important;
  width:calc(100% - 36px) !important;
  max-width:calc(100% - 36px) !important;
  min-width:0 !important;
  margin:0 auto !important;
  padding:0 !important;
  box-sizing:border-box !important;
  overflow-x:hidden !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap,
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap.cea-breakout{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap > .cea-card.cea-employee-list-shell{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-filter,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table-wrap,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table-wrap{
  overflow-x:auto !important;
  overflow-y:hidden !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table{
  table-layout:fixed !important;
  border-collapse:collapse !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table th,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table td,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table a{
  min-width:0 !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}
@media (max-width: 640px){
  main.bsd-content > .cea-employee-list.cea-employee-list-page{
    width:calc(100% - 16px) !important;
    max-width:calc(100% - 16px) !important;
  }
}


/* v2.5.28 hard reset for Build Safe employee list width inside .bsd-content */
main.bsd-content > .cea-employee-list.cea-employee-list-page{display:block !important;width:auto !important;max-width:none !important;min-width:0 !important;margin:0 !important;padding:0 !important;box-sizing:border-box !important;overflow-x:clip !important;}
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap,
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap.cea-breakout{display:block !important;width:auto !important;max-width:none !important;min-width:0 !important;margin:0 !important;padding:0 !important;box-sizing:border-box !important;}
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap > .cea-card.cea-employee-list-shell{display:block !important;width:auto !important;max-width:none !important;min-width:0 !important;margin:0 !important;padding:16px !important;box-sizing:border-box !important;overflow:hidden !important;}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-filter,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table-wrap,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table{width:100% !important;max-width:100% !important;min-width:0 !important;box-sizing:border-box !important;}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table-wrap{overflow-x:auto !important;overflow-y:hidden !important;}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table{table-layout:fixed !important;border-collapse:collapse !important;}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table th,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table td,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table a{min-width:0 !important;overflow-wrap:anywhere !important;word-break:break-word !important;}
body.cea-employee-list-page-active, body.cea-employee-list-page-active .bsd-main, body.cea-employee-list-page-active main.bsd-content{overflow-x:hidden !important;}


/* v2.5.29 employee list: mirror employee management page sizing in Build Safe */
main.bsd-content > .cea-employee-list.cea-employee-list-page{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
  overflow-x:hidden !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap,
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap.cea-breakout{
  width:calc(100% - 3.5%) !important;
  max-width:calc(100% - 3.5%) !important;
  min-width:0 !important;
  margin:0 3.5% 0 0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap > .cea-card.cea-employee-list-shell{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:16px !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-filter,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table-wrap,
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table-wrap{
  overflow-x:auto !important;
  overflow-y:hidden !important;
}
main.bsd-content > .cea-employee-list.cea-employee-list-page .cea-table{
  table-layout:auto !important;
  border-collapse:collapse !important;
}
@media (max-width: 900px){
  main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap,
  main.bsd-content > .cea-employee-list.cea-employee-list-page > .cea-wrap.cea-employee-list-wrap.cea-breakout{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
  }
}
