/* v1.17.7: lighter silver buttons with independent, unchanged teal menu surfaces. */
:root {
  --hd-ui-blue: #18546a;
  --hd-ui-ink: #ffffff;
  --hd-ui-edge: #174a5b;
  --hd-control-face: linear-gradient(180deg, #246a81 0%, #18546a 44%, #18546a 76%, #174a5b 100%);
  --hd-button-edge: #8c99a6;
  --hd-button-base: #738291;
  --hd-button-highlight: #ffffff;
  --hd-button-ink: #172033;
  --hd-button-text-shadow: 0 1px 0 rgba(255,255,255,.4);
  --hd-button-face: linear-gradient(180deg, #f7f9fb 0%, #e3e7eb 44%, #d5dce3 76%, #c3ccd5 100%);
  --hd-button-hover: linear-gradient(180deg, #ffffff 0%, #edf0f3 44%, #d9e0e7 100%);
  --hd-button-pressed: linear-gradient(180deg, #b7c2cd, #dce2e8);
}
body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tab, .contact-edit-button, .contacts-az a, .print-controls a, .ed-color, .ed-toolbar select):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, .ed-image-handle, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link) {
  appearance: none !important;
  border: 1px solid var(--hd-button-edge) !important;
  background: var(--hd-button-face) !important;
  color: var(--hd-button-ink) !important;
  box-shadow: inset 0 1px 0 #ffffff55, inset 0 -1px 0 var(--hd-button-edge), 0 var(--hd-button-depth, 2px) 0 var(--hd-button-edge), 0 4px 7px rgba(23, 32, 51, .16) !important;
  text-shadow: var(--hd-button-text-shadow) !important;
  transform: none !important;
  filter: none !important;
  transition: background .12s ease, box-shadow .12s ease, translate .12s ease !important;
}
body .btn { --hd-button-depth: 3px; }

/* Compact desktop actions without changing the header's sizing. */
body :is(.btn, .tab, .contact-edit-button, .print-controls a, .print-controls button, .login-card button, .ed-dialog-actions button, .ed-table-tools button, .ed-image-tools button):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link) {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 9px !important;
  font-size: .82rem !important;
  line-height: 1.2 !important;
  gap: 6px !important;
}
body .editade :is(.ed-icon-button, .ed-color) {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
}
body .editade .ed-view-switch button { padding: 4px 8px; font-size: 12px; }
body .editade .ed-toolbar select { padding: 4px 18px 4px 5px; font-size: 12px; }

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tab, .contact-edit-button, .contacts-az a, .print-controls a, .ed-color, .ed-toolbar select):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, .ed-image-handle, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--hd-button-hover) !important;
  border-color: var(--hd-button-base) !important;
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tab, .contact-edit-button, .contacts-az a, .print-controls a, .ed-color, .ed-toolbar select):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, .ed-image-handle, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link):is(.active, .is-active, [aria-pressed="true"], [aria-selected="true"], [aria-current="page"]) {
  background: var(--hd-button-pressed) !important;
  border-color: var(--hd-button-base) !important;
  box-shadow: inset 0 2px 4px rgba(23, 32, 51, .22), inset 0 -2px 0 var(--hd-button-base), 0 1px 0 #fff !important;
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tab, .contact-edit-button, .contacts-az a, .print-controls a, .ed-color, .ed-toolbar select):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, .ed-image-handle, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link):active:not(:disabled):not([aria-disabled="true"]) {
  translate: 0 1px;
  background: var(--hd-button-pressed) !important;
  box-shadow: inset 0 2px 3px rgba(23, 32, 51, .2), 0 1px 0 var(--hd-button-edge) !important;
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tab, .contact-edit-button, .contacts-az a, .print-controls a, .ed-color, .ed-toolbar select):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, .ed-image-handle, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link):focus-visible,
body .ed-color:focus-within {
  outline: 3px solid #007ca5 !important;
  outline-offset: 3px !important;
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tab, .contact-edit-button, .contacts-az a, .print-controls a, .ed-color, .ed-toolbar select):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, .ed-image-handle, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link):is(:disabled, [aria-disabled="true"]) {
  opacity: .5 !important;
  cursor: not-allowed !important;
  translate: none;
  box-shadow: inset 0 1px 0 #ffffff55, 0 1px 0 var(--hd-button-edge) !important;
}

/* Destructive actions retain their text cue on the same silver face. */
body :is(.btn.danger, .ed-remove-link):not(#helpdeskHeader *, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link) { color: #630d25 !important; }
body .tab:not(#helpdeskHeader *, .mobile-helpdesk-navigation *, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link) span { background: rgba(23, 32, 51, .09); color: var(--hd-button-ink); }
.ed-color { border-radius: 5px; }
.ticket-mini-dialog .modal-actions { padding: 12px 16px 16px; }

body input[type="file"]:not(#helpdeskHeader *, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link)::file-selector-button {
  border: 1px solid var(--hd-button-edge);
  border-radius: 5px;
  background: var(--hd-button-face);
  color: var(--hd-button-ink);
  box-shadow: inset 0 1px 0 #ffffff55, 0 2px 0 var(--hd-button-edge);
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
}
@media (max-width: 800px), (pointer: coarse) {
  body :is(.btn, .tab, .contact-edit-button, .print-controls a, .print-controls button, .login-card button, .ed-dialog-actions button):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link) {
    min-height: 40px !important;
    padding: 8px 11px !important;
    font-size: .88rem !important;
  }
  body .editade :is(.ed-icon-button, .ed-color) { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
  body .editade .ed-view-switch button { min-height: 34px; }
  body .editade .ed-toolbar select { min-height: 34px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  body :is(button, .btn, .tab, .ed-color, .ed-toolbar select):not(#helpdeskHeader *, .mobile-helpdesk-navigation *, .header-visibility-tab, .ed-image-handle, :where(#helpdeskDashboard, #ticketNavigation) .dash-control, :where(#helpdeskDashboard, #ticketNavigation) .dash-icon-button, :where(#helpdeskDashboard, #ticketNavigation) .dash-quick-link) { transition: none !important; }
}

/* Native option menus keep dark labels on their light popup surface. */
.editade .ed-toolbar select option { background:#fff; color:#172033; }

/* Formatting dropdowns retain their existing teal appearance. */
body .editade .ed-toolbar select {
  --hd-button-face: var(--hd-control-face);
  --hd-button-ink: #ffffff;
  --hd-button-text-shadow: 0 1px 1px rgba(0,0,0,.3);
  --hd-button-hover: linear-gradient(180deg, #2b7188 0%, #216078 44%, #18546a 100%);
  --hd-button-pressed: linear-gradient(180deg, #174a5b, #246a81);
  --hd-button-edge: #174a5b;
  --hd-button-base: #103947;
}
