/* Manpower Hub — light blue / white professional workspace */
:root {
  --mh-blue: #2563eb;
  --mh-blue-dark: #1747ad;
  --mh-blue-light: #eaf3ff;
  --mh-ink: #193250;
  --mh-muted: #637b96;
  --mh-line: #dde9f7;
  --mh-surface: #ffffff;
  --mh-page: #f2f7fd;
}
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(circle at 85% -15%, #e0efff 0%, transparent 38%),
              var(--mh-page);
  color: var(--mh-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(22px, 4vw, 64px);
  background: white;
  color: var(--mh-ink);
  border-bottom: 1px solid var(--mh-line);
  box-shadow: 0 4px 22px rgba(26, 72, 132, .04);
}
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: white;
  background: linear-gradient(135deg, #55a9fb 0%, #2460d7 100%);
  border-radius: 15px;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .18);
  font-size: 14px;
  letter-spacing: .04em;
  font-weight: 800;
}
.app-header h1 { font-size: 21px; font-weight: 750; letter-spacing: -.65px; margin: 0 0 3px; }
.app-header p { color: var(--mh-muted); font-size: 12px; letter-spacing: .03em; }
.header-label {
  color: #416ba4;
  background: #edf5ff;
  border: 1px solid #d8eaff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}
main { max-width: 1540px; margin: 30px auto 70px; padding: 0 clamp(16px,3vw,44px); }
#dashboard:not(.hidden) { display: grid; grid-template-columns: 228px minmax(0,1fr); gap: 26px; align-items: start; }
.workspace-main { min-width: 0; }
.side-nav {
  position: sticky;
  top: 20px;
  background: #fff;
  border: 1px solid var(--mh-line);
  border-radius: 20px;
  padding: 22px 12px;
  box-shadow: 0 6px 32px rgba(31, 70, 123, .035);
}
.nav-overline {
  margin: 0 12px 14px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 800;
  color: #8ca1b9;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  text-decoration: none;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  color: #526d8b;
  transition: background-color .15s, color .15s;
}
.side-nav a:hover, .side-nav a:focus-visible { background: #eaf3ff; color: #205cc8; }
.side-nav a:first-of-type { color: var(--mh-blue-dark); background: #eff6ff; }
.nav-symbol {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  border: 1px solid #dceafe;
  background: #f4f9ff;
  color: #4c85d2;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}
.nav-footnote { margin: 23px 12px 4px; padding-top: 18px; border-top: 1px solid var(--mh-line); font-size: 12px; line-height: 1.6; color: #8aa1bc; }
.card {
  border-radius: 18px;
  background: var(--mh-surface);
  border: 1px solid var(--mh-line);
  padding: clamp(22px,2.4vw,32px);
  box-shadow: 0 9px 28px rgba(26, 76, 128, .045);
  margin-bottom: 22px;
}
.dashboard-hero {
  background: linear-gradient(110deg, #ffffff 0%, #f2f8ff 100%);
  border: 1px solid #d7e7fa;
  padding: 28px 32px;
}
.dashboard-hero h2 { font-size: 27px; letter-spacing: -.9px; margin: 3px 0 8px; }
.dashboard-hero p:not(.eyebrow) { color: var(--mh-muted); margin: 0; line-height: 1.55; }
.eyebrow {
  margin: 0 0 9px;
  font-size: 10px;
  font-weight: 800;
  color: var(--mh-blue);
  letter-spacing: .13em;
  text-transform: uppercase;
}
h2, h3 { color: #163759; letter-spacing: -.6px; }
.card h2 { margin-top: 0; }
.card > p:not(.eyebrow), .section-subtitle { color: var(--mh-muted); line-height: 1.55; }
.stats { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.stat {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  padding: 23px 21px;
  border: 1px solid #dceafc;
  background: linear-gradient(160deg,#fff 44%,#f6faff);
}
.stat::before {
  content: "";
  position: absolute;
  right: -21px;
  top: -26px;
  height: 95px;
  width: 95px;
  background: #eaf3ff;
  border-radius: 50%;
}
.stat:nth-child(2)::before { background: #e5f8f2; }
.stat:nth-child(3)::before { background: #eaf2ff; }
.stat:nth-child(4)::before { background: #f1f4fa; }
.stat p { position: relative; margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #58718e; }
.stat strong { position: relative; font-size: 35px; font-weight: 750; color: #1c5bd3; letter-spacing: -1.4px; line-height: 1; }
.dashboard-charts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.dashboard-charts .card { min-width: 0; min-height: 260px; }
.dashboard-charts h2 { font-size: 18px; margin: 0 0 26px; }
.breakdown-label { font-size: 13px; color: #4d6684; }
.breakdown-label strong { color: #214a7e; }
.breakdown-track { background: #e7f1fd; height: 10px; }
.breakdown-fill { background: linear-gradient(90deg,#6db6ff,#2563eb); }
.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.section-heading h2 { font-size: 22px; margin: 0 0 4px; }
.section-subtitle { margin: 0; font-size: 13px; }
.record-filters {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) minmax(160px,.8fr);
  gap: 11px;
  margin-bottom: 18px;
}
.record-filters #searchManpower { grid-column: 1; }
.record-filters #filterPosition { grid-column: 2; }
.record-filters #filterAvailability { grid-column: 3; }
.record-filters #clearFilters { grid-column: 1; }
.record-filters #exportCsvButton { grid-column: 2 / 4; }
.record-filters #exportCsvStatus { grid-column: 1 / -1; margin: 0; }
.record-filters #filterCount { grid-column: 1 / -1; margin: 0; color: #6280a1; font-size: 12px; font-weight: 600; }
button {
  background: var(--mh-blue);
  border-radius: 10px;
  font-weight: 650;
  box-shadow: 0 3px 7px rgba(37,99,235,.10);
  transition: background-color .15s ease, transform .15s ease;
}
button:hover:not(:disabled) { background: var(--mh-blue-dark); }
button:active:not(:disabled) { transform: translateY(1px); }
button.secondary { background: #eaf2fd; color: #285c9d; box-shadow: none; border: 1px solid #d2e3f8; }
button.secondary:hover:not(:disabled) { background: #dceafe; }
button.delete-button { background: #fff0f1; color: #b42335; box-shadow: none; border: 1px solid #ffd9df; }
button.delete-button:hover:not(:disabled) { background: #ffe4e9; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #cfdeee;
  color: var(--mh-ink);
  font: inherit;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: #4388e4; outline: 3px solid rgba(54,131,229,.12); }
input[type="file"] { padding: 12px; }
label { color: #274b72; font-size: 13px; }
.table-wrap { border: 1px solid var(--mh-line); border-radius: 13px; background:white; overflow-x:auto; }
table { min-width: 750px; }
th {
  background: #f0f6fe;
  color: #49719e;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  padding: 14px 13px;
}
td { padding: 15px 13px; font-size: 13px; color: #29445e; border-bottom: 1px solid #e6eff9; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fbff; }
#workerRows td:last-child { min-width: 240px; }
#workerRows td:last-child button { font-size: 12px; padding: 8px 11px; margin: 2px; }
#workerProfileCard, #editWorkerCard, #bulkImport, #addWorker, #manpowerRecords, #dashboardInsights { scroll-margin-top: 22px; }
.profile-details div { background: #f3f8ff; border: 1px solid #e4edf9; }
.profile-photo, .profile-photo-empty { border: 3px solid #e5f0fc; }
.login {
  margin: 70px auto;
  background: white;
  border: 1px solid var(--mh-line);
  box-shadow: 0 18px 50px rgba(36,82,146,.10);
  border-radius: 20px;
}
.login h2 { font-size: 24px; }
.login p { color: #617c9b; }
button:focus-visible, a:focus-visible { outline: 3px solid #8bc4ff; outline-offset: 3px; }
@media (max-width: 1100px) {
  #dashboard:not(.hidden) { grid-template-columns: 190px minmax(0,1fr); gap: 18px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-filters #searchManpower { grid-column: 1 / -1; }
  .record-filters #filterPosition { grid-column: 1; }
  .record-filters #filterAvailability { grid-column: 2; }
  .record-filters #clearFilters { grid-column: 1; }
  .record-filters #exportCsvButton { grid-column: 2; }
}
@media (max-width: 800px) {
  main { margin-top: 18px; padding: 0 14px 40px; }
  #dashboard:not(.hidden) { display: flex; flex-direction: column; gap: 14px; }
  .workspace-main, .side-nav { width: 100%; }
  .side-nav { position: static; display:flex; align-items:center; gap: 4px; padding:10px; overflow-x:auto; border-radius:14px; }
  .side-nav a { flex: 0 0 auto; white-space:nowrap; padding:10px 11px; }
  .nav-overline, .nav-footnote { display:none; }
  .nav-symbol { width: 22px; height: 22px; flex-basis:22px; }
  .dashboard-charts { grid-template-columns: 1fr; }
  .card { padding: 21px; }
}
@media (max-width: 540px) {
  .app-header { padding: 14px 17px; }
  .app-header h1 { font-size: 18px; }
  .app-header p { font-size: 11px; }
  .header-label { display:none; }
  .brand-icon { width:40px; height:40px; flex-basis:40px; border-radius:12px; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; }
  .stat { min-height: 115px; padding: 18px 15px; }
  .stat p { font-size: 12px; }
  .stat strong { font-size: 29px; }
  .dashboard-hero { padding: 24px 20px; }
  .dashboard-hero h2 { font-size: 22px; }
  .record-filters { display:flex; flex-direction:column; }
  .record-filters > * { width:100%; }
  .record-filters p { width:auto; }
  .card { padding: 20px 16px; border-radius:14px; }
  .profile-head { gap:12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  button, .side-nav a { transition:none; }
}