/* LTRCMS now uses the shared MASTER page, ledger, toolbar, dropdown, and
   pagination owners from erp-v97-sales-workbench.css. This file only keeps
   LTRCMS-specific modal affordances that are not page layout owners. */
#ltrcms .ltrcms-sync-disabled {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid #E7E4DE;
  border-radius: 8px;
  background: #F8F8F6;
  color: #7E8791;
  font-size: 12px;
  font-weight: 430;
}

#ltrcms .ltrcms-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

#ltrcms .ltrcms-detail-actions .btn[disabled] {
  opacity: .48;
  cursor: not-allowed;
}


#ltrcms .master-section {
  margin-top: 0;
}

body.erp-ui2 #ltrcms.ltrcms-batch5-page {
  padding-top: var(--workbench-page-top) !important;
}

body.erp-ui2 #ltrcms .ltrcms-batch5-toolbar {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: var(--workbench-toolbar-gap) !important;
  margin: 0 0 12px !important;
}

body.erp-ui2 #ltrcms .ltrcms-filterbar {
  margin-left: var(--workbench-context-control-margin, auto) !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

#ltrcms .ltrcms-filterbar .search,
#ltrcms .ltrcms-filterbar .batch2-select-field,
#ltrcms .ltrcms-filterbar .batch2-dropdown-host,
#ltrcms .ltrcms-filterbar .ltrcms-date-range,
#ltrcms .ltrcms-filterbar .add-btn {
  height: var(--workbench-control-height, 34px) !important;
  min-height: var(--workbench-control-height, 34px) !important;
}

body.erp-ui2 #ltrcms .ltrcms-filterbar .search {
  position: relative !important;
  width: var(--workbench-search-width) !important;
  flex: 0 0 var(--workbench-search-width) !important;
  padding: 0 11px 0 34px !important;
  border: 1px solid rgba(214, 222, 233, .86) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: none !important;
}

body.erp-ui2 #ltrcms .ltrcms-filterbar .search::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  opacity: .72;
  background: no-repeat center / 14px 14px url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m21 21-4.35-4.35' stroke='%238793A6' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='11' cy='11' r='6.2' stroke='%238793A6' stroke-width='1.8'/%3E%3C/svg%3E");
}

body.erp-ui2 #ltrcms .ltrcms-filterbar .search:focus-within {
  border-color: rgba(215, 19, 42, .18) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 0 0 2px rgba(215, 19, 42, .045) !important;
}

body.erp-ui2 #ltrcms .ltrcms-filterbar .search-field {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

body.erp-ui2 #ltrcms .ltrcms-filter-type {
  width: 138px !important;
  flex: 0 0 138px !important;
}

body.erp-ui2 #ltrcms .ltrcms-filter-status {
  width: 132px !important;
  flex: 0 0 132px !important;
}

body.erp-ui2 #ltrcms .ltrcms-filter-time {
  width: 122px !important;
  flex: 0 0 122px !important;
}


#ltrcms .ltrcms-date-range {
  display: inline-grid;
  grid-template-columns: 126px 126px;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

#ltrcms .ltrcms-date-range[hidden] {
  display: none !important;
}

body.erp-ui2 #ltrcms .batch2-date-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  width: 126px;
}

body.erp-ui2 #ltrcms .batch2-date-field > span:not(.erp-date-control) {
  display: none !important;
}

body.erp-ui2 #ltrcms .batch2-date-field .erp-date-control {
  width: 100%;
}

body.erp-ui2 #ltrcms .ltrcms-filterbar .add-btn {
  flex: 0 0 auto !important;
  height: var(--workbench-control-height, 34px) !important;
  min-height: var(--workbench-control-height, 34px) !important;
  padding: 0 13px !important;
  border: 1px solid rgba(214, 222, 233, .86) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .72) !important;
  color: #344052 !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  box-shadow: none !important;
}

body.erp-ui2 #ltrcms .ltrcms-integration-surface {
  overflow: hidden !important;
}

body.erp-ui2 #ltrcms .ltrcms-ledger-table {
  table-layout: fixed !important;
}

body.erp-ui2 #ltrcms .ltrcms-ledger-table .num {
  text-align: left !important;
  font-variant-numeric: tabular-nums !important;
}

body.erp-ui2 #ltrcms .status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #424a56 !important;
  font-size: 13px !important;
  font-weight: 520 !important;
  box-shadow: none !important;
}

body.erp-ui2 #ltrcms .status::before {
  content: "" !important;
  width: 5px !important;
  height: 5px !important;
  flex: 0 0 auto !important;
  border-radius: 50% !important;
  background: #86aa8b !important;
  opacity: .78 !important;
}

body.erp-ui2 #ltrcms .status.partial::before {
  background: #a88f87 !important;
}

body.erp-ui2 #ltrcms .status.void::before,
body.erp-ui2 #ltrcms .status.returned::before {
  background: #b28a85 !important;
}

body.erp-ui2 #globalModal[data-detail-kind="ltrcms"] .ltrcms-readonly-detail {
  display: grid !important;
  gap: 16px !important;
}

body.erp-ui2 #globalModal[data-detail-kind="ltrcms"] .personnel-readonly-grid {
  margin: 0 !important;
}

body.erp-ui2 #globalModal[data-detail-kind="ltrcms"] .detail-table-wrap table {
  min-width: 760px !important;
}

body.erp-ui2 #globalModal[data-detail-kind="ltrcms"] .num {
  text-align: left !important;
  font-variant-numeric: tabular-nums !important;
}

@media(max-width:1120px) {
  body.erp-ui2 #ltrcms .ltrcms-batch5-toolbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  #ltrcms .ltrcms-filterbar,
  #ltrcms .ltrcms-filterbar .search,
  #ltrcms .ltrcms-filterbar .batch2-select-field,
  #ltrcms .ltrcms-filterbar .ltrcms-date-range,
  #ltrcms .ltrcms-filterbar .add-btn {
    width: 100%;
    flex: 1 1 auto !important;
  }

  #ltrcms .ltrcms-date-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
