/* ERP 화면 공통 입력·선택·버튼 기준 */
body:not(.pdf-view) .print-management-page input,
body:not(.pdf-view) .print-management-page select,
body:not(.pdf-view) .print-management-page textarea,
body:not(.pdf-view) .sales-page input,
body:not(.pdf-view) .sales-page select,
body:not(.pdf-view) .sales-page textarea,
body:not(.pdf-view) .management-page input,
body:not(.pdf-view) .management-page select,
body:not(.pdf-view) .management-page textarea,
body:not(.pdf-view) .rental-page input,
body:not(.pdf-view) .rental-page select,
body:not(.pdf-view) .rental-page textarea {
  box-sizing: border-box;
  min-height: 30px;
  border: 1px solid #9fb5ca;
  border-radius: 0;
  color: #071a2f;
  font: inherit;
  line-height: 1.35;
}

body:not(.pdf-view) .print-management-page input::placeholder,
body:not(.pdf-view) .print-management-page textarea::placeholder,
body:not(.pdf-view) .sales-page input::placeholder,
body:not(.pdf-view) .sales-page textarea::placeholder,
body:not(.pdf-view) .management-page input::placeholder,
body:not(.pdf-view) .management-page textarea::placeholder,
body:not(.pdf-view) .rental-page input::placeholder,
body:not(.pdf-view) .rental-page textarea::placeholder {
  color: #64748b;
  font-size: inherit;
  font-style: normal;
  opacity: 1;
}

body:not(.pdf-view) .print-management-page input[type="checkbox"],
body:not(.pdf-view) .sales-page input[type="checkbox"],
body:not(.pdf-view) .management-page input[type="checkbox"],
body:not(.pdf-view) .rental-page input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #176988;
}

/* 데이터 셀은 버튼 장식을 제거하고 셀 전체를 탐색 영역으로 사용합니다. */
html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) td:has(.table-link:is(.customer-estimate-link, .estimate-title-link, .estimate-edit-link, .item-name-link, .project-estimate-link, .quote-cell-link)) {
  position: relative;
}

html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) td .table-link:is(.customer-estimate-link, .estimate-title-link, .estimate-edit-link, .item-name-link, .project-estimate-link, .quote-cell-link) {
  position: static !important;
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #25485e !important;
  font: inherit !important;
  line-height: inherit !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-decoration: none !important;
  cursor: pointer;
}

html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) td .table-link:is(.customer-estimate-link, .estimate-title-link, .estimate-edit-link, .item-name-link, .project-estimate-link, .quote-cell-link)::after {
  content: '';
  position: absolute;
  inset: 0;
  cursor: pointer;
}

html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) td:has(.table-link:is(.customer-estimate-link, .estimate-title-link, .estimate-edit-link, .item-name-link, .project-estimate-link, .quote-cell-link)):is(:hover, :focus-within) {
  background-color: #edf3f7 !important;
}

html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) td .table-link:is(.customer-estimate-link, .estimate-title-link, .estimate-edit-link, .item-name-link, .project-estimate-link, .quote-cell-link):is(:hover, :focus-visible) {
  color: #0d5b80 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) td .table-link:is(.customer-estimate-link, .estimate-title-link, .estimate-edit-link, .item-name-link, .project-estimate-link, .quote-cell-link):focus-visible::after {
  outline: 2px solid #216b90;
  outline-offset: -2px;
}

/* 상세 제목의 수정 링크도 텍스트 모양을 유지하고 긴 제목은 줄바꿈합니다. */
html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) .detail-panel-head > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) .detail-panel-head .estimate-edit-link {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  white-space: normal !important;
  text-decoration: none;
}
html body:not(.pdf-view) :is(main.sheet.print-management-page:not(.sales-page), main.sheet.rental-page #app) .detail-panel-head .estimate-edit-link:is(:hover, :focus-visible) {
  color: #0d5b80 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body:not(.pdf-view) .quote-customer-totals {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}
body:not(.pdf-view) .quote-customer-totals td {
  width: 33.333333% !important;
  padding: 8px 6px !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
body:not(.pdf-view) .quote-customer-totals td > span,
body:not(.pdf-view) .quote-customer-totals td > strong { display: block; line-height: 1.5; }

/* 견적목록만 새 기간 이미지를 사용하며 다른 메뉴의 기간 아이콘은 유지합니다. */
html body:not(.pdf-view) :is(#estimateListFilters, #rentalEstimateFilters) .action-icon-period::before {
  background-image: url('../images/quote-period.png?v=20261015-bold-period-1');
}

body:not(.pdf-view) .table-link,
body:not(.pdf-view) .status-badge,
body:not(.pdf-view) .tag,
body:not(.pdf-view) td > button,
body:not(.pdf-view) td > .button {
  box-sizing: border-box;
  min-height: 28px;
  line-height: 26px;
  white-space: nowrap;
}

/* 모바일 왼쪽메뉴는 렌탈 메뉴와 같은 상단 가로형 구조를 사용합니다. */
@media screen and (max-width: 980px) {
  body:not(.pdf-view) main.sheet.print-management-page {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.pdf-view) main.sheet.print-management-page > aside.print-side-nav,
  html body:not(.pdf-view) main.sheet.sales-page.print-management-page > aside.print-side-nav.sales-side-nav,
  html body:not(.pdf-view) main.sheet.management-page.print-management-page > aside.print-side-nav.management-side-nav,
  html body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout > aside.print-side-nav.management-side-nav {
    grid-column: 1 / -1 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 8px !important;
    border: 1px solid #1d3557 !important;
    border-radius: 8px !important;
    background: #102a43 !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body:not(.pdf-view) main.sheet.print-management-page > aside.print-side-nav > strong,
  html body:not(.pdf-view) main.sheet.sales-page.print-management-page > aside.print-side-nav.sales-side-nav > strong,
  html body:not(.pdf-view) main.sheet.management-page.print-management-page > aside.print-side-nav.management-side-nav > strong,
  html body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout > aside.print-side-nav.management-side-nav > strong {
    display: none !important;
  }

  body:not(.pdf-view) main.sheet.print-management-page > aside.print-side-nav > .print-side-link,
  html body:not(.pdf-view) main.sheet.print-management-page:not(.sales-page):not(.management-page) > aside.print-side-nav:not(.management-side-nav) > a.print-side-link,
  html body:not(.pdf-view) main.sheet.sales-page.print-management-page > aside.print-side-nav.sales-side-nav > button.print-side-link.sales-view-button,
  html body:not(.pdf-view) main.sheet.management-page.print-management-page > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button,
  html body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button {
    display: flex !important;
    flex: 1 1 0 !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #dbeafe !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  body:not(.pdf-view) main.sheet.print-management-page > aside.print-side-nav > .print-side-link.active,
  body:not(.pdf-view) main.sheet.print-management-page > aside.print-side-nav > .print-side-link:hover,
  html body:not(.pdf-view) main.sheet.sales-page.print-management-page > aside.print-side-nav.sales-side-nav > button.print-side-link.sales-view-button.active,
  html body:not(.pdf-view) main.sheet.sales-page.print-management-page > aside.print-side-nav.sales-side-nav > button.print-side-link.sales-view-button:hover,
  html body:not(.pdf-view) main.sheet.management-page.print-management-page > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button.active,
  html body:not(.pdf-view) main.sheet.management-page.print-management-page > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button:hover,
  html body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button.active,
  html body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button:hover {
    background: #1d5d7d !important;
    color: #ffffff !important;
  }

  body:not(.pdf-view) main.sheet.print-management-page > aside.management-side-nav > .print-side-link,
  html body:not(.pdf-view) main.sheet.management-page.print-management-page > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button,
  html body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout > aside.print-side-nav.management-side-nav > a.print-side-link.management-view-button {
    flex: 0 0 calc((100% - 16px) / 5) !important;
    min-width: calc((100% - 16px) / 5) !important;
    padding: 0 4px !important;
    font-size: 11px !important;
  }

  body:not(.pdf-view) main.sheet.print-management-page > :not(.list-header):not(.print-side-nav) {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body:not(.pdf-view) main.sheet.rental-page #app .management-app-layout > :not(.management-side-nav) {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

.quote-project-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}

.quote-project-control.is-manual select {
  text-indent: 100%;
}

.quote-project-control.is-manual select option {
  color: #071a2f;
  text-indent: 0;
}

.quote-project-control [data-quote-project-name] {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - 28px) !important;
  height: 100% !important;
  min-width: 0;
  margin: 0 !important;
  box-sizing: border-box;
}

.quote-project-control [hidden] {
  display: none !important;
}

@media screen and (max-width: 760px) {
  body:not(.pdf-view) main.sheet > header.list-header .tabs,
  body:not(.pdf-view) main.sheet > header.list-header nav.tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  html body:not(.pdf-view) main.sheet > header.list-header > nav.tabs.no-print > .tab,
  html body:not(.pdf-view) main.sheet > header.list-header > nav.tabs.no-print > .tab-link {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    padding-right: 4px !important;
    padding-left: 4px !important;
    font-size: 12px !important;
  }

  body:not(.pdf-view) .print-management-page input,
  body:not(.pdf-view) .print-management-page select,
  body:not(.pdf-view) .print-management-page textarea,
  body:not(.pdf-view) .sales-page input,
  body:not(.pdf-view) .sales-page select,
  body:not(.pdf-view) .sales-page textarea,
  body:not(.pdf-view) .management-page input,
  body:not(.pdf-view) .management-page select,
  body:not(.pdf-view) .management-page textarea,
  body:not(.pdf-view) .rental-page input,
  body:not(.pdf-view) .rental-page select,
  body:not(.pdf-view) .rental-page textarea {
    font-size: 16px;
  }
}

/* 목록 검색은 빠른 기간과 직접 설정을 한 줄 도구 모음으로 묶습니다. */
body:not(.pdf-view) .compact-search-bar {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px !important;
  width: 100%;
  min-width: 0;
  margin: 0 0 6px !important;
  padding: 4px 6px !important;
  border: 1px solid #c8d6e5;
  background: #f7f9fc;
}

body:not(.pdf-view) .compact-search-bar .compact-search-input {
  flex: 1 1 190px;
  width: min(260px, 100%);
  min-width: 150px;
  max-width: 260px;
}

body:not(.pdf-view) .compact-search-bar > select {
  flex: 0 0 112px;
  width: 112px;
}

body:not(.pdf-view) .compact-search-bar .period-presets,
body:not(.pdf-view) .compact-search-bar .period-range {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

body:not(.pdf-view) .compact-search-bar .period-presets button,
body:not(.pdf-view) .compact-search-bar > button {
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 0;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

body:not(.pdf-view) .compact-search-bar .period-presets button.active {
  border-color: #174f72;
  background: #174f72;
  color: #fff;
}

body:not(.pdf-view) .compact-search-bar .period-range input[type="month"] {
  flex: 0 0 112px;
  width: 112px;
  min-width: 0;
  height: 28px;
  padding: 2px 5px;
  font-size: 11px;
}

body:not(.pdf-view) .compact-search-bar .period-range .range-separator {
  width: 12px;
  color: #42536a;
  font-size: 11px;
  text-align: center;
}

body:not(.pdf-view) .compact-search-bar input,
body:not(.pdf-view) .compact-search-bar select {
  height: 28px;
  min-height: 28px;
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 11px;
}

@media screen and (max-width: 760px) {
  body:not(.pdf-view) .compact-search-bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 4px !important;
  }

  body:not(.pdf-view) .compact-search-bar .compact-search-input {
    flex: 1 1 160px;
    max-width: none;
  }

  body:not(.pdf-view) .compact-search-bar > select {
    flex: 0 0 96px;
    width: 96px;
  }

  body:not(.pdf-view) .compact-search-bar .period-presets,
  body:not(.pdf-view) .compact-search-bar .period-range {
    order: 2;
  }

  body:not(.pdf-view) .compact-search-bar .period-presets button {
    padding-right: 2px;
    padding-left: 2px;
    font-size: 10px;
  }

  body:not(.pdf-view) .compact-search-bar .period-range input[type="month"] {
    flex-basis: 80px;
    width: 80px;
    padding-right: 2px;
    padding-left: 2px;
    font-size: 10px;
  }

  body:not(.pdf-view) .compact-search-bar input,
  body:not(.pdf-view) .compact-search-bar select,
  body:not(.pdf-view) .compact-search-bar button {
    font-size: 11px !important;
  }
}
