/*
 * UI completion polish: full dark mode coverage, salary V4 estimator,
 * and floating-operation controls that do not cover the theme button.
 */
.salary-nested-tabs{
  display:flex;
  gap:8px;
  align-items:center;
  margin:0 0 14px;
  padding:8px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  background:#f8fafc;
}
.salary-nested-tabs button{
  border:0;
  border-radius:12px;
  padding:11px 15px;
  background:transparent;
  color:#475569;
  font-weight:950;
  cursor:pointer;
}
.salary-nested-tabs button.active{
  color:#fff;
  background:#0b63f6;
  box-shadow:0 10px 24px rgba(11,99,246,.22);
}
.calculator-frame.salary-v4-estimator,
#salaryEstimatePanel.salary-v4-estimator{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  overflow:visible;
  padding:24px 26px 26px!important;
}
.salary-v4-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 0 18px;
  padding:0 2px 16px;
  border-bottom:1px solid #e2e8f0;
}
.salary-v4-head>div{
  min-width:0;
  max-width:860px;
}
.salary-v4-head h1{
  margin:0;
  color:#0f172a;
  font-size:26px;
  line-height:1.16;
  letter-spacing:0;
}
.salary-v4-head p{
  max-width:860px;
  margin:8px 0 0;
  color:#64748b;
  font-size:14px;
  font-weight:750;
  line-height:1.55;
  word-break:keep-all;
}
.salary-v4-head small{
  display:inline-flex;
  align-items:center;
  margin-top:10px;
  padding:6px 10px;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
}
.salary-v4-head .btn{
  flex:0 0 auto;
  height:42px;
  min-height:42px;
  padding:0 17px;
  border-radius:13px;
  white-space:nowrap;
}
.salary-v4-layout{
  display:grid;
  grid-template-columns:minmax(520px,1.12fr) minmax(340px,.88fr);
  gap:16px;
  align-items:start;
}
.salary-v4-form{
  display:grid;
  gap:12px;
  min-width:0;
}
.salary-v4-form section,
.salary-v4-result,
.salary-v4-tables section{
  border:1px solid #dbe4f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 26px rgba(15,23,42,.05);
}
.salary-v4-form section{
  padding:15px 16px 16px;
}
.salary-v4-form h3,
.salary-v4-tables h3{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  color:#0f172a;
  font-size:15px;
  line-height:1.25;
  letter-spacing:0;
}
.salary-v4-form h3::before,
.salary-v4-tables h3::before{
  content:"";
  width:4px;
  height:16px;
  border-radius:999px;
  background:#0b63f6;
}
.salary-v4-form section>div{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 12px;
}
.salary-v4-field{
  display:grid;
  gap:5px;
  min-width:0;
}
.salary-v4-field span{
  color:#334155;
  font-size:11.5px;
  font-weight:900;
  line-height:1.25;
}
.salary-v4-field input{
  box-sizing:border-box;
  width:100%;
  height:38px;
  border:1px solid #d5dee9;
  border-radius:10px;
  padding:0 11px;
  background:#fff;
  color:#0f172a;
  font-size:13px;
  font-weight:800;
  line-height:38px;
  text-align:left!important;
  font-variant-numeric:tabular-nums;
  outline:none;
}
.salary-v4-field input::placeholder{
  color:#94a3b8;
  font-size:12px;
  font-weight:750;
  text-align:left;
}
.salary-v4-field input:focus{
  border-color:#0b63f6;
  box-shadow:0 0 0 3px rgba(11,99,246,.12);
}
.salary-v4-result{
  min-width:0;
  padding:15px;
  position:sticky;
  top:110px;
}
.salary-v4-empty{
  min-height:178px;
  display:grid;
  align-content:start;
  gap:9px;
  padding:20px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
}
.salary-v4-empty::before{
  content:"PDF";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:24px;
  margin-bottom:2px;
  border-radius:999px;
  background:#e0f2fe;
  color:#0369a1;
  font-size:11px;
  font-weight:950;
}
.salary-v4-empty strong{
  color:#0f172a;
  font-size:20px;
  line-height:1.25;
}
.salary-v4-empty p{
  margin:0;
  color:#64748b;
  font-size:14px;
  line-height:1.6;
  font-weight:800;
}
.salary-v4-kpis{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.salary-v4-kpis article{
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
}
.salary-v4-kpis article.net{
  background:#eef8ff;
  border-color:#bfdbfe;
}
.salary-v4-kpis small{
  display:block;
  color:#64748b;
  font-weight:900;
}
.salary-v4-kpis b{
  display:block;
  margin-top:6px;
  color:#0f172a;
  font-size:22px;
}
.salary-v4-hours{
  margin:12px 0;
  padding:12px;
  border-radius:12px;
  background:#f1f5f9;
  color:#334155;
  font-weight:850;
  line-height:1.5;
}
.salary-v4-tables{
  display:grid;
  gap:12px;
}
.salary-v4-tables section{
  overflow:hidden;
}
.salary-v4-tables h3{
  padding:14px 14px 0;
}
.salary-v4-tables table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.salary-v4-tables th,
.salary-v4-tables td{
  padding:10px 12px;
  border-top:1px solid #e2e8f0;
  text-align:left;
  vertical-align:top;
}
.salary-v4-tables th{
  color:#475569;
  background:#f8fafc;
}

body .portal-ops-fab{
  right:104px!important;
  bottom:calc(92px + env(safe-area-inset-bottom,0px))!important;
  z-index:380!important;
}
body .workflow-floating-theme{
  z-index:410!important;
}
body .admin-patch-fab.show{
  right:22px!important;
  bottom:calc(188px + env(safe-area-inset-bottom,0px))!important;
}
@media (min-width:1100px) and (max-width:1380px){
  #salaryPage.active #salaryEstimatePanel.salary-v4-estimator{
    padding-right:190px!important;
  }
  #salaryPage.active #salaryEstimatePanel .salary-v4-layout{
    grid-template-columns:minmax(500px,1.1fr) minmax(280px,.9fr);
  }
  #salaryPage.active #salaryEstimatePanel .salary-v4-empty strong{
    font-size:18px;
  }
  #salaryPage.active #salaryEstimatePanel .salary-v4-empty p{
    font-size:13px;
  }
}
@media(max-width:720px){
  body .portal-ops-fab{
    right:12px!important;
    bottom:calc(150px + env(safe-area-inset-bottom,0px))!important;
  }
  .calculator-frame.salary-v4-estimator,
  #salaryEstimatePanel.salary-v4-estimator{
    padding:18px 14px 20px!important;
    border-radius:22px!important;
  }
  .salary-v4-layout{grid-template-columns:1fr}
  .salary-v4-result{position:static}
  .salary-v4-form section>div{grid-template-columns:1fr}
  .salary-v4-head{
    display:grid;
    gap:12px;
    align-items:start;
  }
  .salary-v4-head .btn{
    width:100%;
    justify-content:center;
  }
}

html.theme-dark .salary-nested-tabs,
html.theme-dark .salary-v4-form section,
html.theme-dark .salary-v4-result,
html.theme-dark .salary-v4-tables section,
html.theme-dark .portal-ops-panel,
html.theme-dark .account-settings-panel,
html.theme-dark .workflow-edit-box,
html.theme-dark .workflow-card,
html.theme-dark .workflow-toolbar,
html.theme-dark .workflow-stat,
html.theme-dark .workflow-list article,
html.theme-dark .file-cafe-row,
html.theme-dark .news-item,
html.theme-dark .news-card,
html.theme-dark .tool-popup,
html.theme-dark .pwa-setup-panel,
html.theme-dark .app-install-panel,
html.theme-dark .union-chat-panel{
  color:var(--dark-text)!important;
  background:rgba(16,29,50,.96)!important;
  border-color:var(--dark-line)!important;
  box-shadow:0 18px 44px rgba(1,7,18,.3)!important;
}
html.theme-dark .portal-ops-head,
html.theme-dark .portal-ops-card,
html.theme-dark .portal-ops-stat,
html.theme-dark .salary-v4-kpis article,
html.theme-dark .salary-v4-hours,
html.theme-dark .salary-v4-tables th,
html.theme-dark .union-chat-body,
html.theme-dark .union-chat-form,
html.theme-dark .union-chat-files,
html.theme-dark .workflow-empty,
html.theme-dark .salary-upload-box,
html.theme-dark .salary-result-table th,
html.theme-dark .salary-result-table td,
html.theme-dark .salary-section-row td{
  color:var(--dark-text)!important;
  background:rgba(10,20,37,.94)!important;
  border-color:var(--dark-line)!important;
}
html.theme-dark .salary-v4-head p,
html.theme-dark .salary-v4-field span,
html.theme-dark .salary-v4-kpis small,
html.theme-dark .portal-ops-head span,
html.theme-dark .portal-ops-card small,
html.theme-dark .portal-ops-card p,
html.theme-dark .workflow-card-head span,
html.theme-dark .file-cafe-row em,
html.theme-dark .file-cafe-row small,
html.theme-dark .news-item p,
html.theme-dark .salary-input-caption{
  color:var(--dark-sub)!important;
}
html.theme-dark .salary-v4-kpis b,
html.theme-dark .portal-ops-card strong,
html.theme-dark .workflow-card strong,
html.theme-dark .file-cafe-row strong,
html.theme-dark .news-item strong,
html.theme-dark .salary-v4-head h1,
html.theme-dark .salary-v4-empty strong{
  color:#f4f8ff!important;
}
html.theme-dark .salary-v4-empty,
html.theme-dark .salary-v4-head small{
  color:#bfdbfe!important;
  background:rgba(37,99,235,.14)!important;
  border-color:rgba(96,165,250,.28)!important;
}
html.theme-dark .salary-v4-empty p{
  color:var(--dark-sub)!important;
}
html.theme-dark .salary-v4-head{
  border-bottom-color:var(--dark-line)!important;
}
html.theme-dark .salary-v4-field input{
  color:var(--dark-text)!important;
  background:rgba(6,14,28,.96)!important;
  border-color:var(--dark-line)!important;
}
html.theme-dark .salary-v4-field input::placeholder{
  color:#71839a!important;
}
html.theme-dark .salary-v4-field input:focus{
  border-color:#60a5fa!important;
  box-shadow:0 0 0 3px rgba(96,165,250,.18)!important;
}
html.theme-dark .salary-v4-form h3,
html.theme-dark .salary-v4-tables h3{
  color:#f4f8ff!important;
}
html.theme-dark .salary-v4-form h3::before,
html.theme-dark .salary-v4-tables h3::before{
  background:#60a5fa!important;
}
html.theme-dark .salary-nested-tabs button{
  color:#b6c6dc!important;
}
html.theme-dark .salary-nested-tabs button.active{
  color:#fff!important;
  background:var(--dark-blue-strong)!important;
}
html.theme-dark .portal-ops-fab button{
  background:rgba(17,31,53,.96)!important;
  color:#eef5ff!important;
  border:1px solid var(--dark-line)!important;
}
html.theme-dark .portal-ops-fab button.ops-admin{
  background:#115e75!important;
}
html.theme-dark .union-chat-msg.bot{
  background:var(--dark-surface-raised)!important;
  color:var(--dark-text)!important;
  border-color:var(--dark-line)!important;
}
html.theme-dark .union-chat-msg.user{
  background:var(--dark-blue-strong)!important;
}
