/* Dashboard components share the workspace's calm surfaces and dark text. */
#dashboardHome {
  --dashboard-ink: #172b40;
  --dashboard-text: #344b64;
  --dashboard-muted: #52647a;
  min-width: 0;
  width: 100%;
}

#appView:has(#dashboardHome:not(.hidden)) #addEmployeeBtn { display: none !important; }
#dashboardHome .dashboard-page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
#dashboardHome .dashboard-eyebrow { margin: 0 0 6px; color: #4b6078; font-size: 10px; font-weight: 650; letter-spacing: 1.4px; }
#dashboardHome .dashboard-page-head h2 { margin: 0 0 7px; color: var(--dashboard-ink) !important; font-size: 30px !important; font-weight: 700 !important; line-height: 1.2; letter-spacing: -1px !important; }
#dashboardHome .dashboard-page-description { margin: 0; color: #4b6078; font-size: 14px; line-height: 1.6; }
#dashboardHome .dashboard-page-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
#dashboardHome button { min-height: 39px; padding: 0 14px; border-radius: 7px !important; box-shadow: none !important; font-size: 11px; font-weight: 600 !important; transform: none !important; }
#dashboardHome button.ghost { border: 1px solid #dce4ed !important; background: #fff !important; color: #365572 !important; }
#dashboardHome button.ghost:hover { background: #f4f7fa !important; }
#dashboardHome button.dashboard-primary { min-height: 41px; background: #183b50 !important; border-color: #183b50 !important; color: #fff !important; }
#dashboardHome button.dashboard-primary:hover { background: #23536b !important; }
#dashboardHome .dashboard-page-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#dashboardHome .dashboard-page-actions button span { font-size: 16px; font-weight: 400; }

#dashboardHome #metricsSection { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0 !important; width: 100% !important; max-width: 100% !important; margin: 0 0 22px !important; padding: 21px 0; border: 1px solid #e2e7ee; border-radius: 12px; background: #fff; box-shadow: none; }
#dashboardHome .dashboard-metric { min-width: 0; padding: 0 24px; }
#dashboardHome .dashboard-metric + .dashboard-metric { border-left: 1px solid #e9edf2; }
#dashboardHome .dashboard-metric p { margin: 0; color: #40546d; font-size: 12px; font-weight: 600; }
#dashboardHome .dashboard-metric strong { display: block; margin: 8px 0 6px; color: #20334a; font-size: clamp(20px, 1.8vw, 28px); font-weight: 650; line-height: 1.2; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dashboardHome .dashboard-metric-net strong { color: #206343; }
#dashboardHome .dashboard-metric > span { color: var(--dashboard-muted); font-size: 10px; font-weight: 400; line-height: 1.6; }

#dashboardHome #dashboardCommandCenter { display: flex !important; align-items: center; gap: 16px; width: 100% !important; max-width: 100% !important; margin: 0 0 24px !important; padding: 19px 22px; border: 1px solid #e2e7ee; border-radius: 10px; background: #fff; }
#dashboardHome .dashboard-status-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid #e0e9f0; border-radius: 8px; background: #f0f5f9; color: #365572; }
#dashboardHome .dashboard-status-icon svg { width: 22px; height: 22px; }
#dashboardHome .dashboard-status-copy { min-width: 0; flex: 1; }
#dashboardHome .dashboard-status-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#dashboardHome .dashboard-status-title h3 { margin: 0; color: #20334a !important; font-size: 14px; font-weight: 650 !important; letter-spacing: -0.25px !important; }
#dashboardHome #dashboardMonthStatusDetail { margin: 6px 0 0; color: var(--dashboard-muted); font-size: 11px; line-height: 1.7; }
#dashboardHome .status-pill { display: inline-flex; align-items: center; min-height: 0 !important; padding: 3px 8px !important; border: 1px solid #d7eee3 !important; border-radius: 5px !important; background: #edf8f2 !important; color: #206343 !important; font-size: 9px; font-weight: 600; white-space: nowrap; }
#dashboardHome .status-pill.leave { border-color: #f3e8c7 !important; background: #fff8e9 !important; color: #785815 !important; }
#dashboardHome #dashboardCommandCenter > button { flex: 0 0 auto; min-height: 34px; font-size: 10px; }

#dashboardHome #dashboardInsightsSection { display: grid !important; grid-template-columns: minmax(0, 1fr) 320px !important; align-items: start; gap: 22px !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; }
#dashboardHome .dashboard-main-column,
#dashboardHome .dashboard-side-column { display: grid; min-width: 0; gap: 22px; align-items: start; }
#dashboardHome .dashboard-card { min-width: 0; border: 1px solid #e2e7ee; border-radius: 12px; background: #fff; overflow: hidden; }
#dashboardHome .dashboard-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 22px; }
#dashboardHome .dashboard-card-head h3 { margin: 0; color: #20334a !important; font-size: 15px; font-weight: 650 !important; letter-spacing: -0.3px !important; }
#dashboardHome .dashboard-card-head p { margin: 6px 0 0; color: var(--dashboard-muted); font-size: 11px; line-height: 1.6; }
#dashboardHome .dashboard-card-title { display: flex; align-items: center; gap: 9px; }
#dashboardHome .dashboard-count { padding: 3px 6px; border-radius: 5px; background: #f1f4f8; color: var(--dashboard-muted); font-size: 10px; font-weight: 600; }
#dashboardHome .dashboard-period-label,
#dashboardHome .dashboard-card-caption { color: var(--dashboard-muted); font-size: 10px; font-weight: 500; }
#dashboardHome .dashboard-card-footer { border-top: 1px solid #edf0f4; padding: 11px 22px; }
#dashboardHome button.dashboard-text-button { min-height: 28px; padding: 0; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #365572 !important; font-size: 11px; }
#dashboardHome button.dashboard-text-button span { margin-left: 5px; }
#dashboardHome button.dashboard-text-button:hover { color: #172b40 !important; text-decoration: underline; }

#dashboardHome .dashboard-distribution { padding: 0 22px 6px; }
#dashboardHome .dashboard-distribution-head,
#dashboardHome .dashboard-role-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) minmax(130px, 1.2fr) minmax(84px, 0.75fr) minmax(96px, 0.85fr); align-items: center; gap: 18px; }
#dashboardHome .dashboard-distribution-head { padding: 11px 0; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; color: #4b6078; font-size: 9px; font-weight: 650; letter-spacing: 0.4px; text-transform: uppercase; }
#dashboardHome .dashboard-distribution-head > span:nth-child(n+3) { text-align: right; }
#dashboardHome .dashboard-role-row { padding: 17px 0; border-bottom: 1px solid #edf0f4; }
#dashboardHome .dashboard-role-row:last-child { border-bottom: 0; }
#dashboardHome .dashboard-role-label { min-width: 0; }
#dashboardHome .dashboard-role-label strong { display: block; color: #263e57; font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
#dashboardHome .dashboard-role-label > span { display: block; margin-top: 4px; color: var(--dashboard-muted); font-size: 10px; }
#dashboardHome .dashboard-role-net { min-width: 0; }
#dashboardHome .dashboard-role-net strong { color: #244f69; font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
#dashboardHome .dashboard-role-track { height: 5px; margin-top: 9px; border-radius: 3px; background: #edf2f7; overflow: hidden; }
#dashboardHome .dashboard-role-track > span { display: block; height: 100%; border-radius: 3px; background: #4d8099; }
#dashboardHome .dashboard-role-deduction,
#dashboardHome .dashboard-role-advance { min-width: 0; text-align: right; }
#dashboardHome .dashboard-role-deduction strong,
#dashboardHome .dashboard-role-advance strong { color: #40546d; font-size: 11px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
#dashboardHome .dashboard-mobile-label { display: none; }

#dashboardHome .dashboard-team-summary { padding: 0 22px; }
#dashboardHome .dashboard-team-composition { display: flex; height: 7px; margin: 0 0 18px; border-radius: 4px; background: #eef2f6; overflow: hidden; }
#dashboardHome .dashboard-team-composition > span { height: 100%; }
#dashboardHome .dashboard-team-composition .working { background: #458b70; }
#dashboardHome .dashboard-team-composition .leave { background: #d3ad5a; }
#dashboardHome .dashboard-team-composition .terminated { background: #b2828b; }
#dashboardHome .dashboard-team-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; }
#dashboardHome .dashboard-team-row > span { display: flex; align-items: center; gap: 8px; color: #40546d; font-size: 11px; font-weight: 500; }
#dashboardHome .dashboard-team-row strong { color: #263e57; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
#dashboardHome .dashboard-team-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #458b70; }
#dashboardHome .dashboard-team-dot.leave { background: #c39945; }
#dashboardHome .dashboard-team-dot.terminated { background: #ad7480; }
#dashboardHome .dashboard-team-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 16px 0 18px; border-top: 1px solid #edf0f4; color: #40546d; font-size: 11px; font-weight: 600; }
#dashboardHome .dashboard-team-total strong { color: #263e57; font-size: 13px; }

#dashboardHome .dashboard-checks-list { padding: 0 22px; }
#dashboardHome .dashboard-check-item { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf0f4; }
#dashboardHome .dashboard-check-item:last-child { border-bottom: 0; padding-bottom: 20px; }
#dashboardHome .dashboard-check-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; border: 1px solid #f0e3c6; border-radius: 50%; background: #fff8e9; color: #785815; font-size: 10px; font-weight: 600; }
#dashboardHome .dashboard-check-item > div { min-width: 0; }
#dashboardHome .dashboard-check-item strong { display: block; color: #344b64; font-size: 11px; font-weight: 600; line-height: 1.5; }
#dashboardHome .dashboard-check-item > div > span { display: block; margin-top: 4px; color: var(--dashboard-muted); font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }

#dashboardHome .dashboard-reports-list { padding: 0 22px; }
#dashboardHome button.dashboard-report-row { width: 100%; min-height: 74px; display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 0; border: 0 !important; border-top: 1px solid #edf0f4 !important; border-radius: 0 !important; background: #fff !important; color: #344b64 !important; text-align: left; }
#dashboardHome button.dashboard-report-row:hover { background: #f8fafc !important; }
#dashboardHome .dashboard-report-icon { display: grid; place-items: center; width: 34px; height: 36px; flex: 0 0 34px; border: 1px solid #e1e8f0; border-radius: 7px; background: #f3f7fa; color: #4b6680; }
#dashboardHome .dashboard-report-icon svg { width: 20px; height: 20px; }
#dashboardHome .dashboard-report-copy { display: grid; gap: 6px; flex: 1; min-width: 0; }
#dashboardHome .dashboard-report-copy strong { color: #263e57; font-size: 12px; font-weight: 600; line-height: 1.5; }
#dashboardHome .dashboard-report-copy > span { color: var(--dashboard-muted); font-size: 10px; font-weight: 400; line-height: 1.6; }
#dashboardHome .dashboard-report-arrow { margin-left: 4px; color: #52647a; font-size: 20px; font-weight: 400; }
#dashboardHome .dashboard-report-row:disabled { opacity: 0.6; cursor: wait !important; }
#dashboardHome .dashboard-empty-state { display: grid; gap: 7px; padding: 24px 22px 30px; }
#dashboardHome .dashboard-empty-state strong { color: #344b64; font-size: 12px; font-weight: 600; }
#dashboardHome .dashboard-empty-state > span { color: var(--dashboard-muted); font-size: 11px; line-height: 1.8; }
#dashboardHome button:focus-visible { outline: 2px solid #3984a5; outline-offset: 3px; }
#appView:has(#dashboardHome:not(.hidden)) #appMessage:not(:empty) { position: fixed; z-index: 60; right: 24px; bottom: 24px; max-width: min(430px, calc(100% - 32px)); min-height: 0; margin: 0; padding: 12px 18px; border: 1px solid #dce8e2; border-radius: 9px; background: #fff; box-shadow: 0 5px 24px #172b401a; font-size: 13px; }

@media (min-width: 1800px) {
  #dashboardHome #dashboardInsightsSection { grid-template-columns: minmax(0, 1fr) 360px !important; }
}

@media (max-width: 1180px) {
  #dashboardHome .dashboard-page-head { flex-wrap: wrap; gap: 16px; }
  #dashboardHome .dashboard-metric { padding: 0 16px; }
  #dashboardHome .dashboard-metric strong { font-size: 22px; }
  #dashboardHome #dashboardInsightsSection { grid-template-columns: minmax(0, 1fr) !important; }
  #dashboardHome .dashboard-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  #dashboardHome .dashboard-page-head { margin-bottom: 20px; }
  #dashboardHome .dashboard-page-head h2 { font-size: 26px !important; }
  #dashboardHome .dashboard-page-description { font-size: 12px; }
  #dashboardHome .dashboard-page-actions { gap: 8px; }
  #dashboardHome .dashboard-page-actions button { min-height: 40px; font-size: 11px; }
  #dashboardHome #metricsSection { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; padding: 0; margin-bottom: 20px !important; }
  #dashboardHome .dashboard-metric { padding: 16px; }
  #dashboardHome .dashboard-metric:nth-child(3) { border-left: 0; }
  #dashboardHome .dashboard-metric:nth-child(n+3) { border-top: 1px solid #e9edf2; }
  #dashboardHome .dashboard-metric p { font-size: 11px; }
  #dashboardHome .dashboard-metric strong { font-size: clamp(18px, 5.4vw, 24px); }
  #dashboardHome .dashboard-metric > span { font-size: 9px; }
  #dashboardHome #dashboardCommandCenter { flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 16px; margin-bottom: 20px !important; }
  #dashboardHome .dashboard-status-icon { width: 32px; height: 32px; flex-basis: 32px; }
  #dashboardHome .dashboard-status-copy { flex: 1 1 calc(100% - 44px); }
  #dashboardHome .dashboard-status-title h3 { font-size: 13px !important; }
  #dashboardHome #dashboardMonthStatusDetail { font-size: 10px; }
  #dashboardHome #dashboardCommandCenter > button { margin-left: 44px; }
  #dashboardHome #dashboardInsightsSection { gap: 20px !important; }
  #dashboardHome .dashboard-main-column,
  #dashboardHome .dashboard-side-column { display: contents; }
  #dashboardHome .dashboard-checks-card { order: 1; }
  #dashboardHome .dashboard-distribution-card { order: 2; }
  #dashboardHome .dashboard-team-card { order: 3; }
  #dashboardHome .dashboard-reports-card { order: 4; }
  #dashboardHome .dashboard-card-head { padding: 18px 16px; }
  #dashboardHome .dashboard-card-head h3 { font-size: 14px; }
  #dashboardHome .dashboard-card-head p { font-size: 10px; }
  #dashboardHome .dashboard-card-footer { padding: 11px 16px; }
  #dashboardHome .dashboard-distribution { padding: 0 16px 6px; }
  #dashboardHome .dashboard-team-summary,
  #dashboardHome .dashboard-checks-list,
  #dashboardHome .dashboard-reports-list { padding-left: 16px; padding-right: 16px; }
  #appView:has(#dashboardHome:not(.hidden)) #appMessage:not(:empty) { right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (max-width: 620px) {
  #dashboardHome .dashboard-distribution-head { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #dashboardHome .dashboard-role-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 16px; padding: 18px 0; }
  #dashboardHome .dashboard-role-label { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  #dashboardHome .dashboard-role-label > span { flex: 0 0 auto; margin: 0; }
  #dashboardHome .dashboard-role-net { grid-column: 1 / -1; }
  #dashboardHome .dashboard-mobile-label { display: block; margin-bottom: 6px; color: var(--dashboard-muted); font-size: 10px; font-weight: 400; }
  #dashboardHome .dashboard-role-deduction,
  #dashboardHome .dashboard-role-advance { text-align: left; }
  #dashboardHome .dashboard-role-track { margin-top: 8px; }
  #dashboardHome .dashboard-report-icon { display: none; }
  #dashboardHome button.dashboard-report-row { gap: 9px; }
  #dashboardHome .dashboard-report-copy > span { font-size: 9px; }
  #dashboardHome .dashboard-report-arrow { margin-left: 0; }
}

@media (max-width: 360px) {
  #dashboardHome .dashboard-metric { padding: 14px 12px; }
  #dashboardHome .dashboard-page-actions { width: 100%; }
  #dashboardHome .dashboard-page-actions button { flex: 1; padding: 0 10px; font-size: 10px; }
  #dashboardHome .dashboard-role-label { flex-wrap: wrap; }
}
