:root{
  --bg:#f4f7fb;
  --panel:#ffffff;
  --panel-2:#f8fbff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#dbe4f0;
  --primary:#203764;
  --primary-2:#2f4f85;
  --accent:#1abc9c;
  --accent-2:#16a085;
  --danger:#e74c3c;
  --warning:#f39c12;
  --shadow:0 6px 18px rgba(32,55,100,0.08);
  --radius:14px;
}

*{box-sizing:border-box}
*{
  scrollbar-width:thin;
  scrollbar-color:#8fb3d9 #edf3fb;
}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:#edf3fb;border-radius:999px}
*::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#8fb3d9,#1abc9c);border:2px solid #edf3fb;border-radius:999px}
*::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#6f9ac8,#16a085)}
html,body{
  min-height:100%;
  margin:0;
  font-family:Arial,sans-serif;
  background:linear-gradient(180deg,#f8fbff 0%,#f2f6fb 100%);
  color:var(--text);
}
.home-dashboard{
  height:100vh;
  overflow:hidden;
}
.home-dashboard.home-scrollable{
  height:auto;
  min-height:100vh;
  overflow:auto;
}
a{color:inherit}
.menu-bar{
  position:sticky;
  top:0;
  z-index:2000;
  background:linear-gradient(135deg,var(--primary) 0%,var(--primary-2) 100%);
  color:white;
  display:flex;
  align-items:center;
  padding:14px 22px;
  gap:15px;
  box-shadow:0 4px 16px rgba(0,0,0,.14);
}
.menu-left,.menu-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.menu-left{flex:1}
.menu-bar h1{font-size:20px;margin:0 10px 0 0;font-weight:700;letter-spacing:.3px}
.menu-bar a,.menu-bar button{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  padding:9px 14px;
  border-radius:999px;
  color:white;
  text-decoration:none;
  font-size:14px;
  cursor:pointer;
  transition:all .2s ease;
}
.menu-bar a:hover,.menu-bar button:hover{background:rgba(255,255,255,.20);transform:translateY(-1px)}
.menu-bar a.active,.menu-bar button.active{background:var(--accent);border-color:transparent;font-weight:700}
.menu-dropdown{
  position:relative;
  display:inline-block;
}
.menu-dropdown summary{
  list-style:none;
}
.menu-dropdown summary::-webkit-details-marker{display:none}
.menu-dropdown-summary{
  height:34px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 13px;
  border-radius:8px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  color:white;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.menu-dropdown-summary:after{
  content:"";
  width:0;
  height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid currentColor;
  opacity:.85;
}
.menu-dropdown-summary:hover,
.menu-dropdown-summary.active{
  background:rgba(255,255,255,.20);
}
.menu-dropdown[open] .menu-dropdown-summary{
  background:#1abc9c;
  border-color:#1abc9c;
}
.menu-dropdown-content{
  position:absolute;
  top:40px;
  left:0;
  z-index:5200;
  min-width:210px;
  display:grid;
  gap:4px;
  padding:7px;
  border:1px solid #d7e3f3;
  border-radius:10px;
  background:white;
  box-shadow:0 14px 34px rgba(15,23,42,.18);
}
.menu-dropdown-content a{
  width:100%;
  height:34px;
  justify-content:flex-start;
  margin:0;
  background:white!important;
  border:0!important;
  color:#203764!important;
  border-radius:7px!important;
  box-shadow:none!important;
}
.menu-dropdown-content a:hover,
.menu-dropdown-content a.active{
  background:#e8f8f4!important;
  color:#087864!important;
  transform:none!important;
}
.username-display{
  font-size:13px;
  font-weight:700;
  background:rgba(0,0,0,.18);
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
}
.save-status-top{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.55);
  background:#ffffff;
  color:var(--primary);
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.editor-save-strip{
  position:sticky;
  top:58px;
  z-index:1700;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:8px max(2%, 18px);
  background:rgba(244,247,251,.92);
  border-bottom:1px solid #dfe8f4;
  backdrop-filter:blur(8px);
}
.editor-save-strip .btn{
  height:34px;
}
.save-status-side{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  border:1px solid #d7e3f3;
  background:#f8fbff;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  text-align:center;
}
#autosaveStatus{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  border-radius:9px;
  border:1px solid #d7e3f3;
  background:#ffffff;
  color:#203764;
  font-size:13px;
  font-weight:700;
  text-align:center;
}
.save-status-top[data-state="ready"],
.save-status-side[data-state="ready"],
#autosaveStatus[data-state="ready"]{background:#ffffff!important;border-color:#d7e3f3!important;color:#203764!important}
.save-status-top[data-state="saved"],
.save-status-side[data-state="saved"],
#autosaveStatus[data-state="saved"]{background:#e8f8f4!important;border-color:#a9ded2!important;color:#087864!important}
.save-status-top[data-state="saving"],
.save-status-side[data-state="saving"],
#autosaveStatus[data-state="saving"]{background:#fff7e6!important;border-color:#ffd891!important;color:#9a5b00!important}
.save-status-top[data-state="dirty"],
.save-status-side[data-state="dirty"],
#autosaveStatus[data-state="dirty"]{background:#fff3e8!important;border-color:#ffc699!important;color:#9a4d00!important}
.save-status-top[data-state="error"],
.save-status-side[data-state="error"],
#autosaveStatus[data-state="error"]{background:#fde8e8!important;border-color:#ffb4ad!important;color:#b42318!important}
.menu-bar button:disabled,
.btn:disabled{
  cursor:wait;
  opacity:.72;
  transform:none;
}
.page-wrap{width:96%;margin:18px auto 24px}
.top-controls,.panel{
  background:rgba(255,255,255,.92);
  border:1px solid #eef3f9;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.top-controls{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
  padding:14px 16px;
  margin-bottom:14px;
}
.control-group{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.filter-controls{
  display:grid;
  grid-template-columns:170px 190px;
  gap:8px;
  align-items:end;
}
.filter-field{
  display:grid;
  gap:5px;
  min-width:0;
}
.filter-field label{
  line-height:1;
}
.filter-field .searchable-select,
.filter-field select{
  width:100%;
}
.action-controls{
  margin-left:auto;
}
label,.field-label{font-size:13px;color:var(--muted);font-weight:700}
input,select,textarea{
  border:1px solid var(--line);
  border-radius:10px;
  font-size:14px;
  background:#fff;
  color:var(--text);
}
input,select{height:40px;padding:0 12px}
textarea{padding:10px 12px;min-height:80px}
input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:#8db4ff;
  box-shadow:0 0 0 3px rgba(56,132,255,.12);
}
.searchable-select-source{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}
.searchable-select{
  position:relative;
  width:100%;
  min-width:0;
}
.searchable-select-input{
  width:100%;
  height:40px;
  padding:0 34px 0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  color:var(--text);
  font-size:14px;
  cursor:text;
}
.searchable-select:after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  width:0;
  height:0;
  margin-top:-2px;
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:6px solid #64748b;
  pointer-events:none;
}
.searchable-select-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 4px);
  z-index:6000;
  display:none;
  max-height:260px;
  overflow:auto;
  padding:5px;
  border:1px solid #cfdbea;
  border-radius:10px;
  background:#fff;
  box-shadow:0 16px 36px rgba(32,55,100,.20);
}
.searchable-select.open .searchable-select-menu{
  display:grid;
  gap:2px;
}
.searchable-select-option{
  display:block;
  width:100%;
  border:0;
  border-radius:7px;
  background:#fff;
  color:#203764;
  padding:8px 9px;
  text-align:left;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.searchable-select-option:hover,
.searchable-select-option.active{
  background:#e8f8f4;
  color:#087864;
}
.searchable-select-empty{
  padding:8px 9px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.search-bar{flex:1;min-width:260px}
.search-bar input{width:100%;min-width:220px}
.btn{
  border:none;
  height:40px;
  padding:0 14px;
  color:white;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:all .2s ease;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:var(--accent)}
.btn.primary:hover{background:var(--accent-2)}
.btn.soft{background:#edf3fb;color:var(--primary);border:1px solid #d7e3f3;box-shadow:none}
.btn.soft:hover{background:#dfeaf8}
.btn.danger{background:var(--danger)}
.btn.warning{background:var(--warning)}
.summary-wrap{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:14px}
.summary-card{
  background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--shadow);
  border:1px solid #edf2f8;
  position:relative;
  overflow:hidden;
  min-width:0;
}
.home-dashboard .menu-bar{padding:10px 18px}
.home-wrap{
  height:calc(100vh - 62px);
  margin:10px auto;
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
  overflow:hidden;
}
.home-dashboard .top-controls{
  margin-bottom:8px;
  padding:10px 12px;
  gap:8px;
}
.home-dashboard .summary-wrap{
  gap:8px;
  margin-bottom:8px;
}
.home-dashboard .summary-card{
  padding:9px 11px;
  border-radius:12px;
}
.home-dashboard .summary-value{font-size:20px}
.home-dashboard .summary-title{margin-bottom:4px;font-size:11px}
.home-main-grid{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:10px;
}
.home-docs,.home-setup{
  min-height:0;
  overflow:hidden;
}
.home-docs .module-content-body,
.home-setup .module-content-body{
  height:calc(100% - 47px);
  overflow:hidden;
  padding:10px;
}
.home-docs .folder-layout{
  height:100%;
  min-height:0;
  grid-template-columns:280px minmax(0,1fr);
}
.home-docs .folder-tree,
.home-docs .table-wrap,
.home-setup .module-content-body{
  max-height:none;
  overflow:auto;
}
.home-setup .editor-shell{
  grid-template-columns:1fr;
  gap:10px;
}
.home-setup .editor-side{
  max-height:none;
  padding:10px;
}
.home-email-status{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:10px;
}
.compact-panel{
  padding:10px;
  margin-bottom:10px;
  border-radius:12px;
}
.compact-panel h3{margin:0 0 8px;color:var(--primary);font-size:14px}
.summary-card:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--accent),#58a6ff)}
.summary-card.blue:before{background:linear-gradient(90deg,#203764,#2f4f85)}
.summary-card.green:before{background:linear-gradient(90deg,#22c55e,#16a34a)}
.summary-card.orange:before{background:linear-gradient(90deg,#f59e0b,#d97706)}
.summary-card.red:before{background:linear-gradient(90deg,#ef4444,#dc2626)}
.summary-card.gray:before{background:linear-gradient(90deg,#6b7280,#4b5563)}
.summary-title{font-size:12px;color:var(--muted);margin-bottom:8px;text-transform:uppercase;letter-spacing:.7px;font-weight:700}
.summary-value{font-size:24px;font-weight:700;color:var(--primary);line-height:1.15}
.summary-sub{font-size:12px;color:#7b8794;margin-top:6px}
.module-content{
  background:white;
  border-radius:18px;
  box-shadow:0 8px 20px rgba(0,0,0,.07);
  border:1px solid #e7eef7;
  overflow:hidden;
}
.module-content-header{
  padding:14px 18px;
  background:linear-gradient(180deg,var(--primary) 0%,#2d4d83 100%);
  color:white;
  font-weight:700;
  font-size:15px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.module-content-body{padding:16px;background:#fff}
.folder-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:14px;align-items:start}
.folder-tree{padding:12px;max-height:620px;overflow:auto}
.tree-title{font-size:13px;font-weight:700;color:var(--primary);margin:0 0 10px}
.tree-branch{display:grid;gap:4px;margin-left:14px}
.folder-tree details{display:grid;gap:4px}
.folder-tree summary{list-style:none}
.folder-tree summary::-webkit-details-marker{display:none}
.tree-node{
  width:100%;
  min-height:32px;
  border:0;
  background:transparent;
  color:var(--text);
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  padding:6px 8px;
  border-radius:8px;
  font-size:13px;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}
.tree-node:hover,.tree-node.active{background:#edf3fb;color:var(--primary)}
.tree-root{font-weight:700;margin-bottom:5px}
.folder-tree details:not([open]) > summary .tree-node{background:#fbfdff}
.tree-icon{
  width:15px;
  height:11px;
  border-radius:2px;
  background:#f5b84b;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.12);
  position:relative;
}
.tree-icon:before{
  content:"";
  position:absolute;
  left:1px;
  top:-4px;
  width:8px;
  height:5px;
  border-radius:2px 2px 0 0;
  background:#f0a929;
}
.tree-file-mark{
  width:12px;
  height:15px;
  border:1px solid #9fb2cc;
  border-radius:2px;
  background:#fff;
  display:inline-block;
}
.tree-count{font-size:11px;color:#6b7280;background:#eef3f9;border-radius:999px;padding:2px 6px}
.tree-empty{font-size:12px;color:#7b8794;padding:7px 8px}
.tree-template-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px;
  align-items:center;
}
.tree-template-row .tree-node{min-width:0}
.tree-delete-btn{
  border:1px solid #f3b2aa;
  background:#fff5f3;
  color:#b42318;
  border-radius:999px;
  width:24px;
  height:24px;
  line-height:20px;
  padding:0;
  font-size:18px;
  font-weight:700;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.tree-delete-btn:hover{background:#fde8e8}
.folder-table{min-width:0}
.batch-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:14px;align-items:start}
.email-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,.8fr);gap:14px;align-items:start}
.email-panel{padding:16px}
.email-panel h3{margin:0 0 12px;color:var(--primary);font-size:16px}
.notice{border-radius:10px;padding:10px 12px;font-size:13px;font-weight:700;margin-bottom:12px}
.notice.warning{background:#fff7e6;color:#9a5b00;border:1px solid #f8d28a}
.email-config-grid{display:grid;grid-template-columns:130px minmax(0,1fr);gap:8px 10px;font-size:13px}
.email-config-grid span{color:var(--muted);font-weight:700}
.email-config-grid strong{color:var(--primary);overflow-wrap:anywhere}
.email-test-btn{margin-top:14px;width:100%}
.email-action-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.email-action-row .btn{height:34px;font-size:12px}
.email-group-list{display:grid;gap:8px;margin-bottom:12px}
.email-group-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.email-group-row .btn{height:34px;font-size:12px}
.email-group-row .btn.soft{justify-content:flex-start;overflow:hidden;text-overflow:ellipsis}
.email-group-form{border-top:1px solid #edf2f8;padding-top:12px}
.email-employee-list{max-height:300px}
.batch-actions{display:flex;gap:8px;margin:8px 0}
.batch-actions .btn{height:34px;font-size:12px}
.employee-check-list{display:grid;gap:6px;margin-top:10px;max-height:500px;overflow:auto;padding-right:4px}
.employee-check{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 8px;align-items:center;border:1px solid #edf2f8;border-radius:10px;padding:8px;background:#fbfdff}
.employee-check input{grid-row:1 / span 2;width:auto;height:auto}
.employee-check span{font-size:13px;font-weight:700;color:var(--primary)}
.employee-check small{font-size:11px;color:#6b7280}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{padding:8px 8px;border-bottom:1px solid #edf2f8;text-align:left;vertical-align:top}
th{color:var(--primary);font-size:12px;text-transform:uppercase;letter-spacing:.5px;background:#f8fbff}
.column-filter-btn{
  width:100%;
  min-height:24px;
  border:0;
  background:transparent;
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  padding:0;
  font:inherit;
  text-transform:inherit;
  letter-spacing:inherit;
  cursor:pointer;
}
.column-filter-btn:after{content:"▾";font-size:10px;color:#6b7280}
.column-filter-btn.active{color:#087864}
.column-filter-btn.active:after{color:#1abc9c}
.column-filter-menu{
  position:fixed;
  z-index:5000;
  width:260px;
  display:none;
  padding:8px;
  border:1px solid #d7e3f3;
  border-radius:10px;
  background:white;
  box-shadow:0 12px 28px rgba(32,55,100,.18);
}
.column-filter-title{
  color:#203764;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  margin:0 0 6px;
}
.column-filter-menu input{
  width:100%;
  height:34px;
  margin-bottom:6px;
  border-radius:8px;
}
.column-filter-menu button{
  width:100%;
  border:0;
  border-radius:7px;
  background:white;
  color:#203764;
  padding:7px 8px;
  text-align:left;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.column-filter-menu button:hover,.column-filter-menu button.selected{
  background:#e8f8f4;
  color:#087864;
}
.column-filter-options{
  display:grid;
  gap:2px;
  max-height:220px;
  overflow:auto;
  border-top:1px solid #edf2f8;
  margin-top:6px;
  padding-top:6px;
}
.home-dashboard table{font-size:12px}
.home-dashboard th,.home-dashboard td{padding:6px 7px}
.compact-table th,.compact-table td{padding:6px 7px}
.compact-table td:last-child{width:82px;text-align:right}
.compact-table strong{font-size:12px;color:var(--primary)}
.compact-table .summary-sub{font-size:11px;margin-top:2px}
.action-menu{position:relative;display:inline-block}
.action-menu summary{
  list-style:none;
  cursor:pointer;
  min-height:30px;
  padding:6px 10px;
  border-radius:8px;
  background:#087864;
  color:white;
  border:1px solid #087864;
  font-size:12px;
  font-weight:700;
}
.action-menu summary::-webkit-details-marker{display:none}
.action-menu summary:hover,
.action-menu[open] summary{background:#1abc9c;color:white;border-color:#1abc9c}
.action-menu-list{
  position:absolute;
  right:0;
  top:34px;
  z-index:100;
  min-width:150px;
  display:grid;
  gap:2px;
  padding:6px;
  border:1px solid #d7e3f3;
  border-radius:10px;
  background:white;
  box-shadow:0 10px 24px rgba(32,55,100,.18);
}
.action-menu-list a,
.action-menu-list button{
  width:100%;
  border:0;
  background:white;
  color:var(--primary);
  text-align:left;
  text-decoration:none;
  padding:7px 8px;
  border-radius:7px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.action-menu-list a:hover,
.action-menu-list button:hover{background:#edf3fb}
.status-pill{display:inline-flex;border-radius:999px;padding:5px 9px;background:#e8f8f4;color:#087864;font-size:12px;font-weight:700}
.status-pill.failed{background:#fde8e8;color:#b42318}
.empty-state{
  min-height:260px;
  border:2px dashed #dbe4f0;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  color:#6b7280;
  background:#fbfdff;
  text-align:center;
}
.editor-shell{display:grid;grid-template-columns:minmax(250px,300px) minmax(0,1fr);gap:14px;align-items:start}
.editor-side{padding:14px;position:sticky;top:82px;max-height:calc(100vh - 100px);overflow:auto;min-width:0}
.editor-side h3{margin:0 0 12px;color:var(--primary);font-size:15px}
.form-grid{display:grid;gap:10px;min-width:0}
.form-row{display:grid;gap:5px;min-width:0}
.form-row input,.form-row select,.form-row textarea{width:100%;min-width:0}
.form-row select[multiple]{height:auto;padding:8px}
.check-row{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text);font-weight:600}
.check-row input{width:auto;height:auto}
.autosave-toggle-row{
  justify-content:center;
  min-height:34px;
  padding:7px 9px;
  border:1px solid #d7e3f3;
  border-radius:8px;
  background:#fbfdff;
  color:#203764;
}
#documentForm .btn{width:100%}
.mini-list{display:grid;gap:8px;margin-top:12px}
.mini-list-row{display:flex;justify-content:space-between;gap:8px;align-items:center;border:1px solid #edf2f8;border-radius:10px;padding:8px;background:#fbfdff}
.mini-list-row .btn{height:30px;padding:0 9px;font-size:12px}
.editor-side-title{
  margin:-12px -12px 12px;
  padding:10px 12px;
  color:white;
  background:#243f70;
  border-radius:12px 12px 0 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.editor-side-title h3{
  margin:0;
  padding:0;
  background:transparent;
  color:white;
  border-radius:0;
}
.side-collapse-btn{
  height:28px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.12);
  color:white;
  border-radius:7px;
  padding:0 9px;
  font-weight:700;
  cursor:pointer;
}
.side-collapse-btn:hover{background:rgba(255,255,255,.22)}
.side-restore-btn{
  display:none;
  width:max-content;
  margin:0 0 8px;
}
.editor-workspace{min-width:0}
.editor-shell.editor-side-collapsed{
  grid-template-columns:0 minmax(0,1fr);
}
.editor-shell.editor-side-collapsed .editor-side{
  width:0;
  min-width:0;
  padding:0;
  border:0;
  opacity:0;
  overflow:hidden;
  pointer-events:none;
}
.editor-shell.editor-side-collapsed .side-restore-btn{
  display:inline-flex;
}
.toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px;
  margin-bottom:14px;
  position:relative;
  z-index:10;
}
.overflow-status{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border-radius:10px;
  background:#e8f8f4;
  color:#087864;
  font-size:12px;
  font-weight:700;
}
.overflow-status.warning{
  background:#fff7e6;
  color:#9a5b00;
  border:1px solid #f8d28a;
}
.tool-btn,.toolbar select,.toolbar input[type=color]{
  height:36px;
  min-width:36px;
  border-radius:10px;
  border:1px solid #d7e3f3;
  background:#edf3fb;
  color:var(--primary);
  font-weight:700;
  cursor:pointer;
}
.tool-btn:hover{background:#dfeaf8}
.toolbar select{padding:0 8px}
.toolbar input[type=color]{padding:4px;width:40px}
.page-stage{overflow:auto;padding:20px;background:#e8eef7;border-radius:14px;border:1px solid #d7e3f3}
.page-stage{
  display:grid;
  grid-template-columns:104px minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.page-scroll{
  min-width:0;
  overflow:auto;
  padding:2px 0 16px;
}
.pages-container{
  --page-zoom:1;
  display:grid;
  gap:calc(24px * var(--page-zoom));
  min-width:calc(8.5in * var(--page-zoom));
  justify-content:center;
}
.page-navigator{
  position:sticky;
  top:86px;
  display:grid;
  gap:6px;
  max-height:calc(100vh - 120px);
  overflow:auto;
}
.page-navigator-title{
  color:#203764;
  font-size:12px;
  font-weight:700;
  padding:2px 4px 5px;
}
.page-nav-btn{
  border:1px solid #cfdbea;
  background:white;
  color:#203764;
  border-radius:8px;
  min-height:32px;
  padding:0 8px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  text-align:left;
}
.page-nav-btn:hover{
  background:#e8f8f4;
  border-color:#a9ded2;
}
.legal-page{
  width:8.5in;
  height:14in;
  margin:0 auto;
  padding:.7in;
  background:white;
  box-shadow:0 8px 26px rgba(32,55,100,.18);
  position:relative;
  outline:none;
  color:#111827;
  line-height:1;
  font-family:Arial,sans-serif;
  font-size:12pt;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  zoom:var(--page-zoom);
}
.legal-page.has-design-background .doc-header,
.legal-page.has-design-background .doc-footer{
  visibility:hidden;
  min-height:0;
  height:0;
  margin:0;
  padding:0;
  border:0;
  overflow:hidden;
}
.legal-page.has-design-background .doc-body{
  position:absolute;
  inset:.7in;
  min-height:auto;
}
.document-design-background{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  overflow:hidden;
}
.document-design-background img,
.document-design-background object,
.document-design-background iframe{
  width:100%;
  height:100%;
  border:0;
  object-fit:fill;
  display:block;
}
.document-watermark{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  opacity:.10;
  color:#203764;
  font-size:68px;
  font-weight:700;
  transform:rotate(-28deg);
  text-align:center;
  z-index:1;
}
.document-watermark img{
  max-width:70%;
  max-height:70%;
  object-fit:contain;
}
.doc-header,.doc-body,.doc-footer{position:relative;z-index:2}
.doc-header{
  min-height:86px;
  flex:0 0 auto;
  border-bottom:1px solid #dbe4f0;
  margin-bottom:16px;
  padding-bottom:10px;
  display:flex;
  align-items:center;
  gap:14px;
}
.doc-logo{max-height:62px;max-width:170px;object-fit:contain}
.doc-logo.logo-size-small{max-height:46px;max-width:125px}
.doc-logo.logo-size-normal{max-height:62px;max-width:170px}
.doc-logo.logo-size-large{max-height:86px;max-width:230px}
.doc-header.logo-align-center{justify-content:center;text-align:center;flex-wrap:wrap}
.doc-header.logo-align-center .doc-logo{flex-basis:100%;margin:0 auto}
.doc-header.logo-align-center .doc-meta{margin-left:0;text-align:center}
.header-copy{min-width:0}
.header-text-preview{font-size:16px;color:#111827}
.header-subtext-preview{font-size:12px;color:#6b7280;white-space:pre-wrap}
.doc-meta{margin-left:auto;text-align:right;font-size:12px;color:#4b5563}
.header-right-text-preview,
.header-right-subtext-preview{white-space:pre-wrap}
.doc-body{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  font-family:Arial,sans-serif;
  font-size:12pt;
  line-height:1.35;
  text-align:justify;
}
.doc-body:focus{outline:2px solid rgba(26,188,156,.18);outline-offset:8px}
.doc-body p{margin:0 0 10pt}
.doc-body h1,.doc-body h2,.doc-body h3{line-height:1.18;margin:0 0 12pt;text-align:left}
.doc-body h1{font-size:20pt}
.doc-body h2{font-size:16pt}
.doc-body h3{font-size:14pt}
.doc-body ul,.doc-body ol{margin:0 0 10pt 22pt;padding:0}
.doc-body li{margin:0 0 4pt}
.doc-body img{max-width:100%;height:auto}
.doc-body table p{margin:0}
.employee-placeholder-token{background:#fff3a3;border-radius:4px;padding:1px 3px}
.signature-block{display:block;width:100%;margin:16px 0 0}
.signature-inner{width:240px;text-align:center;color:#111827}
.signature-align-left{margin-right:auto}
.signature-align-center{margin-left:auto;margin-right:auto}
.signature-align-right{margin-left:auto}
.signature-label{font-size:9pt;color:#6b7280;font-weight:700;text-transform:uppercase;margin-bottom:2px}
.signature-mark{height:34px;display:flex;align-items:flex-end;justify-content:center;margin-bottom:0}
.signature-image{max-width:170px;max-height:34px;object-fit:contain;display:block}
.signature-line{border-top:1px solid #111827;width:100%;height:1px;margin:2px 0 4px}
.signature-inner strong{display:block;font-size:10.5pt;text-transform:uppercase;letter-spacing:.2px;line-height:1.1}
.signature-inner span{display:block;font-size:9pt;color:#4b5563;margin-top:1px;line-height:1.1}
.doc-body .doc-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  margin:12px 0;
  font-size:12px;
}
.doc-table-wrap{
  margin:12px 0;
  border:1px solid transparent;
  border-radius:8px;
  padding:4px;
  width:100%;
  max-width:100%;
}
.doc-table-wrap.table-align-left{margin-right:auto}
.doc-table-wrap.table-align-center{margin-left:auto;margin-right:auto}
.doc-table-wrap.table-align-right{margin-left:auto}
.doc-table-wrap:hover{
  border-color:#c7d6ea;
  background:#fbfdff;
}
.doc-table-wrap.table-dragging{
  opacity:.55;
}
.doc-table-tools{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  align-items:center;
  margin:0 0 6px;
  user-select:none;
}
.doc-table-tools button{
  border:1px solid #d7e3f3;
  background:#edf3fb;
  color:#203764;
  border-radius:7px;
  min-height:28px;
  padding:0 8px;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.doc-table-tools button:hover{
  background:#dfeaf8;
}
.doc-table-tools .table-drag-handle{
  background:#203764;
  color:#fff;
  border-color:#203764;
  cursor:grab;
}
.doc-table-tools .table-drag-handle:active{
  cursor:grabbing;
}
.doc-body .doc-table th,
.doc-body .doc-table td{
  border:1px solid #94a3b8;
  padding:7px 8px;
  min-height:28px;
  vertical-align:top;
  overflow-wrap:anywhere;
}
.doc-body .doc-table td:focus,
.doc-body .doc-table th:focus{
  outline:2px solid rgba(26,188,156,.35);
  outline-offset:-2px;
}
.doc-body .doc-table .table-cell-selected{
  box-shadow:inset 0 0 0 2px #1abc9c;
  background:#ecfdf8;
}
.doc-body .doc-table th{
  background:#edf3fb;
  color:#203764;
  font-weight:700;
  text-align:left;
}
.doc-table-wrap.table-style-plain .doc-table th{background:#fff;color:#111827}
.doc-table-wrap.table-style-formal .doc-table th{background:#203764;color:#fff}
.doc-table-wrap.table-style-soft .doc-table th{background:#e8f8f4;color:#087864}
.doc-table-wrap.table-style-soft .doc-table td{border-color:#b7e4d8}
.table-col-resizer{position:absolute;width:6px;cursor:col-resize;z-index:5}
.doc-table-wrap{position:relative}
.table-context-menu,.amount-context-menu,.signature-choice-menu{position:fixed;z-index:5000;background:#fff;border:1px solid #d7e3f3;border-radius:10px;box-shadow:0 10px 30px rgba(32,55,100,.18);padding:6px;display:none}
.signature-choice-menu{width:260px}
.table-context-menu button,.amount-context-menu button,.signature-choice-menu button{display:block;width:100%;border:0;background:#fff;color:#203764;text-align:left;padding:8px 10px;border-radius:7px;font-weight:700}
.table-context-menu button:hover,.amount-context-menu button:hover,.signature-choice-menu button:hover{background:#edf3fb}
.signature-choice-menu input,.signature-choice-menu select{width:100%;height:34px;margin:4px 0 6px;border:1px solid #d7e3f3;border-radius:8px;padding:0 9px}
.signature-employee-results{
  display:grid;
  gap:3px;
  max-height:170px;
  overflow:auto;
  margin:0 0 8px;
  padding:3px;
  border:1px solid #edf2f8;
  border-radius:8px;
  background:#fbfdff;
}
.signature-employee-results button{
  background:white;
  border:1px solid transparent;
  padding:7px 8px;
}
.signature-employee-results button:hover{
  border-color:#b7e4d8;
  background:#e8f8f4;
}
.signature-employee-results button.selected{
  border-color:#1abc9c;
  background:#e8f8f4;
  box-shadow:inset 3px 0 0 #1abc9c;
}
.signature-employee-results strong,
.signature-employee-results span{
  display:block;
}
.signature-employee-results span{
  margin-top:2px;
  color:#6b7280;
  font-size:11px;
  font-weight:600;
}
.employee-context-menu{
  position:fixed;
  z-index:5000;
  width:260px;
  max-height:360px;
  overflow:auto;
  background:#fff;
  border:1px solid #d7e3f3;
  border-radius:10px;
  box-shadow:0 10px 30px rgba(32,55,100,.18);
  padding:6px;
  display:none;
}
.employee-context-menu .context-title{
  font-size:12px;
  color:#6b7280;
  font-weight:700;
  padding:7px 9px;
  border-bottom:1px solid #edf2f8;
  margin-bottom:4px;
}
.context-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:6px 0}
.context-quick-actions button{background:#edf3fb;text-align:center}
.employee-context-menu input{
  width:100%;
  height:34px;
  padding:0 9px;
  margin:4px 0 6px;
  border:1px solid #d7e3f3;
  border-radius:8px;
}
.context-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
  margin:6px 0;
}
.context-tabs button{
  border:1px solid #d7e3f3;
  background:#edf3fb;
  text-align:center;
}
.context-tabs button.active{
  background:#1abc9c;
  color:#fff;
  border-color:#1abc9c;
}
.context-panel{display:none}
.context-panel.active{display:block}
.employee-context-menu button{
  display:block;
  width:100%;
  border:0;
  background:#fff;
  color:#203764;
  text-align:left;
  padding:8px 10px;
  border-radius:7px;
  font-weight:700;
  cursor:pointer;
}
.employee-context-menu button:hover{background:#edf3fb}
.doc-page-break{
  page-break-after:always;
  break-after:page;
  border-top:2px dashed #b8c8de;
  margin:34px 0;
  height:0;
  position:relative;
}
.doc-page-break:after{
  content:"New page";
  position:absolute;
  left:50%;
  top:-13px;
  transform:translateX(-50%);
  background:#fff;
  color:#6b7280;
  border:1px solid #dbe4f0;
  border-radius:999px;
  padding:3px 10px;
  font-size:11px;
  font-weight:700;
}
.doc-footer{flex:0 0 auto;border-top:1px solid #dbe4f0;margin-top:16px;padding-top:10px;font-size:12px;color:#6b7280;text-align:center}
.footer-preview{margin-bottom:6px}
.footer-meta{
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  color:#4b5563;
}
.toast{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:3000;
  background:#203764;
  color:white;
  padding:12px 14px;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.18);
  max-width:min(360px,calc(100vw - 36px));
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:opacity .28s ease,transform .28s ease,visibility .28s ease;
  pointer-events:none;
}
.toast.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.toast.notification-toast{
  background:#fff7e6;
  color:#7a4a00;
  border:1px solid #f8d28a;
  box-shadow:0 14px 34px rgba(122,74,0,.22);
  font-weight:800;
}

/* UI polish pass */
body{
  background:
    linear-gradient(180deg,#f7fafc 0%,#eef4fb 100%);
}
body.modal-open{
  overflow:hidden;
}
body.modal-open .column-filter-menu{
  display:none!important;
}
body.modal-open .table-wrap th,
body.modal-open .excel-table-wrap th{
  position:static!important;
  z-index:0!important;
}
.menu-bar{
  min-height:58px;
  padding:11px 22px;
  background:#243f70;
  border-bottom:1px solid rgba(255,255,255,.12);
  box-shadow:0 8px 22px rgba(32,55,100,.16);
}
.menu-bar h1{
  font-size:19px;
  letter-spacing:0;
}
.menu-bar a,.menu-bar button{
  height:34px;
  display:inline-flex;
  align-items:center;
  padding:0 13px;
  border-radius:8px;
  background:rgba(255,255,255,.08);
}
.menu-bar a.active,.menu-bar button.active{
  background:#1abc9c;
  box-shadow:0 6px 14px rgba(26,188,156,.22);
}
.notification-menu-link{
  position:relative;
  padding-right:30px!important;
}
.notification-menu-badge{
  position:absolute;
  right:6px;
  top:-7px;
  min-width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 5px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  border:2px solid #243f70;
  font-size:10px;
  font-weight:900;
  line-height:1;
}
.notification-source-focus{
  position:relative;
  z-index:80;
}
.notification-source-focus:before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background:rgba(15,23,42,.22);
  backdrop-filter:blur(3px);
  pointer-events:none;
}
.notification-source-focus:after{
  content:"";
  position:absolute;
  inset:-7px;
  z-index:-1;
  border:2px solid rgba(245,158,11,.95);
  border-left-width:8px;
  border-radius:inherit;
  background:rgba(255,248,219,.72);
  box-shadow:0 18px 44px rgba(15,23,42,.22),0 0 0 1px rgba(255,255,255,.72);
  pointer-events:none;
}
.username-display{
  height:34px;
  display:inline-flex;
  align-items:center;
  border-radius:8px;
}
.page-wrap{
  width:min(98%,1540px);
}
.top-controls,.panel,.module-content{
  border-color:#dfe8f4;
  box-shadow:0 8px 24px rgba(32,55,100,.07);
}
.top-controls{
  align-items:center;
}
input,select,textarea{
  border-radius:8px;
  border-color:#cfdbea;
}
.btn{
  height:36px;
  border-radius:8px;
  box-shadow:none;
}
.summary-card{
  border-radius:10px;
  padding:12px 13px;
}
.summary-card:before{
  height:3px;
}
.summary-title{
  letter-spacing:.4px;
}
.module-content{
  border-radius:12px;
}
.module-content-header{
  min-height:42px;
  padding:10px 14px;
  background:#243f70;
  letter-spacing:0;
}
.module-content-body{
  padding:12px;
}
.folder-layout{
  gap:10px;
}
.folder-tree{
  border-radius:10px;
  padding:10px;
  background:#fbfdff;
}
.tree-title{
  padding:0 4px 8px;
  border-bottom:1px solid #e7eef7;
}
.tree-branch{
  gap:2px;
  margin-left:10px;
}
.tree-node{
  min-height:29px;
  padding:5px 7px;
  border-radius:7px;
  font-size:12px;
}
.tree-node:hover,.tree-node.active{
  background:#e8f8f4;
  color:#087864;
}
.tree-count{
  font-size:10px;
  padding:1px 6px;
}
.tree-delete-btn{
  width:22px;
  height:22px;
  font-size:14px;
}
.table-wrap{
  border:1px solid #e7eef7;
  border-radius:10px;
  background:white;
}
table{
  font-size:12px;
}
th{
  position:sticky;
  top:0;
  z-index:2;
  background:#f3f7fc;
  border-bottom:1px solid #dfe8f4;
}
td{
  color:#334155;
}
tbody tr:hover td{
  background:#fbfdff;
}
.action-menu summary{
  min-height:28px;
  border-radius:7px;
  padding:5px 9px;
}
.action-menu-list{
  border-radius:8px;
}
.status-pill{
  border-radius:7px;
  padding:4px 7px;
  font-size:11px;
}
.editor-shell{
  grid-template-columns:minmax(270px,320px) minmax(0,1fr);
  gap:12px;
}
.editor-side{
  top:74px;
  padding:12px;
  border-radius:12px;
}
.editor-side h3{margin:0;color:white;font-size:15px}
.form-grid{
  gap:9px;
}
.form-row{
  gap:4px;
}
label,.field-label{
  font-size:12px;
}
#documentForm .btn{
  height:35px;
}
.toolbar{
  position:sticky;
  top:70px;
  z-index:1500;
  border-radius:12px;
  padding:9px;
  gap:6px;
  background:#ffffff;
  border:1px solid #dfe8f4;
}
.tool-btn,.toolbar select,.toolbar input[type=color]{
  height:34px;
  min-width:34px;
  border-radius:8px;
  background:#f4f8fd;
  border-color:#cfdbea;
}
.toolbar-color-control{
  height:34px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 7px 0 9px;
  border:1px solid #cfdbea;
  border-radius:8px;
  background:#f4f8fd;
  color:#203764;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.toolbar-color-control:hover{
  background:#e8f8f4;
  border-color:#a9ded2;
}
.toolbar-color-control input[type=color]{
  width:28px;
  min-width:28px;
  height:24px;
  padding:2px;
  border:0;
  background:transparent;
}
.editor-text-settings{
  position:fixed;
  inset:0;
  z-index:4200;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.28);
}
.editor-text-settings.is-open{
  display:flex;
}
.editor-text-settings-card{
  width:min(620px,calc(100vw - 36px));
  border:1px solid #dfe8f4;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 44px rgba(32,55,100,.22);
  padding:14px;
}
.editor-text-settings-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:10px;
  border-bottom:1px solid #edf2f8;
}
.editor-text-settings-head h3{
  margin:0;
  color:#203764;
  font-size:16px;
}
.editor-text-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding-top:12px;
}
.editor-text-settings-grid label{
  display:grid;
  gap:5px;
}
.editor-text-settings-grid span{
  color:#6b7280;
  font-size:12px;
  font-weight:700;
}
.editor-text-settings-grid select{
  width:100%;
}
.tool-btn:hover,.toolbar select:hover{
  background:#e8f8f4;
  border-color:#a9ded2;
}
.toolbar-mode-btn{
  min-width:74px;
  background:#243f70;
  color:white;
  border-color:#243f70;
}
.toolbar-mode-btn:hover{
  background:#1abc9c;
  color:white;
  border-color:#1abc9c;
}
.toolbar.toolbar-compact{
  gap:5px;
  padding:8px;
}
.toolbar.toolbar-compact .toolbar-secondary{
  display:none;
}
.toolbar.toolbar-compact .toolbar-mode-btn{
  min-width:54px;
}
.zoom-controls{
  display:inline-flex;
  gap:5px;
  padding-left:4px;
  border-left:1px solid #dfe8f4;
}
.zoom-controls .tool-btn{
  min-width:42px;
  font-size:12px;
}
.zoom-controls .tool-btn.active{
  background:#1abc9c;
  color:white;
  border-color:#1abc9c;
}
.toolbar select{
  max-width:180px;
}
.overflow-status{
  min-height:34px;
  border-radius:8px;
}
.page-stage{
  border-radius:12px;
  background:#dfe8f4;
  padding:18px;
}
.legal-page{
  box-shadow:0 12px 30px rgba(32,55,100,.22);
}
.doc-body:focus{
  outline:2px solid rgba(26,188,156,.28);
}
.mini-list-row,.employee-check{
  border-radius:8px;
}
.health-box{
  display:none;
  border:1px solid #dfe8f4;
  border-radius:8px;
  padding:10px;
  background:#fbfdff;
  font-size:12px;
}
.health-box.show{display:block}
.health-box.ok{
  background:#e8f8f4;
  border-color:#b7e4d8;
  color:#087864;
}
.health-box.warning{
  background:#fff7e6;
  border-color:#f8d28a;
  color:#8a5a00;
}
.health-box ul{
  margin:8px 0 0 18px;
  padding:0;
}
.health-box li{margin:4px 0}
.version-box{
  border:1px solid #dfe8f4;
  border-radius:8px;
  padding:10px;
  background:#fbfdff;
  display:grid;
  gap:7px;
}
.version-box > strong{
  color:#203764;
  font-size:12px;
}
.version-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  border-top:1px solid #edf2f8;
  padding-top:7px;
}
.version-row span,
.version-row small{
  display:block;
  font-size:11px;
  color:#6b7280;
}
.version-row .btn{
  height:28px;
  font-size:11px;
  padding:0 8px;
}
.email-preview-panel{
  grid-column:1 / -1;
}
.email-pdf-preview{
  width:100%;
  height:620px;
  border:1px solid #dfe8f4;
  border-radius:8px;
  background:white;
}
.recruitment-summary{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.recruitment-controls{
  margin:0 0 12px;
}
.recruitment-table table{
  min-width:1480px;
}
.recruitment-table select,
.recruitment-table textarea,
.recruitment-table input{
  width:100%;
  min-width:130px;
  border-radius:8px;
  margin-bottom:5px;
}
.inline-actions{
  position:static;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  min-width:170px;
  padding:0;
  border:0;
  box-shadow:none;
  background:transparent;
}
.inline-actions a,
.inline-actions button{
  width:auto;
  border:1px solid #d7e3f3;
  background:#edf3fb;
}
.recruitment-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.recruitment-side{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:14px;
  position:static;
}
.recruitment-kanban{
  margin-bottom:14px;
}
.recruitment-stage-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
}
.stage-card{
  min-height:64px;
  display:grid;
  align-content:center;
  gap:4px;
  padding:10px;
  border:1px solid #dfe8f4;
  border-radius:10px;
  background:#fbfdff;
  text-align:center;
  cursor:pointer;
  font:inherit;
}
.stage-card:hover,
.stage-card.is-active{
  border-color:#1abc9c;
  background:#e8f8f4;
  box-shadow:0 8px 22px rgba(8,120,100,.14);
}
.stage-card.is-active{
  border-color:#203764;
  background:#203764;
  color:white;
  box-shadow:0 10px 26px rgba(32,55,100,.28);
}
.stage-card strong{
  color:#203764;
  font-size:12px;
}
.stage-card.is-active strong{
  color:white;
}
.stage-card span{
  color:#087864;
  font-size:22px;
  font-weight:700;
}
.stage-card.is-active span{
  color:white;
}
.requirements-box{
  border:1px solid #d7e3f3;
  border-radius:8px;
  padding:7px;
  margin-bottom:6px;
  background:#fbfdff;
}
.requirements-box summary{
  color:#203764;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  margin-bottom:5px;
}
.requirements-open-btn{
  width:100%;
  margin-bottom:6px;
}
.requirements-modal{
  position:fixed;
  inset:0;
  z-index:6000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.48);
}
.requirements-modal.show{
  display:flex;
}
.requirements-modal.show{
  z-index:50000!important;
  isolation:isolate;
}
.requirements-modal-panel{
  width:min(1120px,96vw);
  max-height:88vh;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  overflow:hidden;
  border-radius:12px;
  background:white;
  border:1px solid #dfe8f4;
  box-shadow:0 22px 60px rgba(15,23,42,.28);
  position:relative;
  z-index:1;
}
.requirements-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  background:#243f70;
  color:white;
}
.requirements-modal-head strong,
.requirements-modal-head span{
  display:block;
}
.requirements-modal-head strong{
  font-size:16px;
}
.requirements-modal-head span{
  margin-top:3px;
  font-size:12px;
  color:#dbeafe;
}
.requirements-close-btn{
  height:34px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:8px;
  background:rgba(255,255,255,.12);
  color:white;
  font-weight:700;
  cursor:pointer;
  padding:0 12px;
}
.requirements-close-btn:hover{
  background:rgba(255,255,255,.22);
}
.replacement-pool-card{
  display:grid;
  gap:5px;
  padding:10px;
  border:1px solid #edf2f8;
  border-radius:10px;
  background:#fbfdff;
}
.replacement-pool-card strong{
  color:#203764;
  font-size:13px;
}
.replacement-pool-card span{
  color:#087864;
  font-size:12px;
  font-weight:700;
}
.replacement-pool-card a{
  color:#334155;
  text-decoration:none;
  font-size:12px;
  font-weight:700;
}
.replacement-pool-card a:hover{
  color:#087864;
}
.replacement-pool-card small{
  color:#6b7280;
  font-weight:600;
}
.requirements-modal-body{
  overflow:auto;
  padding:14px 16px 18px;
}
.requirement-category{
  margin:8px 0 5px;
  padding:4px 6px;
  border-radius:6px;
  background:#edf3fb;
  color:#203764;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
}
.requirement-row{
  display:grid;
  grid-template-columns:minmax(190px,1fr) minmax(280px,2fr);
  gap:8px;
  align-items:start;
  padding:10px;
  border:1px solid #edf2f8;
  border-radius:10px;
  background:#fbfdff;
  margin-bottom:8px;
}
.requirement-name-cell strong{
  display:block;
  color:#334155;
  font-size:13px;
}
.requirement-name-cell span,
.requirement-field span,
.requirement-file-cell > span{
  display:block;
  margin-bottom:4px;
  color:#6b7280;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
}
.requirement-row input,
.requirement-row select{
  min-width:0;
  width:100%;
  height:34px;
  margin:0;
  padding:0 8px;
  font-size:12px;
}
.requirement-field{
  display:grid;
  gap:0;
  color:#334155;
}
.requirement-detail-cell{
  grid-column:auto;
}
.requirement-file-cell{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px;
  align-items:center;
}
.requirement-file-cell input[type=file]{
  grid-column:1 / -1;
  height:auto;
  padding:5px;
}
.requirement-file-name{
  margin:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.requirement-file-link{
  height:28px;
  padding:0 8px;
  font-size:11px;
}
.requirement-notes-cell{
  grid-column:2 / -1;
}
.recruitment-form-shell{
  max-width:1180px;
  margin:0 auto;
}
.applicant-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.applicant-form-panel{
  padding:14px;
}
.applicant-form-panel.wide,
.applicant-submit-row{
  grid-column:1 / -1;
}
.applicant-form-panel h3{
  margin:0 0 12px;
  color:#203764;
  font-size:15px;
}
.applicant-repeat-grid{
  display:grid;
  gap:10px;
}
.applicant-repeat-row{
  display:grid;
  grid-template-columns:1fr 1fr 90px 90px;
  gap:8px;
  padding:10px;
  border:1px solid #edf2f8;
  border-radius:10px;
  background:#fbfdff;
}
.applicant-repeat-row textarea{
  grid-column:1 / -1;
}
.applicant-repeat-row.education{
  grid-template-columns:1fr 1fr 110px;
}
.applicant-submit-row{
  display:grid;
  grid-template-columns:minmax(180px,260px) minmax(0,1fr);
  gap:10px;
  align-items:center;
}
.resume-wrap{
  max-width:900px;
}
.applicant-resume-page{
  background:white;
  min-height:11in;
  padding:.65in;
  border:1px solid #dfe8f4;
  box-shadow:0 12px 30px rgba(32,55,100,.12);
}
.resume-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px;
  gap:18px;
  border-bottom:3px solid #203764;
  padding-bottom:18px;
  margin-bottom:18px;
}
.resume-head h1{
  margin:0;
  color:#203764;
  font-size:30px;
  line-height:1.05;
}
.resume-head p{
  margin:8px 0 0;
  color:#087864;
  font-weight:700;
}
.resume-contact{
  display:grid;
  gap:5px;
  color:#334155;
  font-size:13px;
  text-align:right;
}
.resume-section{
  margin:0 0 18px;
}
.resume-section h2{
  margin:0 0 8px;
  color:#203764;
  font-size:15px;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.resume-section p{
  margin:0;
  color:#334155;
  line-height:1.45;
}
.resume-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.resume-grid div{
  border:1px solid #edf2f8;
  border-radius:8px;
  padding:8px;
  background:#fbfdff;
}
.resume-grid strong,
.resume-grid span{
  display:block;
}
.resume-grid strong{
  color:#6b7280;
  font-size:11px;
  text-transform:uppercase;
}
.resume-grid span{
  color:#203764;
  font-weight:700;
  margin-top:3px;
}
.resume-tags{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.resume-tags span{
  border:1px solid #b7e4d8;
  background:#e8f8f4;
  color:#087864;
  border-radius:999px;
  padding:5px 9px;
  font-size:12px;
  font-weight:700;
}
.resume-requirements{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}
.resume-requirements div{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 8px;
  padding:8px;
  border:1px solid #edf2f8;
  border-radius:8px;
  background:#fbfdff;
}
.resume-requirements strong{
  color:#203764;
  font-size:12px;
}
.resume-requirements span{
  color:#087864;
  font-size:12px;
  font-weight:700;
}
.resume-requirements small{
  grid-column:1 / -1;
  color:#6b7280;
}
.resume-requirements a{
  grid-column:1 / -1;
  color:#203764;
  font-size:12px;
  font-weight:700;
}
.resume-item{
  border-left:3px solid #1abc9c;
  padding:0 0 0 10px;
  margin:0 0 12px;
}
.resume-item strong,
.resume-item span{
  display:block;
}
.resume-item strong{
  color:#203764;
}
.resume-item span{
  color:#6b7280;
  font-size:12px;
  margin:2px 0 5px;
}
.employee-history-layout{
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.employee-profile-card{
  position:sticky;
  top:78px;
  grid-row:1 / span 3;
}
.employee-profile-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  margin:12px 0 10px;
  border:1px solid #e7eef7;
  border-radius:10px;
  background:#fbfdff;
}
.employee-avatar{
  width:44px;
  height:44px;
  flex:0 0 44px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#203764;
  color:white;
  font-size:18px;
  font-weight:700;
}
.employee-profile-head strong{display:block;color:#203764}
.employee-profile-head span{display:block;margin-top:3px;color:#6b7280;font-size:12px}
.employee-info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.employee-info-grid div{
  min-width:0;
  padding:8px;
  border:1px solid #edf2f8;
  border-radius:8px;
  background:#fbfdff;
}
.employee-info-grid .wide{grid-column:1 / -1}
.employee-info-grid span{
  display:block;
  margin-bottom:4px;
  color:#6b7280;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
}
.employee-info-grid strong{
  color:#203764;
  font-size:12px;
  overflow-wrap:anywhere;
}
.employee-history-summary{
  grid-column:2;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.employee-small-value{font-size:16px}
.employee-history-docs,.employee-profile-details{grid-column:2}
.employee-directory-analytics{
  margin-bottom:14px;
}
.chart-summary-wrap{
  gap:10px;
}
.chart-summary-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) 58px;
  align-items:center;
  gap:8px;
}
.metric-ring{
  --ring:#1abc9c;
  width:58px;
  height:58px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(var(--ring) calc(var(--pct) * 1%), #edf3fb 0);
  position:relative;
}
.metric-ring:before{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:50%;
  background:white;
}
.metric-ring span{
  position:relative;
  color:#203764;
  font-size:11px;
  font-weight:700;
}
.metric-ring.full{--ring:#203764}
.metric-ring.orange-ring{--ring:#f59e0b}
.metric-ring.gray-ring{--ring:#6b7280}
.metric-ring.red-ring{--ring:#ef4444}
.employee-analytics-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}
.employee-mixed-charts{
  grid-template-columns:300px minmax(0,1fr) minmax(0,1fr);
}
.employee-analytics-wide{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.analytics-panel{
  padding:14px;
  border-radius:12px;
}
.analytics-panel h3{
  margin:0 0 12px;
  color:#203764;
  font-size:14px;
}
.analytics-pie{
  --active:50;
  width:150px;
  height:150px;
  margin:4px auto 12px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(#1abc9c calc(var(--active) * 1%), #e8eef7 0);
  position:relative;
}
.analytics-pie:before{
  content:"";
  position:absolute;
  inset:34px;
  border-radius:50%;
  background:white;
}
.analytics-pie span{
  position:relative;
  color:#203764;
  font-size:22px;
  font-weight:700;
}
.analytics-legend{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  font-size:12px;
  color:#4b5563;
  font-weight:700;
}
.analytics-legend i{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
  margin-right:5px;
}
.active-dot{background:#1abc9c}
.inactive-dot{background:#e8eef7;border:1px solid #cfdbea}
.coverage-row{
  display:grid;
  grid-template-columns:130px 42px minmax(0,1fr);
  gap:8px;
  align-items:center;
  margin:12px 0;
  font-size:12px;
}
.coverage-row span,.coverage-row strong{
  color:#203764;
  font-weight:700;
}
.coverage-row strong{text-align:right}
.coverage-row i{
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:#edf3fb;
}
.coverage-row b{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#203764,#1abc9c);
}
.analytics-bar-row{
  display:grid;
  grid-template-columns:minmax(90px,1fr) minmax(110px,1.4fr) 42px;
  gap:8px;
  align-items:center;
  margin:8px 0;
  font-size:12px;
}
.analytics-bar-row span{
  color:#334155;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.analytics-bar-row strong{
  color:#203764;
  text-align:right;
}
.analytics-bar{
  height:9px;
  border-radius:999px;
  overflow:hidden;
  background:#edf3fb;
}
.analytics-bar i{
  display:block;
  height:100%;
  min-width:3px;
  border-radius:999px;
  background:linear-gradient(90deg,#203764,#1abc9c);
}
.analytics-list-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:8px 0;
  border-bottom:1px solid #edf2f8;
  color:inherit;
  text-decoration:none;
}
.analytics-list-row:last-child{
  border-bottom:0;
}
.analytics-list-row strong{
  color:#203764;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.analytics-list-row span{
  color:#6b7280;
  font-size:12px;
  font-weight:700;
}
.analytics-list-row:hover strong{
  color:#087864;
}
.analytics-person-row{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:9px;
  padding:10px 0;
  border-bottom:1px solid #edf2f8;
  color:inherit;
  text-decoration:none;
}
.analytics-person-row:last-child{border-bottom:0}
.analytics-person-row:hover strong{color:#087864}
.analytics-avatar{
  width:38px;
  height:38px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#203764;
  color:white;
  font-weight:700;
}
.analytics-avatar.document{
  background:#1abc9c;
}
.analytics-person-copy{
  min-width:0;
  display:grid;
  gap:2px;
}
.analytics-person-copy strong,
.analytics-person-copy small,
.analytics-person-copy em{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.analytics-person-copy strong{
  color:#203764;
  font-size:13px;
}
.analytics-person-copy small{
  color:#334155;
  font-size:12px;
  font-weight:700;
}
.analytics-person-copy em{
  color:#6b7280;
  font-size:11px;
  font-style:normal;
}
.analytics-date-pill{
  grid-column:2;
  justify-self:start;
  margin-top:3px;
  padding:3px 7px;
  border-radius:999px;
  background:#edf3fb;
  color:#203764;
  font-size:11px;
  font-weight:700;
}
.employee-list-shell{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:14px;
  align-items:start;
}
.employee-side-analytics{
  display:grid;
  gap:14px;
  position:sticky;
  top:76px;
}
.employee-directory-controls{
  display:flex;
  gap:8px;
  margin-bottom:10px;
}
.employee-directory-controls input{
  width:100%;
}
.employee-directory-table{
  max-height:520px;
}
.employee-directory-table table{
  min-width:1840px;
}
.employee-directory-table th,
.employee-directory-table td{
  padding:7px 8px;
  white-space:nowrap;
}
.employee-directory-table td:nth-child(12),
.employee-directory-table td:nth-child(18){
  white-space:normal;
  min-width:220px;
}
.excel-table-wrap{
  border-radius:12px;
  border:1px solid #cfdbea;
  background:white;
  box-shadow:0 8px 20px rgba(32,55,100,.08);
}
.excel-table-wrap table{
  border-collapse:separate;
  border-spacing:0;
  font-size:12px;
}
.excel-table-wrap th{
  position:sticky;
  top:0;
  z-index:5;
  height:32px;
  padding:0 8px;
  color:white;
  background:linear-gradient(180deg,#203764 0%,#2d4d83 100%);
  border-right:1px solid #3d5c91;
  border-bottom:1px solid #3d5c91;
  text-align:center;
  vertical-align:middle;
  letter-spacing:.2px;
}
.excel-table-wrap td{
  height:30px;
  max-width:220px;
  padding:0 8px;
  border-right:1px solid #e4ebf4;
  border-bottom:1px solid #e4ebf4;
  line-height:30px;
  vertical-align:middle;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:white;
}
.excel-table-wrap tbody tr:nth-child(even) td{
  background:#fbfdff;
}
.excel-table-wrap tbody tr:hover td{
  background:#f1f7ff;
}
.excel-table-wrap th:first-child,
.excel-table-wrap td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:82px;
  text-align:center;
  border-right:1px solid #c8d7ea;
}
.excel-table-wrap th:first-child{
  z-index:7;
}
.excel-table-wrap td:first-child{
  background:#f8fbff;
}
.excel-table-wrap tbody tr:hover td:first-child{
  background:#eaf3ff;
}
.excel-table-wrap .column-filter-btn{
  height:32px;
  color:white;
  justify-content:center;
  gap:8px;
  text-align:center;
}
.excel-table-wrap .column-filter-btn:after{
  color:rgba(255,255,255,.78);
}
.excel-table-wrap .column-filter-btn.active{
  color:#e8f8f4;
}
.excel-table-wrap .status-pill{
  height:22px;
  padding:0 7px;
  align-items:center;
  font-size:11px;
}
.employee-name-link{
  color:#203764;
  font-weight:700;
  text-decoration:none;
}
.employee-name-link:hover{
  color:#087864;
  text-decoration:underline;
}
.employee-profile-open{
  height:24px;
  padding:0 9px;
  border-radius:7px;
  font-size:11px;
}
.employee-profile-sections{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.employee-profile-section{
  border:1px solid #e7eef7;
  border-radius:10px;
  background:#fbfdff;
  padding:10px;
}
.employee-profile-section h4{
  margin:0 0 8px;
  color:#203764;
  font-size:13px;
}
.employee-detail-list{
  display:grid;
  gap:6px;
}
.employee-detail-list div{
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:8px;
  font-size:12px;
}
.employee-detail-list span{color:#6b7280;font-weight:700}
.employee-detail-list strong{color:#1f2937;overflow-wrap:anywhere}
.page-stage{overflow:visible}
.page-navigator{
  top:130px;
  z-index:20;
  padding:8px;
  border:1px solid #d7e3f3;
  border-radius:10px;
  background:rgba(255,255,255,.92);
  box-shadow:0 8px 20px rgba(32,55,100,.08);
}
@media print{
  .menu-bar,.editor-side,.toolbar,.top-controls,.doc-table-tools,.table-col-resizer,.page-navigator{display:none!important}
  body{background:white}
  .page-wrap{width:auto;margin:0}
  .editor-shell{display:block}
  .page-stage{padding:0;border:none;background:white;overflow:visible}
  .pages-container{display:block;min-width:0}
  .legal-page{box-shadow:none;margin:0;width:8.5in;height:14in;page-break-after:always;break-after:page;overflow:hidden}
  .legal-page:last-child{page-break-after:auto;break-after:auto}
  .doc-header{min-height:.9in;margin-bottom:.16in}
  .doc-body{min-height:0;overflow:hidden}
  .doc-footer{margin-top:.16in}
  @page{size:legal;margin:0}
}
@media (max-width:1100px){
  .home-dashboard{height:auto;overflow:auto}
  .home-wrap{height:auto;display:block;overflow:visible}
  .home-main-grid{grid-template-columns:1fr}
  .home-docs .module-content-body,.home-setup .module-content-body{height:auto;overflow:visible}
  .summary-wrap{grid-template-columns:repeat(2,minmax(0,1fr))}
  .folder-layout{grid-template-columns:1fr}
  .batch-layout{grid-template-columns:1fr}
  .email-layout{grid-template-columns:1fr}
  .employee-history-layout{grid-template-columns:1fr}
  .employee-analytics-grid{grid-template-columns:1fr}
  .employee-list-shell{grid-template-columns:1fr}
  .recruitment-layout{grid-template-columns:1fr}
  .recruitment-side{position:static}
  .recruitment-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .applicant-form-grid{grid-template-columns:1fr}
  .requirement-row{grid-template-columns:1fr}
  .requirements-modal{padding:10px}
  .employee-side-analytics{position:static}
  .employee-profile-card{position:static}
  .employee-history-summary,.employee-history-docs,.employee-profile-details{grid-column:auto}
  .employee-history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .employee-profile-sections{grid-template-columns:1fr}
  .folder-tree{max-height:none}
  .editor-shell{grid-template-columns:1fr}
  .editor-side,.toolbar{position:static}
  .editor-side{max-height:none}
  .page-stage{padding:12px}
  .pages-container{min-width:8.5in}
}
@media (max-width:768px){
  .menu-bar{flex-direction:column;align-items:flex-start}
  .menu-right{width:100%;justify-content:space-between}
  .page-wrap{width:calc(100% - 24px);margin:12px}
  .summary-wrap{grid-template-columns:1fr}
  .employee-info-grid,.employee-history-summary{grid-template-columns:1fr}
  .employee-detail-list div{grid-template-columns:1fr}
  .top-controls{margin-bottom:12px}
  .filter-controls{
    grid-template-columns:1fr;
    width:100%;
  }
  .action-controls{
    margin-left:0;
    width:100%;
  }
}

/* Final save-status override: keep the save message pale and readable. */
body .save-status-top,
body .save-status-side,
body #autosaveStatus{
  background:#ffffff!important;
  border:2px solid #ffffff!important;
  color:#203764!important;
  box-shadow:0 3px 10px rgba(32,55,100,.12)!important;
}
body .save-status-top[data-state="saved"],
body .save-status-side[data-state="saved"],
body #autosaveStatus[data-state="saved"]{
  background:#f0fff8!important;
  border-color:#b7f0d2!important;
  color:#203764!important;
}
body .save-status-top[data-state="saving"],
body .save-status-side[data-state="saving"],
body #autosaveStatus[data-state="saving"],
body .save-status-top[data-state="dirty"],
body .save-status-side[data-state="dirty"],
body #autosaveStatus[data-state="dirty"]{
  background:#fff8ed!important;
  border-color:#ffd9a8!important;
  color:#203764!important;
}
body .save-status-top[data-state="error"],
body .save-status-side[data-state="error"],
body #autosaveStatus[data-state="error"]{
  background:#fff1f1!important;
  border-color:#ffc9c9!important;
  color:#203764!important;
}

/* HR experience polish */
:root{
  --surface:#ffffff;
  --surface-soft:#f7fafc;
  --ink:#172033;
  --ink-2:#314158;
  --quiet:#66758a;
  --brand:#203764;
  --brand-2:#315286;
  --good:#0f8f78;
  --good-soft:#edfdf8;
  --warn-soft:#fff8ed;
  --danger-soft:#fff1f1;
  --stroke:#dce7f3;
  --stroke-2:#edf2f8;
  --lift:0 10px 26px rgba(32,55,100,.08);
}
body{
  color:var(--ink);
}
.menu-bar{
  gap:14px;
  padding:10px 18px;
  background:linear-gradient(135deg,#203764 0%,#2f527f 100%);
  border-bottom:1px solid rgba(255,255,255,.15);
}
.menu-left,.menu-right{
  gap:7px;
}
.menu-bar h1{
  margin-right:8px;
  font-size:18px;
}
.menu-bar a,.menu-bar button{
  height:32px;
  padding:0 11px;
  border-radius:7px;
  border-color:rgba(255,255,255,.14);
  background:rgba(255,255,255,.09);
  font-size:12px;
  font-weight:800;
}
.menu-bar a:hover,.menu-bar button:hover{
  background:rgba(255,255,255,.18);
}
.menu-bar a.active,.menu-bar button.active{
  background:#e8f8f4;
  color:#203764;
  box-shadow:none;
}
.page-wrap{
  width:min(98%,1600px);
}
.top-controls{
  border-color:var(--stroke);
  background:rgba(255,255,255,.96);
  box-shadow:var(--lift);
}
.module-content,.panel,.summary-card{
  border-color:var(--stroke);
  box-shadow:var(--lift);
}
.module-content-header{
  background:linear-gradient(135deg,#203764 0%,#315286 100%);
  align-items:center;
}
.module-content-header span:last-child{
  opacity:.88;
  font-size:12px;
}
.module-content-body{
  background:#fff;
}
.summary-wrap{
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
}
.summary-card{
  min-height:92px;
  border-radius:12px;
  background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);
}
.summary-card:before{
  height:3px;
  background:#1abc9c;
}
.summary-title{
  color:#66758a;
}
.summary-value{
  color:#203764;
  font-size:25px;
}
.summary-sub{
  color:#6f7d92;
}
.btn{
  border-radius:7px;
  font-size:12px;
  font-weight:800;
}
.btn.primary{
  background:#0f8f78;
}
.btn.primary:hover{
  background:#0b7664;
}
.btn.soft{
  background:#f3f7fc;
  border-color:#d9e4f2;
}
.btn.soft:hover{
  background:#e8f8f4;
  border-color:#b7e4d8;
  color:#087864;
}
.table-wrap{
  border-color:#dce7f3;
}
table{
  color:#314158;
}
th{
  color:#203764;
  background:#f5f8fc;
}
td{
  border-bottom-color:#eef3f8;
}
tbody tr:hover td{
  background:#f8fcff;
}
input,select,textarea{
  border-color:#cfdbea;
}
input:hover,select:hover,textarea:hover{
  border-color:#aec2dc;
}
input:focus,select:focus,textarea:focus{
  border-color:#4f8bd6;
  box-shadow:0 0 0 3px rgba(79,139,214,.13);
}
.status-pill{
  background:#edfdf8;
  color:#087864;
  border:1px solid #b7e4d8;
}
.status-pill.failed{
  background:#fff1f1;
  color:#9f1d16;
  border-color:#ffc9c9;
}
.empty-state{
  border-color:#cfdbea;
  background:linear-gradient(180deg,#fbfdff,#f7fafc);
}
.home-dashboard .summary-wrap{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.home-dashboard.home-scrollable .home-wrap{
  height:auto;
  min-height:calc(100vh - 62px);
  overflow:visible;
}
.home-dashboard.home-scrollable .home-main-grid{
  min-height:0;
}
.home-dashboard.home-scrollable .home-docs,
.home-dashboard.home-scrollable .home-setup,
.home-dashboard.home-scrollable .home-docs .module-content-body,
.home-dashboard.home-scrollable .home-setup .module-content-body{
  height:auto;
  overflow:visible;
}
.home-dashboard.home-scrollable .home-docs .folder-layout{
  min-height:620px;
}
.home-dashboard.home-scrollable .home-docs .folder-tree,
.home-dashboard.home-scrollable .home-docs .table-wrap{
  max-height:none;
  overflow:visible;
}
.home-dashboard.home-scrollable .folder-table{
  min-width:0;
}
.home-dashboard.home-scrollable .folder-table .table-wrap{
  overflow:auto;
}
.home-docs .folder-layout{
  grid-template-columns:300px minmax(0,1fr);
}
.folder-tree{
  background:#fbfdff;
}
.tree-node{
  transition:background .15s ease,color .15s ease;
}
.tree-node:hover,.tree-node.active{
  background:#e8f8f4;
  color:#087864;
}
.action-menu-list.inline-actions{
  position:static;
  display:grid;
  min-width:136px;
  box-shadow:none;
  border:0;
  padding:0;
  background:transparent;
}
.action-menu-list.inline-actions a,
.action-menu-list.inline-actions button{
  border:1px solid #d9e4f2;
  background:#f8fbff;
  color:#203764;
  text-align:center;
}
.action-menu-list.inline-actions a:hover,
.action-menu-list.inline-actions button:hover{
  background:#e8f8f4;
  color:#087864;
}
.recruitment-stage-grid{
  gap:10px;
}
.stage-card{
  border:1px solid #dce7f3;
  border-radius:10px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  box-shadow:0 6px 18px rgba(32,55,100,.06);
}
.stage-card:hover,
.stage-card.is-active{
  border-color:#1abc9c;
  background:#e8f8f4;
  box-shadow:0 8px 22px rgba(8,120,100,.14);
}
.stage-card.is-active{
  border-color:#203764;
  background:#203764;
  color:white;
  box-shadow:0 10px 26px rgba(32,55,100,.28);
}
.stage-card strong{
  color:#203764;
}
.stage-card.is-active strong{
  color:white;
}
.stage-card span{
  background:#edfdf8;
  color:#087864;
}
.stage-card.is-active span{
  background:rgba(255,255,255,.16);
  color:white;
}
.recruitment-table table{
  min-width:1280px;
}
.recruitment-table td{
  vertical-align:top;
}
.requirements-modal-panel{
  border-radius:12px;
  box-shadow:0 24px 60px rgba(23,32,51,.22);
}
.requirement-row{
  border-color:#edf2f8;
  background:#fbfdff;
}
.requirement-row:hover{
  background:#f7fbff;
}
.workflow-page,.case-detail-layout,.manager-ir-layout{
  animation:hrFadeIn .18s ease-out;
}
@keyframes hrFadeIn{
  from{opacity:.86;transform:translateY(4px)}
  to{opacity:1;transform:none}
}
.workflow-hero-main,.workflow-mini-metric,.workflow-step,.case-card,.heat-tile,.case-side,.case-panel,.manager-ir-card{
  border-color:#dce7f3!important;
  box-shadow:var(--lift)!important;
}
.workflow-hero-main,.manager-ir-card{
  background:linear-gradient(180deg,#fff 0%,#f8fbff 100%)!important;
}
.workflow-hero-main h2,.manager-ir-card h2,.case-side h2{
  color:#203764!important;
}
.workflow-mini-metric strong,.heat-tile b{
  color:#0f7665!important;
}
.workflow-step:before{
  content:"";
  position:absolute;
  left:12px;
  top:10px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#1abc9c;
}
.workflow-step strong{
  padding-left:13px;
}
.workflow-type-card{
  background:#fbfdff!important;
}
.workflow-type-card.active{
  background:#edfdf8!important;
  border-color:#9addcf!important;
}
.workflow-form-section{
  background:#fbfdff!important;
}
.workflow-evidence-item{
  background:#fff;
}
.case-card{
  position:relative;
  overflow:hidden;
}
.case-card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#1abc9c;
}
.case-card strong,.case-doc-row strong,.case-evidence-row strong,.case-email-row strong,.case-note-row strong,.case-witness-row strong{
  color:#203764!important;
}
.case-flow b,.case-ticks b,.check-item b{
  border:1px solid #d9e4f2;
}
.case-flow b.done,.case-ticks b.done,.check-item.done b{
  border-color:#b7e4d8;
}
.check-item{
  background:#fff!important;
}
.check-item.done{
  background:#edfdf8!important;
  border-color:#b7e4d8!important;
}
.case-edit-grid .wide textarea,
.case-edit-grid .wide input{
  width:100%;
}
.manager-ir-side div{
  background:#fff!important;
}
.employee-list-shell .summary-card,
.employee-side-analytics .panel,
.analytics-panel{
  border-color:#dce7f3;
  box-shadow:var(--lift);
}
.excel-table-wrap{
  border-color:#dce7f3;
}
.excel-table-wrap th{
  background:#203764;
}
.excel-table-wrap td{
  color:#314158;
}
.analytics-bar i{
  background:linear-gradient(90deg,#203764,#0f8f78);
}
.metric-ring{
  --ring:#0f8f78;
}
@media (max-width:1100px){
  .home-dashboard .summary-wrap{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .home-docs .folder-layout{
    grid-template-columns:1fr;
  }
}
@media (max-width:768px){
  .menu-bar a,.menu-bar button{
    height:31px;
    padding:0 9px;
  }
  .home-dashboard .summary-wrap{
    grid-template-columns:1fr;
  }
}
