/* Dealer setup: readable business details with stacked cookie options. */
.add-user-panel .panel-title h2 { font-size: 25px; }
.add-user-panel .panel-title p { font-size: 15px; line-height: 1.5; }
.add-user-panel .dealer-setup-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.add-user-panel .dealer-setup-main, .add-user-panel .dealer-setup-options { display: grid; gap: 20px; min-width: 0; }
.add-user-panel .dealer-setup-options { background: #edf2f6; padding: 20px; border: 1px solid #d3dee7; border-radius: 12px; }
.add-user-panel .form-section { margin: 0; padding: 18px; border: 1px solid #d3dee7; border-radius: 10px; background: #f8fafc; min-width: 0; }
.add-user-panel .form-section legend { font-size: 18px; font-weight: 700; color: #35516a; padding: 0 8px; }
.add-user-panel .profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.add-user-panel label { display: flex; flex-direction: column; gap: 7px; font-size: 15px; font-weight: 600; color: #40566b; min-width: 0; }
.add-user-panel input, .add-user-panel select, .add-user-panel textarea { width: 100%; box-sizing: border-box; font-size: 16px; line-height: 1.4; padding: 10px 12px; border: 1px solid #bacbd8; border-radius: 7px; background: #fff; color: #21384b; min-width: 0; }
.add-user-panel input, .add-user-panel select { min-height: 44px; }
.add-user-panel input[readonly] { background: #e8eef3; color: #506779; }
.add-user-panel .option-code, .add-user-panel .wide { grid-column: 1 / -1; }
.add-user-panel .dealer-setup-options .form-section { background: #fff; }
.add-user-panel .dealer-setup-options .option-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.add-user-panel .notes-box-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.add-user-panel .notes-box-grid textarea { min-height: 220px; resize: vertical; }
.add-user-panel .notice, .add-user-panel .form-actions, .add-user-panel .profile-details summary { font-size: 14px; line-height: 1.5; }
.add-user-panel .profile-details { margin-top: 22px; }
.add-user-panel .form-actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid #d3dee7; }
.add-user-panel .button { font-size: 15px; padding: 11px 18px; }
@media (max-width: 1000px) { .add-user-panel .dealer-setup-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .add-user-panel .profile-grid, .add-user-panel .notes-box-grid, .add-user-panel .dealer-setup-options .option-profile-grid { grid-template-columns: minmax(0, 1fr); }
  .add-user-panel .dealer-setup-options { padding: 12px; }
  .add-user-panel .form-section { padding: 14px; }
}

/* Keep credential controls aligned even when their labels wrap. */
.add-user-panel .profile-grid > label { justify-content: flex-end; }
.add-user-panel .password-entry { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 8px; align-items: stretch; width: 100%; }
.add-user-panel .password-entry input { height: 44px; min-width: 0; }
.add-user-panel .password-entry button { height: 44px; padding: 0 8px; border: 1px solid #bacbd8; border-radius: 7px; background: #edf4f8; color: #35516a; font-size: 15px; font-weight: 600; }
.add-user-panel .password-entry button:focus-visible { outline: 2px solid #0b8ec4; outline-offset: 2px; }

/* Keep order entry fields single-line beside the taller cookie option group. */
.order-form .form-grid { align-items: start; }
.order-form .form-grid > label > input { height: 44px; }

.manager-search-grid .mark-date-search { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.manager-search-grid .mark-date-search label { width: 165px; font-size: 13px; }
.manager-search-grid .mark-date-search input, .manager-search-grid .mark-date-search select { height: 38px; padding: 7px 9px; font-size: 13px; }

.mark-date-search .field-search-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid #d3dee7; border-radius: 9px; background: #f7fafc; }
.mark-date-search .field-search-actions .button { height: 38px; padding: 7px 11px; font-size: 12px; }

.report-order-grid .report-field-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.report-order-grid .report-field-controls input, .report-order-grid .report-field-controls select { width: 135px; height: 31px; padding: 4px 6px; font-size: 12px; }
.report-field-controls button { height: 31px; border: 1px solid #cadbe7; padding: 4px 8px; background: #eaf1f6; color: #3c607c; font-size: 11px; }

.report-order-card .report-found-count { margin: 0 0 16px; color: #35516a; font-size: 14px; font-weight: 700; }
.report-order-grid .report-mark-date-field { grid-column: span 3; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: end; column-gap: 12px; }
.report-mark-date-field > span:first-child { grid-column: 1; grid-row: 1; }
.report-mark-date-field > input { grid-column: 1; grid-row: 2; }
.report-order-grid .report-mark-date-field > .report-field-controls { grid-column: 2; grid-row: 1 / 3; align-items: end; }
.report-mark-date-field .report-field-controls > span { display: grid; gap: 4px; }
@media (max-width: 900px) { .report-order-grid .report-mark-date-field { grid-column: 1 / -1; } }
@media (max-width: 500px) { .report-order-grid .report-mark-date-field { grid-template-columns: 1fr; } .report-order-grid .report-mark-date-field > .report-field-controls { grid-column: 1; grid-row: 3; } }

.report-matches-table { max-height: 560px; overflow: auto; }
.report-matches-table thead th { position: sticky; top: 0; z-index: 1; }

/* Align both mark rows and the last successful Endicia range. */
.report-order-grid .report-mark-row { grid-column: 1 / -1; display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 12px; align-items: end; }
.report-mark-row > span:first-child { grid-column: 1; grid-row: 1; }
.report-mark-row > input { grid-column: 1; grid-row: 2; }
.report-order-grid .report-mark-row > .report-field-controls { grid-column: 2; grid-row: 1 / 3; align-items: end; }
.endicia-range-row { margin: 16px 0 0 162px; }
.endicia-range-row label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: #40566b; }
.endicia-range-row input { width: min(100%, 440px); box-sizing: border-box; padding: 8px 10px; border: 1px solid #cadbe7; border-radius: 5px; background: #edf2f6; color: #35516a; font-size: 14px; }
@media (max-width: 500px) {
 .report-order-grid .report-mark-row { grid-template-columns: 1fr; }
 .report-order-grid .report-mark-row > .report-field-controls { grid-column: 1; grid-row: 3; }
 .endicia-range-row { margin-left: 0; }
}

.report-order-card .endicia-range-row { margin-left: 0; }

.manager-search-grid .record-end-search-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.manager-search-grid .record-end-search-group .manager-search-buttons { display: flex; justify-content: flex-start; gap: 8px; margin: 0; padding: 0; align-self: stretch; }

/* Keep the date inputs level, with the main actions above the search fields. */
.manager-search-card > form { position: relative; }
.manager-search-grid { align-items: start; }
.manager-search-grid .record-end-search-group { gap: 0; }
.manager-search-grid .record-end-search-group .manager-search-buttons {
  position: absolute; top: -64px; right: 0; justify-content: flex-end;
}
@media (max-width: 600px) {
  .manager-search-card .manager-search-title { margin-bottom: 82px; }
  .manager-search-grid .record-end-search-group .manager-search-buttons { top: -70px; left: 0; right: 0; }
}

.dealer-anniversary-card { min-width: 0; padding: 20px; background: #f0f7fb; border: 1px solid #cbdfe9; border-radius: 12px; }
.dealer-anniversary-card h2 { margin: 0 0 5px; font-size: 18px; color: #244c65; }
.dealer-anniversary-card > p { margin: 0 0 12px; font-size: 13px; color: #506779; }
.dealer-anniversary-list { max-height: 260px; overflow-y: auto; display: grid; gap: 8px; }
.dealer-anniversary-list button { display: grid; text-align: left; gap: 4px; width: 100%; background: #fff; color: #244c65; border: 1px solid #cbdfe9; border-radius: 7px; padding: 10px; cursor: pointer; }
.dealer-anniversary-list button:hover { background: #e5f1f8; }
.dealer-anniversary-list button:focus-visible { outline: 2px solid #0b5f88; outline-offset: 2px; }
.dealer-anniversary-list span, .dealer-anniversary-list small, .anniversary-empty { font-size: 12px; }

/* Compact anniversary list beside the dealer greeting. */
.dealer-dashboard-heading { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.7fr); gap: 24px; align-items: start; margin-bottom: 20px; }
.dealer-dashboard-heading > :first-child { min-width: 0; flex-wrap: wrap; }
.dealer-dashboard-heading .dealer-anniversary-card { padding: 14px 16px; }
.dealer-dashboard-heading .dealer-anniversary-card h2 { display: inline; font-size: 17px; }
.dealer-dashboard-heading .dealer-anniversary-card > p { display: inline; margin-left: 12px; font-size: 12px; }
.dealer-dashboard-heading .dealer-anniversary-list { margin-top: 10px; max-height: 148px; overflow-y: auto; scrollbar-gutter: stable; gap: 4px; }
.dealer-dashboard-heading .dealer-anniversary-list button { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; font-size: 13px; }
.dealer-dashboard-heading .dealer-anniversary-list button > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dealer-summary-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .dealer-dashboard-heading { grid-template-columns: 1fr; gap: 10px; } }
@media (max-width: 600px) { .dealer-dashboard-heading .dealer-anniversary-list button { grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 185px; min-width: 520px; } .dealer-dashboard-heading .dealer-anniversary-list { overflow-x: auto; } }

/* Three aligned cards, with more room for anniversary rows. */
.stat-grid.dealer-summary-stats { grid-template-columns: minmax(130px, .6fr) minmax(130px, .6fr) minmax(0, 2.4fr); align-items: stretch; margin-top: 36px; }
.dealer-anniversary-column { min-width: 0; position: relative; }
.dealer-anniversary-column > h2 { position: absolute; bottom: 100%; margin: 0 0 9px; color: #244c65; font-size: 18px; }
.dealer-anniversary-column .dealer-anniversary-card { height: 100%; box-sizing: border-box; padding: 12px 14px; }
.dealer-anniversary-column .dealer-anniversary-card > p { margin-bottom: 8px; font-size: 12px; }
.dealer-anniversary-column .dealer-anniversary-list { max-height: 130px; overflow-y: auto; scrollbar-gutter: stable; gap: 4px; }
.dealer-anniversary-column .dealer-anniversary-list button { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; font-size: 13px; }
.dealer-anniversary-column .dealer-anniversary-list button > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 850px) { .stat-grid.dealer-summary-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } .dealer-anniversary-column { grid-column: 1 / -1; margin-top: 30px; } }
@media (max-width: 550px) { .dealer-anniversary-column .dealer-anniversary-list button { grid-template-columns: 150px 150px 185px; min-width: 525px; } .dealer-anniversary-column .dealer-anniversary-list { overflow-x: auto; } }

.all-reports-batch { margin-top: 20px; }
.all-reports-batch h2 { margin: 0 0 10px; color: #35516a; font-size: 20px; }
.all-reports-batch p { font-size: 14px; line-height: 1.5; }
.batch-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }

.add-user-panel .imported-upcharge-fields { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: end; min-width: 0; }
@media (max-width: 560px) { .add-user-panel .imported-upcharge-fields { grid-template-columns: 1fr; } }

.report-order-bottom { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 24px; align-items: start; margin-top: 20px; border-top: 1px solid #d9e6ed; padding-top: 18px; }
.report-order-card .report-order-bottom .endicia-range-row { margin: 0; }
.report-replace-controls { min-width: 0; padding: 0; }
.report-replace-controls .report-card-heading { margin-bottom: 10px; }
.report-replace-controls .report-card-heading h2 { font-size: 16px; margin: 0; }
.report-replace-controls > p { font-size: 12px; margin: 8px 0; }
.report-replace-controls .report-criteria { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0; }
.report-replace-controls .report-criteria label { display: grid; gap: 6px; font-size: 13px; flex: 1 1 145px; min-width: 0; }
.report-replace-controls .report-criteria input, .report-replace-controls .report-criteria select { width: 100%; box-sizing: border-box; height: 39px; padding: 7px 9px; font-size: 13px; }
.report-replace-controls .button { min-height: 39px; padding: 8px 12px; font-size: 13px; }
@media (max-width: 850px) { .report-order-bottom { grid-template-columns: 1fr; } }

.report-order-card > .report-replace-controls { max-width: 760px; margin: 14px 0 0 auto; padding: 12px 0 0; }
.report-order-card > .report-replace-controls .report-criteria { justify-content: flex-end; gap: 10px; }
.report-order-card > .report-replace-controls .report-criteria label { flex: 0 1 180px; }
.report-order-card > .report-replace-controls .report-card-heading h2 { font-size: 15px; }
.report-order-card > .report-replace-controls .report-clear-button { min-height: 33px; padding: 6px 10px; }
@media (max-width: 600px) { .report-order-card > .report-replace-controls { max-width: 100%; } .report-order-card > .report-replace-controls .report-criteria { justify-content: flex-start; } }

.report-mark-tools { margin-top: 20px; }
.report-mark-tools > h2 { margin: 0 0 16px; font-size: 20px; color: #35516a; }
.report-mark-tools .report-replace-controls { margin: 18px 0 0; max-width: 760px; padding-top: 16px; border-top: 1px solid #d9e6ed; }
.report-mark-tools .report-order-bottom { display: block; margin-top: 16px; padding-top: 14px; }
.report-mark-tools .endicia-range-row { margin: 0; }
.report-mark-tools .report-order-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
@media (max-width: 850px) { .report-mark-tools .report-order-grid { grid-template-columns: 1fr; } }

/* This utility card uses stacked sections, not the report launcher columns. */
.hercules-reports-page .report-launcher-grid > .report-form-card.report-mark-tools {
  display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; padding: 22px;
}
.hercules-reports-page .report-mark-tools > h2 { margin: 0 0 18px; }
.hercules-reports-page .report-mark-tools .report-order-grid { width: 100%; min-width: 0; box-sizing: border-box; }
.hercules-reports-page .report-mark-tools .report-replace-controls { display: block; width: 100%; max-width: 800px; min-width: 0; box-sizing: border-box; margin: 20px 0 0; }
.hercules-reports-page .report-mark-tools .report-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hercules-reports-page .report-mark-tools .report-card-heading h2 { display: block; font-size: 16px; }
.hercules-reports-page .report-mark-tools .report-criteria { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; width: 100%; min-width: 0; }
.hercules-reports-page .report-mark-tools .report-criteria label { flex: 0 1 190px; width: 190px; max-width: 100%; }
.hercules-reports-page .report-mark-tools .report-field-controls { min-width: 0; flex-wrap: wrap; }
.hercules-reports-page .report-mark-tools .report-order-bottom { width: 100%; box-sizing: border-box; }
@media (max-width: 600px) {
 .hercules-reports-page .report-launcher-grid > .report-form-card.report-mark-tools { padding: 16px; }
 .hercules-reports-page .report-mark-tools .report-mark-row { grid-template-columns: minmax(0, 1fr); }
 .hercules-reports-page .report-mark-tools .report-mark-row > .report-field-controls { grid-column: 1; grid-row: 3; margin-top: 8px; }
 .hercules-reports-page .report-mark-tools .report-field-controls input, .hercules-reports-page .report-mark-tools .report-field-controls select { max-width: 100%; }
}

/* Dashboard email actions stay compact instead of inheriting full-width list buttons. */
.dealer-anniversary-list > div { min-width: 0; }
.dealer-anniversary-list > div > .button.danger {
  width: 90px; min-width: 90px; max-width: 90px; flex: 0 0 90px;
  display: inline-flex; align-items: center; justify-content: center;
  align-self: flex-start; white-space: nowrap; padding: 8px;
}
.dealer-anniversary-list > div > button:first-child { overflow-wrap: anywhere; }

/* Keep dashboard email rows stable while hovering and scrolling. */
.dealer-anniversary-list:has(> div > .button.danger) { display: block; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.dealer-anniversary-list > div:has(> .button.danger) { width: 100%; max-width: 100%; box-sizing: border-box; height: 106px; }
.dealer-anniversary-list > div:has(> .button.danger) > button:first-child,
.dealer-anniversary-list > div:has(> .button.danger) > button:first-child:hover,
.dealer-anniversary-list > div:has(> .button.danger) > button:first-child:focus {
  width: 0; max-width: calc(100% - 98px); height: 106px; max-height: 106px;
  box-sizing: border-box; overflow: hidden; transform: none; transition: none;
}
.dealer-anniversary-list > div:has(> .button.danger) > button:first-child > span { overflow: hidden; text-overflow: ellipsis; }
.dealer-anniversary-list > div:has(> .button.danger) > button:first-child > span:not(:first-child) { white-space: nowrap; }
.dealer-anniversary-list > div > .button.danger:hover { transform: none; }
