/* Staff Portal redesign — scoped to /staff/ only */
.staff-portal-page{
  --sp-primary:#1677ff;
  --sp-primary-dark:#0f4fb8;
  --sp-navy:#0f2747;
  --sp-bg:#f6f9fd;
  --sp-card:#fff;
  --sp-border:#e4eaf2;
  --sp-text:#14213d;
  --sp-muted:#667085;
  --sp-success:#16a36a;
  --sp-warning:#f59e0b;
  --sp-danger:#e5484d;
  --sp-shadow:0 14px 34px rgba(15,39,71,.08);
  --sp-radius:16px;
  margin:0;
  min-height:100vh;
  background:var(--sp-bg);
  color:var(--sp-text);
  font-family:'Noto Sans Thai',Tahoma,Arial,sans-serif;
}
.staff-portal-page *{box-sizing:border-box}
.staff-portal-page button,.staff-portal-page input{font:inherit}
.staff-portal-page a{color:inherit}
.staff-portal-page :focus-visible{outline:3px solid rgba(22,119,255,.28);outline-offset:3px}
.staff-bootstrap{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--sp-muted);font-weight:700}
.staff-spinner{width:22px;height:22px;border:3px solid #dbeafe;border-top-color:var(--sp-primary);border-radius:50%;animation:spSpin .8s linear infinite}@keyframes spSpin{to{transform:rotate(360deg)}}
.staff-auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(330px,420px) 1fr;background:linear-gradient(135deg,#f8fbff,#eef6ff)}
.staff-auth-panel{background:#fff;padding:44px;box-shadow:20px 0 60px rgba(15,39,71,.08);display:flex;flex-direction:column;justify-content:center}
.staff-auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}.staff-auth-brand img,.staff-brand img{height:42px;width:auto;border-radius:10px}.staff-auth-brand b,.staff-brand b{display:block;color:var(--sp-navy);font-size:20px;line-height:1;font-weight:800}.staff-auth-brand span,.staff-brand span{display:block;color:var(--sp-primary);font-size:11px;font-weight:800;letter-spacing:.09em;margin-top:4px}.staff-auth-card{border:1px solid var(--sp-border);border-radius:24px;background:#fff;padding:24px;box-shadow:var(--sp-shadow)}.staff-auth-card h1{margin:0 0 6px;color:var(--sp-navy);font-size:28px}.staff-auth-card p{margin:0 0 18px;color:var(--sp-muted);line-height:1.7}.staff-auth-card label{display:block;font-weight:700;margin:14px 0 7px}.staff-auth-card input{width:100%;border:1px solid var(--sp-border);border-radius:14px;padding:12px 14px;background:#fff}.staff-auth-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:18px}.staff-auth-hero{padding:48px;display:flex;align-items:center;justify-content:center}.staff-auth-hero-card{max-width:620px;border:1px solid rgba(228,234,242,.8);border-radius:32px;background:rgba(255,255,255,.72);padding:34px;box-shadow:var(--sp-shadow)}.staff-auth-hero-card h2{font-size:clamp(28px,4vw,48px);line-height:1.2;margin:0 0 12px;color:var(--sp-navy)}.staff-auth-hero-card p{color:var(--sp-muted);line-height:1.8;margin:0}.staff-btn{border:0;border-radius:12px;min-height:42px;padding:10px 16px;display:inline-flex;gap:8px;align-items:center;justify-content:center;font-weight:800;cursor:pointer;text-decoration:none;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}.staff-btn:hover{transform:translateY(-1px)}.staff-btn-primary{background:var(--sp-primary);color:#fff;box-shadow:0 10px 22px rgba(22,119,255,.18)}.staff-btn-soft{background:#eef6ff;color:var(--sp-primary)}.staff-btn-ghost{background:#fff;color:var(--sp-muted);border:1px solid var(--sp-border)}.staff-btn-full{width:100%}
.staff-portal-shell{min-height:100vh;display:grid;grid-template-columns:236px minmax(0,1fr)}.staff-sidebar{position:sticky;top:0;height:100vh;background:#fff;border-right:1px solid var(--sp-border);padding:18px 14px;display:flex;flex-direction:column;gap:18px;z-index:30}.staff-brand{display:flex;gap:10px;align-items:center;padding:2px 6px 10px}.staff-nav{display:grid;gap:6px}.staff-nav button{width:100%;border:0;background:transparent;border-radius:12px;padding:11px 12px;text-align:left;color:#475467;font-weight:700;display:flex;gap:10px;align-items:center;cursor:pointer}.staff-nav button:hover{background:#f3f7fb;color:var(--sp-navy)}.staff-nav button.active{background:#eaf3ff;color:var(--sp-primary)}.staff-nav i{width:18px;text-align:center}.staff-support{margin-top:auto;border:1px solid #dceafe;background:linear-gradient(135deg,#f7fbff,#edf6ff);border-radius:18px;padding:14px;color:#344054}.staff-support b{display:flex;align-items:center;gap:8px;color:var(--sp-primary);font-size:14px}.staff-support p{margin:8px 0 0;font-size:13px;line-height:1.55;color:#475467}.staff-version{font-size:12px;color:var(--sp-muted);padding:0 4px}.staff-main{min-width:0}.staff-topbar{height:64px;background:rgba(255,255,255,.92);border-bottom:1px solid var(--sp-border);display:grid;grid-template-columns:auto minmax(240px,1fr) auto;align-items:center;gap:18px;padding:0 22px;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.staff-top-left,.staff-top-actions,.staff-user{display:flex;align-items:center;gap:12px}.staff-icon-btn{width:40px;height:40px;border:1px solid var(--sp-border);border-radius:12px;background:#fff;color:#344054;display:grid;place-items:center;cursor:pointer;position:relative}.staff-icon-btn:hover{background:#f8fbff;color:var(--sp-primary)}.staff-badge{position:absolute;top:-5px;right:-4px;background:var(--sp-danger);color:#fff;border-radius:999px;font-size:10px;min-width:18px;height:18px;display:grid;place-items:center;border:2px solid #fff}.staff-page-title{font-weight:800;color:var(--sp-navy);white-space:nowrap}.staff-search{position:relative;max-width:520px;width:100%;justify-self:center}.staff-search i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#98a2b3}.staff-search input{width:100%;border:1px solid var(--sp-border);border-radius:14px;padding:11px 44px;background:#fff;color:var(--sp-text)}.staff-search-kbd{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:11px;color:#98a2b3;background:#f4f7fb;border:1px solid #e6edf5;border-radius:7px;padding:2px 6px}.staff-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#eaf3ff,#d8e9ff);color:var(--sp-primary);display:grid;place-items:center;font-weight:900}.staff-user-meta{line-height:1.25}.staff-user-name{font-size:14px;font-weight:800;color:var(--sp-navy)}.staff-user-role{font-size:12px;color:var(--sp-muted)}.staff-content{padding:22px;display:grid;gap:18px}.staff-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr);gap:18px;align-items:stretch}.staff-hero-copy{background:linear-gradient(135deg,#fff 0%,#f7fbff 100%);border:1px solid var(--sp-border);border-radius:20px;padding:24px;position:relative;overflow:hidden;min-height:160px}.staff-hero-copy h1{margin:0 0 8px;color:var(--sp-navy);font-size:clamp(26px,3vw,38px);letter-spacing:-.02em}.staff-hero-copy p{margin:0;color:var(--sp-muted);line-height:1.8;max-width:640px}.staff-session-line{margin-top:12px;color:#344054;font-size:14px;font-weight:700}.staff-illustration{position:absolute;right:18px;bottom:0;width:170px;height:120px;opacity:.38;pointer-events:none}.staff-building{position:absolute;bottom:0;background:#9dccff;border-radius:8px 8px 0 0}.staff-building:nth-child(1){right:104px;width:32px;height:70px}.staff-building:nth-child(2){right:62px;width:38px;height:100px}.staff-building:nth-child(3){right:18px;width:34px;height:82px}.staff-building:after{content:"";display:block;margin:14px auto;width:42%;height:58%;background:repeating-linear-gradient(to bottom,#fff 0 6px,transparent 6px 14px);opacity:.8}.staff-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.staff-summary-card{background:#fff;border:1px solid var(--sp-border);border-radius:18px;padding:18px;display:flex;gap:14px;align-items:flex-start;box-shadow:0 8px 20px rgba(15,39,71,.04)}.staff-summary-icon,.staff-system-icon{width:46px;height:46px;border-radius:15px;background:#eaf3ff;color:var(--sp-primary);display:grid;place-items:center;font-size:22px;flex:0 0 auto}.staff-summary-card:nth-child(2) .staff-summary-icon{background:#fff4df;color:#f59e0b}.staff-summary-card:nth-child(3) .staff-summary-icon{background:#eafaf2;color:#16a36a}.staff-summary-label{font-size:13px;color:var(--sp-muted);font-weight:700}.staff-summary-value{font-size:28px;color:var(--sp-navy);font-weight:900;line-height:1.1}.staff-summary-unit{font-size:12px;color:var(--sp-muted)}.staff-summary-link{margin-top:8px;border:0;background:transparent;color:var(--sp-primary);font-weight:800;padding:0;cursor:pointer}.staff-panel{background:#fff;border:1px solid var(--sp-border);border-radius:20px;box-shadow:0 8px 22px rgba(15,39,71,.04)}.staff-panel-head{padding:16px 18px;border-bottom:1px solid var(--sp-border);display:flex;align-items:center;justify-content:space-between;gap:12px}.staff-panel-head h2,.staff-panel-head h3{margin:0;color:var(--sp-navy);font-size:16px}.staff-panel-body{padding:16px 18px}.staff-systems-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.staff-system-card{border:1px solid var(--sp-border);border-radius:18px;background:#fff;padding:18px;box-shadow:0 12px 26px rgba(15,39,71,.06);display:flex;flex-direction:column;min-height:242px;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.staff-system-card:hover{transform:translateY(-3px);box-shadow:0 18px 34px rgba(15,39,71,.10);border-color:#c8daf0}.staff-system-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.staff-fav-btn{border:0;background:#fff;color:#98a2b3;border-radius:10px;width:36px;height:36px;display:grid;place-items:center;cursor:pointer}.staff-fav-btn.active{color:#f59e0b;background:#fff8e7}.staff-system-card h3{margin:18px 0 8px;color:var(--sp-navy);font-size:17px}.staff-system-card p{margin:0;color:var(--sp-muted);line-height:1.65;font-size:14px;flex:1}.staff-status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;margin-top:10px;width:max-content}.staff-status-ready{background:#eafaf2;color:var(--sp-success)}.staff-status-ready:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}.staff-system-action{margin-top:16px}.staff-system-action .staff-btn{justify-content:space-between}.staff-lower-grid{display:grid;grid-template-columns:1.15fr .85fr 1.2fr 1.05fr 1fr;gap:14px;align-items:start}.staff-widget{min-height:236px}.staff-list{display:grid;gap:10px}.staff-list-item{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #edf1f6;border-radius:14px;padding:10px 12px;text-decoration:none;background:#fff}.staff-list-item:hover{background:#f8fbff}.staff-list-title{font-weight:800;color:var(--sp-navy);font-size:13px}.staff-list-sub{font-size:12px;color:var(--sp-muted);margin-top:2px}.staff-empty{min-height:126px;border:1px dashed #d8e3f0;border-radius:16px;display:grid;place-items:center;text-align:center;color:var(--sp-muted);padding:16px;line-height:1.7}.staff-empty i{display:block;color:#b3c2d5;font-size:24px;margin-bottom:8px}.staff-announcement,.staff-task,.staff-health-row{border:1px solid #edf1f6;border-radius:14px;padding:11px 12px;margin-bottom:10px}.staff-health-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.staff-health-unknown{color:#8a95a5;background:#f2f4f7;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800}.staff-no-results{border:1px dashed #cbd7e6;border-radius:18px;background:#fff;padding:28px;text-align:center;color:var(--sp-muted);font-weight:700}.staff-drawer-backdrop{position:fixed;inset:0;background:rgba(15,39,71,.36);z-index:25}.staff-toast{position:fixed;right:18px;top:18px;z-index:80;background:#0f2747;color:#fff;border-radius:14px;padding:12px 16px;box-shadow:var(--sp-shadow);max-width:min(440px,calc(100vw - 36px));font-weight:700}.staff-hidden{display:none!important}@media(max-width:1280px){.staff-hero{grid-template-columns:1fr}.staff-lower-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-widget:nth-child(3){grid-column:span 2}}@media(max-width:1024px){.staff-portal-shell{grid-template-columns:1fr}.staff-sidebar{position:fixed;left:0;transform:translateX(-105%);transition:transform .2s ease}.staff-sidebar.open{transform:none}.staff-topbar{grid-template-columns:auto 1fr auto}.staff-page-title{display:none}.staff-search{justify-self:stretch;max-width:none}.staff-systems-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.staff-auth-shell{grid-template-columns:1fr}.staff-auth-panel{padding:26px 18px}.staff-auth-hero{display:none}.staff-topbar{height:auto;grid-template-columns:auto 1fr;gap:10px;padding:12px}.staff-search{grid-column:1/3;grid-row:2}.staff-top-actions{justify-content:flex-end}.staff-user-meta,.staff-search-kbd,.staff-help-top{display:none}.staff-content{padding:14px}.staff-hero-copy{padding:20px;min-height:auto}.staff-illustration{display:none}.staff-summary-grid,.staff-systems-grid,.staff-lower-grid{grid-template-columns:1fr}.staff-widget:nth-child(3){grid-column:auto}.staff-panel-head{align-items:flex-start}.staff-system-card{min-height:220px}.staff-btn{min-height:44px}.staff-support{margin-top:18px}}@media(max-width:390px){.staff-top-actions{gap:6px}.staff-icon-btn{width:38px;height:38px}.staff-content{padding:10px}.staff-panel-body{padding:14px}.staff-panel-head{padding:14px}.staff-system-card{padding:15px}}

/* Enterprise owner-only user rights workspace — 2026-08-04 */
.staff-admin-shell{grid-template-columns:220px minmax(0,1fr);background:var(--admin-bg,#f5f7fb)}
.staff-admin-enterprise{
  --admin-primary:#1468e8;
  --admin-navy:#102a4c;
  --admin-bg:#f5f7fb;
  --admin-border:#e3e9f1;
  --admin-muted:#64748b;
  --admin-success:#16a56a;
  --admin-warning:#e89a20;
  --admin-danger:#dc4c4c;
  --admin-purple:#7457e8;
  overflow-x:clip;
  background:var(--admin-bg);
}
.staff-admin-enterprise .staff-content{max-width:1920px;width:100%;margin:0 auto}
.staff-admin-enterprise .staff-topbar{grid-template-columns:auto minmax(220px,520px) auto}
.staff-admin-top-search{position:relative;width:100%;justify-self:center}
.staff-admin-top-search i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#94a3b8}
.staff-admin-top-search input{width:100%;height:42px;border:1px solid var(--admin-border);border-radius:10px;padding:0 14px 0 40px;background:#fff;color:var(--admin-navy);font:inherit}
.staff-breadcrumb{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:13px;color:var(--admin-muted)}
.staff-breadcrumb button{border:0;background:transparent;padding:0;color:var(--admin-primary);font:inherit;cursor:pointer}
.staff-breadcrumb i{font-size:9px;color:#a8b2c1}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.staff-admin-content{display:grid;gap:18px;padding:22px}
.staff-admin-card{min-width:0;border:1px solid var(--admin-border);border-radius:16px;background:#fff;box-shadow:0 3px 12px rgba(16,42,76,.035)}
.staff-owner-badge{display:inline-flex;align-items:center;gap:7px;width:max-content;border:1px solid #cddfff;border-radius:999px;padding:6px 10px;background:#edf5ff;color:#0f5fc6;font-size:11px;font-weight:700;letter-spacing:.02em}
.staff-admin-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:4px 2px 2px}
.staff-admin-head h1{margin:8px 0 2px;color:var(--admin-navy);font-size:clamp(25px,2vw,31px);font-weight:700}
.staff-admin-head p,.staff-admin-toolbar p,.staff-admin-card-head p{margin:0;color:var(--admin-muted);line-height:1.6;font-size:13px}
.staff-admin-head-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.staff-admin-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.staff-admin-summary article{min-width:0;padding:17px 18px;border:1px solid var(--admin-border);border-radius:15px;background:#fff;box-shadow:0 2px 8px rgba(16,42,76,.025)}
.staff-admin-summary article>span{display:flex;align-items:center;gap:8px;color:var(--admin-muted);font-size:13px;font-weight:600}
.staff-admin-summary article>strong{display:block;margin:5px 0 0;color:var(--admin-navy);font-size:28px;line-height:1.15;font-weight:700}
.staff-admin-summary article>small{display:block;margin-top:3px;color:#8591a3;font-size:11px}
.staff-admin-summary .is-blue{background:#f5f9ff}.staff-admin-summary .is-blue i{color:var(--admin-primary)}
.staff-admin-summary .is-green{background:#f3fbf7}.staff-admin-summary .is-green i{color:var(--admin-success)}
.staff-admin-summary .is-orange{background:#fff9ef}.staff-admin-summary .is-orange i{color:var(--admin-warning)}
.staff-admin-summary .is-red{background:#fff7f7}.staff-admin-summary .is-red i{color:var(--admin-danger)}
.staff-admin-summary .is-purple{background:#f8f6ff}.staff-admin-summary .is-purple i{color:var(--admin-purple)}
.staff-admin-layout{display:grid;grid-template-columns:290px minmax(0,1fr) 220px;gap:14px;align-items:start}
.staff-admin-create,.staff-admin-role-panel,.staff-admin-audit{padding:20px}
.staff-admin-create{position:sticky;top:82px}
.staff-admin-card-head{display:flex;align-items:flex-start;gap:11px;min-width:0}
.staff-admin-card-head>div{min-width:0}
.staff-admin-card-head h2,.staff-admin-toolbar h2{margin:0 0 2px;color:var(--admin-navy);font-size:18px;font-weight:600}
.staff-admin-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;background:#edf5ff;color:var(--admin-primary)}
.staff-admin-drawer-close{display:none;margin-left:auto;width:38px;height:38px;border:1px solid var(--admin-border);border-radius:10px;background:#fff;color:var(--admin-muted);cursor:pointer}
.staff-admin-create form{display:grid;gap:6px;margin-top:16px}
.staff-admin-create label,.staff-admin-dialog label{margin-top:6px;color:#334155;font-size:13px;font-weight:600}
.staff-admin-create label b,.staff-admin-dialog label b{color:var(--admin-danger)}
.staff-admin-create input,.staff-admin-create select,.staff-admin-dialog input,.staff-admin-dialog select,.staff-admin-filters input,.staff-admin-filters select{width:100%;height:44px;border:1px solid var(--admin-border);border-radius:10px;padding:0 12px;background:#fff;color:#1e293b;font:inherit}
.staff-admin-create input[disabled],.staff-admin-create select[disabled]{background:#f4f6f9;color:#64748b;cursor:not-allowed}
.staff-admin-create input[aria-invalid="true"]{border-color:var(--admin-danger);box-shadow:0 0 0 3px rgba(220,76,76,.1)}
.staff-field-error{min-height:16px;color:#b42318;font-size:11px}
.staff-password-input{display:grid;grid-template-columns:minmax(0,1fr) 42px}
.staff-password-input input{border-radius:10px 0 0 10px}
.staff-password-input button{border:1px solid var(--admin-border);border-left:0;border-radius:0 10px 10px 0;background:#f8fafc;color:var(--admin-muted);cursor:pointer}
.staff-editor-status{display:grid;gap:4px;margin:8px 0;padding:11px;border:1px solid var(--admin-border);border-radius:10px;background:#f8fafc}
.staff-editor-status>span,.staff-editor-status>small{color:var(--admin-muted);font-size:11px}
.staff-form-help{margin:4px 0 8px;color:var(--admin-muted);font-size:11px;line-height:1.55}
.staff-admin-form-actions{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;margin-top:4px}
.admin-message{display:none;margin:7px 0;padding:10px 12px;border-radius:10px;background:#ecfdf3;color:#067647;font-size:12px;font-weight:600}
.admin-message.is-visible{display:block}.admin-message.is-error{background:#fff1f2;color:#b42318}
.staff-admin-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid var(--admin-border)}
.staff-admin-result-count{flex:0 0 auto;border-radius:999px;padding:6px 10px;background:#edf5ff;color:var(--admin-primary);font-size:12px;font-weight:600}
.staff-admin-filters{display:grid;grid-template-columns:minmax(180px,1.4fr) repeat(3,minmax(96px,.7fr)) auto;gap:8px;align-items:end;padding:14px 16px;border-bottom:1px solid var(--admin-border);background:#fbfcfe}
.staff-admin-filters label{display:grid;gap:5px;color:var(--admin-muted);font-size:11px;font-weight:600}
.staff-admin-filters .staff-btn{height:44px;white-space:nowrap}
.staff-admin-table-wrap{min-height:260px;overflow:hidden}
.staff-admin-desktop-table{width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.staff-admin-table{width:100%;min-width:760px;border-collapse:separate;border-spacing:0}
.staff-admin-table th,.staff-admin-table td{padding:12px 8px;border-bottom:1px solid #edf1f5;text-align:left;vertical-align:middle;font-size:11px}
.staff-admin-table th{position:sticky;top:0;background:#f4f7fb;color:#526176;font-size:11px;font-weight:600;white-space:nowrap;z-index:1}
.staff-admin-table tbody tr{transition:background .15s ease}
.staff-admin-table tbody tr:hover{background:#f8fbff}
.staff-admin-table tbody tr:last-child td{border-bottom:0}
.staff-admin-table td strong{color:var(--admin-navy);font-weight:600}.staff-admin-table td time{color:#64748b;white-space:nowrap}.staff-user-name,.staff-user-role{display:block}
.admin-user-avatar{display:flex;align-items:center;gap:10px;min-width:0}
.admin-user-avatar>div{display:grid;min-width:0}.admin-user-avatar>div>span{color:var(--admin-muted);font-size:10px}
.admin-user-avatar__badge{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:#edf5ff;color:var(--admin-primary);font-weight:700}
.admin-user-avatar__badge.is-manager{background:#eaf2ff;color:#1468e8}.admin-user-avatar__badge.is-head{background:#eaf9f1;color:#168457}.admin-user-avatar__badge.is-staff{background:#e9f8ff;color:#1680a8}
.staff-role-badge{display:inline-flex;width:max-content;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:700;letter-spacing:.03em}
.staff-role-badge.is-manager{background:#eaf2ff;color:#145fc8}.staff-role-badge.is-head{background:#eaf9f1;color:#13764d}.staff-role-badge.is-staff{background:#e9f8ff;color:#147a9f}.staff-role-badge.is-viewer{background:#f1edff;color:#6546cf}
.staff-admin-status{display:inline-flex;align-items:center;gap:6px;width:max-content;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:600}
.staff-admin-status i{font-size:6px}.staff-admin-status.is-active{background:#eaf9f1;color:#087a4b}.staff-admin-status.is-password{background:#fff5dd;color:#9a5a00}.staff-admin-status.is-inactive{background:#f1f3f6;color:#667085}
.staff-permission-text{color:#475569;line-height:1.45}
.staff-admin-actions{display:flex;align-items:center;gap:5px;position:relative;min-height:34px}
.staff-icon-action,.staff-action-menu summary{display:grid;place-items:center;width:34px;height:34px;border:1px solid #dbe4ef;border-radius:9px;background:#fff;color:#35679e;cursor:pointer;list-style:none}
.staff-action-menu{position:relative}.staff-action-menu summary::-webkit-details-marker{display:none}
.staff-action-menu[open] summary{background:#edf5ff;color:var(--admin-primary)}
.staff-action-menu>div{position:absolute;right:0;top:39px;z-index:15;display:grid;min-width:170px;padding:6px;border:1px solid var(--admin-border);border-radius:11px;background:#fff;box-shadow:0 16px 36px rgba(16,42,76,.16)}
.staff-action-menu button{display:flex;align-items:center;gap:9px;width:100%;min-height:38px;border:0;border-radius:8px;padding:8px 10px;background:#fff;color:#334155;text-align:left;font:inherit;font-size:12px;cursor:pointer}
.staff-action-menu button:hover{background:#f5f8fc}.staff-action-menu button.is-danger{color:#b42318}.staff-action-menu button.is-danger:hover{background:#fff1f2}
.staff-owner-note{display:inline-flex;align-items:center;gap:5px;border-radius:9px;padding:7px 9px;background:#fff7df;color:#91610d;font-size:10px;font-weight:600;white-space:nowrap}
.staff-admin-directory-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;border-top:1px solid var(--admin-border)}
.staff-admin-page-size-label{display:inline-flex;align-items:center;gap:7px;color:var(--admin-muted);font-size:11px;font-weight:600}.staff-admin-page-size-label select{width:78px;height:38px}
.staff-admin-pagination{display:flex;align-items:center;justify-content:flex-end;gap:6px;color:var(--admin-muted);font-size:11px}
.staff-admin-pagination button{display:grid;place-items:center;min-width:36px;height:36px;border:1px solid var(--admin-border);border-radius:9px;background:#fff;color:var(--admin-navy);font-weight:600;cursor:pointer}.staff-admin-pagination button.active{border-color:#bfd6ff;background:#edf5ff;color:var(--admin-primary)}.staff-admin-pagination button:disabled{opacity:.42;cursor:not-allowed}
.staff-admin-role-panel{min-width:0}
.staff-admin-role-list{display:grid;gap:10px;margin-top:15px}
.staff-role-overview-item{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;padding:12px;border:1px solid var(--admin-border);border-radius:13px;background:#fbfcfe}
.staff-role-overview-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#edf5ff;color:var(--admin-primary)}
.staff-role-overview-item.is-head .staff-role-overview-icon{background:#eaf9f1;color:#168457}.staff-role-overview-item.is-staff .staff-role-overview-icon{background:#e9f8ff;color:#1680a8}
.staff-role-overview-item header{display:flex;justify-content:space-between;gap:6px}.staff-role-overview-item header strong{color:var(--admin-navy);font-size:12px}.staff-role-overview-item header span{color:var(--admin-muted);font-size:10px}.staff-role-overview-item p{margin:2px 0;color:var(--admin-muted);font-size:11px}.staff-role-overview-item ul{margin:6px 0 0;padding-left:16px;color:#475569;font-size:10px;line-height:1.55}
.staff-admin-audit{margin-bottom:22px}.staff-admin-audit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.staff-audit-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;margin-top:14px;border-top:1px solid var(--admin-border)}
.staff-audit-list article{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--admin-border)}
.staff-audit-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#edf5ff;color:var(--admin-primary)}.staff-audit-icon.is-create,.staff-audit-icon.is-activate{background:#eaf9f1;color:var(--admin-success)}.staff-audit-icon.is-reset,.staff-audit-icon.is-suspend{background:#fff5dd;color:var(--admin-warning)}.staff-audit-icon.is-delete{background:#fff0f0;color:var(--admin-danger)}
.staff-audit-list strong{color:var(--admin-navy);font-size:12px}.staff-audit-list p{margin:2px 0 0;color:var(--admin-muted);font-size:10px}.staff-audit-list time{color:var(--admin-muted);font-size:10px;white-space:nowrap}
.staff-admin-loading,.staff-admin-empty,.staff-admin-error{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:180px;padding:24px;color:var(--admin-muted);text-align:center}
.staff-admin-loading{flex-direction:row;min-height:120px}.staff-admin-error>i,.staff-admin-empty>i{font-size:28px;color:#9eb1c8}.staff-admin-error strong,.staff-admin-empty strong{color:var(--admin-navy)}
.staff-admin-mobile-cards{display:none}
.staff-admin-mobile-card{display:grid;gap:13px;padding:16px;border-bottom:1px solid var(--admin-border)}.staff-admin-mobile-card>header{display:flex;align-items:center;justify-content:space-between;gap:8px}.staff-admin-mobile-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:0}.staff-admin-mobile-card dt{color:var(--admin-muted);font-size:10px;font-weight:600}.staff-admin-mobile-card dd{margin:3px 0 0;color:#334155;font-size:12px}.staff-admin-mobile-card footer{display:flex;justify-content:flex-end}
.staff-admin-dialog{width:min(540px,calc(100vw - 28px));max-height:min(86vh,780px);border:0;border-radius:16px;padding:0;box-shadow:0 30px 80px rgba(16,42,76,.28)}.staff-admin-dialog::backdrop{background:rgba(16,42,76,.48);backdrop-filter:blur(3px)}.staff-admin-dialog-body{display:grid;gap:11px;padding:22px;max-height:84vh;overflow:auto}.staff-admin-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.staff-admin-dialog-head h2{margin:7px 0 0;color:var(--admin-navy);font-size:21px}.staff-admin-dialog-head p{margin:3px 0 0;color:var(--admin-muted);font-size:12px}.staff-admin-dialog-head>button{width:36px;height:36px;border:0;border-radius:10px;background:#f2f5f9;color:#667085;cursor:pointer}.staff-admin-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.staff-confirm-account{display:grid;gap:3px;padding:12px;border:1px solid var(--admin-border);border-radius:11px;background:#f8fafc}.staff-confirm-account span{color:var(--admin-muted);font-size:11px}.staff-confirm-account strong{color:var(--admin-navy)}
.staff-btn-danger{background:var(--admin-danger);color:#fff}.staff-btn-warning{background:var(--admin-warning);color:#fff}.staff-btn-success{background:var(--admin-success);color:#fff}
.staff-admin-editor-backdrop{display:none}
@media (max-width:1439px){
  .staff-admin-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .staff-admin-layout{grid-template-columns:minmax(290px,320px) minmax(0,1fr)}
  .staff-admin-role-panel{grid-column:1/-1}
  .staff-admin-role-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .staff-admin-filters{grid-template-columns:minmax(210px,1.2fr) repeat(2,minmax(120px,.7fr))}.staff-admin-filters label:nth-child(4){grid-column:1}.staff-admin-filters .staff-btn{grid-column:2}
}
@media (min-width:1440px) and (max-width:1599px){
  .staff-admin-shell{grid-template-columns:80px minmax(0,1fr)}
  .staff-admin-shell .staff-sidebar{padding-inline:10px;align-items:center}
  .staff-admin-shell .staff-brand>div,.staff-admin-shell .staff-nav button span,.staff-admin-shell .staff-support p,.staff-admin-shell .staff-version{display:none}
  .staff-admin-shell .staff-brand img{width:46px;height:46px;object-fit:cover}
  .staff-admin-shell .staff-nav{width:100%}.staff-admin-shell .staff-nav button{justify-content:center;padding-inline:8px}.staff-admin-shell .staff-nav i{width:auto}
  .staff-admin-shell .staff-support{padding:10px}.staff-admin-shell .staff-support b{font-size:0}.staff-admin-shell .staff-support b i{font-size:16px}
}
@media (max-width:1100px){
  .staff-admin-enterprise .staff-topbar{grid-template-columns:auto minmax(0,1fr) auto}.staff-admin-top-search{display:none}.staff-admin-add-top{display:none}
  .staff-admin-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:1023px){
  .staff-admin-shell{grid-template-columns:minmax(0,1fr)}
  .staff-admin-layout{grid-template-columns:1fr}.staff-admin-directory{grid-column:1}.staff-admin-role-panel{grid-column:1}
  .staff-admin-create{position:fixed;top:0;right:0;z-index:60;width:min(390px,92vw);height:100dvh;overflow:auto;border-radius:16px 0 0 16px;transform:translateX(105%);transition:transform .2s ease;box-shadow:-20px 0 50px rgba(16,42,76,.18)}
  .staff-admin-enterprise.is-editor-open .staff-admin-create{transform:none}.staff-admin-enterprise.is-editor-open .staff-admin-editor-backdrop{display:block;position:fixed;inset:0;z-index:55;background:rgba(16,42,76,.38)}
  .staff-admin-drawer-close{display:grid;place-items:center}.staff-admin-role-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .staff-admin-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-admin-filters label:nth-child(4),.staff-admin-filters .staff-btn{grid-column:auto}
}
@media (max-width:760px){
  .staff-admin-enterprise .staff-topbar{grid-template-columns:auto minmax(0,1fr);height:auto;padding:10px 12px}.staff-admin-enterprise .staff-top-actions{justify-content:flex-end}.staff-breadcrumb span,.staff-admin-enterprise .staff-user-meta{display:none}
  .staff-admin-content{padding:13px;gap:14px}.staff-admin-head{align-items:flex-start;flex-direction:column}.staff-admin-head-actions{width:100%}.staff-admin-head-actions .staff-btn{flex:1}.staff-admin-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-admin-summary article{padding:14px}.staff-admin-summary article>strong{font-size:24px}
  .staff-admin-toolbar{padding:16px;flex-direction:column}.staff-admin-filters{grid-template-columns:1fr;padding:12px 16px}.staff-admin-filters label:nth-child(4),.staff-admin-filters .staff-btn{grid-column:auto}
  .staff-admin-desktop-table{display:none}.staff-admin-mobile-cards{display:grid}.staff-admin-directory-meta{align-items:flex-start;flex-direction:column}.staff-admin-pagination{width:100%;justify-content:space-between}.staff-icon-action,.staff-action-menu summary{width:42px;height:42px}
  .staff-admin-role-list{grid-template-columns:1fr}.staff-audit-list{grid-template-columns:1fr}.staff-audit-list article{grid-template-columns:34px minmax(0,1fr)}.staff-audit-list time{grid-column:2;white-space:normal}.staff-admin-audit{padding:16px}.staff-admin-audit-head{flex-direction:column}.staff-admin-dialog-actions{flex-direction:column-reverse}.staff-admin-dialog-actions .staff-btn{width:100%}
}
@media (max-width:420px){
  .staff-admin-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-admin-summary article:last-child{grid-column:span 2}.staff-admin-head-actions{display:grid;grid-template-columns:1fr}.staff-admin-mobile-card dl{grid-template-columns:1fr}.staff-admin-role-panel{padding:16px}.staff-admin-create{width:100vw;border-radius:0}
}

.staff-system-access{margin:14px 0 4px;padding:0;border:0;min-width:0}
.staff-system-access legend{padding:0;color:#17365d;font-weight:800;font-size:14px}
.staff-system-access>p{margin:4px 0 10px;color:#64748b;font-size:12px;line-height:1.45}
.staff-system-access-grid{display:grid;gap:8px}
.staff-system-access-grid label{position:relative;display:block;margin:0;cursor:pointer}
.staff-system-access-grid input{position:absolute;opacity:0;pointer-events:none}
.staff-system-access-grid span{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 12px;border:1px solid #dbe5f0;border-radius:12px;background:#f8fafc;color:#334155;transition:.15s ease}
.staff-system-access-grid i{width:22px;text-align:center;color:#64748b}
.staff-system-access-grid input:checked+span{border-color:#3b82f6;background:#eff6ff;color:#0f3f8f;box-shadow:0 0 0 1px #93c5fd inset}
.staff-system-access-grid input:checked+span i{color:#2563eb}
.staff-system-access-grid input:focus-visible+span{outline:3px solid rgba(59,130,246,.25);outline-offset:2px}
.staff-system-access-grid input:disabled+span{opacity:.72;cursor:not-allowed}
