:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dfe5ee;
  --blue: #1d5fd1;
  --blue-soft: #eaf2ff;
  --green: #138a62;
  --green-soft: #e9f7f1;
  --amber: #a15c07;
  --amber-soft: #fff3dc;
  --red: #c7352b;
  --red-soft: #fff0ee;
  --radius: 8px;
  --shadow: 0 10px 24px rgba(20, 31, 52, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button, input, select, textarea {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}

button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

button.primary:hover,
button.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

input, select, textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  width: 100%;
  min-height: 170px;
  padding: 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.45;
}

.portal {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #fff;
  overflow: auto;
}

.mobileNavButton,
.mobileNavBackdrop {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 22px;
}

.brandMark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.brand strong, .brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 7px;
}

.navGroup {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  border: 0;
}

.navSection {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
}

.navChildren {
  display: grid;
  gap: 4px;
}

.navChildren[hidden] {
  display: none;
}

.navItem, .navSubItem {
  width: 100%;
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  background: transparent;
  color: #344054;
  font-size: 14px;
  font-weight: 760;
  min-height: 38px;
  padding-left: 12px;
  padding-right: 10px;
}

.nav > .navItem,
.nav > .navSection > .navToggle {
  color: #1d2939;
  font-weight: 840;
}

.navToggle {
  justify-content: space-between;
}

.navToggle .chevron {
  color: #98a2b3;
  font-size: 10px;
  line-height: 1;
}

.navLevel2 {
  margin-top: 2px;
}

.navLevel2 > .navItem,
.navLevel2 > .navGroup > .navItem {
  font-weight: 760;
  padding-left: 22px;
}

.navLevel3 {
  gap: 2px;
}

.navSubItem {
  min-height: 32px;
  color: #667085;
  font-size: 13px;
  font-weight: 720;
  padding-left: 30px;
}

.navItem.active, .navSubItem.active {
  background: var(--blue-soft);
  border-color: #cfe0ff;
  color: var(--blue);
}

.navToggle.ancestorActive {
  background: #f5f8ff;
  color: var(--blue);
}

.navToggle.ancestorActive .chevron {
  color: var(--blue);
}

.navToggle.expanded:not(.active) {
  color: #344054;
}

.navItem:not(.active):hover,
.navSubItem:not(.active):hover {
  background: #f6f8fb;
  border-color: transparent;
  color: #1d2939;
}

.nav::before,
.navGroup::before,
.navChildren::before,
.navItem::before,
.navSubItem::before {
  content: none;
}

.main {
  min-width: 0;
  padding: 0 28px 56px;
}

.topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.topTools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.globalSearch {
  display: grid;
  gap: 4px;
}

.globalSearch span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.globalSearch input {
  width: min(420px, 38vw);
}

.iconButton {
  min-width: 38px;
  padding: 0;
}

.accountMenu {
  position: relative;
}

.userBadge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.userBadge span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.userMeta {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.userMeta strong,
.userMeta small {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.userMeta strong {
  color: #1d2939;
  font-size: 13px;
  line-height: 1.2;
}

.userMeta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

.accountDropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.accountDropdown button {
  width: 100%;
  justify-content: flex-start;
  border-color: transparent;
  text-align: left;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

#autoAppointments.page.active,
#autoAppointmentsCompleted.page.active {
  min-height: calc(100vh - 44px - 20px);
  display: flex;
  flex-direction: column;
}

body:has(#autoAppointments.page.active) .main,
body:has(#autoAppointmentsCompleted.page.active) .main {
  padding-bottom: 20px;
}

#autoAppointments #accountHealthAlertAuto,
#autoAppointmentsCompleted #accountHealthAlertAutoCompleted {
  flex: 0 0 auto;
}

body:has(#poManagement.page.active) .main {
  padding-bottom: 24px;
}

#poManagement.page.active {
  min-height: calc(100vh - 70px - 24px);
  display: flex;
  flex-direction: column;
}

#poManagement .pageHead,
#poManagement .poFilterBar,
#poManagement .poToolbar {
  flex: 0 0 auto;
}

.pageHead {
  margin: 14px 0 18px;
}

.pageHead h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.pageHead p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.kpiGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kpi {
  padding: 16px;
}

.kpi span, .kpi small {
  display: block;
  color: var(--muted);
  font-weight: 750;
}

.kpi strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 26px;
  line-height: 1;
}

.actionStrip, .toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.poFilterBar {
  display: grid;
  grid-template-columns: 100px 140px 150px clamp(380px, 32vw, 500px) auto auto;
  align-items: end;
  justify-content: start;
  gap: 10px;
  margin-bottom: 12px;
}

.poFilterBar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.poFilterBar input,
.poFilterBar select {
  min-height: 36px;
}

.poToolbar {
  justify-content: space-between;
}

.appointmentToolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 10px;
}

.toolbarLeft,
.toolbarCenter,
.toolbarRight {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbarCenter {
  flex: 0 1 auto;
  justify-content: flex-start;
}

.toolbarCenter input[type="search"] {
  width: 320px;
  flex: 0 0 320px;
}

.toolbarRight {
  margin-left: auto;
  justify-content: flex-end;
}

.appointmentToolbar button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 800;
}

.appointmentToolbar input,
.appointmentToolbar select {
  margin: 0;
}

.accountForm {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.accountForm label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.formGrid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(140px, 220px);
  gap: 12px;
}

.formActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.formActions span {
  color: var(--muted);
  font-weight: 750;
}

.fieldHelp {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.formError {
  border: 1px solid #fac8c2;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--red);
  padding: 10px 12px;
  font-weight: 750;
}

.formInfo {
  border: 1px solid #cfe0ff;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: #315c9b;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.6;
}

.modalForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.modalForm label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.modalForm .wide {
  grid-column: 1 / -1;
}

.syncSummary {
  margin: 0 0 10px;
}

.syncSummary:empty {
  display: none;
}

.syncSummaryPanel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
}

.syncSummaryLine {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.syncSummaryLine + .syncSummaryLine {
  margin-top: 4px;
}

.syncSummaryLine strong {
  color: var(--text);
  font-weight: 850;
}

.syncSummaryLabel {
  color: var(--muted);
  font-weight: 850;
}

.syncSummaryHint {
  color: var(--muted);
  font-weight: 600;
}

.appointmentRunningUtilities {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.appointmentRunningUtilities > .syncSummary {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.appointmentRangeExport {
  display: grid;
  grid-template-columns: repeat(2, 132px) auto;
  align-items: end;
  gap: 8px;
}

.appointmentRangeExport label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.appointmentRangeExport input {
  width: 132px;
  height: 38px;
  padding: 0 10px;
}

.appointmentRangeExport button {
  height: 38px;
  white-space: nowrap;
}

.appointmentRangeExportStatus {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.appointmentRangeExportStatus.success { color: var(--green); }
.appointmentRangeExportStatus.error { color: var(--red); }

.compactFilterForm {
  align-items: end;
}

.textButton {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 850;
}

.twoColumn {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.panelHead {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panelHead h2 {
  margin: 0;
  font-size: 16px;
}

.panelHead span {
  color: var(--muted);
  font-weight: 750;
}

.tableWrap {
  width: 100%;
  overflow: auto;
}

.todayOverview {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.overviewCard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.overviewCardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overviewCardHead h3 {
  margin: 0;
  font-size: 15px;
}

.overviewCardHead strong {
  font-size: 22px;
  line-height: 1;
}

.overviewCard p {
  margin: 10px 0;
  color: var(--muted);
  font-weight: 700;
}

.overviewMetrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.overviewMetrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overviewMetrics strong {
  color: var(--text);
}

.overviewMetrics .warnText strong {
  color: #b45309;
}

.appointmentTableWrap {
  max-height: clamp(360px, calc(100vh - 360px), 680px);
  overflow: auto;
}

.appointmentTableWrap table {
  min-width: 1200px;
}

.appointmentTableWrap th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.autoTaskPanel,
.autoSuccessPanel {
  flex: 1 1 auto;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.autoTaskPanel .autoToolbar,
.autoSuccessPanel .autoToolbar {
  flex-shrink: 0;
}

.autoTaskTableWrap,
.autoSuccessTableWrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.autoTaskTableWrap table,
.autoSuccessTableWrap table {
  table-layout: fixed;
}

.autoTaskTableWrap table {
  min-width: 1430px;
}

.autoSuccessTableWrap table {
  min-width: 1780px;
}

.autoTaskTableWrap th,
.autoSuccessTableWrap th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fbfcfe;
}

.autoSuccessTableWrap th:nth-child(1),
.autoSuccessTableWrap td:nth-child(1) {
  width: 180px;
}

.autoSuccessTableWrap th:nth-child(2),
.autoSuccessTableWrap td:nth-child(2) {
  width: 150px;
}

.autoSuccessTableWrap th:nth-child(3),
.autoSuccessTableWrap td:nth-child(3) {
  width: 150px;
}

.autoSuccessTableWrap th:nth-child(4),
.autoSuccessTableWrap td:nth-child(4) {
  width: 90px;
}

.autoSuccessTableWrap th:nth-child(5),
.autoSuccessTableWrap td:nth-child(5),
.autoSuccessTableWrap th:nth-child(6),
.autoSuccessTableWrap td:nth-child(6) {
  width: 190px;
}

.autoSuccessTableWrap th:nth-child(7),
.autoSuccessTableWrap td:nth-child(7) {
  width: 150px;
}

.autoSuccessTableWrap th:nth-child(8),
.autoSuccessTableWrap td:nth-child(8) {
  width: 170px;
}

.autoSuccessTableWrap th:nth-child(9),
.autoSuccessTableWrap td:nth-child(9) {
  width: 150px;
}

.autoSuccessTableWrap th:nth-child(10),
.autoSuccessTableWrap td:nth-child(10) {
  width: 130px;
}

.autoSuccessTableWrap th:nth-child(11),
.autoSuccessTableWrap td:nth-child(11) {
  width: 110px;
}

.autoSuccessTableWrap th:nth-child(12),
.autoSuccessTableWrap td:nth-child(12) {
  width: 120px;
}

.autoTaskTableWrap th:nth-child(1),
.autoTaskTableWrap td:nth-child(1) {
  width: 150px;
}

.autoTaskTableWrap th:nth-child(2),
.autoTaskTableWrap td:nth-child(2) {
  width: 80px;
}

.autoTaskTableWrap th:nth-child(3),
.autoTaskTableWrap td:nth-child(3) {
  width: 110px;
}

.autoTaskTableWrap th:nth-child(4),
.autoTaskTableWrap td:nth-child(4),
.autoTaskTableWrap th:nth-child(5),
.autoTaskTableWrap td:nth-child(5) {
  width: 135px;
}

.autoTaskTableWrap th:nth-child(6),
.autoTaskTableWrap td:nth-child(6) {
  width: 135px;
}

.autoTaskTableWrap th:nth-child(7),
.autoTaskTableWrap td:nth-child(7) {
  width: 160px;
}

.autoTaskTableWrap th:nth-child(8),
.autoTaskTableWrap td:nth-child(8) {
  width: 105px;
}

.autoTaskTableWrap th:nth-child(9),
.autoTaskTableWrap td:nth-child(9) {
  width: 135px;
}

.autoTaskTableWrap th:nth-child(10),
.autoTaskTableWrap td:nth-child(10) {
  position: sticky;
  right: 0;
  width: 225px;
  text-align: right;
  background: #fff;
  box-shadow: -10px 0 18px -18px rgba(15, 23, 42, 0.55);
}

.autoTaskTableWrap th:nth-child(10) {
  z-index: 5;
  background: #fbfcfe;
}

.autoTaskTableWrap td,
.autoSuccessTableWrap td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.autoTaskTableWrap tbody tr {
  height: 78px;
  transition: background-color 160ms ease;
}

.autoTaskTableWrap tbody tr:hover,
.autoTaskTableWrap tbody tr:hover td:nth-child(10) {
  background: #f8fafc;
}

.autoTaskTableWrap td {
  vertical-align: middle;
}

.autoTaskTableWrap .rowActions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.autoTaskName,
.linkButton.autoTaskName {
  display: block;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linkButton.autoTaskName {
  cursor: copy;
}

.autoTaskTime {
  display: grid;
  gap: 3px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.autoTaskTime span:last-child:not(:first-child) {
  color: var(--muted);
  font-size: 12px;
}

.autoTaskRowActions button {
  min-height: 32px;
}

.autoTaskActionPrimary {
  box-shadow: none;
}

.autoTaskMoreTrigger {
  width: 34px;
  padding: 0;
  font-size: 15px;
  letter-spacing: 1px;
}

.autoTaskMoreTrigger[aria-expanded="true"] {
  border-color: #9dbef7;
  background: var(--blue-soft);
  color: var(--blue);
}

.autoTaskMorePopover,
.customerMorePopover {
  position: fixed;
  z-index: 1200;
  display: grid;
  width: 168px;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
}

.autoTaskMorePopover button,
.customerMorePopover button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.autoTaskMorePopover button:not(:disabled):hover,
.autoTaskMorePopover button:not(:disabled):focus-visible,
.customerMorePopover button:not(:disabled):hover,
.customerMorePopover button:not(:disabled):focus-visible {
  background: #f5f7fa;
  outline: none;
}

.autoTaskMoreDivider,
.customerMoreDivider {
  height: 1px;
  margin: 4px 5px;
  background: var(--line);
}

.autoTaskMorePopover .autoTaskMoreDanger,
.customerMorePopover .customerMoreDanger {
  color: var(--red);
}

.autoTaskMorePopover .autoTaskMoreDanger:not(:disabled):hover,
.autoTaskMorePopover .autoTaskMoreDanger:not(:disabled):focus-visible,
.customerMorePopover .customerMoreDanger:not(:disabled):hover,
.customerMorePopover .customerMoreDanger:not(:disabled):focus-visible {
  background: var(--red-soft);
}

.autoRunStatus .badge {
  padding: 4px 8px;
  font-size: 11px;
  box-shadow: none;
}

.autoTaskPagination {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.appointmentPagination {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.paginationMeta {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.pageSizeSelect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.pageSizeSelect select {
  width: 78px;
  height: 34px;
}

.paginationButtons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.paginationButtons button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
}

.paginationButtons button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  cursor: default;
}

.paginationButtons button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.paginationButtons button:not(:disabled):hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.remarkAddButton,
.remarkTextButton {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 28px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.remarkAddButton {
  border: 1px dashed #b9c9e7;
  background: #fbfdff;
  color: #5576a9;
  padding: 0 11px;
}

.remarkAddButton:hover {
  border-color: #7da2d6;
  background: #f4f8ff;
  color: var(--blue);
}

.remarkTextButton {
  justify-content: flex-start;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remarkTextButton:hover {
  color: var(--blue);
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.emptyBlock {
  padding: 18px;
  color: var(--muted);
  font-weight: 750;
}

.inlineStatus {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
  font-weight: 750;
}

.inlineStatus.success {
  border-color: #bfe8d3;
  background: var(--green-soft);
  color: var(--green);
}

.inlineStatus.warn {
  border-color: #f3cf8c;
  background: var(--amber-soft);
  color: var(--amber);
}

.inlineStatus.error {
  border-color: #fac8c2;
  background: var(--red-soft);
  color: var(--red);
}

.accountHealthAlert,
.autoAccountHealthNotice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #fac8c2;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
}

.accountHealthAlert div,
.autoAccountHealthNotice div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.accountHealthAlert strong,
.autoAccountHealthNotice strong {
  font-size: 14px;
  font-weight: 850;
}

.accountHealthAlert span,
.autoAccountHealthNotice span {
  color: #9f3a32;
  font-size: 13px;
  font-weight: 700;
}

.accountHealthAlert button,
.autoAccountHealthNotice button {
  flex-shrink: 0;
  border-color: #f4afa8;
  background: #fff;
  color: var(--red);
  font-weight: 850;
}

.accountDetailBasics > h3,
.accountPerformanceHeader h3 {
  margin: 0;
  font-size: 15px;
}

.accountDetailDrawerPanel {
  width: min(1080px, 100vw);
}

.accountDetailBasics > h3 {
  margin-bottom: 12px;
}

.accountPerformanceDetail {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.accountPerformanceHeader,
.accountPerformanceTrendHead,
.accountPerformanceThresholds,
.accountPerformanceComparison {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.accountPerformanceHeader > div {
  display: grid;
  gap: 4px;
}

.accountPerformanceHeader span,
.accountPerformanceTrendHead span,
.accountPerformanceComparison span,
.accountPerformanceComparison small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.accountPerformanceTabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  border-bottom: 1px solid var(--line);
}

.accountPerformanceTabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 16px;
  font-weight: 850;
}

.accountPerformanceTabs button.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.accountPerformanceLayout {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(420px, 1.4fr);
  gap: 16px;
  align-items: start;
}

.accountPerformanceSummary {
  display: grid;
  gap: 10px;
}

.accountPerformanceThresholds,
.accountPerformanceComparison,
.accountPerformanceStat,
.accountPerformanceDefects,
.accountPerformanceTrendPanel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.accountPerformanceThresholds,
.accountPerformanceComparison {
  flex-wrap: wrap;
}

.accountPerformanceThresholds span {
  color: var(--muted);
  font-size: 12px;
}

.accountPerformanceThresholds b {
  color: var(--ink);
}

.accountPerformanceComparison {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.accountPerformanceStat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
}

.accountPerformanceStat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.accountPerformanceStat strong {
  grid-row: span 2;
  grid-column: 2;
  font-size: 18px;
}

.accountPerformanceStat small {
  color: var(--muted);
  font-weight: 750;
}

.accountPerformanceDefects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.accountPerformanceDefects > strong {
  grid-column: 1 / -1;
}

.accountPerformanceDefects .accountPerformanceStat {
  border-color: #edf0f4;
  padding: 9px;
}

.accountPerformanceTrendHead {
  margin-bottom: 8px;
}

.accountPerformanceChart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.performanceRiskArea { fill: rgba(199, 53, 43, 0.08); }
.performanceGridLine { stroke: #e7ebf0; stroke-width: 1; }
.performanceTargetLine { stroke: var(--green); stroke-width: 1.5; stroke-dasharray: 8 5; }
.performanceDataLine { fill: none; stroke: #344054; stroke-width: 2; }
.performancePoint { stroke: #fff; stroke-width: 2; }
.performancePoint.good { fill: var(--green); }
.performancePoint.warn { fill: var(--amber); }
.performancePoint.bad { fill: var(--red); }
.performancePoint.neutral { fill: #667085; }
.performanceAxisLabel,
.performanceWeekLabel,
.performanceTargetLabel {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.performanceTargetLabel { fill: var(--green); }

.accountPerformanceLoading,
.accountPerformanceEmpty,
.accountPerformanceError {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  color: var(--muted);
  font-weight: 750;
}

.accountPerformanceError {
  border-color: #fac8c2;
  background: var(--red-soft);
  color: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  background: #eef2f6;
  color: #475467;
}

.badge.good { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.bad { background: var(--red-soft); color: var(--red); }
.badge.info { background: #dbeafe; color: #1d4ed8; }
.badge.neutral { background: #eef2f6; color: #475467; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab.active {
  border-color: #cfe0ff;
  background: var(--blue-soft);
  color: var(--blue);
}

.feed, .notificationList, .featureList {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.feedItem, .notice, .feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.feedItem p, .notice p {
  margin: 8px 0;
  color: var(--muted);
}

.feedItem small, .notice small, .feature small {
  color: var(--muted);
  font-weight: 700;
}

.notice div, .feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settingsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 1px;
  padding: 0;
  background: var(--line);
}

.settingsGrid article {
  min-height: 92px;
  padding: 16px;
  background: #fff;
}

.settingsGrid article button {
  width: 100%;
  min-height: 60px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.settingsGrid span, .settingsGrid strong {
  display: block;
}

.settingsGrid span {
  color: var(--muted);
  font-weight: 750;
  margin-bottom: 8px;
}

.rowActions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rowActions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.customerMoreTrigger {
  width: 34px;
  padding: 0;
  letter-spacing: 1px;
}

.customerMoreTrigger[aria-expanded="true"] {
  border-color: #9dbef7;
  background: var(--blue-soft);
  color: var(--blue);
}

.rowActions template {
  display: none;
}

.moreMenu {
  position: relative;
}

.moreMenu summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.moreMenu summary::-webkit-details-marker {
  display: none;
}

.moreMenuPanel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 15;
  display: grid;
  min-width: 120px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 6px;
}

.moreMenuPanel button {
  width: 100%;
  justify-content: flex-start;
  border-color: transparent;
  text-align: left;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
}

.modalOverlay[hidden] {
  display: none;
}

.modal {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.modal:has(.appointmentEditForm) {
  width: min(760px, 100%);
}

.modal.poDetailModal {
  width: min(1080px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 64px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.poDetailModal .modalHead {
  flex-shrink: 0;
}

.modal.poDetailModal .modalBody {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.modal.poEditorModal {
  position: relative;
  width: min(860px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.modal.poEditorModal .modalHead {
  min-height: 48px;
  padding: 10px 20px;
}

.modal.poEditorModal .modalHead h2 {
  font-size: 17px;
}

.modal.poEditorModal .modalBody {
  min-height: 0;
  padding: 18px 20px 0;
  overflow: hidden;
}

.modal.addPoModal {
  width: min(1600px, 94vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.poWindowDetailOverlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
}

.poWindowDetailModal {
  z-index: 1110;
  width: min(1280px, 90vw);
  max-height: 86vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.poWindowDetailBody {
  overflow: auto;
}

.addPoCancelConfirmOverlay {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
}

.addPoCancelConfirmModal {
  z-index: 1130;
  width: min(460px, 92vw);
}

.addPoCancelConfirmModal .modalBody {
  display: grid;
  gap: 10px;
}

.addPoCancelConfirmModal .modalNote {
  font-weight: 750;
}

.modalHead, .modalActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.modalHead {
  border-bottom: 1px solid var(--line);
}

.modalHead h2 {
  margin: 0;
  font-size: 18px;
}

.modalBody {
  padding: 16px;
  overflow: auto;
}

.modal.addPoModal .modalBody {
  position: relative;
}

.modalNote {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
}

.walletRechargeForm {
  display: grid;
  gap: 16px;
}

.walletRechargeForm fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.walletRechargeForm legend,
.walletRechargeForm label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.walletRechargePresets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.walletRechargePresets button[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

@media (max-width: 560px) {
  .walletRechargePresets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.poEditorForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  max-height: calc(100vh - 110px);
  min-width: 0;
  min-height: 0;
}

.poEditorForm > .wide {
  flex: 0 0 auto;
  min-width: 0;
}

.poEditorBasics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

.poEditorBasics label {
  gap: 5px;
}

.poEditorBasics small {
  color: var(--muted);
  font-size: 12px;
}

.poAccountWarning,
.poSaveHint {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.poAccountWarning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.poAccountWarningActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.poAccountWarningActions span {
  color: #912018;
}

.poSaveHint {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.warehouseCombobox {
  position: relative;
  width: 100%;
}

.warehouseComboButton {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  padding: 8px 34px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 500;
  text-align: left;
  position: relative;
}

.warehouseComboButton::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
}

.warehouseCombobox.open .warehouseComboButton {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.warehouseComboPanel {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.warehouseComboSearch {
  width: 100%;
  height: 36px;
  margin-bottom: 8px;
}

.warehouseComboOptions {
  max-height: 360px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
}

.warehouseComboOptions button {
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.warehouseComboOptions button:hover,
.warehouseComboOptions button:focus,
.warehouseComboOptions button[aria-selected="true"] {
  background: #eff6ff;
  color: #1d4ed8;
}

.warehouseComboOptions strong {
  min-width: 52px;
  margin-right: 8px;
}

.warehouseComboOptions span {
  color: var(--muted);
  font-weight: 500;
}

.warehouseComboEmpty {
  padding: 16px 10px;
  color: var(--muted);
  text-align: center;
}

.poInputMode {
  display: inline-flex;
  width: max-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f1f5f9;
  gap: 2px;
}

.poInputMode button {
  min-height: 32px;
  padding: 0 14px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: #334155;
}

.poInputMode button:hover {
  background: #e8eef6;
}

.poInputMode button.active {
  background: #fff;
  color: var(--blue);
  border-color: #cfe0ff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.poSectionHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.poSectionHead h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.poSectionHead p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.poAddRowButton {
  min-height: 32px;
  padding: 0 10px;
}

.poEditorTable {
  flex: 1;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overflow: auto;
}

.poEditorTableShell {
  display: flex;
  flex-direction: column;
  height: clamp(240px, 32vh, 340px);
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.poEditorTable input {
  width: 100%;
  min-height: 34px;
}

.poEditorTable table {
  table-layout: fixed;
  min-width: 690px;
}

.poEditorTable th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

.poEditorTable th,
.poEditorTable td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.poEditorTable th:last-child,
.poEditorTable td:last-child {
  text-align: center;
}

.poEditorTable .poWindowInfo {
  justify-content: flex-start;
  max-width: 100%;
}

.poDeleteRowButton {
  min-height: 30px;
  padding: 0 9px;
  border-color: #fecaca;
  color: var(--red);
  background: #fff;
}

.poDeleteRowButton:hover {
  background: #fef2f2;
}

.poUploadBox {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.poUploadActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.poUploadActions input[type="file"] {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.poManagementCard {
  flex: 1 1 auto;
  min-height: 420px;
  height: auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
}

.poManagementTableWrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.poManagementTableWrap table {
  min-width: 1080px;
}

.poManagementTableWrap th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fbfcfe;
}

.poManagementTableWrap th:last-child,
.poManagementTableWrap td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 0 var(--line);
}

.poManagementTableWrap th:last-child {
  z-index: 4;
  background: #fbfcfe;
}

.poManagementTableWrap .rowActions {
  flex-wrap: nowrap;
  min-width: max-content;
}

.poManagementPagination {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.poPaginationControls,
.poPageButtons,
.poDesktopPages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.paginationEllipsis {
  min-width: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.poMobilePage {
  display: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.buttonLike {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  background: #fff;
}

.buttonLike:hover {
  background: #f8fafc;
}

.poEditorFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px -20px 0;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.poEditorFooterLeft,
.poEditorFooterRight {
  display: flex;
  align-items: center;
  gap: 10px;
}

.poEditorFooterLeft {
  min-width: 0;
}

.poEditorFooterRight {
  flex-shrink: 0;
}

.poEditorClearInvalidButton {
  border-color: #fecaca;
  background: #fff;
  color: var(--red);
}

.poEditorClearInvalidButton:not(:disabled):hover {
  background: #fef2f2;
  box-shadow: none;
  transform: none;
}

.poEditorClearHint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.poEditorClearConfirmOverlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.22);
}

.poEditorClearConfirmModal {
  width: min(460px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.poEditorClearConfirmModal h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.poEditorClearConfirmModal p {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.6;
}

.poEditorClearConfirmModal ul {
  margin: 10px 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.poEditorClearConfirmActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.autoToolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.autoToolbar input {
  width: 320px;
  max-width: 100%;
}

.autoToolbar select {
  min-width: 160px;
}

.autoRunStatus {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 170px;
}

.autoRunStatus small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.modalSectionTitle {
  margin: 18px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.detailGrid.autoRealtimeGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.auto-runtime-card {
  min-width: 0;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auto-runtime-card .label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.auto-runtime-card .value {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.auto-runtime-card--result {
  grid-column: 1 / -1;
  min-height: auto;
}

.modal.autoAppointmentModal {
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.modal.autoAppointmentModal .modalBody {
  min-height: 0;
  overflow: auto;
}

.modal.autoTaskDetailModal {
  width: min(1360px, 92vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.modal.autoTaskDetailModal .modalBody {
  min-height: 0;
  overflow: auto;
}

.autoTaskDetailShell {
  display: grid;
  gap: 18px;
  padding-bottom: 10px;
}

.auto-detail-basic-info {
  display: grid;
  gap: 10px;
}

.auto-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 10px;
}

.auto-detail-info-card {
  min-width: 0;
  min-height: 66px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auto-detail-info-card .label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.auto-detail-info-card .value {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.auto-detail-task-name .value {
  font-size: 15px;
  font-weight: 850;
}

.auto-detail-time-range .value {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.auto-detail-time-arrow {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.autoRunSection {
  display: grid;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.autoRunSectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.autoRunSectionHead .modalSectionTitle {
  margin: 0 0 3px;
}

.autoRunSectionHead span,
.mutedText {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.autoRunFilters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.autoRunFilters select,
.autoRunsPager input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.autoRunsTableWrap {
  max-height: 420px;
  overflow: auto;
}

.autoRunsTable {
  min-width: 1190px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.autoRunsTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef4ff;
}

.autoRunsTable th,
.autoRunsTable td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.autoRunsTable th:nth-child(1),
.autoRunsTable td:nth-child(1) {
  width: 80px;
}

.autoRunsTable th:nth-child(2),
.autoRunsTable td:nth-child(2) {
  width: 210px;
}

.autoRunsTable th:nth-child(3),
.autoRunsTable td:nth-child(3),
.autoRunsTable th:nth-child(4),
.autoRunsTable td:nth-child(4) {
  width: 170px;
}

.autoRunsTable th:nth-child(5),
.autoRunsTable td:nth-child(5) {
  width: 360px;
}

.autoRunsTable th:nth-child(6),
.autoRunsTable td:nth-child(6) {
  width: 300px;
}

.autoRunsTable td small,
.autoExpectedTime span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.offered-slots-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
}

.offered-slots-list strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.offered-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.offered-slots-list.expanded {
  max-height: 320px;
}

.offered-slot.selected {
  border-color: #b7dfca;
  background: #f0faf5;
  color: #166534;
}

.offered-slot em {
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.offered-slots-toggle {
  justify-content: flex-start;
  width: fit-content;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.autoRunResult {
  display: grid;
  gap: 5px;
}

.autoRunResult strong {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.autoRunResult span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.autoRunResult.good strong {
  background: #e8f8ef;
  color: #047857;
}

.autoRunResult.info strong {
  background: #e8f0ff;
  color: #1d4ed8;
}

.autoRunResult.warn strong {
  background: #fff7ed;
  color: #b45309;
}

.autoRunResult.bad strong {
  background: #fee2e2;
  color: #b91c1c;
}

.autoRunResult.neutral strong {
  background: #f1f5f9;
  color: #475569;
}

.autoRunsPager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.autoRunsPager button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
}

.autoRunsPager label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.autoRunsPager input {
  width: 58px;
  padding: 0 8px;
}

.autoAppointmentForm {
  display: grid;
  gap: 16px;
}

.auto-edit-form {
  display: grid;
  gap: 0;
}

.auto-edit-four-column-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  column-gap: 18px;
  row-gap: 16px;
  margin-bottom: 18px;
}

.newAppointmentCrddRow {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 18px;
  row-gap: 16px;
  margin-bottom: 18px;
}

.systemAccountBillingNotice {
  margin: -2px 0 18px;
}

.systemAccountBillingNotice.is-insufficient {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.newSlotPicker,
.newAppointmentConfirm,
.newAppointmentSuccess {
  display: grid;
  gap: 16px;
}

.newSlotSummary,
.newAppointmentConfirm,
.newAppointmentSuccess {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.newSlotSummary {
  display: grid;
  gap: 12px;
}

.newSlotSummary article,
.newAppointmentConfirm article,
.newAppointmentSuccess article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  min-width: 0;
}

.newSlotSummary span,
.newAppointmentConfirm span,
.newAppointmentSuccess span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.newSlotSummary strong,
.newAppointmentConfirm strong,
.newAppointmentSuccess strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.newSlotList {
  display: grid;
  gap: 14px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.newSlotDateGroup {
  display: grid;
  gap: 8px;
}

.newSlotDateGroup h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.newSlotDateOptions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}

.newSlotOption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.newSlotOption:hover {
  border-color: #b8cdf8;
  background: #f5f9ff;
}

.newSlotEmpty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 24px;
}

.autoFormField,
.autoPoSource {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.auto-edit-form input,
.auto-edit-form select,
.auto-edit-form .warehouseComboButton {
  width: 100%;
  min-height: 44px;
  height: 44px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.auto-edit-form .warehouseComboButton {
  padding: 0 34px 0 11px;
}

.auto-edit-form .warehouseCombobox,
.auto-edit-form .warehouseSelectFallback {
  width: 100%;
}

.autoFieldHint {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.autoFieldHint[hidden] {
  display: none;
}

.auto-edit-form input.fieldInvalid,
.auto-edit-form select.fieldInvalid,
.auto-edit-form .fieldInvalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.fieldErrorText {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.autoPoSource {
  gap: 12px;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.autoPoSource legend {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.autoPoSourceOptions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.autoPoSourceOptions label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.autoPoSourceOptions input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.autoPoPanel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.autoPoPanel[hidden] {
  display: none;
}

.autoPoPanelHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.autoPoPanelHead > div {
  display: grid;
  gap: 4px;
}

.autoPoPanelHead span,
.importSummary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.autoPoPanelHead label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.autoPoActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.autoPoPanelHead > .autoPoActions {
  display: flex;
}

.autoExcelToolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.autoFileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.autoFilePicker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.autoFilePicker span {
  font-size: 14px;
  font-weight: 600;
}

.autoFilePicker strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autoPoActions button,
.autoPoActions .buttonLike,
.autoExcelToolbar .buttonLike,
.autoExcelToolbar button,
.autoPoTable button,
.autoAppointmentForm .poEditorFooter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.autoPoCheckButton {
  border-color: #b8cdf8;
  color: var(--blue);
  background: #f5f9ff;
}

.autoPoTable button {
  padding: 0 12px;
  color: var(--red);
  border-color: #f3c9c5;
  background: #fff;
}

.autoPoTable button:hover {
  background: var(--red-soft);
}

.autoPoTable {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.autoPoTable table {
  min-width: 760px;
}

.autoPoTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}

.autoPoTable th,
.autoPoTable td {
  vertical-align: top;
}

.autoPoTable input {
  width: 100%;
}

.poDetailContent {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
}

.poDetailSummary {
  display: grid;
  flex-shrink: 0;
  gap: 10px;
}

.poDetailSummaryRow {
  display: grid;
  gap: 10px;
}

.poDetailSummaryRowPrimary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.poDetailSummaryRowSecondary {
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(220px, 1.4fr);
}

.poDetailSummaryRow > div {
  display: grid;
  gap: 4px;
  min-height: 82px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.poDetailSummary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.poDetailTableShell {
  display: flex;
  flex: 1;
  min-height: 260px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.poDetailTableHeader {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.poDetailTableHeader h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.poDetailTableHeader span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.poDetailClearButton {
  color: var(--red);
  border-color: #fecaca;
  background: #fff;
}

.poDetailClearButton:not(:disabled):hover {
  background: #fef2f2;
}

.poDetailTableScroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.poDetailModal table th,
.poDetailModal table td {
  vertical-align: top;
}

.poDetailModal table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

.poDetailModal table td:nth-child(1),
.poDetailModal table td:nth-child(2) {
  word-break: break-word;
}

.poDetailModal table td:nth-child(3) {
  white-space: nowrap;
}

.poWindowInfo {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  white-space: normal;
}

.poWindowInfo-green {
  background: var(--green-soft);
  color: var(--green);
}

.poWindowInfo-orange {
  background: var(--amber-soft);
  color: #9a6700;
}

.poWindowInfo-yellow {
  background: #fef9c3;
  color: #854d0e;
}

.poWindowInfo-red {
  background: var(--red-soft);
  color: var(--red);
}

.poManagementWindowInfo[data-po-result-color="Green"] {
  background: var(--green-soft);
  color: var(--green);
}

.poManagementWindowInfo[data-po-result-color="Orange"] {
  background: var(--amber-soft);
  color: #9a6700;
}

.poManagementWindowInfo[data-po-result-color="Yellow"] {
  background: #fef9c3;
  color: #854d0e;
}

.poManagementWindowInfo[data-po-result-color="Red"] {
  background: var(--red-soft);
  color: var(--red);
}

.dangerButton {
  background: var(--red);
  border-color: var(--red);
}

.modalActions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.profileList {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.profileList dt {
  color: var(--muted);
  font-weight: 850;
}

.profileList dd {
  margin: 0;
  font-weight: 750;
}

.drawerOverlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.36);
}

.drawerOverlay[hidden] {
  display: none;
}

.drawer {
  width: min(720px, 100vw);
  height: 100%;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -20px 0 60px rgba(15, 23, 42, 0.18);
}

.drawerHead {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}

.drawerHead h2 {
  margin: 0;
  font-size: 20px;
}

.drawerHead p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.drawerBody {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.drawerBody label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.drawerActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.detailGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.detailCard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.detailCard.wide {
  grid-column: 1 / -1;
}

.detailCard.quiet {
  background: #fbfcfe;
  box-shadow: none;
}

.detailCard span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detailCard strong {
  overflow-wrap: anywhere;
}

.dangerBox {
  border: 1px solid #fac8c2;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--red);
  padding: 12px;
  font-weight: 750;
  line-height: 1.6;
}

.addPoForm {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  height: calc(92vh - 86px);
  min-height: 0;
}

.addPoSummary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.addPoSummaryRow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.addPoSummaryField,
.addPoDetailsGrid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
}

.addPoSummaryField span,
.addPoDetailsGrid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.addPoSummaryField input {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addPoSummaryField input[readonly] {
  pointer-events: none;
}

.addPoSummaryField input:not([readonly]) {
  border-color: var(--line);
  background: #fff;
  padding: 0 8px;
  font-weight: 800;
}

.addPoSummaryField input:not([readonly]):focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: none;
}

.addPoDetailsGrid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.addPoDetails {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #fff;
}

.addPoDetails summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.addPoDetailsGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.addPoCurrentPo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.addPoCurrentPo strong {
  color: var(--text);
}

.addPoPreview {
  border: 1px dashed #b8c7df;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.addPoToolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.addPoToolbar .buttonLike {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.addPoQuickMenuWrap {
  position: relative;
  display: inline-flex;
}

.addPoQuickMenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 260px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.addPoQuickMenu[hidden] {
  display: none;
}

.addPoQuickMenu button {
  justify-content: flex-start;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.addPoQuickMenu button:hover {
  background: #f3f7ff;
}

.addPoQuickMenu button.disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.addPoImportOverlay {
  z-index: 1120;
}

.addPoQuickOverlay {
  z-index: 1130;
}

.addPoQuickConfirmModal {
  width: min(560px, calc(100vw - 40px));
}

.addPoImportPreviewModal {
  width: min(1120px, calc(100vw - 40px));
  max-height: 88vh;
}

.addPoImportPreviewBody {
  overflow: auto;
}

.addPoImportConfirmModal {
  width: min(520px, calc(100vw - 40px));
}

.addPoTableWrap {
  min-height: 0;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.addPoTable {
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
}

.addPoTable th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
}

.addPoTable th,
.addPoTable td {
  white-space: nowrap;
}

.addPoSticky {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.addPoLineNo {
  min-width: 64px;
  text-align: center;
  font-weight: 850;
  background: inherit;
}

.addPoActionsSticky {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 82px;
  background: inherit;
}

.addPoInput,
.addPoLine,
.addPoCount {
  width: 100%;
}

.addPoCount {
  min-width: 72px;
}

.addPoExistingRow,
.addPoNewRow {
  background: #fff;
}

.addPoRowStatus {
  font-size: 12px;
  font-weight: 850;
  white-space: pre-line;
  min-width: 190px;
}

.addPoRowStatus.good { color: var(--green); }
.addPoRowStatus.warn { color: #9a6700; }
.addPoRowStatus.bad { color: var(--red); }
.addPoRowStatus.neutral { color: var(--muted); }

.poStatusLine {
  display: grid;
  grid-template-columns: 18px minmax(72px, auto) 1fr;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
  max-width: 320px;
}

.poStatusLine.good { color: var(--green); }
.poStatusLine.warn { color: #9a6700; }
.poStatusLine.bad { color: var(--red); }
.poStatusLine.neutral { color: var(--muted); }

.poStatusLine strong {
  color: inherit;
  font-weight: 850;
}

.poStatusDot {
  line-height: 1;
}

.poStatusMore,
.linkButton {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 800;
  cursor: pointer;
}

.addPoResultBox {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.addPoFooter {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 0 -16px -16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.addPoBusyOverlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(1px);
}

.addPoBusyOverlay[hidden] {
  display: none;
}

.addPoBusyPanel {
  width: min(420px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.addPoBusyPanel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.spinner {
  width: 28px;
  height: 28px;
  margin: 10px 0;
  border: 3px solid #dbeafe;
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.addPoBusyPanel p {
  margin: 4px 0;
  color: var(--muted);
  font-weight: 750;
}

.rowActions.tight {
  gap: 4px;
}

.rowActions.tight button {
  padding: 5px 7px;
  font-size: 12px;
}

.miniStats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.miniStats span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

#walletBilling > .panel,
#walletBilling > .billingQuotaGrid {
  margin-bottom: 12px;
}

#walletBilling > .panel > .panelHead {
  min-height: 48px;
  padding: 10px 14px;
}

.billingSubscriptionGrid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.billingSubscriptionGrid article {
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
}

.billingSubscriptionGrid span {
  margin-bottom: 6px;
}

.billingSkeleton::before,
.billingSkeleton::after {
  display: block;
  width: 58%;
  height: 10px;
  border-radius: 4px;
  background: #e7ecf3;
  content: "";
  animation: billingSkeletonPulse 1.2s ease-in-out infinite;
}

.billingSkeleton::after {
  width: 82%;
  height: 18px;
  margin-top: 10px;
}

@keyframes billingSkeletonPulse {
  50% { opacity: .45; }
}

.billingPlanCurrent {
  border-color: #bfd4ff;
  background: #f5f8ff;
}

.billingCurrentBadge {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.billingQuotaGrid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.billingQuotaGrid .kpi {
  min-width: 0;
  min-height: 88px;
  padding: 12px;
}

.billingQuotaGrid .kpi strong {
  margin: 6px 0 3px;
  font-size: 24px;
  white-space: nowrap;
}

.billingQuotaGrid .kpi small {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1199px) {
  #walletBilling .billingSubscriptionGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #walletBilling .billingQuotaGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #walletBilling .billingSubscriptionGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #walletBilling .billingQuotaGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  #walletBilling .billingSubscriptionGrid {
    grid-template-columns: 1fr;
  }

  #walletBilling .billingQuotaGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .portal {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .navGroup {
    gap: 5px;
  }

  .main {
    padding: 0 16px 40px;
  }

  .topbar, .topTools {
    align-items: stretch;
    flex-direction: column;
  }

  .globalSearch input {
    width: 100%;
  }

  .appointmentToolbar {
    flex-wrap: wrap;
  }

  .autoToolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .autoTaskTableWrap table {
    min-width: 1320px;
  }

  .autoTaskTableWrap th:nth-child(10),
  .autoTaskTableWrap td:nth-child(10) {
    width: 205px;
  }

  .modal.autoAppointmentModal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .modal.autoTaskDetailModal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .newSlotSummary,
  .newAppointmentConfirm,
  .newAppointmentSuccess {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .autoRunSectionHead,
  .autoRunsPager {
    align-items: stretch;
    flex-direction: column;
  }

  .poFilterBar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointmentToolbar .toolbarCenter {
    order: 2;
    flex: 1 1 100%;
    justify-content: stretch;
  }

  .appointmentToolbar .toolbarRight {
    justify-content: flex-end;
    min-width: 0;
  }

  .toolbarCenter input[type="search"],
  .toolbarCenter input,
  .toolbarCenter select {
    width: 100%;
    flex: 1 1 auto;
  }

  .kpiGrid, .twoColumn, .settingsGrid, .formGrid, .detailGrid {
    grid-template-columns: 1fr;
  }

  .accountPerformanceLayout {
    grid-template-columns: 1fr;
  }

  .addPoSummaryRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal.poDetailModal {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  .poDetailSummaryRowPrimary,
  .poDetailSummaryRowSecondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .poManagementPagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .poPaginationControls {
    flex-wrap: wrap;
    width: 100%;
  }

  .poPageButtons {
    flex-wrap: wrap;
  }

  .drawer {
    width: 100vw;
  }
}

@media (max-width: 1100px) {
  .auto-edit-four-column-row,
  .auto-detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .auto-edit-four-column-row,
  .newAppointmentCrddRow,
  .auto-detail-info-grid,
  .detailGrid.autoRealtimeGrid {
    grid-template-columns: 1fr;
  }

  .newSlotSummary,
  .newAppointmentConfirm,
  .newAppointmentSuccess {
    grid-template-columns: 1fr;
  }

  .auto-runtime-card--result {
    grid-column: auto;
  }

  .autoPoPanelHead {
    align-items: stretch;
    flex-direction: column;
  }

  .autoPoActions {
    justify-content: flex-start;
  }

  .autoRunsTableWrap {
    overflow-x: visible;
  }

  .autoRunsTable {
    display: block;
    min-width: 0;
  }

  .autoRunsTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .autoRunsTable tbody,
  .autoRunsTable tr {
    display: block;
    width: 100%;
  }

  .autoRunsTable tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .autoRunsTable td,
  .autoRunsTable td:nth-child(n) {
    display: grid;
    grid-template-columns: minmax(88px, 30%) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 7px 0;
    border: 0;
  }

  .autoRunsTable td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 780;
  }

  .offered-slots-list,
  .offered-slot {
    min-width: 0;
    max-width: 100%;
  }

  .offered-slot {
    width: 100%;
    overflow-wrap: anywhere;
  }

  .autoExcelToolbar {
    grid-template-columns: 1fr;
  }

  .autoExcelToolbar .buttonLike,
  .autoExcelToolbar button {
    width: max-content;
  }
}

/* Phase 2: responsive customer workspace. Desktop presentation remains unchanged. */
@media (min-width: 1201px) and (max-width: 1440px) {
  .autoTaskTableWrap table,
  .customerTable--autoAppointments {
    width: 100%;
    min-width: 1100px;
    table-layout: fixed;
  }

  .customerTable--autoAppointments th,
  .customerTable--autoAppointments td {
    white-space: normal;
  }

  .customerTable--autoAppointments :is(th, td):nth-child(1) { width: 12%; }
  .customerTable--autoAppointments :is(th, td):nth-child(2) { width: 6%; }
  .customerTable--autoAppointments :is(th, td):nth-child(3) { width: 7%; }
  .customerTable--autoAppointments :is(th, td):nth-child(4),
  .customerTable--autoAppointments :is(th, td):nth-child(5) { width: 11%; }
  .customerTable--autoAppointments :is(th, td):nth-child(6) { width: 10%; }
  .customerTable--autoAppointments :is(th, td):nth-child(7) { width: 11%; }
  .customerTable--autoAppointments :is(th, td):nth-child(8),
  .customerTable--autoAppointments :is(th, td):nth-child(9) { width: 8%; }
  .customerTable--autoAppointments :is(th, td):nth-child(10) { width: 16%; }
}

@media (min-width: 1101px) and (max-width: 1200px) {
  .portal {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .autoTaskTableWrap table,
  .customerTable--autoAppointments {
    width: 980px;
    min-width: 980px;
    table-layout: fixed;
  }

  .autoTaskTableWrap th:nth-child(3),
  .autoTaskTableWrap td:nth-child(3),
  .autoTaskTableWrap th:nth-child(9),
  .autoTaskTableWrap td:nth-child(9) {
    display: none;
  }

  .customerTable--autoAppointments :is(th, td):nth-child(1) { width: 14%; }
  .customerTable--autoAppointments :is(th, td):nth-child(2) { width: 7%; }
  .customerTable--autoAppointments :is(th, td):nth-child(4),
  .customerTable--autoAppointments :is(th, td):nth-child(5) { width: 13%; }
  .customerTable--autoAppointments :is(th, td):nth-child(6) { width: 11%; }
  .customerTable--autoAppointments :is(th, td):nth-child(7) { width: 13%; }
  .customerTable--autoAppointments :is(th, td):nth-child(8) { width: 11%; }
  .customerTable--autoAppointments :is(th, td):nth-child(10) { width: 18%; }
}

@media (max-width: 1100px) {
  body.navDrawerOpen {
    overflow: hidden;
  }

  .portal {
    display: block;
    min-width: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1001;
    width: min(320px, 86vw);
    height: 100dvh;
    border-right: 1px solid var(--line);
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.18);
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .navDrawerOpen .sidebar {
    transform: translateX(0);
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .mobileNavBackdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, 0.38);
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: 0 16px 40px;
  }

  .topbar,
  .topTools {
    flex-direction: row;
    align-items: center;
  }

  .topbar {
    justify-content: space-between;
  }

  .mobileNavButton {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
  }

  .pageHead,
  .autoTaskPanel > .panelHead {
    margin-top: 10px;
  }

  .autoTaskPanel > .panelHead,
  .autoSuccessPanel > .panelHead {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .autoTaskPanel > .panelHead > div,
  .autoSuccessPanel > .panelHead > div {
    flex: 1 1 100%;
  }

  .autoToolbar,
  .appointmentToolbar,
  #accounts .toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .autoToolbar input,
  .autoToolbar select,
  #accounts .toolbar input[type="search"] {
    flex: 1 1 100%;
    width: 100%;
  }

  .appointmentToolbar .toolbarLeft,
  .appointmentToolbar .toolbarRight {
    flex: 1 1 auto;
  }

  .appointmentToolbar .toolbarCenter {
    order: 3;
    flex: 1 1 100%;
  }

  .poFilterBar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .poFilterBar label:nth-child(4) {
    grid-column: 1 / -1;
  }

  .poFilterBar label:nth-child(4) input {
    width: 100%;
  }

  .autoTaskTableWrap .customerTable--autoAppointments {
    width: 940px;
    min-width: 940px;
    table-layout: fixed;
  }

  .customerTable--autoAppointments th,
  .customerTable--autoAppointments td {
    white-space: normal;
  }

  .customerTable--autoAppointments :is(th, td):nth-child(1) { width: 14%; }
  .customerTable--autoAppointments :is(th, td):nth-child(2) { width: 7%; }
  .customerTable--autoAppointments :is(th, td):nth-child(4),
  .customerTable--autoAppointments :is(th, td):nth-child(5) { width: 13%; }
  .customerTable--autoAppointments :is(th, td):nth-child(6) { width: 11%; }
  .customerTable--autoAppointments :is(th, td):nth-child(7) { width: 13%; }
  .customerTable--autoAppointments :is(th, td):nth-child(8) { width: 11%; }
  .customerTable--autoAppointments :is(th, td):nth-child(10) { width: 18%; }

  .customerTable--autoAppointments th:nth-child(3),
  .customerTable--autoAppointments td:nth-child(3),
  .customerTable--autoAppointments th:nth-child(9),
  .customerTable--autoAppointments td:nth-child(9),
  .customerTable--appointments th:nth-child(4),
  .customerTable--appointments td:nth-child(4),
  .customerTable--appointments th:nth-child(6),
  .customerTable--appointments td:nth-child(6),
  .customerTable--appointments th:nth-child(8),
  .customerTable--appointments td:nth-child(8),
  .customerTable--appointments th:nth-child(9),
  .customerTable--appointments td:nth-child(9),
  .customerTable--appointmentsRunning th:nth-child(4),
  .customerTable--appointmentsRunning td:nth-child(4),
  .customerTable--appointmentsRunning th:nth-child(6),
  .customerTable--appointmentsRunning td:nth-child(6),
  .customerTable--appointmentsRunning th:nth-child(8),
  .customerTable--appointmentsRunning td:nth-child(8),
  .customerTable--appointmentsRunning th:nth-child(9),
  .customerTable--appointmentsRunning td:nth-child(9),
  .customerTable--appointmentsCompleted th:nth-child(4),
  .customerTable--appointmentsCompleted td:nth-child(4),
  .customerTable--appointmentsCompleted th:nth-child(6),
  .customerTable--appointmentsCompleted td:nth-child(6),
  .customerTable--appointmentsCompleted th:nth-child(8),
  .customerTable--appointmentsCompleted td:nth-child(8),
  .customerTable--appointmentsCompleted th:nth-child(9),
  .customerTable--appointmentsCompleted td:nth-child(9),
  .customerTable--poManagement th:nth-child(4),
  .customerTable--poManagement td:nth-child(4),
  .customerTable--poManagement th:nth-child(5),
  .customerTable--poManagement td:nth-child(5),
  .customerTable--poManagement th:nth-child(6),
  .customerTable--poManagement td:nth-child(6),
  .customerTable--poManagement th:nth-child(7),
  .customerTable--poManagement td:nth-child(7),
  .customerTable--poManagement th:nth-child(8),
  .customerTable--poManagement td:nth-child(8),
  .customerTable--poManagement th:nth-child(9),
  .customerTable--poManagement td:nth-child(9),
  .customerTable--accounts th:nth-child(2),
  .customerTable--accounts td:nth-child(2),
  .customerTable--accounts th:nth-child(6),
  .customerTable--accounts td:nth-child(6),
  .customerTable--tenantUsers th:nth-child(4),
  .customerTable--tenantUsers td:nth-child(4),
  .customerTable--tenantUsers th:nth-child(6),
  .customerTable--tenantUsers td:nth-child(6) {
    display: none;
  }

  .appointmentTableWrap .customerTable--appointments,
  .appointmentTableWrap .customerTable--appointmentsRunning,
  .appointmentTableWrap .customerTable--appointmentsCompleted {
    width: 820px;
    min-width: 820px;
    table-layout: fixed;
  }

  .customerTable--poManagement,
  .customerTable--accounts,
  .customerTable--tenantUsers {
    width: 720px;
    min-width: 720px;
    table-layout: fixed;
  }

  .modalOverlay {
    padding: 16px;
  }

  .modal,
  .modal.autoAppointmentModal,
  .modal.autoTaskDetailModal,
  .modal.poDetailModal,
  .modal.poEditorModal,
  .modal.addPoModal,
  .poWindowDetailModal {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
  }

  .modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .modalHead,
  .modalActions {
    flex-shrink: 0;
    background: #fff;
  }

  .modalBody {
    min-height: 0;
    overflow-y: auto;
  }

  .auto-detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .autoTaskMoreTrigger,
  .customerMoreTrigger,
  .iconButton {
    min-width: 44px;
    min-height: 44px;
  }

  .autoTaskMorePopover,
  .customerMorePopover {
    max-width: calc(100vw - 24px);
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  .tableWrap:has(> :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  )) {
    overflow: visible;
  }

  :is(
    .autoTaskTableWrap .customerTable--autoAppointments,
    .appointmentTableWrap .customerTable--appointments,
    .appointmentTableWrap .customerTable--appointmentsRunning,
    .appointmentTableWrap .customerTable--appointmentsCompleted,
    .customerTable--autoAppointments tbody,
    .customerTable--appointments tbody,
    .customerTable--appointmentsRunning tbody,
    .customerTable--appointmentsCompleted tbody
  ) {
    display: block;
    width: 100%;
    min-width: 0;
  }

  :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    margin: 0 8px 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
  }

  :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) tbody td {
    position: static;
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    background: transparent;
    text-align: left;
    white-space: normal;
  }

  :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 780;
  }

  :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) tbody td:last-child {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) tbody td:last-child::before {
    content: none;
  }

  :is(
    .customerTable--autoAppointments,
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) .rowActions {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
  }

  .customerTable--autoAppointments :is(th, td):is(:nth-child(3), :nth-child(7), :nth-child(9)),
  :is(
    .customerTable--appointments,
    .customerTable--appointmentsRunning,
    .customerTable--appointmentsCompleted
  ) :is(th, td):is(:nth-child(1), :nth-child(2), :nth-child(5), :nth-child(7), :nth-child(9), :nth-child(10)) {
    display: none;
  }
}

@media (max-width: 900px) {
  .appointmentRunningUtilities {
    flex-wrap: wrap;
  }

  .appointmentRangeExport {
    width: 100%;
  }

  .autoTaskTableWrap .customerTable--autoAppointments tbody td {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .appointmentRangeExport {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointmentRangeExport input {
    width: 100%;
  }

  .appointmentRangeExport button,
  .appointmentRangeExportStatus {
    grid-column: 1 / -1;
  }

  .main {
    padding: 0 8px 28px;
  }

  .topbar {
    min-height: 52px;
  }

  .userMeta {
    display: none;
  }

  .pageHead h1 {
    font-size: 23px;
  }

  .pageHead p {
    font-size: 13px;
    line-height: 1.5;
  }

  .panelHead,
  .autoTaskPanel > .panelHead,
  .autoSuccessPanel > .panelHead {
    align-items: stretch;
    flex-direction: column;
  }

  .panelHead > button,
  .autoTaskPanel > .panelHead > button {
    width: 100%;
  }

  .appointmentToolbar .toolbarLeft,
  .appointmentToolbar .toolbarCenter,
  .appointmentToolbar .toolbarRight,
  .appointmentToolbar .toolbarLeft button,
  .appointmentToolbar .toolbarRight button {
    width: 100%;
  }

  .toolbarCenter input[type="search"] {
    flex: 1 1 0;
    width: 100%;
  }

  #accounts .toolbar > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .poFilterBar {
    grid-template-columns: 1fr;
  }

  .poFilterBar label:nth-child(4) {
    grid-column: auto;
  }

  .poFilterBar > button,
  .poToolbar > button {
    width: 100%;
  }

  .tableWrap:has(> .customerTable--autoAppointments),
  .tableWrap:has(> .customerTable--appointments),
  .tableWrap:has(> .customerTable--appointmentsRunning),
  .tableWrap:has(> .customerTable--appointmentsCompleted),
  .tableWrap:has(> .customerTable--autoSuccess),
  .tableWrap:has(> .customerTable--poManagement),
  .tableWrap:has(> .customerTable--accounts),
  .tableWrap:has(> .customerTable--tenantUsers) {
    overflow: visible;
  }

  .autoTaskTableWrap .customerTable--autoAppointments,
  .appointmentTableWrap .customerTable--appointments,
  .appointmentTableWrap .customerTable--appointmentsRunning,
  .appointmentTableWrap .customerTable--appointmentsCompleted,
  .autoSuccessTableWrap .customerTable--autoSuccess,
  .poManagementTableWrap .customerTable--poManagement,
  .customerTable--accounts,
  .customerTable--tenantUsers,
  .customerTable--autoAppointments tbody,
  .customerTable--appointments tbody,
  .customerTable--appointmentsRunning tbody,
  .customerTable--appointmentsCompleted tbody,
  .customerTable--autoSuccess tbody,
  .customerTable--poManagement tbody,
  .customerTable--accounts tbody,
  .customerTable--tenantUsers tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .customerTable--autoAppointments thead,
  .customerTable--appointments thead,
  .customerTable--appointmentsRunning thead,
  .customerTable--appointmentsCompleted thead,
  .customerTable--autoSuccess thead,
  .customerTable--poManagement thead,
  .customerTable--accounts thead,
  .customerTable--tenantUsers thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .customerTable--autoAppointments tbody tr,
  .customerTable--appointments tbody tr,
  .customerTable--appointmentsRunning tbody tr,
  .customerTable--appointmentsCompleted tbody tr,
  .customerTable--autoSuccess tbody tr,
  .customerTable--poManagement tbody tr,
  .customerTable--accounts tbody tr,
  .customerTable--tenantUsers tbody tr {
    display: block;
    height: auto;
    margin: 0 8px 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
  }

  .customerTable--autoAppointments tbody td,
  .customerTable--appointments tbody td,
  .customerTable--appointmentsRunning tbody td,
  .customerTable--appointmentsCompleted tbody td,
  .customerTable--autoSuccess tbody td,
  .customerTable--poManagement tbody td,
  .customerTable--accounts tbody td,
  .customerTable--tenantUsers tbody td {
    position: static;
    display: grid;
    grid-template-columns: minmax(98px, 34%) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 7px 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    text-align: left;
    white-space: normal;
  }

  .customerTable--autoAppointments tbody td::before,
  .customerTable--appointments tbody td::before,
  .customerTable--appointmentsRunning tbody td::before,
  .customerTable--appointmentsCompleted tbody td::before,
  .customerTable--autoSuccess tbody td::before,
  .customerTable--poManagement tbody td::before,
  .customerTable--accounts tbody td::before,
  .customerTable--tenantUsers tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 780;
  }

  .customerTable--autoAppointments tbody td:last-child,
  .customerTable--appointments tbody td:last-child,
  .customerTable--appointmentsRunning tbody td:last-child,
  .customerTable--appointmentsCompleted tbody td:last-child,
  .customerTable--autoSuccess tbody td:last-child,
  .customerTable--poManagement tbody td:last-child,
  .customerTable--accounts tbody td:last-child,
  .customerTable--tenantUsers tbody td:last-child {
    grid-template-columns: 1fr;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .customerTable--autoAppointments tbody td:last-child::before,
  .customerTable--appointments tbody td:last-child::before,
  .customerTable--appointmentsRunning tbody td:last-child::before,
  .customerTable--appointmentsCompleted tbody td:last-child::before,
  .customerTable--autoSuccess tbody td:last-child::before,
  .customerTable--poManagement tbody td:last-child::before,
  .customerTable--accounts tbody td:last-child::before,
  .customerTable--tenantUsers tbody td:last-child::before {
    content: none;
  }

  .customerTable--autoAppointments .rowActions,
  .customerTable--appointments .rowActions,
  .customerTable--appointmentsRunning .rowActions,
  .customerTable--appointmentsCompleted .rowActions,
  .customerTable--autoSuccess .rowActions,
  .customerTable--poManagement .rowActions,
  .customerTable--accounts .rowActions,
  .customerTable--tenantUsers .rowActions {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
  }

  .customerTable--appointments th:nth-child(4),
  .customerTable--appointments td:nth-child(4),
  .customerTable--appointments th:nth-child(6),
  .customerTable--appointments td:nth-child(6),
  .customerTable--appointments th:nth-child(8),
  .customerTable--appointments td:nth-child(8),
  .customerTable--appointments th:nth-child(9),
  .customerTable--appointments td:nth-child(9),
  .customerTable--appointmentsRunning th:nth-child(4),
  .customerTable--appointmentsRunning td:nth-child(4),
  .customerTable--appointmentsRunning th:nth-child(6),
  .customerTable--appointmentsRunning td:nth-child(6),
  .customerTable--appointmentsRunning th:nth-child(8),
  .customerTable--appointmentsRunning td:nth-child(8),
  .customerTable--appointmentsRunning th:nth-child(9),
  .customerTable--appointmentsRunning td:nth-child(9),
  .customerTable--appointmentsCompleted th:nth-child(4),
  .customerTable--appointmentsCompleted td:nth-child(4),
  .customerTable--appointmentsCompleted th:nth-child(6),
  .customerTable--appointmentsCompleted td:nth-child(6),
  .customerTable--appointmentsCompleted th:nth-child(8),
  .customerTable--appointmentsCompleted td:nth-child(8),
  .customerTable--appointmentsCompleted th:nth-child(9),
  .customerTable--appointmentsCompleted td:nth-child(9),
  .customerTable--poManagement th:nth-child(4),
  .customerTable--poManagement td:nth-child(4),
  .customerTable--poManagement th:nth-child(5),
  .customerTable--poManagement td:nth-child(5),
  .customerTable--poManagement th:nth-child(6),
  .customerTable--poManagement td:nth-child(6),
  .customerTable--poManagement th:nth-child(7),
  .customerTable--poManagement td:nth-child(7),
  .customerTable--poManagement th:nth-child(8),
  .customerTable--poManagement td:nth-child(8),
  .customerTable--poManagement th:nth-child(9),
  .customerTable--poManagement td:nth-child(9),
  .customerTable--accounts th:nth-child(2),
  .customerTable--accounts td:nth-child(2),
  .customerTable--accounts th:nth-child(5),
  .customerTable--accounts td:nth-child(5),
  .customerTable--accounts th:nth-child(6),
  .customerTable--accounts td:nth-child(6),
  .customerTable--tenantUsers th:nth-child(4),
  .customerTable--tenantUsers td:nth-child(4),
  .customerTable--tenantUsers th:nth-child(6),
  .customerTable--tenantUsers td:nth-child(6) {
    display: none;
  }

  .appointmentPagination,
  .autoTaskPagination,
  .poManagementPagination {
    align-items: stretch;
    flex-direction: column;
  }

  .paginationMeta {
    margin-right: 0;
  }

  .paginationButtons,
  .poPaginationControls {
    justify-content: space-between;
    width: 100%;
  }

  .modalOverlay,
  .poWindowDetailOverlay,
  .addPoCancelConfirmOverlay {
    padding: 8px;
  }

  .modal,
  .modal.autoAppointmentModal,
  .modal.autoTaskDetailModal,
  .modal.poDetailModal,
  .modal.poEditorModal,
  .modal.addPoModal,
  .poWindowDetailModal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .modalHead,
  .modalActions {
    padding: 12px;
  }

  .modalBody {
    padding: 12px;
  }

  .auto-detail-info-grid,
  .detailGrid.autoRealtimeGrid {
    grid-template-columns: 1fr;
  }

  .autoRunsTableWrap {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .poFilterBar,
  .poDetailSummaryRowPrimary,
  .poDetailSummaryRowSecondary {
    grid-template-columns: 1fr;
  }

  .poDetailTableHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .poManagementCard {
    min-height: 420px;
    height: auto;
  }

  .poDesktopPages {
    display: none;
  }

  .poMobilePage {
    display: inline-flex;
  }
}

@media (max-width: 700px) {
  .modal.poEditorModal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 48px);
  }

  .modal.poEditorModal .modalHead {
    padding: 10px 12px;
  }

  .modal.poEditorModal .modalBody {
    padding: 16px 12px 0;
  }

  .poEditorBasics {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .poSectionHead {
    align-items: flex-start;
    flex-direction: column;
  }

  .poEditorTable {
    overflow-x: auto;
  }

  .poEditorTable table {
    min-width: 620px;
  }

  .poEditorFooter {
    align-items: stretch;
    flex-direction: column;
    margin-left: -12px;
    margin-right: -12px;
    padding: 14px 12px;
  }

  .poEditorFooterLeft,
  .poEditorFooterRight {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  .modal.poEditorModal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
}
