/* Description / secondary copy — softer than primary body text (both themes) */
.ant-card-meta-description,
.ant-list-item-meta-description,
.ant-empty-description,
.ant-steps-item-description,
.ant-alert-description,
.ant-form-item-extra,
.ant-result-subtitle,
.ant-statistic-title,
.ant-typography.ant-typography-secondary {
  color: var(--gx-text-secondary);
}

/* Warning alerts: readable on warning surface (not primary black, not secondary pale) */
.ant-alert-warning .ant-alert-message,
.ant-alert-warning .ant-alert-description {
  color: #535353 !important;
}

.ant-alert-warning.ant-alert-with-description .ant-alert-message {
  font-weight: 500;
}

.ant-descriptions-item-label {
  color: var(--gx-text-primary);
}

.ant-divider,
.ant-divider-horizontal.ant-divider-with-text::before,
.ant-divider-horizontal.ant-divider-with-text::after {
  border-color: var(--gx-border-subtle);
}

.ant-divider-inner-text {
  color: var(--gx-text-primary);
}

/* Theme surface tokens — light defaults, dark overrides below */
:root {
  --gx-page-bg: #ffffff;
  --gx-card-bg: #ffffff;
  --gx-surface: #fafafa;
  --gx-surface-muted: #f5f5f5;
  --gx-border-subtle: #f0f0f0;
  --gx-text-primary: #262626;
  --gx-text-secondary: #8c8c8c;
  --gx-avatar-bg: #f5f5f5;
  --gx-avatar-border: #ffffff;
  --gx-input-bg: #ffffff;
  --gx-brand-primary: #F18805;
  --gx-brand-primary-hover: #ffa82e;
  --gx-brand-primary-active: #cc6900;
  --gx-brand-focus-ring: rgba(241, 136, 5, 0.2);
  --gx-scrollbar-size: 8px;
  --gx-scrollbar-track: #f0f0f0;
  --gx-scrollbar-thumb: #c0c0c0;
  --gx-scrollbar-thumb-hover: #a0a0a0;
  --gx-media-surface-bg: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(248, 248, 248, 0.42) 52%,
    rgba(238, 238, 238, 0.48) 100%
  );
  --gx-media-surface-border: rgba(0, 0, 0, 0.05);
  --gx-media-surface-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.dark-theme {
  --gx-page-bg: #050505;
  --gx-card-bg: #0f0f0f;
  --gx-surface: #121212;
  --gx-surface-muted: #0c0c0c;
  --gx-media-surface-bg: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 48%,
    rgba(255, 255, 255, 0.02) 100%
  );
  --gx-media-surface-border: rgba(255, 255, 255, 0.08);
  --gx-media-surface-shadow:
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --gx-border-subtle: #2a2a2a;
  --gx-text-primary: #ececec;
  --gx-text-secondary: #a3a3a3;
  --gx-avatar-bg: #1a1a1a;
  --gx-avatar-border: #0f0f0f;
  --gx-input-bg: #050505;
  --gx-scrollbar-track: #050505;
  --gx-scrollbar-thumb: #2e2e2e;
  --gx-scrollbar-thumb-hover: #5a5a5a;
  /* Dark mode: no orange — white accent / primary actions */
  --gx-brand-primary: #ffffff;
  --gx-brand-primary-hover: #f0f0f0;
  --gx-brand-primary-active: #d9d9d9;
  --gx-brand-primary-contrast: #050505;
  --gx-brand-focus-ring: rgba(255, 255, 255, 0.18);
}

/* Native scrollbars — light + dark via CSS variables */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gx-scrollbar-thumb) var(--gx-scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--gx-scrollbar-size);
  height: var(--gx-scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--gx-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--gx-scrollbar-thumb);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--gx-scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--gx-scrollbar-track);
}

.user-settings-avatar-uploader.ant-upload.ant-upload-select-picture-card,
.user-settings-avatar-uploader .ant-upload.ant-upload-select-picture-card {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--gx-border-subtle) !important;
  border-radius: 8px;
  background-color: var(--gx-surface) !important;
}

/* Mobile layout: keep header visible after login (100vh / viewport reflow issues). */
@media screen and (max-width: 991px) {
  html,
  body,
  #root {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  /* Drawer open: prevent body scrollbar padding from shifting layout left/right */
  body.ant-scrolling-effect,
  body.ant-scrolling-effect #root {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
  }

  #root,
  .ant-layout.gx-app-layout,
  .ant-layout.gx-app-layout > .ant-layout {
    height: 100dvh;
    min-height: 100dvh;
  }

  .ant-layout.gx-app-layout {
    overflow-x: hidden !important;
  }

  .ant-layout.gx-app-layout > .ant-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .ant-layout.gx-app-layout > .ant-layout > .ant-layout-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .ant-layout.gx-app-layout > .ant-layout > .gx-layout-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Collapsed mobile sider must not animate/jitter */
  .gx-app-sidebar.gx-collapsed-sidebar.ant-layout-sider {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    transition: none !important;
    box-shadow: none !important;
    border-right: none !important;
    overflow: hidden !important;
  }

  /* Mobile nav drawer: fixed, no horizontal rubber-banding */
  .gx-drawer-sidebar.ant-drawer {
    position: fixed !important;
  }

  .gx-drawer-sidebar .ant-drawer-content-wrapper {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    max-width: 85vw !important;
  }

  .gx-drawer-sidebar .ant-drawer-content,
  .gx-drawer-sidebar .ant-drawer-wrapper-body,
  .gx-drawer-sidebar .ant-drawer-body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    overscroll-behavior-x: none;
    touch-action: pan-y;
  }

  .gx-drawer-sidebar .gx-sidebar-content,
  .gx-drawer-sidebar .gx-layout-sider-scrollbar,
  .gx-drawer-sidebar .ant-menu {
    overflow-x: hidden !important;
    max-width: 100%;
  }

  .gx-drawer-sidebar .ant-menu-item,
  .gx-drawer-sidebar .ant-menu-item a,
  .gx-drawer-sidebar .ant-menu-item-group-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Topbar: menu left, profile right — no brand logo */
.gx-mobile-topbar.ant-layout-header {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px;
  height: 56px !important;
  line-height: normal !important;
  padding: 0 20px !important;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid var(--gx-border-subtle) !important;
  z-index: 2;
}

.gx-mobile-topbar-menu {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.gx-mobile-topbar-menu .gx-icon-btn {
  font-size: 18px !important;
  line-height: 1 !important;
}

.gx-mobile-topbar-spacer {
  width: 0;
  flex-shrink: 0;
}

.gx-topbar-user-profile {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  color: var(--gx-text-primary);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.gx-topbar-user-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 1;
  max-width: 100%;
}

.gx-topbar-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gx-topbar-user-profile .profile-photo-container,
.gx-topbar-user-profile .gx-sidebar-language,
.gx-topbar-user-profile .gx-sidebar-theme-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 !important;
}

.gx-topbar-user-profile .gx-sidebar-language,
.gx-topbar-user-profile .gx-sidebar-theme-control {
  height: 28px;
  padding: 0 2px;
  border-radius: 6px;
}

.gx-topbar-control-label,
.gx-topbar-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.2;
  font-size: 13px;
}

.gx-topbar-user-name {
  max-width: 160px;
}

.gx-topbar-caret {
  font-size: 10px;
  opacity: 0.55;
  flex-shrink: 0;
  transition: transform 0.2s ease-out;
}

.gx-topbar-caret-open {
  transform: rotate(180deg);
}

@media screen and (max-width: 991px) {
  .gx-mobile-topbar.ant-layout-header {
    height: 52px !important;
    padding: 0 8px !important;
    gap: 4px;
  }

  .gx-topbar-user-profile {
    gap: 6px;
  }

  .gx-topbar-user-actions {
    gap: 4px;
  }

  .gx-topbar-control-label {
    display: inline-block;
    max-width: 72px;
    font-size: 12px;
  }

  .gx-topbar-user-profile .gx-sidebar-language,
  .gx-topbar-user-profile .gx-sidebar-theme-control {
    width: auto;
    min-width: 0;
    height: 32px;
    padding: 0 3px;
    gap: 4px;
  }

  .gx-topbar-user-name {
    max-width: 76px;
    font-size: 12px;
  }
}

@media screen and (max-width: 575px) {
  .gx-mobile-topbar.ant-layout-header {
    padding: 0 6px !important;
  }

  .gx-topbar-user-profile {
    gap: 3px;
  }

  .gx-topbar-user-actions {
    gap: 2px;
  }

  .gx-topbar-user-identity {
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
  }

  .gx-topbar-control-label {
    max-width: 54px;
    font-size: 11px;
  }

  .gx-topbar-user-name {
    display: inline-block;
    max-width: 56px;
    font-size: 11px;
  }

  .gx-topbar-caret {
    font-size: 8px;
  }
}

@media screen and (max-width: 430px) {
  .gx-topbar-user-name {
    display: inline-block;
    max-width: 40px;
    font-size: 11px;
  }

  .gx-topbar-control-label {
    max-width: 46px;
  }

  .gx-topbar-user-profile .gx-sidebar-language,
  .gx-topbar-user-profile .gx-sidebar-theme-control {
    padding: 0 2px;
    gap: 3px;
  }
}

@media screen and (max-width: 360px) {
  .gx-topbar-user-name {
    max-width: 32px;
  }
}

/* User menu popover: keep compact on mobile (not full-width like notification popovers). */
.gx-popover-user-menu .ant-popover-inner-content {
  width: auto;
  min-width: 140px;
}

@media screen and (max-width: 575px) {
  .gx-popover-user-menu .gx-user-popover li {
    width: auto;
    min-width: 140px;
    font-size: 14px;
    line-height: 1.4;
    padding: 8px 16px;
  }
}

/* Language menu popover: keep compact on mobile. */
.gx-popover-lang-menu .ant-popover-inner-content {
  width: auto;
  min-width: 160px;
}

.gx-popover-lang-menu .gx-lang-popover-menu {
  margin: -12px -16px;
  padding: 7px 0;
  list-style: none;
}

.gx-popover-lang-menu .gx-lang-popover-menu li {
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.gx-popover-lang-menu .gx-lang-popover-menu li:hover,
.gx-popover-lang-menu .gx-lang-popover-menu li:focus {
  background-color: #fafafa;
}

.gx-popover-lang-menu .gx-lang-popover-menu li:not(:last-child) {
  border-bottom: 1px solid #e8e8e8;
}

.gx-popover-lang-menu .gx-lang-popover-menu .gx-media {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gx-popover-lang-menu .gx-lang-popover-menu li.gx-theme-option-selected {
  font-weight: 600;
  background-color: #f5f5f5;
}

/* ResponsiveForm: stack compact input groups with spacing on mobile. */
@media screen and (max-width: 767px) {
  .gx-responsive-form-mobile .gx-responsive-form-field {
    margin-bottom: 16px;
  }

  .gx-responsive-form-mobile .gx-responsive-form-field:last-child {
    margin-bottom: 0;
  }

  .gx-responsive-form-mobile .gx-responsive-form-label {
    margin-bottom: 8px;
  }

  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > .ant-form-item,
  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > .ant-select,
  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > .ant-picker,
  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > .ant-input-affix-wrapper,
  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > .ant-input-number,
  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > .ant-cascader-picker {
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > * {
    border-radius: 6px !important;
    border-right-width: 1px !important;
  }

  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact > .ant-select > .ant-select-selector,
  .gx-responsive-form-mobile .ant-input-group.ant-input-group-compact .ant-input {
    border-radius: 6px !important;
    border-right-width: 1px !important;
  }

  .gx-responsive-form-mobile .ant-row {
    row-gap: 12px !important;
  }
}

/* Theme CSS loads after webpack bundle and breaks tooltip arrow positioning. */
.ant-tooltip .ant-tooltip-content {
  position: relative;
}

.ant-tooltip .ant-tooltip-inner {
  position: relative;
  z-index: 2;
}

.ant-tooltip .ant-tooltip-arrow {
  display: none !important;
}

.ant-tooltip-placement-top,
.ant-tooltip-placement-topLeft,
.ant-tooltip-placement-topRight {
  padding-bottom: 0 !important;
}

.ant-tooltip-placement-right,
.ant-tooltip-placement-rightTop,
.ant-tooltip-placement-rightBottom {
  padding-left: 0 !important;
}

.ant-tooltip-placement-bottom,
.ant-tooltip-placement-bottomLeft,
.ant-tooltip-placement-bottomRight {
  padding-top: 0 !important;
}

.ant-tooltip-placement-left,
.ant-tooltip-placement-leftTop,
.ant-tooltip-placement-leftBottom {
  padding-right: 0 !important;
}

/* Sidebar colors — layout stays the same; only backgrounds change */
body:not(.dark-theme) .ant-layout-sider,
body:not(.dark-theme) .gx-app-sidebar,
body:not(.dark-theme) .gx-sidebar-content,
body:not(.dark-theme) .gx-sidebar-footer,
body:not(.dark-theme) .gx-drawer-sidebar .ant-drawer-content,
body:not(.dark-theme) .gx-app-sidebar .ant-menu,
body:not(.dark-theme) .gx-app-sidebar .ant-menu-inline,
body:not(.dark-theme) .gx-app-sidebar .ant-menu-vertical {
  background-color: var(--gx-page-bg) !important;
}

/* Ant Design 4 responsive tables — keep sticky headers outside the horizontal scroll container */
.gx-table-responsive {
  min-height: 0.01%;
}

.gx-table-responsive .ant-table {
  overflow: visible;
}

.gx-table-responsive .ant-table-content {
  overflow-x: auto;
}

@media screen and (max-width: 767px) {
  .gx-table-responsive .ant-table-content {
    overflow-y: hidden;
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }
}

/* Light theme tables — remove default gray header/row backgrounds */
body:not(.dark-theme) .ant-table,
body:not(.dark-theme) .ant-table-container,
body:not(.dark-theme) .ant-table-content,
body:not(.dark-theme) .ant-table-body,
body:not(.dark-theme) .gx-table-responsive {
  background-color: var(--gx-page-bg) !important;
}

body:not(.dark-theme) .ant-table-thead > tr > th {
  background-color: var(--gx-page-bg) !important;
  color: var(--gx-text-primary) !important;
}

body:not(.dark-theme) .ant-table-tbody > tr > td {
  background-color: var(--gx-page-bg) !important;
  color: var(--gx-text-primary) !important;
}

body:not(.dark-theme) .ant-table-tbody > tr.ant-table-row:hover > td {
  background-color: var(--gx-surface) !important;
}

body:not(.dark-theme) .ant-table-tbody > tr.ant-table-row-selected > td {
  background-color: var(--gx-surface) !important;
}

body.dark-theme .ant-layout-sider,
body.dark-theme .gx-app-sidebar,
body.dark-theme .gx-sidebar-content,
body.dark-theme .gx-sidebar-footer,
body.dark-theme .gx-drawer-sidebar .ant-drawer-content,
body.dark-theme .gx-app-sidebar .ant-menu,
body.dark-theme .gx-app-sidebar .ant-menu-inline,
body.dark-theme .gx-app-sidebar .ant-menu-vertical {
  background-color: #0a0a0a !important;
  box-shadow: none !important;
}

/* Full-height divider: logo header + menu as one continuous line */
.gx-app-sidebar.ant-layout-sider,
.gx-app-sidebar.ant-layout-sider-lite,
.gx-drawer-sidebar .ant-drawer-content {
  border-right: 1px solid var(--gx-border-subtle) !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05) !important;
  -webkit-box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05) !important;
}

body.dark-theme .gx-app-sidebar.ant-layout-sider,
body.dark-theme .gx-app-sidebar.ant-layout-sider-lite,
body.dark-theme .gx-drawer-sidebar .ant-drawer-content {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.35) !important;
  -webkit-box-shadow: 2px 0 8px rgba(0, 0, 0, 0.35) !important;
}

.gx-sidebar-content,
body.dark-theme .gx-sidebar-content,
body.dark-theme .gx-drawer-sidebar .gx-sidebar-content,
.gx-layout-sider-header,
body.dark-theme .gx-layout-sider-header,
body.dark-theme .gx-drawer-sidebar .gx-layout-sider-header {
  border-right: none !important;
}

body.dark-theme .gx-sidebar-footer {
  border-top-color: var(--gx-border-subtle) !important;
}

body.dark-theme .gx-sidebar-user-profile .gx-avatar-name {
  color: #ffffff;
}

body.dark-theme .gx-app-sidebar .ant-menu-item,
body.dark-theme .gx-app-sidebar .ant-menu-item a,
body.dark-theme .gx-app-sidebar .ant-menu-item-group-title,
body.dark-theme .gx-drawer-sidebar .ant-menu-item,
body.dark-theme .gx-drawer-sidebar .ant-menu-item a,
body.dark-theme .gx-drawer-sidebar .ant-menu-item-group-title {
  color: #d4d4d4 !important;
}

body.dark-theme .gx-app-sidebar .ant-menu-item-selected,
body.dark-theme .gx-app-sidebar .ant-menu-item-selected a,
body.dark-theme .gx-drawer-sidebar .ant-menu-item-selected,
body.dark-theme .gx-drawer-sidebar .ant-menu-item-selected a {
  color: #ffffff !important;
}

body.dark-theme .gx-app-sidebar .gx-menu-group .ant-menu-item-group-title,
body.dark-theme .gx-drawer-sidebar .gx-menu-group .ant-menu-item-group-title {
  color: #a3a3a3 !important;
}

/* Header: logo left, toggle right — same height/line as topbar */
.gx-layout-sider-header {
  height: 56px !important;
  padding: 0 16px 0 24px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid var(--gx-border-subtle) !important;
  background-color: transparent !important;
  justify-content: flex-start !important;
  align-items: center !important;
  position: relative !important;
  z-index: 2;
}

body.dark-theme .gx-mobile-topbar.ant-layout-header,
body.dark-theme .gx-layout-sider-header {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
  -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
}

.gx-layout-sider-header .gx-site-logo {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  max-width: 112px !important;
  max-height: 32px !important;
  margin-right: 12px;
}

.gx-layout-sider-header .gx-site-logo img {
  max-width: 112px;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.gx-layout-sider-header .gx-site-logo .gx-logo-light,
.gx-layout-sider-header .gx-site-logo .gx-logo-dark {
  transition: none;
}

.gx-layout-sider-header .gx-site-logo .gx-logo-dark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

html.dark-theme .gx-layout-sider-header .gx-site-logo .gx-logo-light,
body.dark-theme .gx-layout-sider-header .gx-site-logo .gx-logo-light {
  opacity: 0;
}

html.dark-theme .gx-layout-sider-header .gx-site-logo .gx-logo-dark,
body.dark-theme .gx-layout-sider-header .gx-site-logo .gx-logo-dark {
  opacity: 1;
}

.gx-layout-sider-header .gx-linebar {
  position: absolute !important;
  left: auto !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%);
  margin: 0 !important;
  z-index: 1;
}

.gx-layout-sider-header .gx-linebar .gx-icon-btn {
  font-size: 18px !important;
  line-height: 1 !important;
}

.ant-layout-sider-collapsed .gx-layout-sider-header {
  justify-content: center !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.ant-layout-sider-collapsed .gx-layout-sider-header .gx-site-logo {
  display: none !important;
}

.ant-layout-sider-collapsed .gx-layout-sider-header .gx-linebar {
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -50%);
}

.gx-drawer-sidebar-dark .gx-layout-sider-header,
.gx-layout-sider-dark .gx-layout-sider-header {
  background-color: transparent !important;
}

.gx-mini-custom-sidebar.ant-layout-sider-lite .gx-layout-sider-header,
.gx-custom-sidebar.ant-layout-sider-lite .gx-layout-sider-header {
  border-right: 0 none !important;
}

/*
 * Footer profile needs flex column. Beat orange.min.css scrollbar
 * height: calc(100vh - 76px) without touching menu item spacing.
 */
.gx-sidebar-content {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - 56px) !important;
}

.gx-layout-sider-scrollbar {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

.gx-sidebar-footer {
  flex-shrink: 0 !important;
}

.ant-layout-sider-collapsed .gx-sidebar-footer {
  padding: 12px 4px !important;
}

/* Collapsed sidebar: center profile / language / logout */
.gx-sidebar-user-profile.gx-sidebar-user-profile-collapsed {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
}

.gx-sidebar-user-profile.gx-sidebar-user-profile-collapsed .profile-photo-container,
.gx-sidebar-user-profile.gx-sidebar-user-profile-collapsed .gx-sidebar-language,
.gx-sidebar-user-profile.gx-sidebar-user-profile-collapsed .gx-sidebar-theme-control,
.gx-sidebar-user-profile.gx-sidebar-user-profile-collapsed .gx-sidebar-signout-btn {
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.gx-sidebar-user-profile.gx-sidebar-user-profile-collapsed .gx-sidebar-language {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
}

.gx-sidebar-user-profile .gx-sidebar-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.gx-sidebar-user-profile .gx-sidebar-theme-control {
  display: inline-flex;
  align-items: center;
}

.gx-sidebar-user-profile.gx-sidebar-user-profile-collapsed .gx-sidebar-signout-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 32px !important;
  padding: 4px !important;
}

/* ========== Dark mode fixes (overrides load last) ========== */
body.dark-theme,
html.dark-theme {
  background-color: #0a0a0a !important;
  color: #ececec;
}

body.dark-theme #root,
body.dark-theme .gx-app-layout,
body.dark-theme .ant-layout,
body.dark-theme .ant-layout.ant-layout-has-sider > .ant-layout,
body.dark-theme .gx-layout-content,
body.dark-theme .gx-main-content-wrapper {
  background-color: #0a0a0a !important;
  color: #ececec;
}

/* Main content padding — slightly tighter than theme default (32px) */
.gx-main-content-wrapper {
  padding: 20px 20px 24px !important;
}

@media screen and (max-width: 575px) {
  .gx-main-content-wrapper {
    /* Extra bottom space so floating buttons don't cover content when scrolling */
    padding: 12px 12px 96px !important;
  }
}

/* Pagination breathing room — especially on mobile where items wrap */
.gx-main-content-wrapper .ant-pagination,
.ant-card .ant-pagination,
.gx-card .ant-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  row-gap: 8px;
  column-gap: 4px;
  padding: 8px 4px 4px;
}

.gx-main-content-wrapper .ant-row:has(> .ant-pagination),
.gx-main-content-wrapper .ant-row:has(.ant-pagination) {
  margin-top: 16px !important;
  margin-bottom: 8px !important;
  padding-left: 4px;
  padding-right: 4px;
}

@media screen and (max-width: 575px) {
  .gx-main-content-wrapper .ant-pagination,
  .ant-card .ant-pagination,
  .gx-card .ant-pagination {
    width: 100%;
    padding: 12px 8px 16px;
    row-gap: 10px;
  }

  .gx-main-content-wrapper .ant-row:has(> .ant-pagination),
  .gx-main-content-wrapper .ant-row:has(.ant-pagination) {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    padding-left: 0;
    padding-right: 0;
  }

  .ant-pagination-total-text,
  .ant-pagination-options {
    margin-inline: 0 !important;
  }
}

body.dark-theme .gx-card,
body.dark-theme .ant-card,
body.dark-theme .ant-card-bordered {
  background-color: #141414 !important;
  border-color: #2a2a2a !important;
  color: #ececec !important;
}

body.dark-theme .ant-card-head,
body.dark-theme .ant-card-head-title,
body.dark-theme .ant-card-body,
body.dark-theme .ant-card-meta-title {
  background-color: transparent !important;
  color: var(--gx-text-primary) !important;
  border-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-card-meta-description {
  background-color: transparent !important;
  color: var(--gx-text-secondary) !important;
}

body.dark-theme .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-link):not(.ant-btn-text):not(.gx-btn-success) {
  background-color: #141414 !important;
  border-color: #333333 !important;
  color: #ececec !important;
}

body.dark-theme .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-link):not(.ant-btn-text):not(.gx-btn-success):hover,
body.dark-theme .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous):not(.ant-btn-link):not(.ant-btn-text):not(.gx-btn-success):focus {
  background-color: #1c1c1c !important;
  border-color: #737373 !important;
  color: #ffffff !important;
}

body.dark-theme .ant-btn-text,
body.dark-theme .ant-btn-link {
  background: transparent !important;
}

body.dark-theme .ant-btn-link {
  color: #ffffff !important;
}

/* Keep sidebar sign-out / text buttons readable */
body.dark-theme .gx-sidebar-signout-btn.ant-btn,
body.dark-theme .gx-sidebar-signout-btn.ant-btn-text {
  color: #ff7875 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.dark-theme .ant-input,
body.dark-theme .ant-input-affix-wrapper,
body.dark-theme .ant-input-number,
body.dark-theme .ant-input-number-input,
body.dark-theme .ant-picker,
body.dark-theme .ant-picker-input > input,
body.dark-theme textarea.ant-input,
body.dark-theme .ant-select:not(.ant-select-customize-input) .ant-select-selector {
  background-color: #0a0a0a !important;
  border-color: #333333 !important;
  color: #ececec !important;
}

body.dark-theme .ant-input::placeholder,
body.dark-theme .ant-picker-input > input::placeholder,
body.dark-theme textarea.ant-input::placeholder {
  color: #a3a3a3 !important;
}

body.dark-theme .ant-input-affix-wrapper .ant-input {
  background: transparent !important;
}

/* Browser autofill — keep theme surface instead of white/yellow flash */
input.ant-input:-webkit-autofill,
input.ant-input:-webkit-autofill:hover,
input.ant-input:-webkit-autofill:focus,
input.ant-input:-webkit-autofill:active,
textarea.ant-input:-webkit-autofill,
textarea.ant-input:-webkit-autofill:hover,
textarea.ant-input:-webkit-autofill:focus,
textarea.ant-input:-webkit-autofill:active,
.ant-input-affix-wrapper > input.ant-input:-webkit-autofill,
.ant-input-affix-wrapper > input.ant-input:-webkit-autofill:hover,
.ant-input-affix-wrapper > input.ant-input:-webkit-autofill:focus,
.ant-input-affix-wrapper > input.ant-input:-webkit-autofill:active,
.ant-input-number-input:-webkit-autofill,
.ant-input-number-input:-webkit-autofill:hover,
.ant-input-number-input:-webkit-autofill:focus,
.ant-input-number-input:-webkit-autofill:active,
.ant-picker-input > input:-webkit-autofill,
.ant-picker-input > input:-webkit-autofill:hover,
.ant-picker-input > input:-webkit-autofill:focus,
.ant-picker-input > input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--gx-text-primary) !important;
  caret-color: var(--gx-text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--gx-input-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--gx-input-bg) inset !important;
  transition: background-color 99999s ease-in-out 0s;
}

body.dark-theme .ant-input-affix-wrapper:-webkit-autofill,
body.dark-theme .ant-input-affix-wrapper:has(> input.ant-input:-webkit-autofill) {
  background-color: var(--gx-input-bg) !important;
}

body.dark-theme .ant-select-arrow,
body.dark-theme .ant-picker-suffix,
body.dark-theme .ant-input-clear-icon {
  color: #d4d4d4;
}

body.dark-theme .ant-select-dropdown,
body.dark-theme .ant-picker-dropdown .ant-picker-panel-container,
body.dark-theme .ant-dropdown-menu,
body.dark-theme .ant-popover-inner,
body.dark-theme .ant-tooltip-inner {
  background-color: var(--gx-card-bg) !important;
  color: var(--gx-text-primary) !important;
  border-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-select-item,
body.dark-theme .ant-dropdown-menu-item,
body.dark-theme .ant-select-item-option-content {
  color: #ececec !important;
}

body.dark-theme .ant-dropdown-menu-item-disabled,
body.dark-theme .ant-dropdown-menu-item-disabled .anticon,
body.dark-theme .ant-dropdown-menu-item-disabled .ant-dropdown-menu-title-content,
body.dark-theme .ant-dropdown-menu-submenu-title-disabled,
body.dark-theme .ant-menu-item-disabled,
body.dark-theme .ant-menu-item-disabled .anticon,
body.dark-theme .ant-menu-item-disabled .ant-menu-title-content {
  color: #737373 !important;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

body.dark-theme .ant-dropdown-menu-item-disabled:hover,
body.dark-theme .ant-dropdown-menu-submenu-title-disabled:hover,
body.dark-theme .ant-menu-item-disabled:hover {
  background-color: transparent !important;
  color: #737373 !important;
}

body.dark-theme .ant-select-item-option-active:not(.ant-select-item-option-disabled),
body.dark-theme .ant-select-item-option-selected:not(.ant-select-item-option-disabled),
body.dark-theme .ant-dropdown-menu-item:hover:not(.ant-dropdown-menu-item-disabled) {
  background-color: #1c1c1c !important;
}

/* Modal / drawer backdrop blur (both themes) */
.ant-modal-mask,
.ant-drawer-mask {
  background-color: rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

body.dark-theme .ant-modal-mask,
body.dark-theme .ant-drawer-mask {
  background-color: rgba(0, 0, 0, 0.62) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

body.dark-theme .ant-modal-content,
body.dark-theme .ant-modal-header,
body.dark-theme .ant-modal-footer,
body.dark-theme .ant-modal-body {
  background-color: var(--gx-card-bg) !important;
  border-color: var(--gx-border-subtle) !important;
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-modal-title,
body.dark-theme .ant-modal-close {
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-modal-close:hover,
body.dark-theme .ant-drawer-close:hover {
  color: #ffffff !important;
}

body.dark-theme .ant-drawer-content,
body.dark-theme .ant-drawer-header,
body.dark-theme .ant-drawer-body,
body.dark-theme .ant-drawer-footer,
body.dark-theme .filter-drawer .ant-drawer-content {
  background-color: var(--gx-card-bg) !important;
  border-color: var(--gx-border-subtle) !important;
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-drawer-title,
body.dark-theme .ant-drawer-close {
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-table,
body.dark-theme .ant-table-container,
body.dark-theme .ant-table-content,
body.dark-theme .ant-table-body,
body.dark-theme .ant-table-header,
body.dark-theme .gx-table-responsive {
  background-color: #0a0a0a !important;
  color: var(--gx-text-primary) !important;
  border-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-table-thead > tr > th {
  background-color: #0d0d0d !important;
  color: var(--gx-text-primary) !important;
  border-bottom-color: var(--gx-border-subtle) !important;
  border-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-table-tbody > tr > td {
  border-bottom-color: var(--gx-border-subtle) !important;
  color: var(--gx-text-primary) !important;
  background-color: #0a0a0a !important;
}

body.dark-theme .ant-table-tbody > tr.ant-table-row:hover > td {
  background-color: #121212 !important;
}

body.dark-theme .ant-table-tbody > tr.ant-table-row-selected > td {
  background-color: #1c1c1c !important;
}

body.dark-theme .ant-table-tbody > tr.ant-table-row-selected:hover > td {
  background-color: #242424 !important;
}

body.dark-theme .ant-table-placeholder,
body.dark-theme .ant-empty-description {
  color: var(--gx-text-secondary) !important;
}

body.dark-theme .ant-table-tbody > tr.ant-table-placeholder > td {
  background-color: #0a0a0a !important;
  border-bottom-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-pagination-item,
body.dark-theme .ant-pagination-prev .ant-pagination-item-link,
body.dark-theme .ant-pagination-next .ant-pagination-item-link {
  background-color: var(--gx-card-bg) !important;
  border-color: #333333 !important;
}

body.dark-theme .ant-pagination-item a,
body.dark-theme .ant-pagination-item-link,
body.dark-theme .ant-pagination-total-text {
  color: #ececec !important;
}

body.dark-theme .ant-pagination-item-active {
  border-color: #ffffff !important;
  background-color: #ffffff !important;
}

body.dark-theme .ant-pagination-item-active a {
  color: #0a0a0a !important;
}

body.dark-theme .ant-tabs-tab,
body.dark-theme .ant-tabs-tab .ant-tabs-tab-btn {
  color: #d4d4d4 !important;
}

body.dark-theme .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #ffffff !important;
}

body.dark-theme .ant-tabs-top > .ant-tabs-nav::before,
body.dark-theme .ant-tabs-bottom > .ant-tabs-nav::before,
body.dark-theme .ant-tabs-top > div > .ant-tabs-nav::before {
  border-bottom-color: #2a2a2a !important;
}

/* Card tabs — antd 4 uses .ant-tabs-nav (legacy .ant-tabs-bar styles don't apply) */
body.dark-theme .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab,
body.dark-theme .ant-tabs-card > div > .ant-tabs-nav .ant-tabs-tab {
  background: #111111 !important;
  border-color: #2a2a2a !important;
}

body.dark-theme .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab .ant-tabs-tab-btn,
body.dark-theme .ant-tabs-card > div > .ant-tabs-nav .ant-tabs-tab .ant-tabs-tab-btn {
  color: #d4d4d4 !important;
}

body.dark-theme .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab:hover,
body.dark-theme .ant-tabs-card > div > .ant-tabs-nav .ant-tabs-tab:hover {
  background: #1c1c1c !important;
  color: #ffffff !important;
}

body.dark-theme .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active,
body.dark-theme .ant-tabs-card > div > .ant-tabs-nav .ant-tabs-tab-active {
  background: #141414 !important;
  border-color: #2a2a2a !important;
  border-bottom-color: #141414 !important;
}

body.dark-theme .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn,
body.dark-theme .ant-tabs-card > div > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn,
body.dark-theme .ant-modal .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn,
body.dark-theme .ant-drawer .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #ffffff !important;
}

body.dark-theme .ant-tabs-card.ant-tabs-top > .ant-tabs-nav::before,
body.dark-theme .ant-tabs-card.ant-tabs-top > div > .ant-tabs-nav::before {
  border-bottom-color: #2a2a2a !important;
}

body.dark-theme .ant-tabs-card > .ant-tabs-content-holder,
body.dark-theme .ant-tabs-card > .ant-tabs-nav .ant-tabs-nav-add {
  border-color: #2a2a2a !important;
  background: transparent;
}

body.dark-theme .ant-tabs > .ant-tabs-nav .ant-tabs-nav-more,
body.dark-theme .ant-tabs > div > .ant-tabs-nav .ant-tabs-nav-more {
  color: #d4d4d4 !important;
}

body.dark-theme .ant-tabs > .ant-tabs-nav .ant-tabs-nav-more:hover,
body.dark-theme .ant-tabs > div > .ant-tabs-nav .ant-tabs-nav-more:hover {
  color: #ffffff !important;
}

body.dark-theme .ant-tabs-dropdown,
body.dark-theme .ant-tabs-dropdown-menu {
  background-color: #141414 !important;
  color: #ececec !important;
}

body.dark-theme .ant-tabs-dropdown-menu-item {
  color: #ececec !important;
}

body.dark-theme .ant-tabs-dropdown-menu-item:hover {
  background-color: #1c1c1c !important;
  color: #ffffff !important;
}

body.dark-theme .ant-tabs-dropdown-menu-item-remove,
body.dark-theme .ant-tabs-dropdown-menu-item-remove .anticon {
  color: #a3a3a3 !important;
}

body.dark-theme .ant-tabs-dropdown-menu-item-remove:hover,
body.dark-theme .ant-tabs-dropdown-menu-item-remove:hover .anticon {
  color: #ffffff !important;
}

body.dark-theme .ant-tabs-dropdown-menu-item-disabled,
body.dark-theme .ant-tabs-dropdown-menu-item-disabled:hover {
  color: #737373 !important;
  background-color: transparent !important;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

body.dark-theme .ant-tag {
  border-color: #333333;
}

body.dark-theme .ant-form-item-label > label,
body.dark-theme .ant-typography,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme .ant-statistic-content {
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-typography.ant-typography-secondary,
body.dark-theme .ant-form-item-extra,
body.dark-theme .ant-form-item-explain,
body.dark-theme .ant-list-item-meta-description,
body.dark-theme .ant-result-subtitle,
body.dark-theme .ant-statistic-title {
  color: var(--gx-text-secondary) !important;
}

body.dark-theme .ant-form-item-explain .ant-form-item-explain-error,
body.dark-theme .ant-form-item-explain.ant-form-item-explain-error {
  color: #ff7875 !important;
}

body.dark-theme .ant-divider,
body.dark-theme .ant-divider-horizontal.ant-divider-with-text::before,
body.dark-theme .ant-divider-horizontal.ant-divider-with-text::after {
  border-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-divider-inner-text {
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-alert {
  color: #ececec;
}

body.dark-theme .ant-alert-info {
  background-color: rgba(24, 144, 255, 0.14) !important;
  border-color: rgba(24, 144, 255, 0.35) !important;
}

body.dark-theme .ant-alert-success {
  background-color: rgba(82, 196, 26, 0.14) !important;
  border-color: rgba(82, 196, 26, 0.35) !important;
}

body.dark-theme .ant-alert-warning {
  background-color: rgba(250, 140, 22, 0.14) !important;
  border-color: rgba(250, 140, 22, 0.35) !important;
}

body.dark-theme .ant-alert-error {
  background-color: rgba(244, 67, 54, 0.14) !important;
  border-color: rgba(244, 67, 54, 0.35) !important;
}

body.dark-theme .ant-alert-message {
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-alert-description {
  color: var(--gx-text-secondary) !important;
}

body.dark-theme .ant-alert-warning .ant-alert-message,
body.dark-theme .ant-alert-warning .ant-alert-description {
  color: rgba(255, 255, 255, 0.85) !important;
}

body.dark-theme .ant-alert-info .ant-alert-icon {
  color: #69c0ff !important;
}

body.dark-theme .ant-alert-success .ant-alert-icon {
  color: #95de64 !important;
}

body.dark-theme .ant-alert-warning .ant-alert-icon {
  color: #ffc069 !important;
}

body.dark-theme .ant-alert-error .ant-alert-icon {
  color: #ff7875 !important;
}

body.dark-theme .ant-alert-close-icon {
  color: #a3a3a3 !important;
}

body.dark-theme .ant-alert-close-icon:hover {
  color: #ececec !important;
}

/* Nötr yüzeyli alert (doğrulama vb.) — tip rengi yerine kart yüzeyi */
.gx-alert-surface-wrap {
  margin: 16px 20px 0;
}

@media screen and (max-width: 575px) {
  .gx-alert-surface-wrap {
    margin: 12px 12px 0;
  }
}

.gx-layout-content > .gx-alert-surface-wrap ~ .gx-main-content-wrapper {
  padding-top: 12px;
}

.gx-alert-surface.ant-alert,
.gx-alert-surface.ant-alert-info,
.gx-alert-surface.ant-alert-success,
.gx-alert-surface.ant-alert-warning,
.gx-alert-surface.ant-alert-error,
body.dark-theme .gx-alert-surface.ant-alert,
body.dark-theme .gx-alert-surface.ant-alert-info,
body.dark-theme .gx-alert-surface.ant-alert-success,
body.dark-theme .gx-alert-surface.ant-alert-warning,
body.dark-theme .gx-alert-surface.ant-alert-error {
  background-color: var(--gx-card-bg) !important;
  border: 1px solid var(--gx-border-subtle) !important;
  border-radius: 8px;
  padding: 16px 20px;
  color: var(--gx-text-primary);
}

.gx-alert-surface .ant-alert-message,
.gx-alert-surface-title {
  color: var(--gx-text-primary) !important;
  font-size: 16px;
  font-weight: 600;
}

.gx-alert-surface .ant-alert-description,
.gx-alert-surface-description {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gx-text-secondary) !important;
}

.gx-alert-surface .ant-alert-close-icon {
  color: var(--gx-text-secondary) !important;
}

.gx-alert-surface .ant-alert-close-icon:hover {
  color: var(--gx-text-primary) !important;
}

.gx-alert-surface-action.ant-btn {
  margin-top: 4px;
  height: 40px;
  border-radius: 6px;
  font-weight: 500;
}

body.dark-theme .ant-switch:not(.ant-switch-checked) {
  background-color: #333333 !important;
}

body.dark-theme .gx-app-sidebar .ant-menu-item:hover,
body.dark-theme .gx-app-sidebar .ant-menu-item-active,
body.dark-theme .gx-app-sidebar .ant-menu-item-selected,
body.dark-theme .gx-drawer-sidebar .ant-menu-item:hover,
body.dark-theme .gx-drawer-sidebar .ant-menu-item-active,
body.dark-theme .gx-drawer-sidebar .ant-menu-item-selected {
  background-color: #1c1c1c !important;
}

body.dark-theme .gx-popover-lang-menu .ant-popover-inner-content,
body.dark-theme .gx-popover-lang-menu .gx-lang-popover-menu li {
  background-color: #141414;
  color: #ececec;
}

body.dark-theme .gx-popover-lang-menu .gx-lang-popover-menu li:hover,
body.dark-theme .gx-popover-lang-menu .gx-lang-popover-menu li:focus {
  background-color: #1c1c1c;
}

body.dark-theme .gx-popover-lang-menu .gx-lang-popover-menu li:not(:last-child) {
  border-bottom-color: #2a2a2a;
}

body.dark-theme .gx-popover-lang-menu .gx-lang-popover-menu li.gx-theme-option-selected {
  background-color: #1c1c1c;
}

body.dark-theme .howto-guide-modal .ant-modal-body {
  background: #111111 !important;
}

body.dark-theme .howto-guide-content .howto-guide-steps-block,
body.dark-theme .howto-guide-content .howto-guide-step-card,
body.dark-theme .howto-guide-content .howto-guide-collapse .ant-collapse-item {
  background: #141414 !important;
  border-color: #2a2a2a !important;
}

body.dark-theme .list-page-toolbar,
body.dark-theme .ant-space,
body.dark-theme .ant-space-item {
  color: #ececec;
}

.list-page-toolbar-actions {
  display: inline-flex !important;
  align-items: center !important;
}

.list-page-toolbar-actions > .ant-space-item {
  display: inline-flex;
  align-items: center;
}

.list-page-toolbar-filters-active {
  position: relative;
}

.list-page-toolbar-filters-active::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gx-brand-primary);
  pointer-events: none;
}

body.dark-theme .gx-layout-content a:not(.ant-btn),
body.dark-theme .gx-main-content-wrapper a:not(.ant-btn),
body.dark-theme .ant-modal a:not(.ant-btn),
body.dark-theme .ant-drawer a:not(.ant-btn),
body.dark-theme .ant-popover a:not(.ant-btn),
body.dark-theme .ant-dropdown-menu a:not(.ant-btn),
body.dark-theme .ant-select-dropdown a:not(.ant-btn) {
  color: #ffffff !important;
}

body.dark-theme .ant-dropdown-menu-item-disabled a:not(.ant-btn),
body.dark-theme .ant-dropdown-menu-item-disabled a:not(.ant-btn):hover {
  color: #737373 !important;
  cursor: not-allowed !important;
}

body.dark-theme .gx-layout-content a:not(.ant-btn):hover,
body.dark-theme .gx-main-content-wrapper a:not(.ant-btn):hover,
body.dark-theme .ant-modal a:not(.ant-btn):hover,
body.dark-theme .ant-drawer a:not(.ant-btn):hover,
body.dark-theme .ant-popover a:not(.ant-btn):hover {
  color: #f0f0f0 !important;
}

body.dark-theme .ant-modal .ant-btn-link,
body.dark-theme .ant-drawer .ant-btn-link,
body.dark-theme .ant-modal .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn,
body.dark-theme .ant-drawer .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn,
body.dark-theme .ant-modal .ant-typography a,
body.dark-theme .ant-drawer .ant-typography a {
  color: var(--gx-brand-primary) !important;
}

body.dark-theme .ant-modal .ant-tabs-ink-bar,
body.dark-theme .ant-drawer .ant-tabs-ink-bar {
  background: var(--gx-brand-primary) !important;
}

body.dark-theme .ant-checkbox-inner,
body.dark-theme .ant-radio-inner {
  background-color: #0a0a0a !important;
  border-color: #333333 !important;
}

body.dark-theme .ant-checkbox-checked .ant-checkbox-inner,
body.dark-theme .ant-checkbox-indeterminate .ant-checkbox-inner {
  background-color: var(--gx-brand-primary) !important;
  border-color: var(--gx-brand-primary) !important;
}

body.dark-theme .ant-checkbox-checked .ant-checkbox-inner::after {
  border-color: var(--gx-brand-primary-contrast) !important;
}

body.dark-theme .ant-checkbox-indeterminate .ant-checkbox-inner::after {
  background-color: var(--gx-brand-primary-contrast) !important;
}

body.dark-theme .ant-checkbox-checked .ant-checkbox-inner,
body.dark-theme .ant-checkbox-indeterminate .ant-checkbox-inner {
  background-color: var(--gx-brand-primary) !important;
  border-color: var(--gx-brand-primary) !important;
}

body.dark-theme .ant-skeleton-content .ant-skeleton-title,
body.dark-theme .ant-skeleton-content .ant-skeleton-paragraph > li {
  background: linear-gradient(90deg, #141414 25%, #1c1c1c 37%, #141414 63%) !important;
}

body.dark-theme .ant-result-title,
body.dark-theme .ant-result-subtitle {
  color: #ececec !important;
}

body.dark-theme .ant-badge-count {
  box-shadow: 0 0 0 1px #141414;
}

/* Brand primary buttons — white in dark mode (no orange) */
body.dark-theme .ant-btn-primary,
body.dark-theme .ant-btn-primary:not([disabled]):not(.disabled) {
  background-color: var(--gx-brand-primary) !important;
  border-color: var(--gx-brand-primary) !important;
  color: var(--gx-brand-primary-contrast) !important;
  text-shadow: none !important;
}

body.dark-theme .ant-btn-primary:hover,
body.dark-theme .ant-btn-primary:focus,
body.dark-theme .ant-btn-primary:not([disabled]):not(.disabled):hover,
body.dark-theme .ant-btn-primary:not([disabled]):not(.disabled):focus {
  background-color: var(--gx-brand-primary-hover) !important;
  border-color: var(--gx-brand-primary-hover) !important;
  color: var(--gx-brand-primary-contrast) !important;
}

body.dark-theme .ant-btn-primary:active,
body.dark-theme .ant-btn-primary.active {
  background-color: var(--gx-brand-primary-active) !important;
  border-color: var(--gx-brand-primary-active) !important;
  color: var(--gx-brand-primary-contrast) !important;
}

body.dark-theme .ant-btn-primary[disabled],
body.dark-theme .ant-btn-primary.disabled,
body.dark-theme .ant-btn-primary[disabled]:hover,
body.dark-theme .ant-btn-primary.disabled:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
  color: rgba(255, 255, 255, 0.35) !important;
}

/* Success buttons — green in light mode, white primary in dark mode */
body:not(.dark-theme) .ant-btn.gx-btn-success,
body:not(.dark-theme) a.gx-btn-success {
  color: #ffffff !important;
  background-color: #52c41a !important;
  border-color: #52c41a !important;
}

body:not(.dark-theme) .ant-btn.gx-btn-success:hover,
body:not(.dark-theme) .ant-btn.gx-btn-success:focus,
body:not(.dark-theme) a.gx-btn-success:hover,
body:not(.dark-theme) a.gx-btn-success:focus {
  color: #ffffff !important;
  background-color: #3f9714 !important;
  border-color: #3f9714 !important;
}

body:not(.dark-theme) .ant-btn.gx-btn-success:active,
body:not(.dark-theme) .ant-btn.gx-btn-success.active {
  color: #ffffff !important;
  background-color: #3f9714 !important;
  border-color: #3f9714 !important;
}

body.dark-theme .ant-btn.gx-btn-success,
body.dark-theme .ant-btn.gx-btn-success:not([disabled]):not(.disabled),
body.dark-theme a.gx-btn-success,
html.dark-theme .ant-btn.gx-btn-success,
html.dark-theme .ant-btn.gx-btn-success:not([disabled]):not(.disabled),
html.dark-theme a.gx-btn-success {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  color: #050505 !important;
  text-shadow: none !important;
}

body.dark-theme .ant-btn.gx-btn-success:hover,
body.dark-theme .ant-btn.gx-btn-success:focus,
body.dark-theme .ant-btn.gx-btn-success:not([disabled]):not(.disabled):hover,
body.dark-theme .ant-btn.gx-btn-success:not([disabled]):not(.disabled):focus,
html.dark-theme .ant-btn.gx-btn-success:hover,
html.dark-theme .ant-btn.gx-btn-success:focus,
html.dark-theme .ant-btn.gx-btn-success:not([disabled]):not(.disabled):hover,
html.dark-theme .ant-btn.gx-btn-success:not([disabled]):not(.disabled):focus {
  background-color: #f0f0f0 !important;
  border-color: #f0f0f0 !important;
  color: #050505 !important;
}

body.dark-theme .ant-btn.gx-btn-success:active,
body.dark-theme .ant-btn.gx-btn-success.active,
html.dark-theme .ant-btn.gx-btn-success:active,
html.dark-theme .ant-btn.gx-btn-success.active {
  background-color: #d9d9d9 !important;
  border-color: #d9d9d9 !important;
  color: #050505 !important;
}

body.dark-theme .ant-btn.gx-btn-success[disabled],
body.dark-theme .ant-btn.gx-btn-success.disabled,
body.dark-theme .ant-btn.gx-btn-success[disabled]:hover,
body.dark-theme .ant-btn.gx-btn-success.disabled:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
  color: rgba(255, 255, 255, 0.35) !important;
}

body.dark-theme .ant-btn-background-ghost.ant-btn-primary {
  background-color: transparent !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
}

body.dark-theme .ant-btn-background-ghost.ant-btn-primary:hover,
body.dark-theme .ant-btn-background-ghost.ant-btn-primary:focus {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: #f0f0f0 !important;
  color: #ffffff !important;
}

/* White primary fill: keep check / switch handle readable */
body.dark-theme .ant-checkbox-checked .ant-checkbox-inner::after {
  border-color: var(--gx-brand-primary-contrast) !important;
}

body.dark-theme .ant-checkbox-indeterminate .ant-checkbox-inner::after {
  background-color: var(--gx-brand-primary-contrast) !important;
}
body.dark-theme .ant-switch-checked .ant-switch-handle::before {
  background-color: var(--gx-brand-primary-contrast) !important;
}

body.dark-theme .ant-radio-checked .ant-radio-inner {
  border-color: #ffffff !important;
}

body.dark-theme .ant-radio-checked .ant-radio-inner::after {
  background-color: #ffffff !important;
}

body.dark-theme .ant-input:focus,
body.dark-theme .ant-input-focused,
body.dark-theme .ant-input-affix-wrapper:focus,
body.dark-theme .ant-input-affix-wrapper-focused,
body.dark-theme .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector,
body.dark-theme .ant-picker-focused {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18) !important;
}

body.dark-theme .ant-checkbox-wrapper:hover .ant-checkbox-inner,
body.dark-theme .ant-checkbox:hover .ant-checkbox-inner,
body.dark-theme .ant-radio-wrapper:hover .ant-radio-inner,
body.dark-theme .ant-radio:hover .ant-radio-inner {
  border-color: #ffffff !important;
}

body.dark-theme .ant-steps-item-process .ant-steps-item-icon {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
}

body.dark-theme .ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon {
  color: #0a0a0a !important;
}

body.dark-theme .ant-btn-primary .anticon,
body.dark-theme .ant-btn-primary .ant-btn-loading-icon {
  color: var(--gx-brand-primary-contrast) !important;
}

body.dark-theme .ant-layout-header,
body.dark-theme .gx-header-horizontal,
body.dark-theme .ant-layout-footer {
  background-color: #0a0a0a !important;
  color: #ececec !important;
  border-color: #2a2a2a !important;
}

body.dark-theme .ant-collapse,
body.dark-theme .ant-collapse-content,
body.dark-theme .ant-collapse-item {
  background-color: #141414 !important;
  border-color: #2a2a2a !important;
  color: #ececec !important;
}

body.dark-theme .ant-collapse > .ant-collapse-item > .ant-collapse-header {
  color: #ececec !important;
}

body.dark-theme .ant-descriptions-view {
  background-color: var(--gx-card-bg) !important;
  border-color: var(--gx-border-subtle) !important;
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-descriptions-bordered .ant-descriptions-view,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-view > table,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-row,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-item-label,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-item-content,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-row > th,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-row > td {
  border-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-descriptions-item-label,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-item-label,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-row > th {
  background-color: var(--gx-surface-muted) !important;
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-descriptions-item-content,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-item-content,
body.dark-theme .ant-descriptions-bordered .ant-descriptions-row > td {
  background-color: var(--gx-card-bg) !important;
  color: var(--gx-text-primary) !important;
}

/* Non-bordered Descriptions row separators */
body.dark-theme .ant-descriptions-row > th,
body.dark-theme .ant-descriptions-row > td {
  border-bottom-color: var(--gx-border-subtle) !important;
}

body.dark-theme .ant-message-notice-content,
body.dark-theme .ant-notification-notice {
  background-color: #141414 !important;
  color: #ececec !important;
}

body.dark-theme .ant-steps-item-title {
  color: var(--gx-text-primary) !important;
}

body.dark-theme .ant-steps-item-description {
  color: var(--gx-text-secondary) !important;
}

body.dark-theme .ant-steps-item-wait .ant-steps-item-icon > .ant-steps-icon {
  color: #a3a3a3 !important;
}

body.dark-theme .ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title {
  color: #a3a3a3 !important;
}

body.dark-theme .ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-tail::after,
body.dark-theme .ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after {
  background-color: #2a2a2a !important;
}

body.dark-theme .ant-list,
body.dark-theme .ant-list-item,
body.dark-theme .ant-list-split .ant-list-item {
  color: #ececec !important;
  border-color: #2a2a2a !important;
}

body.dark-theme .ant-upload.ant-upload-select-picture-card,
body.dark-theme .ant-upload-list-picture-card .ant-upload-list-item {
  background-color: #0a0a0a !important;
  border-color: #333333 !important;
}

body.dark-theme .ant-page-header,
body.dark-theme .ant-page-header-heading-title,
body.dark-theme .ant-breadcrumb,
body.dark-theme .ant-breadcrumb a,
body.dark-theme .ant-breadcrumb-separator {
  color: #ececec !important;
  background: transparent !important;
}

body.dark-theme .ant-spin-container::after {
  background: rgba(56, 66, 75, 0.55);
}

body.dark-theme .filter-drawer .ant-drawer-footer,
body.dark-theme .ant-drawer-content.filter-drawer .ant-drawer-footer {
  border-top-color: #2a2a2a !important;
}

/* Filter drawer: kill theme “card frame” (padding + white wrapper around right drawers)
   Note: antd 4 puts className on .ant-drawer root, not on .ant-drawer-content */
.ant-drawer-right.filter-drawer .ant-drawer-content-wrapper,
.ant-drawer-right.filter-drawer-mobile .ant-drawer-content-wrapper {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.ant-drawer-right.filter-drawer:not(.filter-drawer-mobile) .ant-drawer-content-wrapper {
  width: 360px !important;
}

.ant-drawer-right.filter-drawer-mobile .ant-drawer-content-wrapper {
  width: 100% !important;
  max-width: 100vw !important;
  height: 100% !important;
  top: 0 !important;
  bottom: 0 !important;
}

body.dark-theme .ant-drawer-right.filter-drawer .ant-drawer-content-wrapper,
body.dark-theme .ant-drawer-right.filter-drawer-mobile .ant-drawer-content-wrapper {
  background: transparent !important;
}

body.dark-theme .ant-drawer.filter-drawer .ant-drawer-content {
  background-color: var(--gx-card-bg) !important;
}

body.dark-theme .ant-drawer.filter-drawer .ant-drawer-header,
body.dark-theme .ant-drawer.filter-drawer .ant-drawer-body,
body.dark-theme .ant-drawer.filter-drawer .ant-drawer-footer {
  background: transparent !important;
}

/* Disabled / secondary action buttons on shipment create */
body.dark-theme .gx-btn-white,
body.dark-theme a.gx-btn-white {
  color: #a3a3a3 !important;
  background-color: #141414 !important;
  border-color: #2a2a2a !important;
}

body.dark-theme .gx-btn-white:hover,
body.dark-theme a.gx-btn-white:hover,
body.dark-theme .gx-btn-white:focus,
body.dark-theme a.gx-btn-white:focus {
  color: #ececec !important;
  background-color: #1c1c1c !important;
  border-color: #333333 !important;
}

body.dark-theme .gx-btn-white.disabled,
body.dark-theme a.gx-btn-white.disabled,
body.dark-theme .gx-btn-white:disabled,
body.dark-theme a.gx-btn-white:disabled {
  color: #737373 !important;
  background-color: #1f1f1f !important;
  border-color: #333333 !important;
}

body.dark-theme .pricing-table {
  background-color: #0a0a0a !important;
  background: #0a0a0a !important;
}

body.dark-theme .pricing-table .ant-table-thead > tr > th {
  background: #1f1f1f !important;
  color: #ececec !important;
  border-bottom-color: #333333 !important;
}

body.dark-theme .pricing-table .ant-table-tbody > tr > td {
  border-bottom-color: #2a2a2a !important;
  color: #ececec !important;
}

body.dark-theme .pricing-table .ant-table-tbody > tr:hover > td,
body.dark-theme .pricing-table .ant-table-tbody > tr.ant-table-row-selected > td {
  background: #222222 !important;
}

body.dark-theme .gx-popover-user-menu .ant-popover-inner,
body.dark-theme .gx-popover-user-menu .ant-popover-inner-content,
body.dark-theme .gx-user-popover {
  background-color: #141414 !important;
  color: #ececec !important;
}

body.dark-theme .gx-user-popover li:hover {
  background-color: #1c1c1c !important;
}

body.dark-theme .ant-input-group-addon {
  background-color: #1c1c1c !important;
  border-color: #333333 !important;
  color: #ececec !important;
}

body.dark-theme .ant-checkbox-wrapper,
body.dark-theme .ant-radio-wrapper {
  color: #ececec !important;
}

body.dark-theme .ant-timeline-item-content {
  color: #ececec !important;
}

body.dark-theme .howto-guide-modal .ant-modal-header,
body.dark-theme .howto-guide-modal .ant-modal-footer {
  border-color: #2a2a2a !important;
}

body.dark-theme .howto-guide-modal .ant-modal-body {
  background: #111111 !important;
}

body.dark-theme .howto-guide-content .howto-guide-steps-block,
body.dark-theme .howto-guide-content .howto-guide-step-card,
body.dark-theme .howto-guide-content .howto-guide-collapse .ant-collapse-item {
  background: #141414 !important;
  border-color: #2a2a2a !important;
}

body.dark-theme .howto-guide-content .howto-guide-step-label {
  color: #a3a3a3 !important;
}

/* Brand primary — beat webpack/style.min blue defaults (#038fde) */
html {
  --antd-wave-shadow-color: var(--gx-brand-primary);
}

.ant-btn-primary,
.ant-btn-primary:not([disabled]):not(.disabled) {
  background-color: var(--gx-brand-primary) !important;
  border-color: var(--gx-brand-primary) !important;
}

.ant-btn-primary:hover,
.ant-btn-primary:focus {
  background-color: var(--gx-brand-primary-hover) !important;
  border-color: var(--gx-brand-primary-hover) !important;
}

.ant-btn-primary:active,
.ant-btn-primary.active {
  background-color: var(--gx-brand-primary-active) !important;
  border-color: var(--gx-brand-primary-active) !important;
}

.ant-spin-dot-item,
.ant-btn-loading-icon .anticon,
.ant-btn-loading-icon {
  color: inherit;
}

.ant-spin .ant-spin-dot-item {
  background-color: var(--gx-brand-primary) !important;
}

.ant-checkbox-checked .ant-checkbox-inner,
.ant-radio-checked .ant-radio-inner,
.ant-switch-checked,
.ant-progress-bg,
.ant-slider-track,
.ant-slider-handle,
.ant-pagination-item-active,
.ant-tabs-ink-bar,
.ant-steps-item-process .ant-steps-item-icon {
  border-color: var(--gx-brand-primary) !important;
}

.ant-checkbox-checked .ant-checkbox-inner,
.ant-switch-checked,
.ant-progress-bg,
.ant-slider-track,
.ant-steps-item-process .ant-steps-item-icon {
  background-color: var(--gx-brand-primary) !important;
}

.ant-radio-inner::after {
  background-color: var(--gx-brand-primary) !important;
}

.ant-pagination-item-active a,
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn,
.ant-btn-link,
.ant-typography a {
  color: var(--gx-brand-primary) !important;
}

.ant-input:focus,
.ant-input-focused,
.ant-input-affix-wrapper:focus,
.ant-input-affix-wrapper-focused,
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector,
.ant-picker-focused {
  border-color: var(--gx-brand-primary-hover) !important;
  box-shadow: 0 0 0 2px var(--gx-brand-focus-ring) !important;
}

.ant-checkbox-wrapper:hover .ant-checkbox-inner,
.ant-checkbox:hover .ant-checkbox-inner,
.ant-radio-wrapper:hover .ant-radio-inner,
.ant-radio:hover .ant-radio-inner {
  border-color: var(--gx-brand-primary-hover) !important;
}

/* Fixed-height scrollable modal shell (reuse via className="gx-modal-fixed-height") */
.gx-modal-title-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gx-modal-title-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1;
  color: #595959;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.gx-modal-title-link .anticon {
  font-size: 14px;
}

.gx-modal-title-link:hover {
  color: rgba(0, 0, 0, 0.75);
  text-decoration: none;
}

.gx-modal-title-link-separator {
  width: 1px;
  height: 14px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

body.dark-theme .gx-modal-title-link {
  color: var(--gx-text-primary) !important;
}

body.dark-theme .gx-modal-title-link:hover {
  color: #ffffff !important;
}

body.dark-theme .gx-modal-title-link-separator {
  background: rgba(255, 255, 255, 0.25);
}

.gx-modal-fixed-height .ant-modal-content {
  display: flex;
  flex-direction: column;
  height: 85vh;
  max-height: 85vh;
}

.gx-modal-fixed-height .ant-modal-header,
.gx-modal-fixed-height .ant-modal-footer {
  flex-shrink: 0;
}

.gx-modal-fixed-height .ant-modal-body {
  flex: 1;
  min-height: 0;
  height: auto;
  padding: 12px;
  overflow: auto;
}

.gx-modal-fixed-height .shipment-create-page-embedded {
  min-height: 100%;
}

/* Locked shipment modal: don't wash out text via fieldset/disabled opacity */
.gx-modal-fixed-height .shipment-create-fieldset-locked,
.gx-modal-fixed-height .shipment-create-fieldset-locked:disabled,
.gx-modal-fixed-height .shipment-create-fieldset[disabled] {
  opacity: 1 !important;
}

.gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input[disabled],
.gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input-disabled,
.gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input-affix-wrapper-disabled,
.gx-modal-fixed-height .shipment-create-fieldset-locked .ant-select-disabled .ant-select-selector,
.gx-modal-fixed-height .shipment-create-fieldset-locked .ant-picker-disabled,
.gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input-number-disabled {
  opacity: 1 !important;
  color: var(--gx-text-primary) !important;
  -webkit-text-fill-color: var(--gx-text-primary) !important;
}

body.dark-theme .gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input[disabled],
body.dark-theme .gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input-disabled,
body.dark-theme .gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input-affix-wrapper-disabled,
body.dark-theme .gx-modal-fixed-height .shipment-create-fieldset-locked .ant-select-disabled .ant-select-selector,
body.dark-theme .gx-modal-fixed-height .shipment-create-fieldset-locked .ant-picker-disabled,
body.dark-theme .gx-modal-fixed-height .shipment-create-fieldset-locked .ant-input-number-disabled {
  color: #ececec !important;
  -webkit-text-fill-color: #ececec !important;
  background-color: #1f1f1f !important;
}

/* Liquid plate for logos/photos — readable on dark surfaces */
.gx-media-surface {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--gx-media-surface-bg);
  border: 1px solid var(--gx-media-surface-border);
  box-shadow: var(--gx-media-surface-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  vertical-align: middle;
  line-height: 0;
}

.gx-media-surface--sm {
  padding: 4px 6px;
  border-radius: 8px;
}

.gx-media-surface--lg {
  padding: 10px 12px;
  border-radius: 12px;
}

.gx-media-surface img,
.gx-media-surface .ant-image-img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
