:root {
  --brand: #2f6f85;
  --brand-dark: #1d5367;
  --line: #d7dce2;
  --soft: #f6f8fa;
  --soft-2: #eef4f7;
  --text: #17212b;
  --muted: #6b7280;
  --danger: #b42318;
  --warning: #9a6700;
  --ok: #067647;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  color: var(--text);
  background: #fff;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  height: 56px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
}
.topbar a { color: #fff; }
.topbar__brand { font-weight: 700; font-size: 18px; }
.topbar__nav { display: flex; align-items: center; gap: 16px; }
.logout-form { margin: 0; }
.logout-form button {
  border: 1px solid rgb(255 255 255 / 50%);
  background: transparent;
  color: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.page { padding: 28px 36px 40px; }
.hero-card, .login-card {
  max-width: 900px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 4px 18px rgb(15 23 42 / 6%);
}
.login-card { max-width: 420px; margin: 56px auto; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
  font: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
}
input:disabled, select:disabled, textarea:disabled { background: #f3f4f6; color: #6b7280; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.2;
}
button:hover, .button:hover { background: var(--soft); text-decoration: none; }
button.primary, .button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--brand-dark); }
button.danger { color: var(--danger); border-color: #f1b4b0; }
button.small { padding: 5px 8px; font-size: 12px; }
button:disabled { opacity: .55; cursor: not-allowed; }
.actions, .toolbar, .month-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.profile-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.profile-summary div, .summary-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--soft);
}
.profile-summary dt, .summary-grid .label { color: var(--muted); font-size: 12px; }
.profile-summary dd { margin: 4px 0 0; font-weight: 700; }
.muted { color: var(--muted); }
.alert { border-radius: 9px; padding: 12px 14px; margin: 12px 0; }
.alert-danger { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.alert-warning { background: #fffaeb; color: var(--warning); border: 1px solid #fedf89; }
.mt-12 { margin-top: 12px; }
.sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.sheet-header h1 { margin: 0 0 8px; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); }
.toolbar { margin: 16px 0; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.summary-grid strong { display: block; margin-top: 6px; font-size: 22px; }
.help-text { color: var(--muted); margin: 8px 0 14px; }
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  max-height: calc(100vh - 280px);
}
.timesheet-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1380px;
  font-size: 13px;
}
.timesheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #dfe7ec;
  border-bottom: 1px solid #aab7c2;
  padding: 8px;
  text-align: center;
  white-space: nowrap;
}
.timesheet-table td {
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #f1f3f5;
  padding: 5px;
  vertical-align: middle;
  background: #fff;
}
.timesheet-table tr.weekend td { background: #fafafa; }
.timesheet-table tr.holiday td { background: #fff7e6; }
.timesheet-table tr.dirty td { background: #f0f7ff; }
.timesheet-table tr.error td { background: #fff1f0; }
.timesheet-table tr.warning td { background: #fffbeb; }
.timesheet-table .date-cell { text-align: center; font-weight: 700; color: #334155; }
.timesheet-table .weekday-cell { text-align: center; }
.timesheet-table .loading { text-align: center; padding: 40px; color: var(--muted); }
.timesheet-table select, .timesheet-table input, .timesheet-table textarea {
  width: 100%;
  min-height: 32px;
}
.timesheet-table textarea { resize: vertical; min-height: 32px; }
.col-date { width: 80px; }
.col-weekday { width: 50px; }
.col-project { width: 340px; }
.col-pno { width: 110px; }
.col-task { width: 90px; }
.col-hours { width: 80px; }
.col-code { width: 210px; }
.col-remark { width: 260px; }
.col-status { width: 130px; }
.col-actions { width: 120px; }
.project-no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #334155; }
.status-ok { color: var(--ok); font-weight: 700; }
.status-warning { color: var(--warning); font-weight: 700; }
.status-error { color: var(--danger); font-weight: 700; }
.row-actions { display: flex; gap: 4px; justify-content: center; }
@media (max-width: 900px) {
  .page { padding: 18px; }
  .sheet-header { display: block; }
  .month-nav { margin-top: 12px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

.alert-success { background: #ecfdf3; color: var(--ok); border: 1px solid #abefc6; }
.sheet-guide { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.guide-card { border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #fff, #f8fbfd); padding: 12px 14px; box-shadow: 0 2px 10px rgb(15 23 42 / 4%); }
.guide-card strong { display: block; margin-bottom: 6px; }
.guide-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.timesheet-table input.project-input, .timesheet-table input.job-code-input { background: #f9fcff; }
.timesheet-table td.is-focused { outline: 2px solid #93c5fd; outline-offset: -2px; background: #eff6ff; }
.timesheet-table .hint { color: var(--muted); font-size: 11px; display: block; margin-top: 2px; }
@media (max-width: 900px) { .sheet-guide { grid-template-columns: 1fr; } }

/* ERP 2.2 UI patch */
.timesheet-table tr.offday .date-cell,
.timesheet-table tr.offday .weekday-cell {
  color: #c1121f;
  font-weight: 800;
}
.timesheet-table tr.weekend .date-cell,
.timesheet-table tr.weekend .weekday-cell,
.timesheet-table tr.holiday .date-cell,
.timesheet-table tr.holiday .weekday-cell {
  color: #c1121f;
  font-weight: 800;
}
.project-combo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}
.project-combo .project-input { min-width: 0; }
.project-combo .project-open {
  white-space: nowrap;
  padding: 6px 8px;
  font-size: 12px;
  border-color: #a9c2ce;
  background: #eef7fb;
  color: var(--brand-dark);
}
.project-combo .project-open:hover { background: #e0f0f6; }
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgb(15 23 42 / 45%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-card {
  width: min(1080px, 96vw);
  max-height: 86vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
  border: 1px solid #dbe3ea;
  overflow: hidden;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbfd, #fff);
}
.modal-header h2 { margin: 0 0 4px; font-size: 20px; }
.modal-header p { margin: 0; }
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}
.modal-toolbar { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-toolbar input { width: 100%; min-height: 40px; }
.project-picker-table-wrap { overflow: auto; max-height: calc(86vh - 155px); }
.project-picker-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 850px;
  font-size: 13px;
}
.project-picker-table th {
  position: sticky;
  top: 0;
  background: #e8eef3;
  border-bottom: 1px solid #b8c5d0;
  padding: 9px;
  text-align: left;
  z-index: 1;
}
.project-picker-table td {
  border-bottom: 1px solid #edf1f4;
  padding: 8px 9px;
  vertical-align: middle;
}
.project-picker-table tbody tr { cursor: pointer; }
.project-picker-table tbody tr:hover td { background: #eef7ff; }
.project-picker-table tbody tr.selected td { background: #e7f6ee; }
.project-picker-table .pno { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; white-space: nowrap; }
.project-picker-table .task { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.project-picker-empty { padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 900px) {
  .modal-backdrop { padding: 10px; }
  .modal-card { max-height: 92vh; }
  .project-combo { grid-template-columns: 1fr; }
}

/* ERP 2.3 UI patch */
.col-project { width: 420px; }
.col-code { width: 280px; }
.timesheet-table tr.weekend td,
.timesheet-table tr.holiday td,
.timesheet-table tr.offday td {
  background: #ffe4e6;
}
.timesheet-table tr.holiday td {
  background: #ffd6dc;
}
.timesheet-table tr.offday .date-cell,
.timesheet-table tr.offday .weekday-cell,
.timesheet-table tr.weekend .date-cell,
.timesheet-table tr.weekend .weekday-cell,
.timesheet-table tr.holiday .date-cell,
.timesheet-table tr.holiday .weekday-cell {
  color: #b00020;
  font-weight: 900;
}
.project-combo,
.job-code-combo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}
.project-combo .project-input,
.job-code-combo .job-code-input {
  min-width: 0;
}
.project-combo .project-open,
.job-code-combo .job-code-open {
  white-space: nowrap;
  padding: 6px 8px;
  font-size: 12px;
  border-color: #a9c2ce;
  background: #eef7fb;
  color: var(--brand-dark);
}
.project-combo .project-open:hover,
.job-code-combo .job-code-open:hover {
  background: #e0f0f6;
}
.job-code-picker-card {
  width: min(1180px, 96vw);
}
.job-code-picker-table {
  min-width: 920px;
}
.job-code-picker-table .code {
  width: 90px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  white-space: nowrap;
}
.job-code-picker-table .job-desc strong {
  display: block;
  color: var(--text);
  margin-bottom: 3px;
}
.job-code-picker-table .job-desc span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.job-code-picker-table .category {
  width: 80px;
  white-space: nowrap;
  font-weight: 700;
}


/* ERP 2.3.1 offday gray + fixed-height holiday label */
.timesheet-table tbody tr {
  height: 46px;
}
.timesheet-table tbody tr td {
  height: 46px;
}
.timesheet-table tr.weekend:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.holiday:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.offday:not(.dirty):not(.error):not(.warning) td {
  background: #eef1f4;
}
.timesheet-table tr.weekend:hover:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.holiday:hover:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.offday:hover:not(.dirty):not(.error):not(.warning) td {
  background: #e4e8ec;
}
.timesheet-table tr.offday .date-cell,
.timesheet-table tr.offday .weekday-cell,
.timesheet-table tr.weekend .date-cell,
.timesheet-table tr.weekend .weekday-cell,
.timesheet-table tr.holiday .date-cell,
.timesheet-table tr.holiday .weekday-cell {
  color: #495057;
  font-weight: 850;
}
.weekday-cell {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}
.weekday-wrap {
  height: 38px;
  max-height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  line-height: 1.05;
}
.weekday-main {
  display: block;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.holiday-sub {
  display: block;
  width: 100%;
  margin-top: 2px;
  font-size: 7.5px;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  letter-spacing: -0.85px;
  line-height: 0.95;
  text-align: center;
}


/* ERP 2.3.2 holiday label: full name, tiny fixed-height display */
.col-weekday { width: 70px; }
.holiday-sub {
  font-size: 6.8px;
  font-weight: 700;
  letter-spacing: -0.95px;
  line-height: 0.9;
  transform: scaleX(0.82);
  transform-origin: center;
  width: 122%;
  max-width: 122%;
}

/* ERP 2.3.3 offday color tuning */
.timesheet-table tr.weekend:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.holiday:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.offday:not(.dirty):not(.error):not(.warning) td {
  background: rgb(248, 248, 248);
}
.timesheet-table tr.weekend:hover:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.holiday:hover:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.offday:hover:not(.dirty):not(.error):not(.warning) td {
  background: rgb(243, 243, 243);
}
.timesheet-table tr.offday .date-cell,
.timesheet-table tr.offday .weekday-cell,
.timesheet-table tr.weekend .date-cell,
.timesheet-table tr.weekend .weekday-cell,
.timesheet-table tr.holiday .date-cell,
.timesheet-table tr.holiday .weekday-cell,
.timesheet-table tr.offday .holiday-sub,
.timesheet-table tr.weekend .holiday-sub,
.timesheet-table tr.holiday .holiday-sub {
  color: #c1121f;
  font-weight: 850;
}

/* ERP 2.3.4 holiday label size tuning */
.holiday-sub {
  font-size: 7.8px;
  letter-spacing: -0.75px;
  transform: scaleX(0.88);
  width: 114%;
  max-width: 114%;
}


/* ERP 2.3.5 offday unified peach background */
.timesheet-table tr.weekend td,
.timesheet-table tr.holiday td,
.timesheet-table tr.offday td,
.timesheet-table tr.weekend.dirty td,
.timesheet-table tr.holiday.dirty td,
.timesheet-table tr.offday.dirty td,
.timesheet-table tr.weekend.warning td,
.timesheet-table tr.holiday.warning td,
.timesheet-table tr.offday.warning td,
.timesheet-table tr.weekend.error td,
.timesheet-table tr.holiday.error td,
.timesheet-table tr.offday.error td,
.timesheet-table tr.weekend:hover td,
.timesheet-table tr.holiday:hover td,
.timesheet-table tr.offday:hover td {
  background: rgb(255, 237, 228) !important;
}

.timesheet-table tr.offday .date-cell,
.timesheet-table tr.offday .weekday-cell,
.timesheet-table tr.weekend .date-cell,
.timesheet-table tr.weekend .weekday-cell,
.timesheet-table tr.holiday .date-cell,
.timesheet-table tr.holiday .weekday-cell,
.timesheet-table tr.offday .holiday-sub,
.timesheet-table tr.weekend .holiday-sub,
.timesheet-table tr.holiday .holiday-sub {
  color: #c1121f;
}

/* ERP 2.3.6 offday base gray + input peach state */
.timesheet-table tr.weekend:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.holiday:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.offday:not(.dirty):not(.error):not(.warning) td {
  background: rgb(248, 248, 248) !important;
}

.timesheet-table tr.weekend:hover:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.holiday:hover:not(.dirty):not(.error):not(.warning) td,
.timesheet-table tr.offday:hover:not(.dirty):not(.error):not(.warning) td {
  background: rgb(243, 243, 243) !important;
}

.timesheet-table tr.weekend.dirty td,
.timesheet-table tr.holiday.dirty td,
.timesheet-table tr.offday.dirty td,
.timesheet-table tr.weekend.warning td,
.timesheet-table tr.holiday.warning td,
.timesheet-table tr.offday.warning td,
.timesheet-table tr.weekend.error td,
.timesheet-table tr.holiday.error td,
.timesheet-table tr.offday.error td,
.timesheet-table tr.weekend.dirty:hover td,
.timesheet-table tr.holiday.dirty:hover td,
.timesheet-table tr.offday.dirty:hover td,
.timesheet-table tr.weekend.warning:hover td,
.timesheet-table tr.holiday.warning:hover td,
.timesheet-table tr.offday.warning:hover td,
.timesheet-table tr.weekend.error:hover td,
.timesheet-table tr.holiday.error:hover td,
.timesheet-table tr.offday.error:hover td {
  background: rgb(255, 237, 228) !important;
}

.timesheet-table tr.offday .date-cell,
.timesheet-table tr.offday .weekday-cell,
.timesheet-table tr.weekend .date-cell,
.timesheet-table tr.weekend .weekday-cell,
.timesheet-table tr.holiday .date-cell,
.timesheet-table tr.holiday .weekday-cell,
.timesheet-table tr.offday .holiday-sub,
.timesheet-table tr.weekend .holiday-sub,
.timesheet-table tr.holiday .holiday-sub {
  color: #c1121f !important;
}

/* ERP 2.3.7 autosave/value color policy */
.timesheet-table tr.has-value:not(.offday) td,
.timesheet-table tr.dirty:not(.offday) td,
.timesheet-table tr.warning:not(.offday) td,
.timesheet-table tr.error:not(.offday) td,
.timesheet-table tr.has-value:not(.offday):hover td,
.timesheet-table tr.dirty:not(.offday):hover td,
.timesheet-table tr.warning:not(.offday):hover td,
.timesheet-table tr.error:not(.offday):hover td {
  background: rgb(255, 251, 235) !important;
}

.timesheet-table tr.offday:not(.has-value):not(.dirty):not(.warning):not(.error) td,
.timesheet-table tr.weekend:not(.has-value):not(.dirty):not(.warning):not(.error) td,
.timesheet-table tr.holiday:not(.has-value):not(.dirty):not(.warning):not(.error) td {
  background: rgb(248, 248, 248) !important;
}

.timesheet-table tr.offday.has-value td,
.timesheet-table tr.offday.dirty td,
.timesheet-table tr.offday.warning td,
.timesheet-table tr.offday.error td,
.timesheet-table tr.weekend.has-value td,
.timesheet-table tr.weekend.dirty td,
.timesheet-table tr.weekend.warning td,
.timesheet-table tr.weekend.error td,
.timesheet-table tr.holiday.has-value td,
.timesheet-table tr.holiday.dirty td,
.timesheet-table tr.holiday.warning td,
.timesheet-table tr.holiday.error td,
.timesheet-table tr.offday.has-value:hover td,
.timesheet-table tr.offday.dirty:hover td,
.timesheet-table tr.offday.warning:hover td,
.timesheet-table tr.offday.error:hover td,
.timesheet-table tr.weekend.has-value:hover td,
.timesheet-table tr.weekend.dirty:hover td,
.timesheet-table tr.weekend.warning:hover td,
.timesheet-table tr.weekend.error:hover td,
.timesheet-table tr.holiday.has-value:hover td,
.timesheet-table tr.holiday.dirty:hover td,
.timesheet-table tr.holiday.warning:hover td,
.timesheet-table tr.holiday.error:hover td {
  background: rgb(255, 237, 228) !important;
}

.row-actions {
  min-width: 82px;
}

/* ERP 2.3.8 recent job code picker */
.job-code-picker-card {
  width: min(1280px, 97vw);
}
.job-code-picker-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.42fr) minmax(520px, 1fr);
  gap: 14px;
  padding: 14px 16px 18px;
  max-height: calc(86vh - 130px);
}
.job-code-picker-panel {
  min-width: 0;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.job-code-panel-title {
  padding: 9px 12px;
  font-weight: 800;
  background: #f6f8fa;
  border-bottom: 1px solid #dbe3ea;
}
.job-code-picker-grid .project-picker-table-wrap {
  max-height: calc(86vh - 190px);
}
.job-code-recent-table {
  min-width: 330px;
}
.job-code-recent-table .code {
  width: 72px;
}
.job-code-recent-table .job-desc span {
  display: none;
}
.job-code-recent-table .job-desc strong {
  font-size: 12px;
  line-height: 1.25;
}
@media (max-width: 960px) {
  .job-code-picker-grid {
    grid-template-columns: 1fr;
  }
  .job-code-picker-grid .project-picker-table-wrap {
    max-height: 300px;
  }
}

/* ERP 2.4 recent item delete + picker layout tuning */
.picker-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.32fr) minmax(620px, 1fr);
  gap: 14px;
  padding: 14px 16px 18px;
  max-height: calc(86vh - 130px);
}
.picker-panel {
  min-width: 0;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.picker-panel-title {
  padding: 9px 12px;
  font-weight: 800;
  background: #f6f8fa;
  border-bottom: 1px solid #dbe3ea;
}
.picker-grid .project-picker-table-wrap,
.job-code-picker-grid .project-picker-table-wrap {
  max-height: calc(86vh - 190px);
  padding-right: 10px;
  box-sizing: border-box;
}
.project-picker-card,
.job-code-picker-card {
  width: min(1300px, 97vw);
}
.all-project-picker-table {
  min-width: 860px;
}
.recent-project-picker-table,
.job-code-recent-table {
  min-width: 300px;
}
.project-picker-table th:last-child,
.project-picker-table td:last-child {
  width: 64px;
  min-width: 64px;
  text-align: center;
  padding-right: 14px;
}
.project-picker-table th:nth-last-child(2),
.project-picker-table td:nth-last-child(2) {
  width: 64px;
  min-width: 64px;
  text-align: center;
}
.project-picker-table .task {
  width: 72px;
  white-space: nowrap;
}
.project-picker-table .project-name {
  min-width: 210px;
}
.job-code-picker-grid {
  grid-template-columns: minmax(300px, 0.32fr) minmax(650px, 1fr);
}
.job-code-picker-table {
  min-width: 900px;
}
.job-code-recent-table .job-desc span {
  display: none;
}
.recent-project-picker-table .project-name,
.job-code-recent-table .job-desc strong {
  font-size: 12px;
  line-height: 1.25;
}
button.recent-project-remove,
button.recent-job-code-remove {
  border-color: #f1b4b0;
  color: var(--danger);
  background: #fff;
  padding-left: 7px;
  padding-right: 7px;
}
button.recent-project-remove:hover,
button.recent-job-code-remove:hover {
  background: #fff1f0;
}
@media (max-width: 960px) {
  .picker-grid,
  .job-code-picker-grid {
    grid-template-columns: 1fr;
  }
  .picker-grid .project-picker-table-wrap,
  .job-code-picker-grid .project-picker-table-wrap {
    max-height: 300px;
  }
}

/* ERP 3.0 export UI */
.export-modal-card { width: min(980px, 96vw); }
.export-modal-body { padding: 18px 20px; max-height: calc(86vh - 150px); overflow: auto; }
.export-modal-actions { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.export-summary-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.export-summary-grid div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--soft); }
.export-summary-grid .label { color: var(--muted); font-size: 12px; display: block; margin-bottom: 5px; }
.export-summary-grid strong { font-size: 15px; }
.export-preview-table-wrap, .export-history-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.export-preview-table, .export-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.export-preview-table th, .export-preview-table td, .export-history-table th, .export-history-table td { border-bottom: 1px solid #e5e7eb; padding: 8px 9px; text-align: left; white-space: nowrap; }
.export-preview-table th, .export-history-table th { background: #f1f5f9; font-weight: 800; }
.export-modal-body .alert ul { margin: 8px 0 0; padding-left: 18px; }
.export-list-card { max-width: 1180px; }
@media (max-width: 900px) { .export-summary-grid { grid-template-columns: 1fr; } }

/* ERP 3.4 interaction tuning */
.timesheet-table tr.indirect-row .project-input,
.timesheet-table tr.indirect-row .task-input {
  background: #f3f4f6 !important;
  color: #9ca3af;
  cursor: not-allowed;
}
.timesheet-table tr.indirect-row .project-open {
  opacity: .45;
  cursor: not-allowed;
}

/* ERP 4.0 team overview */
.topbar__user {
  color: rgb(255 255 255 / 82%);
  font-weight: 700;
  border-right: 1px solid rgb(255 255 255 / 28%);
  padding-right: 12px;
}
.team-filter-card {
  display: grid;
  grid-template-columns: 110px 90px minmax(180px, 240px) minmax(150px, 190px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 16px 0;
  background: #fff;
  box-shadow: 0 2px 10px rgb(15 23 42 / 4%);
}
.team-filter-card label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.team-filter-card input,
.team-filter-card select {
  width: 100%;
  color: var(--text);
  font-weight: 500;
}
.team-table-wrap {
  max-height: calc(100vh - 250px);
}
.team-status-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1180px;
  font-size: 13px;
}
.team-status-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #dfe7ec;
  border-bottom: 1px solid #aab7c2;
  padding: 8px;
  text-align: center;
  white-space: nowrap;
}
.team-status-table td {
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #f1f3f5;
  padding: 7px 8px;
  background: #fff;
  vertical-align: middle;
}
.team-status-table tbody tr:hover td {
  background: #f8fafc;
}
.team-status-table tbody tr.has-issue td {
  background: rgb(255, 251, 235);
}
.team-status-table tbody tr.missing td {
  color: #6b7280;
}
.team-status-table .name-cell {
  font-weight: 800;
}
.team-status-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #d0d7de;
  background: #f6f8fa;
}
.status-missing { color: #6b7280; background: #f3f4f6; }
.status-draft { color: #9a6700; background: #fff7e6; border-color: #fedf89; }
.status-submitted { color: #175cd3; background: #eff8ff; border-color: #b2ddff; }
.status-approved { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.status-locked { color: #5925dc; background: #f4f3ff; border-color: #d9d6fe; }
.readonly-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #d0d7de;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 1100px) {
  .team-filter-card {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
  .team-filter-search {
    grid-column: span 2;
  }
}

/* ERP 4.1 team edit/status controls */
.change-reason-field {
  display: inline-grid;
  gap: 4px;
  align-items: center;
  min-width: min(360px, 100%);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.change-reason-field input {
  min-width: 300px;
  min-height: 34px;
  border-color: #f59e0b;
  background: #fffbeb;
}
button.primary-soft {
  background: #e8f3f7;
  border-color: #9cc4d2;
  color: var(--brand-dark);
}
button.primary-soft:hover {
  background: #d8edf4;
}


/* ERP 4.2 bulk status controls */
.team-bulk-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  margin: 12px 0 16px;
  box-shadow: 0 2px 10px rgb(15 23 42 / 4%);
}
.team-bulk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.team-bulk-reason {
  display: grid;
  gap: 5px;
  min-width: min(420px, 100%);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.team-bulk-reason input {
  min-height: 36px;
  background: #fffbeb;
  border-color: #f59e0b;
}
.team-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.team-bulk-result {
  margin-top: 10px;
  line-height: 1.5;
}
.team-bulk-result ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.team-status-table .select-col {
  width: 44px;
  text-align: center;
}
.team-status-table .select-col input {
  width: 16px;
  height: 16px;
}

/* ERP 5.0 PM project lookup */
.pm-page .sheet-meta {
  flex-wrap: wrap;
}
.pm-filter-card {
  align-items: end;
}
.pm-table-wrap {
  margin-top: 14px;
}
.pm-project-table .project-name-cell {
  min-width: 360px;
}
.pm-project-table .strong,
.pm-detail-table .strong,
.compact-table .strong {
  font-weight: 800;
}
.pm-section-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.pm-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 3px 12px rgb(15 23 42 / 4%);
}
.pm-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.compact-wrap {
  max-height: 360px;
  overflow: auto;
}
.compact-table {
  min-width: 640px;
}
.pm-detail-wrap {
  max-height: 560px;
  overflow: auto;
}
.pm-detail-table {
  min-width: 1180px;
}
.pm-detail-table .remark-cell {
  min-width: 240px;
  white-space: pre-wrap;
}
.team-table .empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}
.num {
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .pm-section-grid {
    grid-template-columns: 1fr;
  }
}

/* ERP 6.0 project summary report */
.report-page .sheet-meta strong { font-variant-numeric: tabular-nums; }
.report-filter-card {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  background: #fff;
}
.report-filter-card label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.report-filter-card input, .report-filter-card select { min-height: 34px; }
.summary-scroll-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  max-height: calc(100vh - 260px);
}
.project-summary-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1100px;
  width: max-content;
  font-size: 12px;
}
.project-summary-table th,
.project-summary-table td {
  border-right: 1px solid #eef1f4;
  border-bottom: 1px solid #e5e7eb;
  padding: 7px 8px;
  text-align: right;
  white-space: nowrap;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.project-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #edf4f7;
  color: #23323d;
  text-align: center;
  vertical-align: bottom;
}
.project-summary-table .sticky-month {
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: center;
  background: #f8fbfd;
  font-weight: 800;
  min-width: 72px;
}
.project-summary-table thead .sticky-month { z-index: 5; background: #dfeef4; }
.project-summary-table .project-col { min-width: 96px; max-width: 150px; }
.project-summary-table .project-no { display: block; font-weight: 900; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.project-summary-table .project-name { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--muted); }
.project-summary-table .summary-special-col { background: #fff9ed; min-width: 90px; }
.project-summary-table .summary-total-col { background: #eef7f0; min-width: 80px; font-weight: 900; }
.project-summary-table td.summary-total-col { color: #05603a; }
.project-summary-table .person-col { background: #f6f8fa; min-width: 74px; }
.project-summary-table .total-row th,
.project-summary-table .total-row td { background: #eef4f7; font-weight: 900; }
.project-summary-table .clickable-summary-cell { cursor: pointer; color: var(--brand-dark); font-weight: 800; }
.project-summary-table .clickable-summary-cell:hover { background: #e8f3f7; text-decoration: underline; }
.project-summary-table .zero-cell { color: #cbd5e1; }
.report-help { margin: 10px 0 18px; color: var(--muted); font-size: 13px; }
.summary-detail-modal[hidden] { display: none; }
.summary-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgb(15 23 42 / 45%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.summary-detail-card {
  width: min(1180px, 96vw);
  max-height: 86vh;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
  border: 1px solid #dbe3ea;
  display: grid;
  grid-template-rows: auto auto 1fr;
}
.summary-detail-header { display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.summary-detail-header h2 { margin: 0 0 4px; }
.summary-detail-body { overflow: auto; padding: 14px 18px 18px; }
.summary-detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.summary-detail-table th { background: #f1f5f9; position: sticky; top: 0; }
.summary-detail-table th, .summary-detail-table td { border-bottom: 1px solid #e5e7eb; padding: 7px 8px; text-align: left; vertical-align: top; }
.summary-detail-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .report-filter-card { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

/* ERP 7.0 batch export */
.batch-export-page .team-filter-card {
  margin-bottom: 14px;
}
.batch-export-action-card {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.batch-memo-field {
  display: grid;
  gap: 4px;
  min-width: min(460px, 100%);
  font-weight: 700;
  color: var(--muted);
  font-size: 12px;
}
.batch-memo-field input {
  min-height: 36px;
}
.batch-export-table th,
.batch-export-table td {
  white-space: nowrap;
}
.batch-export-table td:nth-child(9),
.batch-export-table td:nth-child(10) {
  white-space: normal;
  min-width: 130px;
}
.batch-export-table tr.has-errors td {
  background: #fff7ed;
}
.batch-created-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mini-list {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--danger);
}
.batch-history-card {
  max-width: none;
  margin-top: 18px;
}

/* ERP 7.1 UI/terms/summary cleanup */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}
.summary-grid-compact {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 0 auto;
  flex-wrap: nowrap;
}
.summary-grid-compact div {
  min-width: 96px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
}
.summary-grid-compact .label {
  display: block;
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
}
.summary-grid-compact strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.1;
}
.timesheet-table thead th,
.team-table thead th,
.pm-project-table thead th,
.pm-detail-table thead th,
.batch-export-table thead th,
.vertical-summary-table thead th,
.export-history-table thead th,
.export-preview-table thead th {
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #94a3b8;
}
.timesheet-table td,
.team-table td,
.pm-project-table td,
.pm-detail-table td,
.batch-export-table td,
.vertical-summary-table td,
.export-history-table td,
.export-preview-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.timesheet-table tbody tr:hover td,
.team-table tbody tr:hover td,
.pm-project-table tbody tr:hover td,
.pm-detail-table tbody tr:hover td,
.batch-export-table tbody tr:hover td,
.vertical-summary-table tbody tr:hover td {
  background-color: #f8fafc;
}
.vertical-summary-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: auto;
  max-height: calc(100vh - 260px);
  background: #fff;
}
.vertical-summary-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1480px;
  font-size: 13px;
}
.vertical-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e8eef3;
  padding: 9px 8px;
  white-space: nowrap;
  text-align: center;
}
.vertical-summary-table td,
.vertical-summary-table th {
  padding: 8px 9px;
  vertical-align: middle;
}
.vertical-summary-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.vertical-summary-table .summary-project-no-col {
  width: 118px;
  white-space: nowrap;
}
.vertical-summary-table .summary-project-name-col {
  min-width: 300px;
  max-width: 520px;
  white-space: normal;
  line-height: 1.25;
}
.vertical-summary-table .summary-kind-col {
  width: 88px;
  white-space: nowrap;
  color: #475569;
}
.vertical-summary-table .summary-task-col,
.vertical-summary-table .summary-month-col,
.vertical-summary-table .summary-total-col,
.vertical-summary-table .person-col,
.vertical-summary-table .entry-col {
  width: 74px;
  white-space: nowrap;
}
.vertical-summary-table .updated-col {
  width: 130px;
  white-space: nowrap;
  color: var(--muted);
}
.vertical-summary-table .detail-col {
  width: 70px;
  text-align: center;
}
.vertical-summary-table .clickable-summary-cell {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
}
.vertical-summary-table .clickable-summary-cell:hover {
  text-decoration: underline;
  background: #eef7ff !important;
}
.vertical-summary-table .zero-cell {
  color: #cbd5e1;
  font-weight: 400;
}
.vertical-summary-table tfoot th,
.vertical-summary-table tfoot td,
.vertical-summary-table .total-row th,
.vertical-summary-table .total-row td {
  background: #f1f5f9;
  font-weight: 900;
  border-top: 2px solid #94a3b8;
}
.vertical-summary-table .special-summary-row td {
  background: #fffdf5;
}
.report-filter-card.compact-filter-card {
  align-items: end;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}
@media (max-width: 1100px) {
  .summary-grid-compact { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .summary-grid-compact div { flex: 1 1 120px; }
}

/* ERP 8.0 person-project matrix */
.person-matrix-filter {
  grid-template-columns: 120px 120px 150px 160px minmax(180px, 1fr) minmax(200px, 1fr) auto auto;
}
.compact-check {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  white-space: nowrap;
  font-weight: 700;
}
.compact-check input {
  width: auto;
}
.person-matrix-note {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.person-matrix-wrap {
  overflow: auto;
  max-height: calc(100vh - 285px);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
.person-matrix-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}
.person-matrix-table th,
.person-matrix-table td {
  border-right: 1px solid #d7dce2;
  border-bottom: 1px solid #d7dce2;
  padding: 5px 6px;
  vertical-align: middle;
  background: #fff;
}
.person-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #d8cce8;
  color: #111827;
  text-align: center;
  font-weight: 800;
  border-bottom: 1px solid #8e83a6;
}
.person-matrix-table thead tr:nth-child(2) th { top: 30px; }
.person-matrix-table thead tr:nth-child(3) th { top: 60px; }
.person-matrix-table .sticky-person {
  position: sticky;
  left: 0;
  z-index: 5;
  min-width: 118px;
  max-width: 118px;
  background: #efe7f6;
  text-align: center;
  border-right: 2px solid #8e83a6;
}
.person-matrix-table tbody .sticky-person {
  background: #fbf8ff;
  text-align: left;
  font-weight: 800;
}
.person-matrix-table tfoot .sticky-person {
  background: #d8cce8;
}
.person-matrix-table .person-name span {
  display: block;
}
.person-matrix-table .person-name small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}
.person-matrix-table .project-col {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}
.person-matrix-table .project-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}
.person-matrix-table .project-name {
  height: 70px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.15;
  font-size: 10.5px;
  padding: 4px;
}
.person-matrix-table .project-name span {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person-matrix-table .task-cell {
  height: 30px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}
.person-matrix-table .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 54px;
}
.person-matrix-table .summary-col {
  width: 82px;
  min-width: 82px;
  background: #e8def1;
}
.person-matrix-table .total-col,
.person-matrix-table .total-cell,
.person-matrix-table .grand-total {
  background: #eee3f7;
  font-weight: 900;
}
.person-matrix-table .has-hours {
  background: #fffdf7;
}
.person-matrix-table tfoot td,
.person-matrix-table tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: #e8def1;
  font-weight: 900;
  border-top: 2px solid #8e83a6;
}
.matrix-detail-cell {
  width: 100%;
  min-height: 24px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #111827;
  text-align: right;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.matrix-detail-cell:hover {
  background: #eef7ff;
  text-decoration: underline;
}
.person-matrix-detail-card {
  width: min(1180px, 96vw);
}
.person-matrix-detail-table {
  min-width: 950px;
}
@media (max-width: 1000px) {
  .person-matrix-filter {
    grid-template-columns: 1fr 1fr;
  }
  .person-matrix-wrap {
    max-height: calc(100vh - 330px);
  }
}

/* ERP 8.1 unified matrix selector */
.matrix-selected-summary {
  margin: 8px 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.person-matrix-table {
  width: max-content !important;
  min-width: unset !important;
}
.person-matrix-wrap {
  display: block;
  width: 100%;
}
.person-matrix-table th,
.person-matrix-table td {
  box-shadow: inset -1px 0 #d7dce2;
}
.person-matrix-table .sticky-person {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}
.person-matrix-table .project-col {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
}
.project-selector-card {
  width: min(1120px, 96vw);
}
.selector-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.project-selector-list {
  max-height: calc(86vh - 160px);
  overflow: auto;
  padding: 10px 16px 16px;
}
.project-selector-row {
  display: grid;
  grid-template-columns: 28px 92px minmax(280px, 1fr) 70px 70px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid #edf1f4;
  padding: 6px 4px;
  cursor: pointer;
}
.project-selector-row:hover {
  background: #f8fbfd;
}
.project-selector-row.used {
  background: #fffdf7;
}
.project-selector-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}
.project-selector-name {
  line-height: 1.25;
}
.project-selector-task,
.project-selector-hours {
  text-align: right;
  font-weight: 800;
  color: var(--muted);
}
@media (max-width: 900px) {
  .selector-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .project-selector-row {
    grid-template-columns: 28px 90px 1fr;
  }
  .project-selector-task,
  .project-selector-hours {
    display: none;
  }
}

/* ERP 8.2 matrix ui fix */
.person-matrix-table {
  table-layout: fixed;
}
.person-matrix-table thead th {
  vertical-align: middle;
}
.person-matrix-table .sticky-person {
  text-align: center;
}
.person-matrix-table tbody .sticky-person {
  text-align: left;
}
.person-matrix-table .task-row th {
  height: 28px;
}
.person-matrix-table thead tr:nth-child(2) th {
  height: 28px;
}
.person-matrix-table thead tr:nth-child(3) th {
  height: 72px;
  vertical-align: middle;
}
.person-matrix-table .project-name {
  padding: 6px 4px;
}
.person-matrix-table .project-name span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.15;
}
.person-matrix-table .summary-col,
.person-matrix-table .total-col {
  min-width: 72px;
  max-width: 72px;
  width: 72px;
}
.person-matrix-wrap {
  background: transparent;
}
.project-selector-list {
  border-top: 1px solid #e5e7eb;
}
.project-selector-row {
  border-left: 1px solid #edf1f4;
  border-right: 1px solid #edf1f4;
}
.project-selector-row:first-child {
  border-top: 1px solid #edf1f4;
}
.person-matrix-detail-table {
  min-width: 100%;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.person-matrix-detail-table th,
.person-matrix-detail-table td {
  border: 1px solid #dbe2e8;
  padding: 8px 10px;
  vertical-align: top;
  background: #fff;
  line-height: 1.35;
}
.person-matrix-detail-table thead th {
  background: #f0f4f7;
  font-weight: 800;
}
.person-matrix-detail-table .col-date {
  width: 110px;
}
.person-matrix-detail-table .col-name {
  width: 90px;
}
.person-matrix-detail-table .col-project {
  width: 280px;
}
.person-matrix-detail-table .col-job {
  width: 250px;
}
.person-matrix-detail-table .col-hours {
  width: 70px;
  text-align: right;
}
.person-matrix-detail-table .col-remark {
  width: auto;
  min-width: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ERP 8.3 persistent project selection + header alignment */
.person-matrix-table thead tr.task-row th {
  height: 30px !important;
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.person-matrix-table thead tr:nth-child(2) th {
  height: 30px !important;
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.person-matrix-table thead tr:nth-child(3) th {
  height: 78px !important;
  min-height: 78px;
}
.person-matrix-table thead th[rowspan="3"] {
  height: 138px !important;
  min-height: 138px;
  background-image:
    linear-gradient(to bottom,
      transparent 0,
      transparent 29px,
      #a79ab9 29px,
      #a79ab9 30px,
      transparent 30px,
      transparent 59px,
      #a79ab9 59px,
      #a79ab9 60px,
      transparent 60px);
  background-color: #eadff1;
  background-blend-mode: normal;
}
.person-matrix-table thead .sticky-person[rowspan="3"] {
  background-color: #eadff1;
}
.person-matrix-table thead .summary-col[rowspan="3"],
.person-matrix-table thead .total-col[rowspan="3"] {
  background-color: #eadff1;
}
.person-matrix-table .project-name span {
  min-height: 66px;
}
.matrix-hidden-warning {
  margin: 8px 0 12px;
  padding: 10px 12px;
  font-size: 13px;
}

/* ERP 8.4 project selection sync + matrix/detail alignment */
.person-matrix-table thead tr.task-row th,
.person-matrix-table thead tr:nth-child(2) th {
  height: 28px !important;
  min-height: 28px !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  line-height: 1.1;
}
.person-matrix-table thead tr:nth-child(3) th {
  height: 76px !important;
  min-height: 76px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}
.person-matrix-table thead tr:nth-child(2) th {
  top: 28px !important;
}
.person-matrix-table thead tr:nth-child(3) th {
  top: 56px !important;
}
.person-matrix-table thead .sticky-person,
.person-matrix-table thead .summary-col,
.person-matrix-table thead .total-col {
  background-color: #eadff1 !important;
  background-image: none !important;
}
.person-matrix-table thead .header-blank {
  color: transparent;
}
.person-matrix-table thead .person-header,
.person-matrix-table thead .summary-col:not(.header-blank),
.person-matrix-table thead .total-col:not(.header-blank) {
  vertical-align: middle;
  color: #111827;
}
.person-matrix-table .project-name span {
  min-height: 64px !important;
}
.person-matrix-table th,
.person-matrix-table td {
  border-color: #cfd8e3 !important;
}
.person-matrix-table thead th {
  border-color: #c4cfda !important;
}
.person-matrix-detail-card {
  width: min(1500px, 98vw);
}
.person-matrix-detail-table {
  min-width: 1450px !important;
  table-layout: fixed;
}
.person-matrix-detail-table .col-date {
  width: 64px !important;
  white-space: nowrap;
}
.person-matrix-detail-table .col-name {
  width: 58px !important;
  white-space: nowrap;
}
.person-matrix-detail-table .col-project {
  width: 250px !important;
}
.person-matrix-detail-table .col-job {
  width: 140px !important;
}
.person-matrix-detail-table .col-hours {
  width: 44px !important;
}
.person-matrix-detail-table .col-remark {
  width: 900px !important;
  min-width: 900px !important;
  white-space: pre-wrap;
  word-break: break-word;
}
.person-matrix-detail-table .col-remark.long-remark {
  font-size: 12px;
  line-height: 1.22;
}
.project-summary-filter {
  grid-template-columns: 110px 145px 160px minmax(160px, 1fr) minmax(180px, 1fr) auto auto auto;
}
.summary-detail-table th,
.summary-detail-table td {
  border: 1px solid #dbe2e8;
}

/* ERP 8.5 xls-like input colors: fixed row shading only for holidays/vacation */
.timesheet-table tbody tr:not(.offday):not(.vacation-row) td,
.timesheet-table tbody tr.has-value:not(.offday):not(.vacation-row) td,
.timesheet-table tbody tr.dirty:not(.offday):not(.vacation-row) td,
.timesheet-table tbody tr.warning:not(.offday):not(.vacation-row) td,
.timesheet-table tbody tr.error:not(.offday):not(.vacation-row) td,
.timesheet-table tbody tr:not(.offday):not(.vacation-row):hover td,
.timesheet-table tbody tr.has-value:not(.offday):not(.vacation-row):hover td,
.timesheet-table tbody tr.dirty:not(.offday):not(.vacation-row):hover td,
.timesheet-table tbody tr.warning:not(.offday):not(.vacation-row):hover td,
.timesheet-table tbody tr.error:not(.offday):not(.vacation-row):hover td {
  background: #ffffff !important;
}
.timesheet-table tbody tr.offday td,
.timesheet-table tbody tr.weekend td,
.timesheet-table tbody tr.holiday td,
.timesheet-table tbody tr.offday.has-value td,
.timesheet-table tbody tr.offday.dirty td,
.timesheet-table tbody tr.offday.warning td,
.timesheet-table tbody tr.offday.error td,
.timesheet-table tbody tr.weekend.has-value td,
.timesheet-table tbody tr.weekend.dirty td,
.timesheet-table tbody tr.weekend.warning td,
.timesheet-table tbody tr.weekend.error td,
.timesheet-table tbody tr.holiday.has-value td,
.timesheet-table tbody tr.holiday.dirty td,
.timesheet-table tbody tr.holiday.warning td,
.timesheet-table tbody tr.holiday.error td,
.timesheet-table tbody tr.offday:hover td,
.timesheet-table tbody tr.weekend:hover td,
.timesheet-table tbody tr.holiday:hover td {
  background: rgb(255, 255, 0) !important;
}
.timesheet-table tbody tr.vacation-row td,
.timesheet-table tbody tr.vacation-row.offday td,
.timesheet-table tbody tr.vacation-row.weekend td,
.timesheet-table tbody tr.vacation-row.holiday td,
.timesheet-table tbody tr.vacation-row.has-value td,
.timesheet-table tbody tr.vacation-row.dirty td,
.timesheet-table tbody tr.vacation-row.warning td,
.timesheet-table tbody tr.vacation-row.error td,
.timesheet-table tbody tr.vacation-row:hover td {
  background: rgb(255, 191, 143) !important;
}
.timesheet-table tbody tr:not(.offday):not(.vacation-row) input,
.timesheet-table tbody tr:not(.offday):not(.vacation-row) textarea,
.timesheet-table tbody tr:not(.offday):not(.vacation-row) select {
  background-color: #ffffff !important;
}
.timesheet-table tbody tr.offday input,
.timesheet-table tbody tr.weekend input,
.timesheet-table tbody tr.holiday input,
.timesheet-table tbody tr.offday textarea,
.timesheet-table tbody tr.weekend textarea,
.timesheet-table tbody tr.holiday textarea,
.timesheet-table tbody tr.offday select,
.timesheet-table tbody tr.weekend select,
.timesheet-table tbody tr.holiday select {
  background-color: rgb(255, 255, 0) !important;
}
.timesheet-table tbody tr.vacation-row input,
.timesheet-table tbody tr.vacation-row textarea,
.timesheet-table tbody tr.vacation-row select,
.timesheet-table tbody tr.vacation-row.offday input,
.timesheet-table tbody tr.vacation-row.offday textarea,
.timesheet-table tbody tr.vacation-row.offday select {
  background-color: rgb(255, 191, 143) !important;
}
.timesheet-table tbody tr.offday .date-cell,
.timesheet-table tbody tr.offday .weekday-cell,
.timesheet-table tbody tr.weekend .date-cell,
.timesheet-table tbody tr.weekend .weekday-cell,
.timesheet-table tbody tr.holiday .date-cell,
.timesheet-table tbody tr.holiday .weekday-cell,
.timesheet-table tbody tr.offday .holiday-sub,
.timesheet-table tbody tr.weekend .holiday-sub,
.timesheet-table tbody tr.holiday .holiday-sub {
  color: #c1121f !important;
  font-weight: 850;
}

/* ERP 8.6 full-row XLS-style colors and no focus/hover tint */
.timesheet-table tbody td.is-focused,
.timesheet-table tbody tr:hover td,
.timesheet-table tbody tr.has-value:hover td,
.timesheet-table tbody tr.dirty:hover td,
.timesheet-table tbody tr.warning:hover td,
.timesheet-table tbody tr.error:hover td {
  outline: none !important;
  box-shadow: none !important;
}

/* Base rows stay plain white regardless of value/save/error state. */
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row) td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row).has-value td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row).dirty td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row).warning td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row).error td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):hover td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row) td.is-focused {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Weekend / holiday rows: whole row, not only controls. */
.timesheet-table tbody tr.offday td,
.timesheet-table tbody tr.weekend td,
.timesheet-table tbody tr.holiday td,
.timesheet-table tbody tr.offday.has-value td,
.timesheet-table tbody tr.weekend.has-value td,
.timesheet-table tbody tr.holiday.has-value td,
.timesheet-table tbody tr.offday.dirty td,
.timesheet-table tbody tr.weekend.dirty td,
.timesheet-table tbody tr.holiday.dirty td,
.timesheet-table tbody tr.offday.warning td,
.timesheet-table tbody tr.weekend.warning td,
.timesheet-table tbody tr.holiday.warning td,
.timesheet-table tbody tr.offday.error td,
.timesheet-table tbody tr.weekend.error td,
.timesheet-table tbody tr.holiday.error td,
.timesheet-table tbody tr.offday:hover td,
.timesheet-table tbody tr.weekend:hover td,
.timesheet-table tbody tr.holiday:hover td,
.timesheet-table tbody tr.offday td.is-focused,
.timesheet-table tbody tr.weekend td.is-focused,
.timesheet-table tbody tr.holiday td.is-focused {
  background: rgb(255, 255, 0) !important;
  background-color: rgb(255, 255, 0) !important;
}

/* Vacation rows override weekend/holiday rows. */
.timesheet-table tbody tr.vacation-row td,
.timesheet-table tbody tr.vacation-row.offday td,
.timesheet-table tbody tr.vacation-row.weekend td,
.timesheet-table tbody tr.vacation-row.holiday td,
.timesheet-table tbody tr.vacation-row.has-value td,
.timesheet-table tbody tr.vacation-row.dirty td,
.timesheet-table tbody tr.vacation-row.warning td,
.timesheet-table tbody tr.vacation-row.error td,
.timesheet-table tbody tr.vacation-row:hover td,
.timesheet-table tbody tr.vacation-row td.is-focused {
  background: rgb(255, 191, 143) !important;
  background-color: rgb(255, 191, 143) !important;
}

/* Inputs/textarea/select follow the row color, so the entire row looks like the old XLS template. */
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row) input,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row) textarea,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row) select {
  background: #ffffff !important;
  background-color: #ffffff !important;
}
.timesheet-table tbody tr.offday input,
.timesheet-table tbody tr.weekend input,
.timesheet-table tbody tr.holiday input,
.timesheet-table tbody tr.offday textarea,
.timesheet-table tbody tr.weekend textarea,
.timesheet-table tbody tr.holiday textarea,
.timesheet-table tbody tr.offday select,
.timesheet-table tbody tr.weekend select,
.timesheet-table tbody tr.holiday select {
  background: rgb(255, 255, 0) !important;
  background-color: rgb(255, 255, 0) !important;
}
.timesheet-table tbody tr.vacation-row input,
.timesheet-table tbody tr.vacation-row textarea,
.timesheet-table tbody tr.vacation-row select,
.timesheet-table tbody tr.vacation-row.offday input,
.timesheet-table tbody tr.vacation-row.offday textarea,
.timesheet-table tbody tr.vacation-row.offday select {
  background: rgb(255, 191, 143) !important;
  background-color: rgb(255, 191, 143) !important;
}

/* Do not tint cells on mouse hover/focus. Keep only normal input borders. */
.timesheet-table tbody tr:hover input,
.timesheet-table tbody tr:hover textarea,
.timesheet-table tbody tr:hover select,
.timesheet-table tbody td.is-focused input,
.timesheet-table tbody td.is-focused textarea,
.timesheet-table tbody td.is-focused select {
  box-shadow: none !important;
}

/* ERP 8.7 strict full-row background priority: vacation > indirect > holiday/weekend > normal */
.timesheet-table tbody td.is-focused,
.timesheet-table tbody td.is-focused *,
.timesheet-table tbody tr:hover td,
.timesheet-table tbody tr:hover input,
.timesheet-table tbody tr:hover textarea,
.timesheet-table tbody tr:hover select {
  outline: none !important;
  box-shadow: none !important;
}

.timesheet-table tbody tr td,
.timesheet-table tbody tr input,
.timesheet-table tbody tr textarea,
.timesheet-table tbody tr select {
  transition: none !important;
}

/* Normal rows: no color change by value/save/warning/error/hover/focus */
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row) td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row):hover td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row) td.is-focused,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row).has-value td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row).dirty td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row).warning td,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row).error td {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Holiday/weekend rows: full row yellow */
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) td,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) td,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) td,
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row):hover td,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row):hover td,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row):hover td,
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) td.is-focused,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) td.is-focused,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) td.is-focused {
  background: rgb(255, 255, 0) !important;
  background-color: rgb(255, 255, 0) !important;
}

/* Indirect job code rows: full row greenish, overrides holiday/weekend unless vacation */
.timesheet-table tbody tr.indirect-row:not(.vacation-row) td,
.timesheet-table tbody tr.indirect-row:not(.vacation-row):hover td,
.timesheet-table tbody tr.indirect-row:not(.vacation-row) td.is-focused,
.timesheet-table tbody tr.indirect-row:not(.vacation-row).has-value td,
.timesheet-table tbody tr.indirect-row:not(.vacation-row).dirty td,
.timesheet-table tbody tr.indirect-row:not(.vacation-row).warning td,
.timesheet-table tbody tr.indirect-row:not(.vacation-row).error td {
  background: rgb(216, 228, 188) !important;
  background-color: rgb(216, 228, 188) !important;
}

/* Vacation rows: full row salmon, highest priority */
.timesheet-table tbody tr.vacation-row td,
.timesheet-table tbody tr.vacation-row:hover td,
.timesheet-table tbody tr.vacation-row td.is-focused,
.timesheet-table tbody tr.vacation-row.has-value td,
.timesheet-table tbody tr.vacation-row.dirty td,
.timesheet-table tbody tr.vacation-row.warning td,
.timesheet-table tbody tr.vacation-row.error td,
.timesheet-table tbody tr.vacation-row.offday td,
.timesheet-table tbody tr.vacation-row.weekend td,
.timesheet-table tbody tr.vacation-row.holiday td,
.timesheet-table tbody tr.vacation-row.indirect-row td {
  background: rgb(255, 191, 143) !important;
  background-color: rgb(255, 191, 143) !important;
}

/* Controls inherit row color. */
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row) input,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row) textarea,
.timesheet-table tbody tr:not(.offday):not(.weekend):not(.holiday):not(.vacation-row):not(.indirect-row) select {
  background: #ffffff !important;
  background-color: #ffffff !important;
}
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) input,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) input,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) input,
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) textarea,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) textarea,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) textarea,
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) select,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) select,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) select {
  background: rgb(255, 255, 0) !important;
  background-color: rgb(255, 255, 0) !important;
}
.timesheet-table tbody tr.indirect-row:not(.vacation-row) input,
.timesheet-table tbody tr.indirect-row:not(.vacation-row) textarea,
.timesheet-table tbody tr.indirect-row:not(.vacation-row) select {
  background: rgb(216, 228, 188) !important;
  background-color: rgb(216, 228, 188) !important;
}
.timesheet-table tbody tr.vacation-row input,
.timesheet-table tbody tr.vacation-row textarea,
.timesheet-table tbody tr.vacation-row select {
  background: rgb(255, 191, 143) !important;
  background-color: rgb(255, 191, 143) !important;
}

/* ERP 8.8 project default TASK mismatch warning */
.timesheet-table .task-input.task-mismatch {
  color: #c1121f !important;
  font-weight: 850;
  border-color: #c1121f !important;
  box-shadow: inset 0 0 0 1px #c1121f !important;
}
.timesheet-table tr.offday .task-input.task-mismatch,
.timesheet-table tr.weekend .task-input.task-mismatch,
.timesheet-table tr.holiday .task-input.task-mismatch,
.timesheet-table tr.vacation-row .task-input.task-mismatch,
.timesheet-table tr.indirect-row .task-input.task-mismatch {
  color: #c1121f !important;
}

/* ERP 8.9 hard inline/full-row color enforcement fallback */
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) > *,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) > *,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) > * {
  background-color: rgb(255, 255, 0) !important;
}
.timesheet-table tbody tr.indirect-row:not(.vacation-row) > * {
  background-color: rgb(216, 228, 188) !important;
}
.timesheet-table tbody tr.vacation-row > * {
  background-color: rgb(255, 191, 143) !important;
}
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) input,
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) textarea,
.timesheet-table tbody tr.offday:not(.vacation-row):not(.indirect-row) select,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) input,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) textarea,
.timesheet-table tbody tr.weekend:not(.vacation-row):not(.indirect-row) select,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) input,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) textarea,
.timesheet-table tbody tr.holiday:not(.vacation-row):not(.indirect-row) select {
  background-color: rgb(255, 255, 0) !important;
}
.timesheet-table tbody tr.indirect-row:not(.vacation-row) input,
.timesheet-table tbody tr.indirect-row:not(.vacation-row) textarea,
.timesheet-table tbody tr.indirect-row:not(.vacation-row) select {
  background-color: rgb(216, 228, 188) !important;
}
.timesheet-table tbody tr.vacation-row input,
.timesheet-table tbody tr.vacation-row textarea,
.timesheet-table tbody tr.vacation-row select {
  background-color: rgb(255, 191, 143) !important;
}
.timesheet-table tbody tr td.is-focused,
.timesheet-table tbody tr:hover td,
.timesheet-table tbody tr:hover input,
.timesheet-table tbody tr:hover textarea,
.timesheet-table tbody tr:hover select {
  outline: none !important;
  box-shadow: none !important;
}

/* ERP 9.1 PM UI refresh */
.pm-page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f2f8;
  color: #356f86;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.pm-hero-card {
  background: linear-gradient(180deg, #f4f9fc 0%, #ffffff 100%);
  border: 1px solid #d7e6ef;
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: 0 10px 28px rgb(15 23 42 / 6%);
  margin-bottom: 16px;
}
.pm-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.pm-hero-title-wrap h1 {
  margin: 0;
  line-height: 1.25;
}
.pm-hero-meta {
  margin-top: 12px;
  gap: 8px;
}
.pm-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d6e5ef;
  color: #4b5563;
}
.pm-month-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pm-month-nav .button {
  min-width: 76px;
  text-align: center;
}
.pm-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.pm-stat-strip-wide {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}
.pm-stat-card {
  border: 1px solid #d7e4ee;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 70%);
}
.pm-stat-card .label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.pm-stat-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  color: var(--text);
}
.pm-stat-card strong small {
  font-size: 14px;
  color: var(--muted);
  margin-left: 2px;
}
.pm-filter-card-enhanced {
  display: grid;
  grid-template-columns: 100px 80px 160px minmax(280px, 1fr) auto;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #dbe6ee;
  border-radius: 16px;
  background: #fbfdfe;
  box-shadow: 0 4px 16px rgb(15 23 42 / 4%);
}
.pm-filter-search-wide {
  min-width: 0;
}
.pm-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.pm-filter-actions .primary,
.pm-filter-actions .button {
  min-width: 92px;
  justify-content: center;
}
.pm-section-grid-top {
  margin-top: 18px;
}
.pm-card {
  border: 1px solid #dbe6ee;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px 16px 14px;
  margin-top: 16px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 5%);
}
.pm-card-emphasis {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.pm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.pm-card-header h2 {
  margin: 0;
  font-size: 18px;
}
.pm-card-header .muted {
  margin: 4px 0 0;
  font-size: 12px;
}
.pm-list-card {
  margin-top: 18px;
}
.pm-table-wrap,
.pm-detail-wrap,
.compact-wrap {
  border: 1px solid #dbe6ee;
  border-radius: 12px;
  background: #fff;
}
.pm-project-table thead th,
.pm-detail-table thead th,
.compact-table thead th {
  background: #edf5f9;
}
.pm-project-table tbody tr:nth-child(even) td,
.pm-detail-table tbody tr:nth-child(even) td,
.compact-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}
.pm-project-table tbody tr:hover td,
.pm-detail-table tbody tr:hover td,
.compact-table tbody tr:hover td {
  background: #f3f8fb;
}
.pm-project-table .project-name-cell {
  min-width: 420px;
}
.pm-detail-card .pm-detail-wrap {
  max-height: 620px;
}
.pm-detail-table {
  min-width: 1240px;
}
.pm-detail-table .remark-cell {
  min-width: 320px;
  white-space: pre-wrap;
  line-height: 1.45;
}
@media (max-width: 1280px) {
  .pm-filter-card-enhanced {
    grid-template-columns: 100px 80px 160px minmax(220px, 1fr);
  }
  .pm-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
@media (max-width: 960px) {
  .pm-hero-top {
    flex-direction: column;
  }
  .pm-stat-strip,
  .pm-stat-strip-wide {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .pm-filter-card-enhanced {
    grid-template-columns: 1fr 1fr;
  }
  .pm-filter-search-wide,
  .pm-filter-actions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .pm-hero-card {
    padding: 16px;
  }
  .pm-stat-strip,
  .pm-stat-strip-wide {
    grid-template-columns: 1fr;
  }
  .pm-filter-card-enhanced {
    grid-template-columns: 1fr;
  }
  .pm-month-nav {
    width: 100%;
  }
}

/* ERP 9.3 person matrix sticky/name/default-selection polish */
.person-matrix-wrap {
  position: relative;
  isolation: isolate;
}
.person-matrix-table thead th {
  z-index: 30 !important;
  background-clip: padding-box;
}
.person-matrix-table thead tr.task-row th {
  top: 0 !important;
}
.person-matrix-table thead tr:nth-child(2) th {
  top: 28px !important;
}
.person-matrix-table thead tr:nth-child(3) th {
  top: 56px !important;
}
.person-matrix-table thead th[rowspan="3"] {
  top: 0 !important;
  height: 132px !important;
  min-height: 132px !important;
  vertical-align: middle !important;
  color: #111827 !important;
  background-color: #eadff1 !important;
  background-image: none !important;
}
.person-matrix-table thead .sticky-person[rowspan="3"] {
  z-index: 80 !important;
  box-shadow: inset -2px 0 #8e83a6, inset 0 -1px #c4cfda;
}
.person-matrix-table tbody .sticky-person {
  z-index: 12 !important;
}
.person-matrix-table tfoot .sticky-person {
  z-index: 70 !important;
}
.person-matrix-table .person-name {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 30px;
  padding: 4px 8px !important;
  white-space: nowrap;
}
.person-matrix-table .person-name .person-display-name,
.person-matrix-table .person-name .person-employee-no {
  display: inline !important;
  vertical-align: baseline;
}
.person-matrix-table .person-name .person-display-name {
  margin-right: 6px;
}
.person-matrix-table .person-name .person-employee-no {
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  margin-top: 0 !important;
}
.person-matrix-table .sticky-person {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
}
.person-matrix-table tbody tr:hover .sticky-person {
  background: #f6f0ff !important;
}
