/* Final shared overrides for migrated pages. Loaded after page-level styles. */

.btn,
a.btn,
button.btn,
input.btn,
.btn-group > .btn,
.input-group-btn > .btn {
  border-radius: 10px !important;
}

.form-control,
select.form-control,
textarea.form-control,
input.form-control,
.chosen-container-single .chosen-single,
.chosen-container .chosen-drop,
.chosen-container-single .chosen-search input[type="text"] {
  border-radius: 10px !important;
}

.panel-heading,
.legacy-panel .panel-heading,
.panel > .panel-heading,
.widget .panel-heading,
.purchase-page .panel-heading,
.purchase-page.panel-heading {
  padding: 10px 16px !important;
}

.panel-title,
.legacy-panel .panel-title,
.purchase-page .panel-title {
  line-height: 1.25;
}

.panel-body,
.legacy-panel .panel-body,
.purchase-page .panel-body {
  padding: 14px 16px;
}

.panel-footer,
.legacy-panel .panel-footer,
.purchase-page .panel-footer {
  padding: 10px 14px;
}

.table > thead > tr > th,
.table > tbody > tr > td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.table a.btn,
.table button.btn,
.table input.btn,
.table .btn {
  padding: 6px 12px;
}

.table td .btn + .btn,
.table td a.btn + a.btn,
.table td .btn-group + .btn,
.table td .btn + .btn-group {
  margin-left: 6px;
}

.legacy-user-toggle {
  min-height: 34px;
  padding: 4px 10px 4px 6px;
}

.legacy-avatar-shell {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.legacy-user-menu > li > a {
  padding-top: 8px;
  padding-bottom: 8px;
}

.legacy-panel select.form-control,
.purchase-page select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23486774' d='M1.15.73 5 4.3 8.85.73 10 1.8 5 6 0 1.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px 6px;
  color: #2d353c !important;
  -webkit-text-fill-color: #2d353c;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color-scheme: light;
}

.legacy-panel select.form-control::-ms-expand,
.purchase-page select.form-control::-ms-expand {
  display: none;
}

.legacy-panel select.form-control:focus,
.purchase-page select.form-control:focus,
.legacy-panel select.form-control:active,
.purchase-page select.form-control:active {
  background-color: #ffffff !important;
  color: #22313c !important;
  -webkit-text-fill-color: #22313c;
}

.legacy-panel select.form-control option,
.purchase-page select.form-control option,
.legacy-panel select.form-control optgroup,
.purchase-page select.form-control optgroup {
  background: #ffffff;
  color: #2d353c;
}

.legacy-panel select.form-control option:checked,
.purchase-page select.form-control option:checked,
.legacy-panel select.form-control option:hover,
.purchase-page select.form-control option:hover,
.legacy-panel select.form-control option:focus,
.purchase-page select.form-control option:focus {
  background: linear-gradient(180deg, #edf8fc 0%, #dff1f7 100%);
  color: #1f5060;
}

.legacy-panel .chosen-container,
.purchase-page .chosen-container {
  max-width: 100%;
  font-size: 13px;
}

.legacy-panel .chosen-container-single .chosen-single,
.purchase-page .chosen-container-single .chosen-single {
  height: 42px;
  line-height: 40px;
  border-radius: 16px;
  border: 1px solid #cfdbe4;
  padding: 0 42px 0 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(36, 42, 48, 0.03);
  color: #2d353c;
}

.legacy-panel .chosen-container-single .chosen-single span,
.purchase-page .chosen-container-single .chosen-single span,
.legacy-panel .chosen-container-single .chosen-default,
.purchase-page .chosen-container-single .chosen-default {
  color: #2d353c;
}

.legacy-panel .chosen-container-single .chosen-single div,
.purchase-page .chosen-container-single .chosen-single div {
  width: 36px;
}

.legacy-panel .chosen-container-single .chosen-single div b,
.purchase-page .chosen-container-single .chosen-single div b {
  background: none;
  position: relative;
}

.legacy-panel .chosen-container-single .chosen-single div b::after,
.purchase-page .chosen-container-single .chosen-single div b::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 6px;
  margin: -3px 0 0 -5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23486774' d='M1.15.73 5 4.3 8.85.73 10 1.8 5 6 0 1.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 10px 6px;
}

.legacy-panel .chosen-container-active .chosen-single,
.purchase-page .chosen-container-active .chosen-single,
.legacy-panel .chosen-container-active.chosen-with-drop .chosen-single,
.purchase-page .chosen-container-active.chosen-with-drop .chosen-single {
  border-color: #49adc5;
  box-shadow: 0 0 0 4px rgba(73, 173, 197, 0.16);
  background: #ffffff;
}

.legacy-panel .chosen-container .chosen-drop,
.purchase-page .chosen-container .chosen-drop {
  margin-top: 8px;
  border: 1px solid #cfdbe4;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 30px rgba(36, 42, 48, 0.12);
  overflow: hidden;
}

.legacy-panel .chosen-container-single .chosen-search,
.purchase-page .chosen-container-single .chosen-search {
  padding: 10px;
}

.legacy-panel .chosen-container-single .chosen-search input[type="text"],
.purchase-page .chosen-container-single .chosen-search input[type="text"] {
  border: 1px solid #d4e0e8;
  border-radius: 12px;
  min-height: 36px;
  padding: 7px 34px 7px 10px;
  background-color: #ffffff;
  color: #2d353c;
  box-shadow: none;
}

.legacy-panel .chosen-container .chosen-results,
.purchase-page .chosen-container .chosen-results {
  margin: 0;
  padding: 0 0 6px;
}

.legacy-panel .chosen-container .chosen-results li,
.purchase-page .chosen-container .chosen-results li {
  padding: 9px 12px;
  color: #2d353c;
}

.legacy-panel .chosen-container .chosen-results li.highlighted,
.purchase-page .chosen-container .chosen-results li.highlighted {
  background: linear-gradient(180deg, #27a9d4 0%, #1f8eb4 100%);
  color: #ffffff;
}

.legacy-panel .chosen-container .chosen-results li.result-selected,
.purchase-page .chosen-container .chosen-results li.result-selected {
  background: #edf8fc;
  color: #22B8CF;
}

.legacy-header {
  height: 46px;
}

.legacy-logo-wrap {
  width: 192px;
}

.legacy-logo-link {
  height: 46px;
}

.legacy-logo {
  max-height: 34px;
}

.legacy-topbar-right {
  padding-right: 10px;
}

.legacy-user-toggle {
  gap: 10px;
  min-height: 38px;
  padding: 4px 12px 4px 7px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2f97d9 0%, #2288cb 100%);
  border: 1px solid #2787c5;
  box-shadow: 0 8px 18px rgba(35, 135, 202, 0.16);
}

.legacy-user-toggle:hover,
.legacy-user-toggle:focus {
  background: linear-gradient(180deg, #2a8fce 0%, #1d7fc0 100%);
}

.legacy-avatar-shell {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.legacy-avatar {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: transparent;
}

.legacy-avatar-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.legacy-user-meta {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.legacy-user {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: #ffffff;
}

.legacy-user-caret {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.95);
}

.legacy-user-menu {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d7e3ec;
  box-shadow: 0 16px 32px rgba(28, 53, 72, 0.12);
}

.btn-primary,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:hover,
.btn-info,
.btn-info:focus,
.btn-info:active,
.btn-info:hover {
  background: linear-gradient(180deg, #349ede 0%, #248dce 100%) !important;
  border-color: #278cc9 !important;
}

.btn-success,
.btn-success:focus,
.btn-success:active,
.btn-success:hover,
.btn-theme-edit,
.btn-theme-edit:focus,
.btn-theme-edit:active,
.btn-theme-edit:hover {
  background: linear-gradient(180deg, #2dc3cb 0%, #20b5bf 100%) !important;
  border-color: #21afb8 !important;
  color: #ffffff !important;
}

.btn-theme-report,
.btn-theme-report:focus,
.btn-theme-report:active,
.btn-theme-report:hover {
  background: linear-gradient(180deg, #aa80db 0%, #9a70cf 100%) !important;
  border-color: #9367c7 !important;
  color: #ffffff !important;
}

.btn-theme-cancel,
.btn-theme-cancel:focus,
.btn-theme-cancel:active,
.btn-theme-cancel:hover {
  background: linear-gradient(180deg, #f59f8e 0%, #ee8d79 100%) !important;
  border-color: #e98a75 !important;
  color: #ffffff !important;
}

.btn-default,
.btn-default:focus,
.btn-default:active,
.btn-default:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%) !important;
  border-color: #d7e0e7 !important;
  color: #4d5f6d !important;
}

.legacy-panel .legacy-action-btn,
.purchase-page .legacy-action-btn,
.legacy-panel .btn-view,
.purchase-page .btn-view,
.legacy-panel .btn-view-details,
.purchase-page .btn-view-details,
.legacy-panel .btn-edit,
.purchase-page .btn-edit,
.legacy-panel .btn-theme-edit,
.purchase-page .btn-theme-edit,
.legacy-panel .btn-theme-report,
.purchase-page .btn-theme-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 82px;
  min-height: 30px;
  padding: 7px 16px !important;
  border-radius: 10px !important;
  border-width: 1px;
  border-style: solid;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.legacy-panel .legacy-action-btn::before,
.purchase-page .legacy-action-btn::before,
.legacy-panel .btn-view::before,
.purchase-page .btn-view::before,
.legacy-panel .btn-view-details::before,
.purchase-page .btn-view-details::before,
.legacy-panel .btn-edit::before,
.purchase-page .btn-edit::before {
  display: inline-block;
  font-family: "Glyphicons Halflings";
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legacy-panel .legacy-action-btn.btn-primary::before,
.purchase-page .legacy-action-btn.btn-primary::before,
.legacy-panel .btn-view::before,
.purchase-page .btn-view::before,
.legacy-panel .btn-view-details::before,
.purchase-page .btn-view-details::before {
  content: "\e105";
}

.legacy-panel .legacy-action-btn.btn-theme-edit::before,
.purchase-page .legacy-action-btn.btn-theme-edit::before,
.legacy-panel .btn-edit::before,
.purchase-page .btn-edit::before {
  content: "\270f";
}

.legacy-panel .legacy-action-btn.btn-theme-report::before,
.purchase-page .legacy-action-btn.btn-theme-report::before {
  content: "\e022";
}

.legacy-panel .btn-xs.legacy-action-btn,
.purchase-page .btn-xs.legacy-action-btn,
.legacy-panel .btn-xs.btn-view,
.purchase-page .btn-xs.btn-view,
.legacy-panel .btn-xs.btn-view-details,
.purchase-page .btn-xs.btn-view-details,
.legacy-panel .btn-xs.btn-edit,
.purchase-page .btn-xs.btn-edit,
.legacy-panel .btn-xs.btn-theme-edit,
.purchase-page .btn-xs.btn-theme-edit,
.legacy-panel .btn-xs.btn-theme-report,
.purchase-page .btn-xs.btn-theme-report {
  min-width: 74px;
  min-height: 28px;
  padding: 6px 14px !important;
}

.legacy-panel .btn-sm.legacy-action-btn,
.purchase-page .btn-sm.legacy-action-btn,
.legacy-panel .btn-sm.btn-view,
.purchase-page .btn-sm.btn-view,
.legacy-panel .btn-sm.btn-view-details,
.purchase-page .btn-sm.btn-view-details,
.legacy-panel .btn-sm.btn-edit,
.purchase-page .btn-sm.btn-edit,
.legacy-panel .btn-sm.btn-theme-edit,
.purchase-page .btn-sm.btn-theme-edit,
.legacy-panel .btn-sm.btn-theme-report,
.purchase-page .btn-sm.btn-theme-report {
  min-width: 78px;
}

.legacy-panel .btn-view,
.purchase-page .btn-view,
.legacy-panel .btn-view-details,
.purchase-page .btn-view-details,
.legacy-panel .btn-primary.legacy-action-btn,
.purchase-page .btn-primary.legacy-action-btn {
  background: linear-gradient(180deg, #349ede 0%, #248dce 100%) !important;
  border-color: #278cc9 !important;
  color: #ffffff !important;
}

.legacy-panel .btn-edit,
.purchase-page .btn-edit,
.legacy-panel .btn-theme-edit,
.purchase-page .btn-theme-edit {
  background: linear-gradient(180deg, #2dc3cb 0%, #20b5bf 100%) !important;
  border-color: #21afb8 !important;
  color: #ffffff !important;
}

.legacy-panel .btn-theme-report,
.purchase-page .btn-theme-report {
  background: linear-gradient(180deg, #aa80db 0%, #9a70cf 100%) !important;
  border-color: #9367c7 !important;
  color: #ffffff !important;
}

.legacy-panel .btn-theme-cancel,
.purchase-page .btn-theme-cancel {
  background: linear-gradient(180deg, #f59f8e 0%, #ee8d79 100%) !important;
  border-color: #e98a75 !important;
  color: #ffffff !important;
}

.legacy-panel .legacy-action-btn:hover,
.purchase-page .legacy-action-btn:hover,
.legacy-panel .btn-view:hover,
.purchase-page .btn-view:hover,
.legacy-panel .btn-view-details:hover,
.purchase-page .btn-view-details:hover,
.legacy-panel .btn-edit:hover,
.purchase-page .btn-edit:hover,
.legacy-panel .btn-theme-edit:hover,
.purchase-page .btn-theme-edit:hover,
.legacy-panel .btn-theme-report:hover,
.purchase-page .btn-theme-report:hover,
.legacy-panel .legacy-action-btn:focus,
.purchase-page .legacy-action-btn:focus,
.legacy-panel .btn-view:focus,
.purchase-page .btn-view:focus,
.legacy-panel .btn-view-details:focus,
.purchase-page .btn-view-details:focus,
.legacy-panel .btn-edit:focus,
.purchase-page .btn-edit:focus,
.legacy-panel .btn-theme-edit:focus,
.purchase-page .btn-theme-edit:focus,
.legacy-panel .btn-theme-report:focus,
.purchase-page .btn-theme-report:focus {
  opacity: 0.96;
  transform: translateY(-1px);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
  color: #ffffff !important;
  background: linear-gradient(180deg, #2f97b8 0%, #267f9b 100%) !important;
  border-color: #267f9b !important;
  text-shadow: none;
}

.legacy-sidebar {
  top: 46px;
}

.legacy-main {
  margin-top: 46px;
  min-height: calc(100vh - 46px);
  /* Base CSS sets width:100% AND margin-left:185px, which pushes the content
     185px past the viewport (constant horizontal scrollbar on every desktop
     page). Use auto width so the left margin is respected instead. */
  width: auto;
  max-width: none;
}

.panel-heading,
.legacy-panel .panel-heading,
.panel-heading.purchase-page,
.purchase-page .panel-heading {
  padding: 10px 16px;
}

.legacy-panel .panel-body,
.purchase-page .panel-body {
  padding: 14px 16px;
}

.legacy-panel .panel-footer,
.purchase-page .panel-footer {
  padding: 10px 14px;
}

.legacy-panel .btn,
.purchase-page .btn,
.invoice-toolbar .btn,
.invoice-filter-actions .btn {
  border-radius: 10px;
}

.legacy-panel .form-control,
.legacy-panel select.form-control,
.legacy-panel textarea.form-control,
.purchase-page .form-control,
.purchase-page select.form-control,
.purchase-page textarea.form-control,
.legacy-panel .chosen-container-single .chosen-single,
.purchase-page .chosen-container-single .chosen-single,
.legacy-panel .chosen-container .chosen-drop,
.purchase-page .chosen-container .chosen-drop,
.legacy-panel .chosen-container-single .chosen-search input[type="text"],
.purchase-page .chosen-container-single .chosen-search input[type="text"] {
  border-radius: 10px;
}

.legacy-panel .form-control,
.legacy-panel select.form-control,
.purchase-page .form-control,
.purchase-page select.form-control,
.legacy-panel .chosen-container-single .chosen-single,
.purchase-page .chosen-container-single .chosen-single {
  min-height: 40px;
}

.purchase-page .btn {
  padding: 8px 16px;
}

.invoice-page {
  padding-top: 14px !important;
}

.invoice-page-shell {
  border: 1px solid #C4DAF0;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #F2F8FF 100%);
  box-shadow: 0 18px 34px rgba(36, 42, 48, 0.06);
  overflow: hidden;
}

.invoice-shell-section {
  padding: 16px 18px;
}

.invoice-shell-section + .invoice-shell-section {
  border-top: 1px solid #C8DCF0;
}

.invoice-toolbar {
  gap: 10px;
}

.invoice-toolbar .btn {
  min-width: 160px;
  padding: 9px 18px;
}

.invoice-toolbar .btn-default {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
  border-color: #d8e2ea;
  color: #516571 !important;
}

.invoice-filter-header {
  margin-bottom: 14px;
}

.invoice-filter-eyebrow {
  color: #3d4348;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

.invoice-filter-subtitle {
  margin-top: 2px;
  color: #a2adb7;
  font-size: 12px;
}

.invoice-filter-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.invoice-filter-field .control-label {
  margin-bottom: 5px;
  color: #475f6f;
  font-size: 13px;
  font-weight: 600;
}

.invoice-filter-actions {
  justify-content: flex-end;
  align-self: end;
}

.invoice-filter-actions .btn {
  min-width: 120px;
}

.invoice-results-heading {
  padding-bottom: 14px;
  margin-bottom: 0;
}

.invoice-results-table-wrap {
  overflow: auto;
  border: 1px solid #C8DCF0;
  border-radius: 14px;
}

.invoice-results-table {
  margin-bottom: 0;
}

.invoice-results-table > thead > tr > th {
  background: linear-gradient(180deg, #E0F0FF 0%, #D4E8FA 100%);
  color: #4A6272;
  font-weight: 600;
}

.invoice-results-table > tbody > tr > td {
  background: #ffffff;
}

.invoice-results-table .invoice-col-order {
  width: 150px;
}

.invoice-results-table .invoice-col-recipient {
  width: 210px;
}

.invoice-results-table .invoice-col-action {
  width: 220px;
}

.invoice-results-table td.invoice-cell-order,
.invoice-results-table td.invoice-cell-recipient {
  white-space: normal;
  word-break: break-word;
}

.invoice-results-table td.invoice-cell-action,
.invoice-results-table th.invoice-col-action {
  white-space: nowrap;
}

.invoice-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.invoice-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.invoice-action-btn .glyphicon {
  font-size: 11px;
}

.invoice-page-shell .panel-footer {
  background: transparent;
  border-top: 1px solid #C8DCF0;
}

@media (max-width: 991px) {
  .invoice-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-filter-actions {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .legacy-logo-wrap {
    width: 150px;
  }

  .legacy-user {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .invoice-shell-section {
    padding: 14px;
  }

  .invoice-toolbar .btn,
  .invoice-filter-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .invoice-filter-grid {
    grid-template-columns: 1fr;
  }

  .invoice-filter-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .invoice-action-group {
    flex-direction: column;
    align-items: stretch;
  }
}

.customer-support-shell {
  padding: 10px;
  display: grid;
  gap: 16px;
}

.customer-support-card {
  border: 1px solid #C4D8F0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

.customer-support-form {
  display: grid;
  gap: 12px;
}

.customer-support-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e4ecf3;
}

.customer-support-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(36, 141, 206, 0.1);
  color: #1c82c2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-support-hero-copy {
  margin-top: 12px;
  max-width: 760px;
  color: #5b7083;
  line-height: 1.65;
}

.customer-support-nav-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.customer-support-nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid #d8e5ef;
  border-radius: 999px;
  background: #f9fcff;
  color: #2a84ba;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.customer-support-nav-pill:hover,
.customer-support-nav-pill:focus {
  border-color: #84bfdc;
  background: #eef7fd;
  color: #1f6f9f;
  text-decoration: none;
}

.customer-support-form-label,
.customer-support-results-header h4,
.customer-support-detail-header h4,
.customer-support-mini-card-title,
.customer-support-summary-title {
  margin: 0;
  color: #16324f;
  font-weight: 700;
}

.customer-support-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 16px;
}

.customer-support-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 500;
}

.customer-support-radio-option input[type="radio"] {
  margin: 0;
}

.customer-support-search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.customer-support-search-input-wrap {
  min-width: 260px;
  flex: 1 1 420px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #d8e4ee;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.customer-support-search-input-wrap .glyphicon {
  color: #58a7d2;
  font-size: 16px;
}

.customer-support-search-row .form-control {
  min-width: 0;
  flex: 1 1 auto;
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}

.customer-support-search-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.customer-support-search-button {
  min-width: 120px;
}

.customer-support-reset-button {
  min-width: 120px;
}

.customer-support-clear-link {
  color: #2988be;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.customer-support-clear-link:hover,
.customer-support-clear-link:focus {
  color: #1d6f9d;
  text-decoration: underline;
}

.customer-support-active-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #EEF6FF;
  border: 1px solid #C8DCF0;
  color: #334155;
}

.customer-support-active-search-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(36, 141, 206, 0.1);
  color: #1c82c2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.customer-support-summary-card {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #F0F7FF 0%, #E4F0FC 100%);
  border: 1px solid #C4DAF0;
  color: #334155;
}

.customer-support-summary-title {
  margin-bottom: 8px;
}

.customer-support-alert {
  margin-top: 14px;
  margin-bottom: 0;
}

.customer-support-results-grid,
.customer-support-detail-grid {
  display: grid;
  gap: 16px;
}

.customer-support-results-grid,
.customer-support-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.customer-support-results-header,
.customer-support-detail-header,
.customer-support-meta-row,
.customer-support-financial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-support-results-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.customer-support-section-note {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.customer-support-results-header span,
.customer-support-detail-eyebrow,
.customer-support-muted {
  color: #64748b;
}

.customer-support-results-header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef7fd;
  border: 1px solid #d5e9f7;
  color: #2a84ba;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.customer-support-detail-eyebrow {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-support-alert-stack {
  margin-top: 12px;
}

.customer-support-alert-inline {
  margin-bottom: 10px;
}

.customer-support-meta-row {
  margin-top: 14px;
  flex-wrap: wrap;
  color: #334155;
}

.customer-support-address-grid,
.customer-support-mini-grid,
.customer-support-detail-footer {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.customer-support-address-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.customer-support-fields-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.customer-support-mini-card,
.customer-support-field-box {
  border: 1px solid #C8DCF0;
  border-radius: 12px;
  background: #F0F7FF;
  padding: 14px;
  color: #334155;
}

.customer-support-field-box {
  display: grid;
  gap: 6px;
}

.customer-support-field-box span {
  color: #0f172a;
  font-weight: 600;
}

.customer-support-table-wrap {
  margin-top: 16px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  overflow-x: auto;
  background: #ffffff;
}

.customer-support-table > thead > tr > th,
.customer-support-table > tbody > tr > td,
.customer-support-results-table > thead > tr > th,
.customer-support-results-table > tbody > tr > td {
  vertical-align: top;
}

.customer-support-table > thead > tr > th,
.customer-support-results-table > thead > tr > th {
  background: #f5f9fc;
  border-bottom: 1px solid #dbe5ef;
  color: #16324f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.customer-support-table > tbody > tr:hover > td,
.customer-support-results-table > tbody > tr:hover > td {
  background: #fbfdff;
}

.customer-support-results-table > tbody > tr > td,
.customer-support-table > tbody > tr > td {
  border-top-color: #e8eef5;
  /* Wrap long cell content (e.g. emails like shipping_..@..) so it shows in full inside
     the narrow two-column results layout instead of being clipped. */
  word-break: break-word;
  overflow-wrap: anywhere;
}

.customer-support-description-cell {
  min-width: 180px;
  overflow-wrap: anywhere;
}

.customer-support-actions-col {
  white-space: nowrap;
  width: 1%;
}

.customer-support-actions-col .btn {
  margin-right: 6px;
  margin-bottom: 6px;
}

.customer-support-actions-col .legacy-action-btn {
  min-width: 88px;
}

.customer-support-empty {
  text-align: center;
  color: #64748b;
  padding: 18px !important;
}

.customer-support-detail-footer {
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
}

.customer-support-subsection-title {
  margin-top: 14px;
  margin-bottom: 4px;
  color: #16324f;
  font-weight: 700;
}

.customer-support-financial-list {
  display: grid;
  gap: 8px;
}

.customer-support-financial-row.is-highlighted {
  padding-top: 8px;
  border-top: 1px solid #cfe0f3;
  color: #0f3f68;
}

.customer-support-rma-notes {
  margin-top: 16px;
}

.customer-ledger-hero-card,
.cash-receipt-search-shell {
  padding: 22px !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, #ffffff 0%, #EEF6FF 100%) !important;
}

.customer-ledger-menu-card {
  padding-top: 14px !important;
}

.customer-ledger-hero-copy,
.cash-receipt-search-copy {
  max-width: 860px;
}

.customer-ledger-kicker,
.cash-receipt-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(36, 141, 206, 0.1);
  color: #1c82c2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-ledger-hero-copy h4,
.cash-receipt-search-copy h4 {
  margin: 12px 0 8px;
  color: #16324f;
  font-size: 28px;
  font-weight: 700;
}

.customer-ledger-hero-copy p,
.cash-receipt-search-copy p {
  margin: 12px 0 0;
  color: #5b7083;
  line-height: 1.65;
}

.cash-receipt-nav-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.cash-receipt-search-form {
  margin-top: 18px;
}

.legacy-panel.cash-receipt-host-panel,
.legacy-panel.cash-receipt-host-panel > .purchase-page,
.legacy-panel.cash-receipt-host-panel .panel,
.legacy-panel.cash-receipt-host-panel .panel-body {
  overflow: visible !important;
}

.cash-receipt-page,
.cash-receipt-page .panel,
.cash-receipt-page .panel-body,
.cash-receipt-page .module-card,
.cash-receipt-search-shell,
.cash-receipt-search-form,
.cash-receipt-search-grid,
.cash-receipt-search-grid > div {
  overflow: visible !important;
}

.cash-receipt-search-shell,
.cash-receipt-search-grid > div {
  position: relative;
}

.cash-receipt-search-shell {
  padding-bottom: 72px !important;
}

.cash-receipt-search-grid {
  display: grid;
  grid-template-columns: 260px 260px auto;
  gap: 14px;
  align-items: end;
}

.cash-receipt-search-grid > div > label {
  display: block;
  margin-bottom: 8px;
}

.cash-receipt-search-grid .chosen-container,
.cash-receipt-search-grid select.form-control {
  width: 260px;
  max-width: 260px;
}

.cash-receipt-page .chosen-container {
  position: relative;
  z-index: 20;
}

.cash-receipt-page .chosen-container.chosen-with-drop {
  z-index: 9999;
}

.cash-receipt-page .chosen-container .chosen-results li,
.cash-receipt-page .chosen-container .chosen-results li.active-result,
.cash-receipt-page .chosen-container .chosen-results li.result-selected,
.cash-receipt-page .chosen-container-single .chosen-single span,
.cash-receipt-page .chosen-container-single .chosen-default {
  color: #2d353c !important;
}

.cash-receipt-page .chosen-container .chosen-drop {
  position: absolute !important;
  background: #ffffff !important;
  z-index: 9999;
  overflow: hidden;
  box-shadow: 0 18px 30px rgba(36, 42, 48, 0.12);
}

.cash-receipt-page .chosen-container .chosen-results {
  display: block !important;
  max-height: 240px !important;
  overflow-y: auto !important;
  background: #ffffff;
}

.cash-receipt-page .chosen-container .chosen-results li {
  display: list-item !important;
  background: #ffffff;
}

.cash-receipt-page .chosen-container .chosen-results li.highlighted {
  color: #ffffff !important;
}

.invoice-display-toolbar-top {
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.invoice-display-hero-baseline {
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.invoice-display-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.invoice-display-hero-metric {
  color: #2a3c48;
  font-size: 15px;
  font-weight: 600;
}

.invoice-display-hero-metric strong {
  margin-right: 6px;
}

.invoice-display-card-title-plain {
  margin-bottom: 14px;
  color: #2d353c;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.invoice-display-card-subheading {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 14px;
}

.invoice-display-card-name {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.invoice-display-billto-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(149, 180, 205, 0.35);
}

.invoice-display-address-grid .invoice-display-card,
.invoice-selected-address-card {
  background: #fcfcfc !important;
  border-color: #d9e2e8 !important;
  box-shadow: none !important;
}

.invoice-selected-metrics-row {
  color: #2f4350;
  font-size: 15px;
}

.invoice-display-table,
.invoice-selected-detail-panel table.table.table-bordered.table-striped {
  table-layout: fixed;
  width: 100%;
}

.invoice-display-col-item {
  width: 46% !important;
  min-width: 360px;
}

.invoice-display-col-esn {
  width: 26% !important;
  min-width: 240px;
}

.invoice-display-cell-item,
.invoice-display-cell-item strong {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.invoice-display-cell-esn {
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.invoice-display-cell-esn .invoice-display-table-note {
  word-break: break-word;
}

@media (max-width: 1600px) {
  .invoice-display-col-item {
    width: 42% !important;
    min-width: 300px;
  }

  .invoice-display-col-esn {
    width: 30% !important;
    min-width: 220px;
  }
}

@media (max-width: 1199px) {
  .invoice-display-col-item,
  .invoice-display-col-esn {
    min-width: 0;
  }
}

.invoice-display-detail-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 4px;
}

.invoice-display-detail-chip {
  color: #2d353c;
  font-size: 15px;
  font-weight: 600;
}

.invoice-display-detail-chip strong {
  margin-right: 6px;
}

.invoice-display-table-baseline thead th {
  background: linear-gradient(180deg, #D4ECFF 0%, #C4E2FA 100%);
  color: #526775;
  font-weight: 400;
}

.invoice-display-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.invoice-display-summary-card {
  padding-top: 10px;
}

.invoice-display-summary-card .invoice-display-summary-row:last-child {
  border-bottom: 0;
}

.invoice-editor-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invoice-editor-page-heading-note {
  display: none;
}

.invoice-editor-page .invoice-editor-toolbar-panel {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.invoice-editor-page .invoice-editor-toolbar-panel .panel-body {
  padding: 8px 0 12px !important;
}

.invoice-editor-page .invoice-editor-toolbar {
  justify-content: flex-end;
}

.invoice-editor-page .invoice-editor-bottom-toolbar .invoice-editor-toolbar {
  justify-content: flex-start;
}

.icon-flip-h {
  display: inline-block;
  transform: scaleX(-1);
}

.invoice-editor-page .invoice-editor-toolbar .btn {
  min-width: 94px;
  min-height: 38px;
  border-radius: 10px !important;
}

.invoice-editor-page .invoice-editor-card:not(.invoice-editor-summary-card) {
  border: 0 !important;
  border-bottom: 1px solid #d2dee7 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.invoice-editor-page .invoice-editor-card:not(.invoice-editor-summary-card) .panel-heading {
  min-height: 0;
  padding: 10px 0 12px !important;
  border: 0 !important;
  background: transparent !important;
}

.invoice-editor-page .invoice-editor-card:not(.invoice-editor-summary-card) .panel-body {
  padding: 0 0 16px !important;
}

.invoice-editor-page .invoice-editor-address-row .invoice-editor-card {
  border-bottom: 0 !important;
}

.invoice-editor-page .invoice-editor-address-row,
.invoice-editor-page .invoice-editor-financial-row {
  margin-bottom: 8px;
}

.invoice-editor-page .invoice-editor-line-items-panel {
  border-bottom: 0 !important;
}

.invoice-editor-page .invoice-editor-line-items-panel .panel-body {
  padding-bottom: 0 !important;
}

.invoice-editor-page .invoice-editor-draft-preview {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.invoice-editor-page .invoice-editor-draft-preview-header {
  margin-bottom: 14px;
}

.invoice-editor-page .invoice-editor-draft-preview-header strong,
.invoice-editor-page .invoice-editor-subsection-title {
  color: #253744;
  font-size: 16px;
  font-weight: 700;
}

.invoice-editor-page .invoice-editor-draft-preview-header span {
  color: #253744;
  font-size: 16px;
  letter-spacing: 0;
}

.invoice-editor-page .invoice-editor-subsection-title {
  margin: 26px 0 10px;
}

.invoice-editor-page .invoice-editor-draft-preview-grid {
  grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(140px, 1fr));
  gap: 22px;
}

.invoice-editor-page .invoice-editor-draft-preview-card {
  padding: 18px 24px;
  border-radius: 12px;
  border: 1px solid #d3dee7;
  box-shadow: none;
}

.invoice-editor-page .invoice-editor-draft-preview-card-accent {
  background: #ffffff;
  border-color: #d3dee7;
}

.invoice-editor-page .invoice-editor-draft-preview-label {
  color: #485a67;
  font-size: 14px;
  letter-spacing: 0;
}

.invoice-editor-page .invoice-editor-draft-preview-card strong {
  font-size: 16px;
}

.invoice-editor-page .invoice-editor-draft-preview-options {
  color: #8497a6;
}

.invoice-editor-page .invoice-editor-inline-note {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  color: #7b8e9b;
}

.invoice-editor-page .invoice-editor-kitting-action-layout {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 14px;
}

.invoice-editor-page .invoice-editor-kitting-action-layout .invoice-editor-kitting-wrap {
  flex: 0 1 740px;
  min-width: 320px;
}

.invoice-editor-page .invoice-editor-item-footer-actions {
  margin-top: 0;
  text-align: left;
  flex: 0 0 auto;
}

.invoice-editor-page .invoice-editor-action-label {
  display: block;
  min-height: 20px;
}

.invoice-editor-page .invoice-editor-kitting-additem-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 38px;
}

.invoice-editor-page .invoice-editor-item-action-buttons {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.invoice-editor-page .invoice-editor-add-item-btn {
  background: linear-gradient(180deg, #349ede 0%, #248dce 100%) !important;
  border-color: #278cc9 !important;
  color: #ffffff !important;
}

.invoice-editor-page .invoice-editor-add-item-btn,
.invoice-editor-page .invoice-editor-cancel-item-btn,
.invoice-editor-page .invoice-editor-line-actions .btn {
  min-width: 126px;
  border-radius: 10px !important;
}

@media (max-width: 991px) {
  .invoice-editor-page .invoice-editor-kitting-action-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .invoice-editor-page .invoice-editor-kitting-action-layout .invoice-editor-kitting-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.invoice-editor-page .invoice-editor-summary-card {
  border: 1px solid #d3dee7 !important;
  border-radius: 10px !important;
  overflow: hidden;
  background: #ffffff !important;
  box-shadow: none !important;
}

.invoice-editor-page .invoice-editor-summary-card .panel-heading {
  background: linear-gradient(180deg, #d9ebf8 0%, #d1e5f4 100%) !important;
  border-bottom: 1px solid #c8dbe8 !important;
  min-height: 46px;
}

.invoice-editor-page .invoice-editor-summary-card .panel-heading strong {
  font-size: 16px;
  font-weight: 500;
}

.invoice-editor-page .invoice-editor-summary-card .panel-body {
  padding: 10px 0 14px !important;
}

.invoice-editor-page .invoice-editor-summary-grid {
  gap: 0;
}

.invoice-editor-page .invoice-editor-summary-row {
  padding: 12px 18px;
  border-bottom: 1px solid #e2ebf1;
}

.invoice-editor-page .invoice-editor-summary-total-row {
  font-size: 18px;
}

.invoice-editor-page .invoice-editor-summary-note {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2f3f4b;
  font-size: 14px;
}

.invoice-editor-page .invoice-editor-table-wrap {
  padding-top: 0;
}

.invoice-editor-page .invoice-editor-items-table > thead > tr > th {
  background: linear-gradient(180deg, #D4ECFF 0%, #C4E2FA 100%);
  color: #4e6473;
  font-weight: 500;
}

.invoice-editor-page .invoice-editor-items-table > tbody > tr > td {
  background: #ffffff;
}

@media (max-width: 1199px) {
  .invoice-display-detail-strip,
  .invoice-display-footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .invoice-display-hero-metrics,
  .invoice-display-detail-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .invoice-display-toolbar-top {
    justify-content: flex-start;
  }

  .invoice-editor-page .invoice-editor-draft-preview-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

.cash-receipt-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cash-receipt-results-card .module-card-header {
  align-items: flex-start;
}

.cash-receipt-section-note {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.cash-receipt-total-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef7fd;
  border: 1px solid #d5e9f7;
  color: #2a84ba;
  font-size: 12px;
  font-weight: 700;
}

.cash-receipt-table > thead > tr > th {
  background: #f5f9fc;
  border-bottom: 1px solid #dbe5ef;
  color: #16324f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cash-receipt-table > tbody > tr:hover > td {
  background: #fbfdff;
}

.cash-receipt-delete-btn {
  color: #d35454;
}

.cash-receipt-delete-btn:hover,
.cash-receipt-delete-btn:focus {
  color: #b74242;
}

@media (max-width: 991px) {
  .cash-receipt-search-grid {
    grid-template-columns: 1fr;
  }

  .cash-receipt-search-grid .chosen-container,
  .cash-receipt-search-grid select.form-control {
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  .customer-support-hero-row {
    flex-direction: column;
  }

  .customer-support-nav-pills {
    justify-content: flex-start;
  }
}

.qc-toolbar {
  justify-content: flex-start !important;
  align-items: flex-end;
}

.qc-master-shell {
  padding: 24px !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, #ffffff 0%, #EEF6FF 100%) !important;
}

.qc-master-shell-copy {
  max-width: 820px;
  margin-bottom: 18px;
}

.qc-master-shell-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(36, 141, 206, 0.1);
  color: #1b7fbf;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qc-master-shell h4 {
  margin: 12px 0 8px;
  color: #213445;
  font-size: 28px;
  font-weight: 700;
}

.qc-master-shell p {
  margin: 0;
  color: #5a6e7d;
  line-height: 1.65;
}

.qc-master-search-form {
  margin: 0;
}

.qc-master-search-label {
  margin-bottom: 10px;
  color: #234056;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.qc-master-search-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.qc-master-search-input {
  flex: 0 1 320px;
  min-width: 200px;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 54px;
  border: 1px solid #d7e3ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(36, 42, 48, 0.03);
}

.qc-master-search-input .glyphicon {
  color: #53a7d8;
  font-size: 16px;
}

.qc-master-search-input .form-control {
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}

.qc-master-search-input .form-control:focus {
  box-shadow: none !important;
}

.qc-toolbar-actions,
.qc-master-search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.qc-master-btn {
  min-width: 102px;
}

.qc-master-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.qc-master-quick-grid.is-landing {
  max-width: 760px;
}

.qc-master-quick-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid #d8e3ea;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  color: #2d353c;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(36, 42, 48, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qc-master-quick-card:hover,
.qc-master-quick-card:focus {
  color: #2d353c;
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #79bddf;
  box-shadow: 0 16px 28px rgba(36, 141, 206, 0.12);
}

.qc-master-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(36, 141, 206, 0.12);
  color: #248dce;
  font-size: 18px;
  flex: 0 0 auto;
}

.qc-master-quick-card h5 {
  margin: 0 0 8px;
  color: #213445;
  font-size: 16px;
  font-weight: 700;
}

.qc-master-quick-card p {
  margin: 0;
  color: #5f7684;
  line-height: 1.55;
}

@media (max-width: 991px) {
  .customer-support-detail-footer {
    grid-template-columns: 1fr;
  }

  .qc-master-shell {
    padding: 18px !important;
  }

  .qc-master-search-row {
    align-items: stretch;
  }

  .qc-master-search-input {
    flex-basis: 100%;
  }

  .qc-toolbar-actions {
    width: 100%;
  }
}

/* =============================================================================
   Global responsiveness foundation
   ========================================================================== */

/* Media never forces horizontal overflow. */
img,
svg,
video,
canvas {
  max-width: 100%;
}

/* Hamburger toggle is hidden on desktop; shown only in the drawer range. */
.legacy-nav-toggle {
  display: none;
}

/* ---- Off-canvas navigation drawer (<= 767px) ---------------------------------
   The base stylesheet hides the sidebar entirely below 768px, which leaves no
   way to reach navigation on phones/small tablets. Instead, turn the sidebar
   into a slide-in drawer opened by the header hamburger. This lives in the
   shared layout, so every page in the site gets usable navigation at small
   sizes. Above 768px the sidebar stays a normal (narrowed) left column. */
@media (max-width: 767px) {
  .legacy-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2f81c5;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .legacy-nav-toggle-icon {
    font-size: 22px;
    line-height: 1;
  }

  /* Re-show the sidebar (base CSS sets display:none here) as a drawer. */
  .legacy-sidebar {
    display: block !important;
    width: 250px;
    max-width: 82vw;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1200;
    box-shadow: 0 18px 40px rgba(20, 40, 60, 0.28);
  }

  body.legacy-nav-open .legacy-sidebar {
    transform: translateX(0);
  }

  .legacy-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 40, 60, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1150;
  }

  body.legacy-nav-open .legacy-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* Lock background scroll while the drawer is open. */
  body.legacy-nav-open {
    overflow: hidden;
  }

  .legacy-main {
    margin-left: 0 !important;
  }
}

/* The backdrop only exists for the drawer; never show it once the sidebar is a
   normal left column (>= 768px). */
@media (min-width: 768px) {
  .legacy-sidebar-backdrop {
    display: none;
  }
}

/* ---- Phone tightening (<= 767px) --------------------------------------------- */
@media (max-width: 767px) {
  .legacy-content-wrap {
    padding: 10px 8px;
  }

  /* Wide data tables scroll inside their own wrapper instead of stretching the
     page, so the rest of the layout stays within the viewport. */
  .module-table-wrap,
  .legacy-panel .table-responsive,
  .purchase-edit-line-items-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
