:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #22354b;
  background: #f5f7fa;
  font-size: 13px;
}
* {
  user-select: auto;
  -webkit-user-select: auto;
}
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
}
button,
select,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #47a3e8;
  outline-offset: 2px;
}
.header {
  flex: none;
  background: #172c45;
  color: white;
  padding: 12px 18px;
  border-bottom: 3px solid #21959e;
}
.headerWrapper {
  align-items: center;
  gap: 18px;
}
.pmsLogo {
  min-width: 70px;
}
.pmsLogo a {
  color: white;
  font-size: 26px;
  letter-spacing: -1px;
}
.navbarButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.headerButtons {
  background: #243e5b;
  border: 1px solid #456079;
  border-radius: 5px;
  color: #edf5fe;
  font-size: 12px;
  padding: 7px 10px;
  min-width: 0;
  margin: 0;
}
.headerButtons:hover {
  background: #355573;
}
#loadXER {
  background: #16838d;
  border-color: #16838d;
}
#navbarIcon {
  display: none;
}
.viewer-toolbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px 8px;
  background: white;
}
.viewer-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #52647a;
}
.viewer-toolbar button,
.viewer-toolbar select,
.viewer-toolbar input {
  border: 1px solid #d5dde6;
  border-radius: 5px;
  background: #fff;
  min-height: 32px;
  padding: 6px 9px;
  color: #22354b;
}
#projectSelect {
  max-width: 180px;
}
#activitySearch {
  width: 225px;
}
#fileEncoding {
  max-width: 145px;
}
.viewer-toolbar button:hover {
  background: #edf4fb;
}
.viewer-status {
  background: white;
  color: #64748b;
  padding: 4px 18px 12px;
  flex: none;
  font-size: 12px;
}
.viewer-status.error {
  color: #a52626;
  background: #fff1f1;
}
#ganttChart {
  --split: 52%;
  display: grid;
  grid-template-columns: minmax(0, var(--split)) 8px minmax(0, 1fr);
  flex: 1;
  min-height: 120px;
  margin: 0 16px;
  height: auto;
  overflow: hidden;
  border: 1px solid #d4dce5;
  background: white;
  border-radius: 6px;
}
.schedule-pane {
  min-width: 0;
  min-height: 0;
  overflow: scroll;
  scrollbar-gutter: stable;
  position: relative;
  overscroll-behavior: contain;
  overflow-anchor: none;
}
#tablePane {
  background: #fff;
}
#ganttColumns {
  display: block;
  width: max-content;
  min-width: 100%;
  flex: none;
}
#ganttTable {
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  background: white;
}
#ganttTable thead {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #edf2f7;
}
#ganttTable th {
  height: 48px;
  max-height: 48px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #dce3eb;
  border-bottom: 1px solid #c8d3df;
  white-space: nowrap;
  text-align: left;
  color: #364b65;
  font-size: 11px;
}
.column-sort {
  background: none;
  border: 0;
  color: inherit;
  font-weight: 600;
  width: 100%;
  text-align: left;
}
.column-sort:after {
  content: " ↕";
  color: #8f9cae;
}
#ganttTable td {
  box-sizing: border-box;
  height: 32px;
  max-height: 32px;
  line-height: 31px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid #e5eaf0;
  border-right: 1px solid #edf0f4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
  font-size: 12px;
}
#ganttTable tr.activity-row:nth-child(2n) {
  background: #fafbfd;
}
#ganttTable .selected-row td {
  background: #dbeafe !important;
}
#ganttTable .wbs-row td {
  background: #edf2f6;
  font-weight: 600;
  color: #3b5068;
}
.wbs-toggle {
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  height: 30px;
  line-height: 30px;
  text-align: left;
  padding: 0;
}
#ganttTable .virtual-spacer td {
  padding: 0;
  border: 0;
  line-height: 0;
  max-height: none;
}
#ganttBarchart {
  display: block;
  position: relative;
  flex: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  overflow: visible;
}
#calendarRow {
  height: 48px;
  display: flex;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #edf2f7;
  border-bottom: 1px solid #c8d3df;
}
.timeline-tick {
  height: 48px;
  flex: none;
  border-left: 1px solid #d0d9e4;
  padding: 16px 5px;
  font-size: 10px;
  color: #526780;
  overflow: hidden;
  white-space: nowrap;
}
#ganttSvg {
  display: block;
  overflow: hidden;
  background-image:
    linear-gradient(to right, #edf1f5 1px, transparent 1px),
    linear-gradient(to bottom, #e5eaf0 1px, transparent 1px);
  background-repeat: repeat;
}
#ganttSvg g {
  cursor: pointer;
}
.row-hit {
  stroke: none;
}
.splitter {
  background: #e0e7ef;
  cursor: col-resize;
  touch-action: none;
  position: relative;
}
.splitter:after {
  content: "";
  position: absolute;
  top: 45%;
  left: 3px;
  width: 2px;
  height: 35px;
  background: #91a2b6;
  border-radius: 2px;
}
.splitter:hover {
  background: #b9d3e8;
}
#ganttChart.table-only {
  grid-template-columns: 1fr;
}
#ganttChart.table-only #chartPane,
#ganttChart.table-only .splitter {
  display: none;
}
.viewer-legend {
  display: flex;
  gap: 18px;
  flex: none;
  flex-wrap: wrap;
  padding: 12px 18px;
  font-size: 11px;
  color: #607187;
}
.viewer-legend span[class]:before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 7px;
  border-radius: 2px;
  margin-right: 5px;
}
.legend-planned:before {
  background: var(--barColorNotStarted, #3484c9);
}
.legend-progress:before {
  background: var(--barColorOngoing, #facc15);
}
.legend-complete:before {
  background: var(--barColorCompleted, #dc2626);
}
.modals {
  z-index: 20 !important;
  max-height: 85vh !important;
  max-width: calc(100vw - 32px) !important;
  overflow: auto !important;
  border-radius: 8px;
  box-shadow: 0 20px 80px #172c4540;
  background: white;
}
.modals .modalHeader {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #233e5a;
  color: white;
  min-height: 38px;
}
.modalclose {
  cursor: pointer;
  padding: 6px 10px;
}
.hide {
  display: none !important;
}
#parsingReportScreen {
  padding: 15px;
  white-space: pre-wrap;
  line-height: 1.6;
  font-family: inherit;
  max-height: 65vh;
  overflow: auto;
}
#calendarIDList {
  max-height: 250px;
  overflow: auto;
}
#calendarModal {
  background: white;
}
.filterHighlight td {
  background: #fff0b3;
}
#sampleProjects li {
  padding: 8px;
  cursor: pointer;
}
#sampleProjects li:hover {
  background: #e7f2fa;
}
@media (max-width: 750px) {
  .header {
    padding: 8px;
  }
  .headerWrapper {
    gap: 6px;
  }
  .headerButtons {
    font-size: 11px;
    padding: 6px;
  }
  .navbarButtons {
    display: flex !important;
  }
  .viewer-toolbar {
    padding: 8px;
    gap: 5px;
  }
  .viewer-toolbar label {
    font-size: 10px;
  }
  #activitySearch {
    width: 170px;
  }
  #ganttChart {
    margin: 0 6px;
    --split: 55%;
  }
  .viewer-legend {
    gap: 8px;
    padding: 8px;
    font-size: 10px;
  }
  .viewer-status {
    padding: 4px 8px 8px;
  }
  .modals {
    left: 8px !important;
    top: 5vh !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }
}
#printSchedule {
  display: none;
}
@media print {
  html,
  body {
    height: auto;
    overflow: visible;
    background: white;
  }
  body > *:not(#printSchedule) {
    display: none !important;
  }
  #printSchedule {
    display: block !important;
  }
  #printSchedule table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 8pt;
  }
  #printSchedule th,
  #printSchedule td {
    border: 1px solid #ccd3dc;
    padding: 4px;
    overflow-wrap: anywhere;
  }
  #printSchedule thead {
    display: table-header-group;
  }
  #printSchedule tr {
    break-inside: avoid;
  }
  #printSchedule .print-gantt {
    width: 38%;
  }
  #printSchedule svg {
    display: block;
    width: 100%;
    height: 20px;
  }
  #printSchedule h1 {
    font-size: 16pt;
    margin-bottom: 8px;
  }
  #printSchedule p {
    font-size: 9pt;
    margin-bottom: 8px;
  }
  @page {
    size: A3 landscape;
    margin: 10mm;
  }
}

.bar-color-settings {
  padding: 20px;
  max-width: 560px;
}
.bar-color-settings p {
  line-height: 1.5;
  margin: 0 0 18px;
  color: #52647a;
}
.bar-color-settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.bar-color-settings small {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}
.bar-color-settings input[type="color"] {
  width: 60px;
  height: 36px;
  padding: 2px;
  border: 1px solid #c8d3df;
  border-radius: 5px;
  cursor: pointer;
}
.bar-color-settings button {
  border: 1px solid #c8d3df;
  background: #f5f7fa;
  padding: 8px 12px;
  border-radius: 5px;
  margin-bottom: 16px;
}
/* Keep format actions in their own row on every tab, including short panels. */
#formatSettings {
  width: min(680px, 94vw);
  min-height: 0;
  max-height: 85vh;
  overflow: hidden;
}
#formatSettings:not(.hide) {
  display: flex;
  flex-direction: column;
}
#formatSettings_Header,
#formatSettings #tagBar,
#settingsConfirmDefault {
  flex-shrink: 0;
}
#formatSettings #tagBar {
  flex-wrap: wrap;
}
#formatSettings_Wrapper {
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}
#settingsConfirmDefault {
  position: static;
  background: white;
  border-top: 1px solid #dbe2ea;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
}
#settingsConfirmDefault .footerButton {
  margin: 0;
}
