:root {
  --bg: #f5f5f7;
  --bg-strong: #ececee;
  --surface: #ffffff;
  --surface-muted: #fafafa;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0a84ff;
  --accent-strong: #0066cc;
  --shadow: 0 16px 40px rgba(15, 15, 15, 0.08);
  --radius: 24px;
  --radius-small: 14px;
  --transition: 180ms ease;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --top-nav-height: 56px;
}

.preorder-mobile-col {
  display: none;
}

.preorder-status-pill-btn {
  cursor: pointer;
  border: none;
}

.sale-status-pill-btn {
  cursor: pointer;
  border: none;
}

.shipping-dashboard-page {
  overflow-y: auto !important;
  overflow-x: hidden;
}

.shipping-picking-page {
  overflow-y: auto !important;
  overflow-x: hidden;
}

.picking-mobile-filters {
  display: none;
}

.shipping-dashboard-page .container,
.shipping-dashboard-page .wide-container {
  padding-top: 0 !important;
}

.shipping-dashboard-page .header {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
}

.shipping-dashboard-page .shipping-tiles {
  margin-top: 26px;
}

@media (pointer: fine) {
  .shipping-dashboard-page .shipping-tiles {
    margin-top: 26px !important;
  }
}

.shipping-print-icon {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  position: relative;
  cursor: pointer;
  color: #1f2937;
  transform: translateY(1px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8V4h10v4'/%3E%3Crect x='4' y='8' width='16' height='9' rx='2'/%3E%3Crect x='7' y='13' width='10' height='7'/%3E%3Cpath d='M17 11h1'/%3E%3C/svg%3E");
  background-size: 20px 20px;
  background-position: center;
  background-repeat: no-repeat;
}

.shipping-print-icon::before {
  content: none;
}

.shipping-print-icon::after {
  content: none;
}

.shipping-print-icon.is-disabled {
  opacity: 0.35;
  cursor: default;
}

.shipping-mobile-filter-pill {
  display: none;
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid #d9dee8;
  border-radius: 999px;
  background: #f8f9fc;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
}

.shipping-mobile-filter-pill:hover {
  background: #eff3fb;
}

.shipping-tile {
  cursor: pointer;
}

.shipping-tile.is-active {
  border-color: rgba(10, 132, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.1);
}

#shipping-next-day-tile {
  background: #ffe1e5;
  border-color: #f6a8b4;
}

#shipping-next-day-tile h3,
#shipping-next-day-tile .value {
  color: #8b1e34;
}

#shipping-internal-tile {
  background: #efe7ff;
  border-color: #ceb5ff;
}

#shipping-internal-tile h3,
#shipping-internal-tile .value {
  color: #4a1f8a;
}

#shipping-standard-tile {
  background: #fff0df;
  border-color: #f6c28d;
}

#shipping-standard-tile h3,
#shipping-standard-tile .value {
  color: #9a4d00;
}

#shipping-all-tile {
  background: #fff;
}

@media (max-width: 1280px), (pointer: coarse) {
  .shipping-picking-page .container,
  .shipping-picking-page .wide-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 96px !important;
  }

  .shipping-picking-page .picking-mobile-filters {
    display: block;
    margin: 8px 0;
    padding: 0;
  }

  .shipping-picking-page .picking-mobile-filters .menu-button {
    width: 100%;
    border-radius: 0;
    justify-content: center;
  }

  .shipping-picking-page .panel.panel--spaced.picking-list-panel {
    margin-top: 0 !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }

  .shipping-picking-page .picking-list-panel .panel-head {
    display: none;
  }

  .shipping-picking-page .picking-list-panel .table-wrap {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .shipping-picking-page #shipping-picking-table thead th {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 11px;
  }

  .shipping-picking-page #shipping-picking-table tbody td {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .shipping-dashboard-page .container,
  .shipping-dashboard-page .wide-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 0 96px !important;
  }

  .shipping-dashboard-page .shipping-ready-panel {
    margin-top: 0 !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    gap: 0 !important;
    background: transparent;
  }

  .shipping-dashboard-page .shipping-ready-panel .panel-head {
    display: none;
  }

  .shipping-dashboard-page .shipping-ready-panel .table-wrap {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .shipping-dashboard-page .shipping-col-actions-label {
    display: none;
  }

  .shipping-dashboard-page .shipping-mobile-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .shipping-dashboard-page .col-actions {
    text-align: center;
  }

  .shipping-dashboard-page #shipping-orders-table td {
    padding-top: 9px;
    padding-bottom: 9px;
    min-height: 0;
    line-height: 1.1;
  }

  .shipping-dashboard-page #shipping-orders-table thead th {
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 11px;
    line-height: 1.05;
  }

  .shipping-dashboard-page #shipping-orders-table tr {
    height: auto;
  }

  .shipping-dashboard-page #shipping-orders-table .menu-button,
  .shipping-dashboard-page #shipping-orders-table .shipping-print-icon {
    margin-top: -1px;
    margin-bottom: -1px;
  }

  .shipping-dashboard-page .shipping-tiles {
    margin: 0 !important;
    margin-top: 0 !important;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 8px;
    transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.25s ease, margin 0.25s ease;
    overflow: hidden;
    transform-origin: top;
  }

  .shipping-dashboard-page .shipping-tiles .tile {
    min-height: 0;
    text-align: center;
    align-items: center;
    gap: 0;
  }

  .shipping-dashboard-page.shipping-mobile-tiles-expanded .shipping-tiles {
    display: grid !important;
    height: var(--shipping-mobile-tiles-available, calc(100dvh - 130px));
    max-height: var(--shipping-mobile-tiles-available, calc(100dvh - 130px));
    opacity: 1;
    transform: translateY(0);
  }

  .shipping-dashboard-page.shipping-mobile-tiles-expanded .shipping-tiles .tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .shipping-dashboard-page .shipping-tiles .tile h3 {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 17px;
    line-height: 1.2;
    margin-bottom: 10px;
    min-height: 0;
    letter-spacing: 0.2px;
  }

  .shipping-dashboard-page .shipping-tiles .tile .value {
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
  }

  .shipping-dashboard-page .shipping-tiles .tile .hint {
    display: none;
  }

  .shipping-dashboard-page.shipping-mobile-tiles-expanded .shipping-ready-panel {
    display: none;
  }

  .shipping-dashboard-page.shipping-mobile-tiles-collapsed .shipping-tiles {
    display: none !important;
    max-height: 0;
    opacity: 0;
    transform: translateY(-14px);
    margin: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
  }

  .shipping-dashboard-page .shipping-tiles-toggle {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: 42px;
    height: 26px;
    border-radius: 999px;
    z-index: 120;
  }

  .shipping-dashboard-page .shipping-tiles-toggle.is-open {
    transform: translateX(-50%);
  }

  .shipping-dashboard-page .shipping-tiles-toggle .drawer-toggle-arrow {
    font-size: 16px;
  }

  .shipping-dashboard-page .shipping-tiles-toggle.is-open .drawer-toggle-arrow,
  .shipping-dashboard-page .shipping-tiles-toggle .drawer-toggle-arrow {
    transform: none !important;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  #shipping-internal-shipments {
    display: none !important;
  }

  #shipping-collections {
    display: none !important;
  }

  .shipping-dashboard-page .container > .header {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .shipping-dashboard-page .panel.panel--spaced.shipping-ready-panel {
    margin-top: 5px !important;
  }
}

@media (pointer: fine) {
  .shipping-dashboard-page .shipping-tiles {
    margin-top: 26px !important;
  }
}

.preorder-mobile-info-btn {
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.preorder-schedule-details-modal-card .modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preorder-schedule-details-modal-card #preorder-details-fields th,
.preorder-schedule-details-modal-card #preorder-details-fields td {
  padding: 10px 12px;
  vertical-align: middle;
}

.preorder-schedule-details-modal-card #preorder-details-fields th {
  width: 42%;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

@media (max-width: 1280px), (pointer: coarse) {
  .preorder-scheduling-page .shopify-products-panel {
    margin-top: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .preorder-scheduling-page .shopify-products-panel .panel-head {
    display: none;
  }

  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap table {
    width: 100%;
    table-layout: auto;
  }

  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap th:nth-child(1),
  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap td:nth-child(1) {
    width: 1%;
    white-space: nowrap;
  }

  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap th:nth-child(2),
  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap td:nth-child(2) {
    width: 100%;
  }

  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap .preorder-desktop-col {
    display: none;
  }

  .preorder-scheduling-page .shopify-products-panel .shopify-products-table-wrap .preorder-mobile-col {
    display: table-cell;
  }

  .sale-scheduling-page .shopify-products-panel {
    margin-top: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .sale-scheduling-page .shopify-products-panel .panel-head {
    display: none;
  }

  .sale-scheduling-page .shopify-products-panel .shopify-products-table-wrap {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .sale-scheduling-page .shopify-products-panel .shopify-products-table-wrap table {
    width: 100%;
    table-layout: auto;
  }

  .sale-scheduling-page .shopify-products-panel .shopify-products-table-wrap th:nth-child(1),
  .sale-scheduling-page .shopify-products-panel .shopify-products-table-wrap td:nth-child(1) {
    width: 1%;
    white-space: nowrap;
  }

  .sale-scheduling-page .shopify-products-panel .shopify-products-table-wrap th:nth-child(2),
  .sale-scheduling-page .shopify-products-panel .shopify-products-table-wrap td:nth-child(2) {
    width: 100%;
  }

  .sale-scheduling-page .shopify-products-panel .shopify-products-table-wrap .sale-desktop-col {
    display: none;
  }

  .sale-scheduling-page .shopify-products-panel .status-pill {
    white-space: normal;
    line-height: 1.15;
    font-size: 11px;
  }

  .preorder-scheduling-page .shopify-products-panel .status-pill {
    white-space: normal;
    line-height: 1.15;
    font-size: 11px;
  }

  #preorder-schedule-details-modal .preorder-schedule-details-modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    overflow: auto;
  }

  #preorder-schedule-details-modal .modal-head {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: -10px -10px 8px;
    padding: 10px;
    border-bottom: 1px solid #eceff3;
    background: #fff;
  }

  #preorder-schedule-details-modal .row-actions-menu {
    right: 0;
    left: auto;
    top: 38px;
    min-width: 220px;
    z-index: 100010;
  }

  #preorder-schedule-details-modal .table-wrap {
    overflow-x: auto;
  }

  #preorder-schedule-details-modal .data-table th,
  #preorder-schedule-details-modal .data-table td {
    padding: 9px 10px;
    font-size: 12px;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100vh;
  background: radial-gradient(circle at 10% 10%, #ffffff, var(--bg)),
    linear-gradient(145deg, #f5f5f7 0%, #f1f1f3 100%);
  padding-top: var(--top-nav-height);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding: 28px 0 90px;
}

.newsletter-page .container {
  padding-top: 20px;
}

.brand {
  font-family: var(--font-display);
  letter-spacing: -0.3px;
  font-size: 26px;
  font-weight: 600;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 20000;
}


.container > .header {
  z-index: 30000;
}

.container > .header .dropdown-menu {
  z-index: 30000;
}

.container > .header .dropdown-submenu {
  z-index: 30001;
}

.container > .header .dropdown-submenu--nested {
  z-index: 30002;
}

.header--spaced {
  margin-bottom: 18px;
}

.panel--spaced {
  margin-top: 18px;
}

.warehouse-stock-page .panel--spaced {
  margin-top: 10px;
}

.warehouse-stock-page .container,
.warehouse-stock-page .wide-container {
  padding-top: 0 !important;
}

.warehouse-stock-page .container > .header {
  margin-bottom: 0 !important;
}

@media (min-width: 901px) and (pointer: fine) {
  .warehouse-stock-page .header {
    display: contents;
  }

  .warehouse-stock-page .container > .header {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible;
  }

  .warehouse-stock-page .container > .header .header-actions {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

.warehouse-stock-check-mobile-actions {
  display: none;
}

@media (max-width: 900px), (pointer: coarse) {
  .warehouse-stock-check-page .container,
  .warehouse-stock-check-page .wide-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 96px !important;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }

  .warehouse-stock-check-page .container > .header {
    margin-bottom: 0 !important;
  }

  .warehouse-stock-check-page .warehouse-stock-check-mobile-actions {
    display: none;
  }

  .warehouse-stock-check-page #warehouse-stock-check-section {
    display: block;
    margin-top: 0 !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 10px;
  }

  .warehouse-stock-check-page #warehouse-stock-check-boxes-section {
    display: none;
  }
}

.mobile-only {
  display: none !important;
}

.crm-page .crm-mobile-controls {
  display: none;
}

.desktop-only {
  display: block;
}

.mobile-only-cell {
  display: none;
}

.crm-email-page .header--spaced {
  margin-bottom: 0px;
}

.crm-email-page .panel--spaced {
  margin-top: 0px;
}

.crm-email-page .container,
.crm-email-page .wide-container {
  padding-top: 0;
}

@media (max-width: 900px), (pointer: coarse) {
  .crm-email-page .panel--spaced {
    margin-top: 0;
  }
}

.chat-page .header--spaced {
  margin-bottom: 0px;
}

.chat-page .panel {
  margin-top: 0px;
}

.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, rgba(45, 135, 79, 0.15), rgba(45, 135, 79, 0.95), rgba(45, 135, 79, 0.15));
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 0 12px rgba(45, 135, 79, 0.45);
  z-index: 9999;
}

.loading-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(45, 135, 79, 1), transparent);
  animation: loadingBar 0.9s ease-in-out infinite;
}

.loading-bar.is-active {
  opacity: 1;
  transform: scaleX(1);
}

@keyframes loadingBar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

.page-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 245, 247, 0.94);
  backdrop-filter: blur(4px);
  z-index: 70000;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-loader.page-loader--overlay {
  background: rgba(245, 245, 247, 0.55);
  backdrop-filter: blur(2px);
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 28px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.page-loader__spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(10, 132, 255, 0.2);
  border-top-color: var(--accent);
  animation: pageSpinner 0.8s linear infinite;
}

.page-loader__text {
  font-size: 14px;
  color: var(--muted);
}

.page-loader__subtext {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.modal-card--auto {
  height: auto;
}

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

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-actions--top {
  justify-content: flex-end;
  margin-top: 0;
}

.modal-actions--top .menu-button,
.modal-actions--top .secondary-button {
  height: 40px;
  padding: 10px 16px;
}

.stock-type-config-card {
  width: min(50vw, 900px);
  max-height: 80vh;
}

.modal-card--tight {
  width: min(96vw, 2000px);
  max-width: min(96vw, 2000px);
  max-height: 80vh;
}

#global-e-heatmap-modal .modal-card--tight {
  width: fit-content;
  max-width: none;
}

.stock-type-config-card {
  display: flex;
  flex-direction: column;
}

.stock-type-config-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}

.stock-type-config-card .table-wrap {
  max-height: calc(80vh - 200px);
  overflow: auto;
}

.data-table--compact td,
.data-table--compact th {
  padding-top: 8px;
  padding-bottom: 8px;
}

.stock-type-modal-close {
  height: 40px;
  padding: 10px 16px;
}

.stock-type-modal-card {
  height: 80vh;
  max-height: 80vh;
}

.stock-type-modal-card.is-compact {
  max-height: 55vh;
}

.stock-type-modal-card.is-medium {
  max-height: 68vh;
}

.stock-type-modal-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 16px 12px;
  gap: 0;
}

.stock-type-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 6px 0;
  margin: 0;
}

.stock-type-modal-card .table-wrap {
  flex: 1;
  max-height: none;
  overflow: auto;
  margin-top: 0;
}

@keyframes pageSpinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-mobile-back {
  display: none;
}

#order-mobile-summary {
  display: none;
}

.crm-order-page .order-actions-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.crm-order-page .order-actions-dropdown > .menu-button {
  display: inline-flex !important;
  align-items: center;
}

.crm-order-page .order-actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #ececef;
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 40000;
  display: none;
}

.crm-order-page .order-actions-menu.active {
  display: block;
}

.crm-order-page .order-actions-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.crm-order-page .order-actions-item:hover {
  background: var(--bg-strong);
}

.header-actions--right {
  margin-left: auto;
}

.compare-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid #e0e0e5;
  font-size: 12px;
  color: var(--muted);
}

.compare-pill.active {
  display: inline-flex;
}

.compare-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.compare-pill .dot.primary {
  background: #1a5e4a;
}

.compare-pill .dot.compare {
  background: #ff7a00;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 14, 16, 0.08);
  color: #0e0e10;
  font-size: 12px;
  font-weight: 600;
}

.pill.pill--alert {
  background: rgba(220, 20, 60, 0.16);
  color: #8a1b2e;
}

.pill.pill--purple {
  background: rgba(99, 102, 241, 0.18);
  color: #3730a3;
}

.pill.pill--danger {
  background: rgba(220, 20, 60, 0.18);
  color: #8a1b2e;
}

.tile.tile--purple {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.08);
}

.tile.tile--danger {
  border-color: rgba(220, 20, 60, 0.35);
  background: rgba(220, 20, 60, 0.08);
}

.tile.tile--success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.threshold-hit {
  background: rgba(255, 122, 0, 0.18);
  color: #7a3b00;
}

.global-e-details-modal td.threshold-hit,
.global-e-details-modal tr.threshold-hit > td {
  background: rgba(255, 122, 0, 0.24) !important;
  color: #7a3b00 !important;
}

.global-e-reports-page .data-table tr.report-awaiting {
  background: rgba(220, 20, 60, 0.16);
  color: #7a1f2a;
}

.global-e-reports-page .data-table tr.report-approved {
  background: rgba(34, 197, 94, 0.16);
  color: #14532d;
}

.global-e-reports-page .data-table tr.report-awaiting > td {
  background: rgba(220, 20, 60, 0.16);
  color: #7a1f2a;
}

.global-e-reports-page .data-table tr.report-approved > td {
  background: rgba(34, 197, 94, 0.16);
  color: #14532d;
}

.global-e-reports-page .data-table tr.threshold-hit > td {
  background: rgba(255, 122, 0, 0.18);
  color: #7a3b00;
}

.global-e-reports-page .data-table tbody tr:last-child > td:first-child {
  border-bottom-left-radius: 16px;
}

.global-e-reports-page .data-table tbody tr:last-child > td:last-child {
  border-bottom-right-radius: 16px;
}

.global-e-reports-page .global-e-period-sep {
  display: inline;
}

.row-actions-menu button[data-disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.log-panel {
  background: #0c0f14;
  color: #e6e7ea;
  border-radius: 12px;
  padding: 16px;
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid rgba(15, 23, 42, 0.2);
  white-space: pre-wrap;
}

.shipping-services-table th,
.shipping-services-table td {
  padding: 8px 10px;
}

.shipping-services-table th[data-sort="service"],
.shipping-services-table td:first-child {
  width: 28%;
}

.shipping-services-table th[data-sort="code"],
.shipping-services-table td:nth-child(2) {
  width: 16%;
}

.shipping-services-table th[data-sort="orders"],
.shipping-services-table td:nth-child(3) {
  width: 7%;
}

.shipping-services-table th[data-sort="lastUsed"],
.shipping-services-table td:nth-child(4) {
  width: 12%;
}

.shipping-services-table th[data-sort="deliveryType"],
.shipping-services-table td:nth-child(5) {
  width: 16%;
}

.shipping-services-table td:nth-child(5) .menu-select {
  width: 100%;
  min-width: 130px;
}

.shipping-services-table th:nth-child(6),
.shipping-services-table td:nth-child(6) {
  width: 21%;
}

.shipping-services-table td:nth-child(6) .menu-select {
  width: 100%;
  min-width: 220px;
}

.modal-card.account-log-card {
  width: min(80vw, 980px);
}

.rule-actions {
  display: grid;
  gap: 10px;
}

.rule-action-row {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e0e0e5;
  background: var(--surface-muted);
}

.rule-action-row input,
.rule-action-row select {
  width: 100%;
}

.rule-action-remove {
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .rule-action-row {
    grid-template-columns: 1fr;
  }
}

.value-panel {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.value-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid #e2e3e7;
  gap: 4px;
  width: fit-content;
}

.value-toggle__button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.value-toggle__button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 15, 15, 0.08);
}

.menu-button {
  background: var(--surface);
  border: 1px solid #e0e0e5;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: var(--transition);
}

.menu-select {
  background: var(--surface);
  border: 1px solid #e0e0e5;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--text);
}

.modal-card input,
.modal-card select,
.modal-card .menu-select {
  font-weight: 400;
}

.menu-select:focus {
  outline: none;
  border-color: #c7c9d3;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.menu-button.danger {
  background: rgba(168, 68, 68, 0.14);
  color: #7b2323;
  border-color: rgba(168, 68, 68, 0.35);
}

.menu-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.menu-button.is-active {
  background: rgba(31, 122, 80, 0.15);
  color: #155a34;
  border-color: rgba(31, 122, 80, 0.35);
}

.prop-textbox {
  min-height: 120px;
  border: 1px solid #e0e0e5;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  line-height: 1.4;
  outline: none;
}

.prop-textbox:focus {
  border-color: #c7c9d3;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.icon-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e0e0e5;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-toggle svg {
  width: 18px;
  height: 18px;
  fill: #1f2937;
}

.icon-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.dropdown {
  position: relative;
  z-index: 40000;
}

.dropdown-menu {
  position: absolute;
  top: 46px;
  right: 0;
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: none;
  min-width: 190px;
  border: 1px solid #ececef;
  z-index: 50000;
}

.dropdown-menu.dropdown-menu--compact {
  min-width: 90px;
  padding: 8px;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-menu button,
.dropdown-menu a {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-weight: 400;
  cursor: pointer;
  border-radius: 10px;
  display: block;
}

.dropdown-menu.dropdown-menu--compact button,
.dropdown-menu.dropdown-menu--compact a {
  text-align: center;
  padding: 8px 10px;
}

.dropdown-menu button:hover,
.dropdown-menu a:hover {
  background: var(--bg-strong);
}

.dropdown-section {
  position: relative;
}

.dropdown-section + .dropdown-section {
  margin-top: 8px;
}

.header .header-actions > .dropdown > .menu-button {
  display: none;
}

.header .dropdown-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  padding: 0 4px;
  min-width: 0;
  height: var(--top-nav-height);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #e5e6ea;
  z-index: 20000;
  overflow: visible;
}

.header .dropdown-menu::before {
  content: none;
}

.menu-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto !important;
  height: 28px;
  padding: 0 8px !important;
  align-self: center;
  margin-right: 0;
  flex: 0 0 auto;
  border-radius: 0;
}

.header-logo-link {
  display: none;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  height: 28px;
  padding: 0 8px;
  border-radius: 0;
  text-decoration: none;
}

.menu-logo-link::before {
  content: '';
  display: block;
  width: 105px;
  height: 28px;
  background: url('/public/assets/branding/ladyv-logo.png') center / contain no-repeat;
}

.header-logo-link::before {
  content: '';
  display: block;
  width: 105px;
  height: 28px;
  background: url('/public/assets/branding/ladyv-logo.png') center / contain no-repeat;
}

.menu-logo-link:hover,
.menu-logo-link:focus,
.menu-logo-link:focus-visible {
  background: transparent !important;
}

.header .dropdown-menu.active {
  display: flex;
}

.header .dropdown-section {
  margin: 0;
}

.header .dropdown-section:last-child {
  margin-left: auto;
}

.header .dropdown-item.dropdown-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: var(--top-nav-height);
  padding: 0 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 10px;
}

.header .dropdown-section:last-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header .dropdown-logout-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header .shopify-sync-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(17, 17, 17, 0.25);
  border-top-color: #111;
  opacity: 0;
  animation: pageSpinner 0.8s linear infinite;
  transition: opacity 0.2s ease;
}

.header .shopify-sync-indicator.is-active {
  opacity: 1;
}

.header #warehouse-push-stock-header.is-hidden {
  display: none;
}

@media (max-width: 900px), (pointer: coarse) {
  #live-button {
    display: none !important;
  }

  .menu-logo-link {
    display: none !important;
  }

  .header-logo-link {
    display: inline-flex;
    margin-left: 0;
    margin-right: 0;
    order: 3;
  }

  .header .header-user-pills-section {
    height: 28px;
    padding: 0 2px;
    margin-right: 6px;
    margin-left: 0;
    order: 2;
  }

  .mobile-only-cell {
    display: table-cell;
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }

  body {
    margin: 0;
  }

  .container,
  .wide-container {
    margin-top: 0;
    padding: 0 6px 90px !important;
  }

  .dashboard-page .container,
  .crm-page .container,
  .chat-page .container,
  .calendar-page .container {
    padding: 0 6px 90px !important;
  }

  .dashboard-page .header,
  .crm-page .header,
  .chat-page .header,
  .calendar-page .header {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .dashboard-page .container > .header,
  .crm-page .container > .header {
    margin-bottom: 10px !important;
  }

  .container {
    padding-top: 0;
  }

  .dashboard-page .tiles {
    margin-top: 55px !important;
  }

  .top-products-panel .panel-head {
    position: relative;
  }

  .top-products-panel .panel-head::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--surface);
    border-radius: 10px;
    pointer-events: none;
  }

  .top-products-panel {
    margin-top: 0 !important;
  }

  .top-products-panel .panel-head {
    margin-top: -15px;
    padding-top: 0;
  }

  .top-products-panel {
    margin-top: 18px !important;
  }


  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    padding: 4px 6px;
    background: var(--surface);
    z-index: 30000;
  }

  body {
    padding-top: 55px;
  }

  .header::before {
    content: none;
  }

  .header .header-actions {
    margin-left: 0;
    margin-right: auto;
    order: 1;
  }

  .header .header-actions > .dropdown > .menu-button {
    display: inline-flex;
    align-self: center;
    width: 34px;
    height: 34px;
    transform: translateY(-6px);
    padding: 0;
    border-radius: 12px;
    font-size: 0;
    background: var(--surface);
    border: 1px solid #e0e0e5;
    background-image:
      linear-gradient(#1f2937, #1f2937),
      linear-gradient(#1f2937, #1f2937),
      linear-gradient(#1f2937, #1f2937);
    background-size: 18px 2px;
    background-position: center 9px, center 16px, center 23px;
    background-repeat: no-repeat;
  }

  .header .dropdown-menu {
    position: absolute;
    top: 52px;
    right: 0;
    left: auto;
    display: none;
    flex-direction: column;
    height: auto;
    border-radius: 16px;
    border: 1px solid #ececef;
    padding: 12px;
    box-shadow: var(--shadow);
    background: var(--surface);
    z-index: 20000;
    max-height: none;
    overflow: visible;
  }

  .header .dropdown-submenu,
  .header .dropdown-submenu--nested {
    position: absolute;
    top: 0;
    left: calc(100% + 6px);
    right: auto;
    display: none;
    border: 1px solid #ececef;
    box-shadow: var(--shadow);
    padding: 10px;
    background: var(--surface);
    min-width: 190px;
    height: auto;
    z-index: 30001;
  }

  .header .dropdown-section.is-open .dropdown-submenu {
    display: block;
  }

  .header .dropdown-subitem.is-open .dropdown-submenu--nested {
    display: block;
  }

  .header .dropdown-menu::before {
    display: none;
  }

  .header .dropdown-menu.active {
    display: block;
  }

  .header .dropdown-section {
    margin: 0 0 2px;
  }

  .header .dropdown-section:last-child {
    margin-left: 0;
  }

  .header .dropdown-section:last-child {
    margin-bottom: 0;
  }

  .header .dropdown-section:last-child::before {
    content: none;
  }

  .header .dropdown-item.dropdown-logout {
    height: 20px;
    min-height: 20px;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 20px !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }

  .header .dropdown-section-title {
    display: inline-flex;
    align-items: center;
    height: 24px;
    min-height: 24px;
    padding: 3px 8px 0 !important;
    font-size: 11px !important;
    line-height: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }

  .header .dropdown-item {
    padding: 3px 8px !important;
    line-height: 1.1 !important;
  }

  .header .dropdown-menu {
    right: auto;
    left: 6px;
    align-items: flex-start;
  }

  .header .dropdown-menu button,
  .header .dropdown-menu a {
    padding: 4px 8px !important;
    line-height: 1.1 !important;
  }

  .header .dropdown-menu .dropdown-item.dropdown-logout {
    height: 20px;
    min-height: 20px;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 20px !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }

  .header .dropdown-section + .dropdown-section {
    margin-top: 4px;
  }

  .header .dropdown-section-title::after {
    display: inline;
  }

  .header .dropdown-section-title::before {
    display: none;
  }

  .header {
    flex-direction: row-reverse;
  }

  .header .header-actions {
    margin-left: 0;
    margin-right: auto;
  }

  .header::before {
    margin-left: 0;
    margin-right: -20px;
  }

  .header .dropdown-submenu,
  .header .dropdown-submenu--nested {
    left: 0 !important;
    right: auto !important;
    transform: none !important;
  }

  .header .dropdown-menu.submenu-right .dropdown-submenu,
  .header .dropdown-menu.submenu-right .dropdown-submenu--nested {
    left: 0 !important;
    right: auto !important;
  }

  #config-modal {
    display: none;
  }

  #top-products-table th:not(:first-child):not(:last-child),
  #top-products-table td:not(:first-child):not(:last-child) {
    display: none;
  }

  #top-products-table tbody tr {
    cursor: pointer;
  }

  button[data-top-mode],
  #popular-limit {
    display: none;
  }

  #compare-highlight-pill {
    display: none !important;
  }

  .compare-highlight-pill {
    display: none !important;
  }

  .compare-pill {
    display: none !important;
  }

  .panel-head .dot,
  .panel-head span.dot {
    display: none !important;
  }

  .dashboard-page .dot {
    display: none !important;
  }

  #top-products-table ~ .compare-highlight-pill,
  .panel-controls #compare-highlight-pill,
  .panel-controls .compare-pill {
    display: none !important;
  }

  #stock-limit {
    display: none;
  }

  #stock-type-search,
  #stock-type-limit,
  #stock-type-config {
    display: none;
  }

  #stock-table th:not(:first-child):not(:nth-child(2)),
  #stock-table td:not(:first-child):not(:nth-child(2)) {
    display: none;
  }

  #stock-table tbody tr {
    cursor: pointer;
  }

  #stock-type-table th:not(:first-child):not(:nth-child(2)),
  #stock-type-table td:not(:first-child):not(:nth-child(2)) {
    display: none;
  }

  #stock-type-table tbody tr {
    cursor: pointer;
  }

  #tags-modal .modal-card,
  #stock-tags-modal .modal-card {
    max-height: calc(100vh - 120px);
    overflow: hidden;
  }

  #tags-modal .tags-list,
  #stock-tags-modal .tags-list {
    max-height: 18vh;
  }

  .table-wrap {
    overflow-x: hidden;
  }

  .data-table {
    table-layout: fixed;
  }

  #top-products-table th:first-child,
  #top-products-table td:first-child,
  #stock-table th:first-child,
  #stock-table td:first-child,
  #stock-type-table th:first-child,
  #stock-type-table td:first-child {
    width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #top-products-table th:last-child,
  #top-products-table td:last-child,
  #stock-table th:nth-child(2),
  #stock-table td:nth-child(2),
  #stock-type-table th:nth-child(2),
  #stock-type-table td:nth-child(2) {
    width: 32%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-page #crm-tab-orders th:not(:nth-child(1)):not(:nth-child(3)):not(:nth-child(10)),
  .crm-page #crm-tab-orders td:not(:nth-child(1)):not(:nth-child(3)):not(:nth-child(10)) {
    display: none;
  }

  .crm-page #crm-tab-tasks th:not(:nth-child(1)):not(:nth-child(3)),
  .crm-page #crm-tab-tasks td:not(:nth-child(1)):not(:nth-child(3)) {
    display: none;
  }

  .crm-page #crm-tab-tasks td:first-child,
  .crm-page #crm-tab-orders td:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-page #crm-orders-fulfillment-toggle,
  .crm-page #crm-order-limit,
  .crm-page #crm-order-filters-open {
    display: none !important;
  }

  .crm-page .crm-mobile-controls {
    display: none !important;
  }

  .crm-page #crm-tab-orders th:nth-child(1),
  .crm-page #crm-tab-orders td:nth-child(1) {
    width: 44%;
  }

  .crm-page #crm-tab-orders th:nth-child(3),
  .crm-page #crm-tab-orders td:nth-child(3) {
    width: 30%;
  }

  .crm-page #crm-tab-orders th:nth-child(10),
  .crm-page #crm-tab-orders td:nth-child(10) {
    width: 26%;
  }

  .crm-page #crm-tab-tasks th:nth-child(1),
  .crm-page #crm-tab-tasks td:nth-child(1) {
    width: 70%;
  }

  .crm-page #crm-tab-tasks th:nth-child(3),
  .crm-page #crm-tab-tasks td:nth-child(3) {
    width: 30%;
  }

  .global-e-reports-page .data-table th:not(:nth-child(1)):not(:nth-child(5)):not(:nth-child(10)),
  .global-e-reports-page .data-table td:not(:nth-child(1)):not(:nth-child(5)):not(:nth-child(10)) {
    display: none;
  }

  .global-e-reports-page .data-table th:nth-child(1),
  .global-e-reports-page .data-table td:nth-child(1) {
    width: 36%;
  }

  .global-e-reports-page .data-table th:nth-child(5),
  .global-e-reports-page .data-table td:nth-child(5) {
    width: 32%;
  }

  .global-e-reports-page .data-table th:nth-child(10),
  .global-e-reports-page .data-table td:nth-child(10) {
    width: 32%;
  }

  .global-e-reports-page .global-e-period-sep {
    display: block;
    line-height: 0;
    font-size: 0;
  }

  .global-e-reports-page .row-actions-menu.is-open {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 6px);
    bottom: auto;
    margin-top: 0;
    min-width: 180px;
    max-width: min(86vw, 260px);
    max-height: 52vh;
    overflow-y: auto;
    z-index: 120000;
  }

  .global-e-reports-page .row-actions-menu.is-open button {
    min-height: 38px;
  }

  #popular-detail-modal .modal-card,
  #stock-detail-modal .modal-card,
  #stock-type-detail-modal .modal-card {
    font-size: 14px;
  }

  #popular-detail-modal .modal-head .brand,
  #stock-detail-modal .modal-head .brand,
  #stock-type-detail-modal .modal-head .brand {
    font-size: 20px;
  }

  #popular-detail-modal .modal-head .subtle,
  #stock-detail-modal .modal-head .subtle,
  #stock-type-detail-modal .modal-head .subtle {
    font-size: 14px;
  }

  #popular-detail-modal .panel-head .brand,
  #stock-detail-modal .panel-head .brand,
  #stock-type-detail-modal .panel-head .brand {
    font-size: 20px;
  }

  #popular-detail-modal .order-detail-card .brand,
  #stock-detail-modal .order-detail-card .brand,
  #stock-type-detail-modal .order-detail-card .brand,
  #popular-detail-modal .order-detail-card .subtle,
  #stock-detail-modal .order-detail-card .subtle,
  #stock-type-detail-modal .order-detail-card .subtle {
    font-size: 14px;
  }
}

.header .dropdown-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  flex: 0 0 auto;
  height: var(--top-nav-height);
  padding: 0 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 10px;
}

.header .dropdown-section-title:hover,
.header .dropdown-section-title:focus,
.header .dropdown-section-title:focus-visible {
  background: transparent;
}

.header .dropdown-section-title::after {
  content: '▾';
  float: none;
  margin-left: 2px;
  color: #9aa0ac;
}

.header .dropdown-section.is-open .dropdown-section-title {
  background: transparent;
}

.header .dropdown-submenu {
  top: calc(100% + 6px);
  left: 0;
  right: auto;
}

.header .dropdown-section:hover .dropdown-submenu {
  display: none;
}

.header .dropdown-subitem:hover .dropdown-submenu--nested {
  display: none;
}

.header .dropdown-menu.submenu-right .dropdown-submenu {
  left: auto;
  right: 0;
}

.header .dropdown-menu.submenu-right .dropdown-section-title::after {
  content: '▾';
}

/* Keep the right-most System menu fully on-screen. */
.header .dropdown-section.system-menu-section .dropdown-submenu {
  left: auto;
  right: 0;
}

.header .dropdown-section.system-menu-section .dropdown-submenu--nested {
  left: auto;
  right: calc(100% + 2px);
}

.dropdown-section-title {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
}

.dropdown-section-title::after {
  content: '‹';
  float: right;
  color: #9aa0ac;
}

.dropdown-section.is-open .dropdown-section-title {
  background: transparent;
  color: var(--text);
}

.dropdown-submenu {
  position: absolute;
  top: 0;
  left: auto;
  right: calc(100% + 2px);
  background: var(--surface);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
  min-width: 210px;
  border: 1px solid #ececef;
  display: none;
  z-index: 20001;
}

.dropdown-section.is-open .dropdown-submenu {
  display: block;
}

.dropdown-menu.submenu-right .dropdown-submenu {
  left: calc(100% + 6px);
  right: auto;
}

.dropdown-menu.submenu-right .dropdown-section-title::after {
  content: '›';
}

.dropdown-subitem {
  position: relative;
}

.dropdown-subitem-title::after {
  content: '›';
  float: right;
  color: #9aa0ac;
}

.dropdown-subitem.is-open .dropdown-subitem-title {
  background: transparent;
}

.dropdown-submenu--nested {
  position: absolute;
  top: 0;
  left: calc(100% + 2px);
  right: auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
  min-width: 200px;
  border: 1px solid #ececef;
  display: none;
  z-index: 20002;
}

.dropdown-subitem.is-open .dropdown-submenu--nested {
  display: block;
}

/* Nested submenu should open on click, not hover */
.dropdown-subitem:hover .dropdown-submenu--nested {
  display: none;
}

.dropdown-subitem.is-open:hover .dropdown-submenu--nested {
  display: block;
}

/* Disable hover-to-open; use click (is-open) only */
.header .dropdown-section:hover .dropdown-submenu {
  display: none;
}

.header .dropdown-subitem:hover .dropdown-submenu--nested {
  display: none;
}

.dropdown-section:hover .dropdown-submenu {
  display: none;
}

.dropdown-subitem:hover .dropdown-submenu--nested {
  display: none;
}

/* Ensure click-to-open always shows submenu in header */
.header .dropdown-section.is-open .dropdown-submenu {
  display: block;
}

.header .dropdown-subitem.is-open .dropdown-submenu--nested {
  display: block;
}

.dropdown-menu.submenu-right .dropdown-submenu--nested {
  left: auto;
  right: calc(100% + 2px);
}


.dropdown-item {
  padding-left: 14px;
}

.dropdown-menu a.dropdown-item {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-decoration: none;
  display: block;
}

.dropdown-menu a.dropdown-item,
.dropdown-menu button.dropdown-item {
  font-family: var(--font-body);
}

.dropdown-menu,
.dropdown-menu * {
  font-family: var(--font-body);
}

.dropdown-menu .dropdown-item {
  font-size: 13px;
  line-height: 1.2;
}


.dropdown-menu .dropdown-item.dropdown-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--top-nav-height);
  padding: 0 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 10px;
}

/* Force logout to render like a normal full-width menu item. */
.header .dropdown-menu #logout-button,
.dropdown-menu #logout-button,
.header .dropdown-menu .dropdown-item.dropdown-logout,
.dropdown-menu .dropdown-item.dropdown-logout {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 10px 12px !important;
  text-align: left !important;
  line-height: 1.2 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  border-radius: 10px !important;
}

.header .dropdown-menu #logout-button:hover,
.dropdown-menu #logout-button:hover,
.header .dropdown-menu .dropdown-item.dropdown-logout:hover,
.dropdown-menu .dropdown-item.dropdown-logout:hover {
  background: var(--bg-strong) !important;
}

.hero {
  margin-top: 34px;
  padding: 32px 36px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  border: 1px solid #ededf0;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: -0.6px;
}

.tiles {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

#research-tiles {
  margin-top: 42px;
}

.modal-body-scroll > .tiles {
  margin-bottom: 16px;
}

.modal-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.modal-actions--top .modal-legend {
  margin-bottom: 0;
}

.modal-legend--tight {
  margin-top: 0;
  margin-bottom: 12px;
}

#global-e-orders-modal .modal-head {
  margin-bottom: 0;
}

#global-e-orders-modal .modal-body-scroll {
  padding-top: 0;
}

#global-e-orders-modal .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

#global-e-orders-tiles {
  grid-template-columns: 1fr;
}

#global-e-orders-tiles .tile.is-spacer {
  visibility: hidden;
}

.orders-tiles-row {
  display: grid;
  gap: 18px;
}

.orders-tiles-row--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.orders-tiles-row--four {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 100%;
  justify-self: center;
}

.orders-row.profit-highlight {
  background: rgba(46, 160, 108, 0.18);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(6, 260px);
  gap: 16px;
  margin: 12px 0 0;
  justify-items: stretch;
  justify-content: center;
  width: 100%;
}

.heatmap-card {
  border-radius: 14px;
  padding: 18px 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 20px rgba(27, 43, 61, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 92px;
  text-align: center;
  min-width: 260px;
  width: 100%;
  min-width: 0;
}

.heatmap-country {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.heatmap-value {
  font-size: 26px;
  font-weight: 700;
}

@media (max-width: 1600px) {
  .heatmap-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}

@media (max-width: 1200px) {
  .heatmap-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

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

.heatmap-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1200px) {
  .orders-tiles-row--five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-tiles-row--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .orders-tiles-row--five,
  .orders-tiles-row--four {
    grid-template-columns: 1fr;
  }
}

.dashboard-page .container {
  padding-top: 12px;
}

.dashboard-page .tiles {
  margin-top: 4px !important;
}

@media (min-width: 901px) and (pointer: fine) {
  .shipping-dashboard-page .tiles.shipping-tiles {
    margin-top: 20px !important;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  .dashboard-page .container > .tiles:first-of-type {
    margin-top: 18px !important;
  }
}

.system-dashboard-page .container {
  padding-top: 6px;
}

.system-dashboard-page .system-dashboard-section {
  display: grid;
  gap: 18px;
}

.system-dashboard-page .system-dashboard-section + .system-dashboard-section {
  margin-top: 18px;
}

.system-dashboard-page .system-dashboard-section .tiles {
  margin-top: 0;
}

.system-dashboard-page .system-dashboard-divider {
  height: 1px;
  background: #d9dde7;
}

@media (min-width: 901px) {
  .global-e-reports-page .container > .panel.panel--spaced:first-of-type {
    margin-top: 8px;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  .system-dashboard-page .system-dashboard-section:first-of-type {
    margin-top: 14px;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  .header .header-actions > .dropdown > .menu-button {
    width: 38px;
    height: 38px;
    transform: translateY(-5px);
    border-radius: 0;
    border: none;
    background-color: transparent;
    box-shadow: none;
    background-image:
      linear-gradient(#1f2d3f, #1f2d3f),
      linear-gradient(#1f2d3f, #1f2d3f),
      linear-gradient(#1f2d3f, #1f2d3f);
    background-size: 18px 2px, 18px 2px, 18px 2px;
    background-position: center 11px, center 18px, center 25px;
    background-repeat: no-repeat;
  }

  .header .dropdown-menu {
    position: fixed;
    top: var(--top-nav-height);
    left: 0;
    right: auto;
    width: min(88vw, 340px);
    height: calc(100dvh - var(--top-nav-height));
    max-height: calc(100dvh - var(--top-nav-height));
    border: none;
    border-right: 1px solid #dde3ee;
    border-radius: 0;
    padding: 10px 10px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fafafc;
    box-shadow: 14px 0 30px rgba(15, 23, 42, 0.16);
    display: block !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-14px);
    transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .header .dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .header .dropdown-section {
    margin: 0;
    width: 100%;
    display: block;
  }

  .header .dropdown-section + .dropdown-section {
    margin-top: 6px;
  }

  .header .dropdown-section:last-child {
    width: 100% !important;
    display: block !important;
    margin-left: 0 !important;
  }

  .header .dropdown-section.system-menu-section {
    margin-left: 0 !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .header .dropdown-section-title {
    width: 100%;
    min-height: 36px;
    height: auto;
    padding: 8px 10px !important;
    justify-content: space-between;
    border-radius: 0;
    font-size: 12px !important;
    line-height: 1.1 !important;
    letter-spacing: 0.08em;
    background: #f0f1f4;
    color: #1f2937;
  }

  .header .dropdown-section.system-menu-section .dropdown-section-title {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 10px 8px !important;
    display: flex !important;
    text-align: left !important;
    text-indent: 0 !important;
  }

  .header .dropdown-section-title::after {
    content: '▸';
    margin-left: 8px;
    color: #667387;
    transition: transform 0.15s ease;
  }

  .header .dropdown-section.is-open .dropdown-section-title::after {
    transform: rotate(90deg);
  }

  .header .dropdown-subitem-title::after {
    content: '▸';
    color: #667387;
    transition: transform 0.15s ease;
  }

  .header .dropdown-subitem.is-open .dropdown-subitem-title::after {
    transform: rotate(90deg);
  }

  .header .dropdown-submenu,
  .header .dropdown-submenu--nested {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    min-width: 0;
    border: none;
    box-shadow: none;
    display: none;
    margin: 6px 0 8px;
    padding: 6px;
    border-radius: 0;
    background: #f4f4f6;
  }

  .header .dropdown-section.is-open .dropdown-submenu,
  .header .dropdown-subitem.is-open .dropdown-submenu--nested {
    display: block;
  }

  .header .dropdown-submenu .dropdown-item,
  .header .dropdown-submenu--nested .dropdown-item,
  .header .dropdown-submenu .dropdown-subitem-title,
  .header .dropdown-submenu--nested .dropdown-subitem-title {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px !important;
    border-radius: 0;
    font-size: 12px !important;
    line-height: 1.15 !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #243247;
  }

  .header .dropdown-section:last-child::before {
    margin: 8px 0;
  }
}

.crm-page .container {
  padding-top: 16px;
}

.crm-page .tiles {
  margin-top: 16px;
}


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

.tiles--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.shopify-products-page .shopify-products-tiles {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

@media (max-width: 1200px) {
  .tiles--five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .shopify-products-page .shopify-products-tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

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

  .tiles--six {
    grid-template-columns: 1fr;
  }

  .tiles--three {
    grid-template-columns: 1fr;
  }

  .shopify-products-page .shopify-products-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  .tiles--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tiles--four {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .tiles--five {
    grid-template-columns: 1fr;
  }

  .shopify-products-page .shopify-products-tiles {
    grid-template-columns: 1fr;
  }
}

.tiles--secondary {
  margin-top: 18px;
}

.dashboard-page #stock-type-tiles {
  margin-top: 18px !important;
}

.tiles--tight {
  margin-top: 12px;
}

.tile-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 15, 23, 0.12);
}

.data-table thead th[data-field] {
  cursor: pointer;
  position: relative;
}

.data-table thead th[data-sort] {
  cursor: pointer;
  position: relative;
}

.data-table thead th.sort-asc::after,
.data-table thead th.sort-desc::after {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.7;
}

.data-table thead th.sort-asc::after {
  content: '▲';
}

.data-table thead th.sort-desc::after {
  content: '▼';
}

.tiles + .panel,
.panel + .panel,
.tiles + .tiles {
  margin-top: 18px;
}

@media (min-width: 901px) {
  .dashboard-page .panel + .panel {
    margin-top: 18px !important;
  }
}

.tiles--tight + .table-wrap,
.tiles--tight + .table-wrap--menus {
  margin-top: 12px;
}

.priority-grid {
  display: grid;
  gap: 10px;
}

.priority-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.priority-row--head {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.priority-row input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 13px;
  background: #fff;
}

.priority-from {
  font-size: 12px;
  color: var(--muted);
}

.priority-stars {
  font-size: 12px;
  letter-spacing: 1px;
  color: #f0a500;
}

.priority-label {
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 900px), (pointer: coarse) {
  #crm-priority-modal .modal-card {
    width: min(96vw, 96vw);
    max-width: 96vw;
    padding: 12px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #crm-priority-modal .priority-grid {
    gap: 8px;
  }

  #crm-priority-modal .priority-row {
    grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }

  #crm-priority-modal .priority-row--head {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  #crm-priority-modal .priority-from {
    font-size: 11px;
    white-space: nowrap;
  }

  #crm-priority-modal .priority-row input {
    padding: 8px 8px;
    font-size: 12px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
}

.status-success {
  color: #16734f;
  font-weight: 600;
}

.status-error {
  color: #b42318;
  font-weight: 600;
}
.order-top-grid {
  margin-top: 18px;
}

.tile {
  background: var(--surface);
  padding: 18px;
  border-radius: var(--radius-small);
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
  position: relative;
  overflow: hidden;
  border: 1px solid #ededf0;
}

.tile.tile-alert {
  border-color: rgba(168, 68, 68, 0.45);
  box-shadow: 0 10px 24px rgba(168, 68, 68, 0.18);
}

.tile h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
  line-height: 1.15;
  min-height: 26px;
  display: flex;
  align-items: center;
}

.tile .value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.tile .compare {
  font-size: 12px;
  color: #ff7a00;
  font-weight: 600;
  display: none;
}

.tile .compare.compare--show {
  display: block;
}

.compare-inline {
  color: #ff7a00;
  font-weight: 600;
  margin-left: 6px;
  font-size: 12px;
}

.tile .hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

.tile .vat {
  font-size: 11px;
  color: rgba(38, 40, 52, 0.6);
  line-height: 1.2;
}

.tile .shipping {
  font-size: 11px;
  color: rgba(38, 40, 52, 0.6);
  line-height: 1.2;
}

.assignment-grid {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.assignment-stat {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.assignment-stat strong {
  color: var(--text);
  font-weight: 600;
}

.assignment-section + .assignment-section {
  margin-top: 18px;
}

.assignment-section .tiles {
  margin-top: 12px;
}

.tile .globale {
  font-size: 11px;
  color: rgba(38, 40, 52, 0.6);
  line-height: 1.2;
}

.tile::after {
  content: '';
  position: absolute;
  inset: -80px;
  background: radial-gradient(circle at top, rgba(10, 132, 255, 0.12), transparent 55%);
  opacity: 0.6;
}

.tile > * {
  position: relative;
}

.columns {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  border: 1px solid #ededf0;
}

.panel--compact {
  padding: 16px;
  gap: 12px;
}

.panel--summary {
  gap: 12px;
  padding-bottom: 22px;
}

.panel--summary .tiles {
  margin-top: 0;
  margin-bottom: 0;
}

.panel--tight-head {
  gap: 2px;
}

.campaign-tracking-modal-card {
  display: flex !important;
  flex-direction: column;
  height: auto;
  max-height: min(86vh, 820px);
  overflow: hidden;
  gap: 12px;
}

.campaign-tracking-header {
  margin-bottom: 6px;
}

.campaign-tracking-tiles {
  margin-top: 0;
}

.status-pill.is-pulse {
  animation: pillPulse 900ms ease;
}

@keyframes pillPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.campaign-tracking-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campaign-tracking-panel .panel-head {
  margin-bottom: 0;
}

.campaign-tracking-table {
  margin-top: 0;
}

.campaign-tracking-table {
  flex: 1 1 auto;
  max-height: min(46vh, 420px);
  overflow: auto;
}

.campaign-tracking-tiles .tile {
  align-self: start;
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.3px;
}

.newsletter-link-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  background: #f6f6f8;
  border: 1px solid #e5e7ee;
  border-radius: 16px;
  padding: 10px 12px;
}

.newsletter-link-bar label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.newsletter-link-bar input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 13px;
  background: #fff;
  min-width: 220px;
}

.newsletter-link-bar input:disabled {
  background: #f1f2f6;
  color: #8a8f9a;
}

#newsletter-templates-modal .modal-card {
  max-width: 880px;
}

.newsletter-builder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 640px;
  position: relative;
}

.builder-block {
  background: #fff;
  border: 1px solid #e1e2ea;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 12px;
  cursor: grab;
  transition: var(--transition);
}

.builder-block:active {
  cursor: grabbing;
}

.builder-block:hover {
  border-color: #c7c9d3;
  box-shadow: 0 10px 24px rgba(15, 15, 15, 0.08);
}

.builder-canvas-wrap {
  background: #f2f2f5;
  border: 1px solid #e5e7ee;
  border-radius: 18px;
  padding: 18px;
  overflow: auto;
  position: relative;
}

.builder-draft-badge {
  position: sticky;
  top: 12px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #b86ec6;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(184, 110, 198, 0.25);
  z-index: 5;
}

.builder-draft-badge.is-hidden {
  display: none;
}

.newsletter-canvas {
  background: #ffffff;
  border-radius: 16px;
  min-height: 600px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(15, 15, 15, 0.08);
}

.drawer-toggle--right {
  left: auto !important;
  right: 12px !important;
  z-index: 40021;
}

.drawer-toggle--right .drawer-toggle-arrow {
  transform: rotate(180deg);
}

.drawer-toggle--right.is-open .drawer-toggle-arrow {
  transform: rotate(0deg);
}

.drawer-toggle--right.is-open {
  transform: translateY(-50%);
}

.drawer-toggle--right {
  transition: transform 0.2s ease, right 0.2s ease;
}

.drawer-overlay--right.is-open ~ .drawer-toggle--right,
.drawer-toggle--right.is-open {
  right: calc(min(420px, 90vw) + 12px) !important;
}

.drawer-overlay--right {
  justify-content: flex-end;
}

.drawer-overlay--right {
  justify-content: flex-end;
}

.drawer-overlay--right .drawer-panel {
  left: auto !important;
  right: 0 !important;
  transform: translateX(100%);
}

.drawer-overlay--right.is-open .drawer-panel {
  transform: translateX(0);
}

.properties-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.properties-body {
  display: grid;
  gap: 12px;
}

.prop-panel.is-hidden {
  display: none;
}

.properties-accordion {
  display: grid;
  gap: 10px;
}

.prop-section {
  border: 1px solid #e5e7ee;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.prop-section-toggle {
  width: 100%;
  background: #f6f6f8;
  border: none;
  padding: 10px 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.prop-section .prop-panel {
  padding: 12px;
  display: none;
}

.prop-section.is-open .prop-panel {
  display: grid;
  gap: 10px;
}

.newsletter-canvas .builder-element {
  border: 1px dashed transparent;
  padding: 6px;
  cursor: grab;
}

.newsletter-canvas .builder-element.is-selected {
  border-color: #0a84ff;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.2);
}
.newsletter-canvas .builder-element a[data-linked="product"] {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
}
.newsletter-canvas .builder-element a[data-linked="product"] img {
  display: block;
  width: 100%;
}
.newsletter-canvas .builder-element a[data-linked="product"]::after {
  content: 'Product Linked';
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #1f7a50;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(31, 122, 80, 0.2);
  pointer-events: none;
}

.builder-dropzone {
  min-height: 20px;
}

.builder-section {
  border: 1px solid #f0f0f3;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.builder-columns {
  display: grid;
  gap: 12px;
}

.builder-columns.two {
  grid-template-columns: repeat(2, 1fr);
}

.builder-columns.three {
  grid-template-columns: repeat(3, 1fr);
}

.builder-columns.four {
  grid-template-columns: repeat(4, 1fr);
}

.builder-button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

.builder-divider {
  height: 1px;
  background: #e5e7eb;
  width: 100%;
}

.price-pill,
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #e2e3e7;
  color: #111827;
  background: #ffffff;
}

.status-pill {
  background: #f7f7f9;
}

.status-pill.is-active {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.4);
  color: #166534;
}

.status-pill.is-draft {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.4);
  color: #92400e;
}

.status-pill.is-archived {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.45);
  color: #475569;
}

.status-pill.is-inactive {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #991b1b;
}

.status-pill.is-published {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.4);
  color: #166534;
}

.status-pill.is-unpublished {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.4);
  color: #92400e;
}

.marketing-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.marketing-pill--accepted {
  background: rgba(34, 197, 94, 0.18);
  color: #0b3b1a;
  border-color: rgba(22, 163, 74, 0.35);
}

.marketing-pill--declined {
  background: rgba(239, 68, 68, 0.18);
  color: #5a0b0b;
  border-color: rgba(239, 68, 68, 0.4);
}

.marketing-pill--not-sent {
  background: rgba(255, 122, 0, 0.18);
  color: #5a2d00;
  border-color: rgba(255, 122, 0, 0.4);
}

.shipping-pill {
  background: rgba(37, 99, 235, 0.16);
  color: #1e3a8a;
  border-color: rgba(37, 99, 235, 0.34);
  cursor: pointer;
}

.shipping-pill:hover {
  filter: brightness(0.98);
}

.internal-shortage-list {
  margin: 0;
  padding-left: 18px;
}

.internal-shortage-list li + li {
  margin-top: 4px;
}

.order-shipment-modal-card {
  gap: 14px;
}

.order-shipment-grid {
  display: grid;
  gap: 10px;
}

.order-shipment-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.order-shipment-row .label {
  color: var(--muted);
  font-size: 12px;
}

.order-shipment-row .value {
  text-align: right;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  max-width: 65%;
}

#finalised-orders-table tbody tr.finalised-row-clickable {
  cursor: pointer;
}

#shipped-warehouse-orders-table td.shipment-trigger-cell {
  cursor: pointer;
}

.event-list {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
}

.table-wrap {
  width: 100%;
  overflow: visible;
  border-radius: 16px;
  border: 1px solid #ededf0;
}

.table-wrap.table-wrap--menus {
  overflow: visible;
}

.email-table-wrap {
  overflow: visible;
  position: relative;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  overflow: visible;
}

.table-action-cell {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.data-table thead {
  background: var(--surface-muted);
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #ededf0;
  position: relative;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr.shipping-row--printed td {
  background: rgba(34, 197, 94, 0.12);
}

.row-actions {
  position: relative;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
}

.shopify-products-table td {
  overflow: visible;
}

.shopify-mobile-product-row td {
  padding: 10px 12px !important;
}

.shopify-mobile-product-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.shopify-mobile-product-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopify-mobile-product-info {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
}

.shopify-mobile-product-details {
  display: grid;
  gap: 14px;
}

.shopify-mobile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shopify-mobile-detail-grid > div {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  background: #fff;
}

.shopify-mobile-detail-grid .meta {
  font-size: 11px;
  color: #647087;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.shopify-mobile-detail-grid strong {
  font-size: 13px;
  color: #111827;
}

.shopify-mobile-variants {
  display: grid;
  gap: 8px;
  border-top: 1px solid #e8ecf2;
  padding-top: 10px;
}

.shopify-mobile-variant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  background: #fafbff;
}

.shopify-products-table .row-actions {
  z-index: 65000;
}

.shopify-products-table .row-actions .dropdown-menu {
  z-index: 70000;
}

.shopify-products-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.shopify-collections-table {
  table-layout: fixed;
}

.shopify-collections-table th:nth-child(1),
.shopify-collections-table td:nth-child(1) {
  width: 86px;
}

.shopify-collections-table th:nth-child(3),
.shopify-collections-table td:nth-child(3) {
  width: 72px;
}

.shopify-collections-table th:nth-child(4),
.shopify-collections-table td:nth-child(4) {
  width: 180px;
}

.shopify-collections-table th:nth-child(5),
.shopify-collections-table td:nth-child(5) {
  width: 130px;
}

.shopify-collections-table th:nth-child(6),
.shopify-collections-table td:nth-child(6) {
  width: 86px;
}

.shopify-collections-table th:nth-child(7),
.shopify-collections-table td:nth-child(7) {
  width: 112px;
}

.shopify-collections-table th:nth-child(8),
.shopify-collections-table td:nth-child(8) {
  width: 96px;
}

.shopify-collections-table th:nth-child(2),
.shopify-collections-table td:nth-child(2),
.shopify-collections-table th:nth-child(4),
.shopify-collections-table td:nth-child(4),
.shopify-collections-table th:nth-child(5),
.shopify-collections-table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.shopify-products-panel {
  overflow: visible;
  position: relative;
  z-index: 10;
}

.shopify-products-panel .panel-actions {
  position: relative;
  z-index: 20;
}

.shopify-products-panel .table-wrap {
  position: relative;
  z-index: 10;
}

.shopify-mobile-action-item {
  display: none;
}

.shopify-products-filters {
  margin: 10px 0 0;
  padding: 6px 0;
  border-radius: 0;
  border: none;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 6px 12px;
  align-items: end;
}

.shopify-products-filters .form-field {
  margin: 0;
  gap: 4px;
}

.shopify-products-filters .form-label {
  font-size: 11px;
}

.shopify-products-filters .form-field input,
.shopify-products-filters .form-field select,
.shopify-products-filters .form-field .menu-button {
  height: 38px;
  font-size: 13px;
  line-height: 1.2;
  padding-top: 8px;
  padding-bottom: 8px;
}

.shopify-products-filters-panel .panel-head {
  margin-bottom: -9px;
}

#shopify-products-preorder-filter.is-active {
  border-color: rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.shopify-products-multi-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.shopify-products-multi-actions .form-field {
  margin: 0;
}

.shopify-products-multi-actions .form-field input {
  height: 38px;
}

.shopify-products-multi-actions .form-field select {
  height: 38px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.2;
  padding-top: 8px;
  padding-bottom: 8px;
}

.multi-tags-pills {
  grid-column: 1 / -1;
  margin-top: -4px;
  padding-bottom: 4px;
}

.multi-action-pill {
  display: none;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.18);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.35);
}

.multi-action-pill.is-active {
  display: inline-flex;
}

.multi-select-col {
  display: none;
  width: 0;
  min-width: 0;
  max-width: 0;
  padding: 0 !important;
  border: 0 !important;
}

.shopify-products-table.is-multi-select .multi-select-col {
  display: table-cell;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 12px 14px !important;
  border-bottom: 1px solid #ededf0 !important;
}

.shopify-products-filters.is-hidden {
  display: none;
}

.shopify-products-filters input,
.shopify-products-filters select {
  width: 100%;
}

.shopify-products-table td:nth-child(3) .shopify-products-title-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.25;
  max-height: 2.5em;
}

.shopify-products-table th:nth-child(7),
.shopify-products-table td:nth-child(7),
.shopify-products-table th:nth-child(8),
.shopify-products-table td:nth-child(8) {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.shopify-products-table th:nth-child(5),
.shopify-products-table td:nth-child(5),
.shopify-products-table th:nth-child(6),
.shopify-products-table td:nth-child(6) {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

.shopify-products-table th:nth-child(9),
.shopify-products-table td:nth-child(9),
.shopify-products-table th:nth-child(10),
.shopify-products-table td:nth-child(10) {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}

.shopify-products-table th:nth-child(11),
.shopify-products-table td:nth-child(11) {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.shopify-products-table th:nth-child(3),
.shopify-products-table td:nth-child(3) {
  width: 360px;
  min-width: 360px;
  max-width: 360px;
}

.shopify-products-table th:nth-child(4),
.shopify-products-table td:nth-child(4) {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.shopify-products-table td:nth-child(4) .secondary-button {
  white-space: normal;
  line-height: 1.15;
  padding-top: 6px;
  padding-bottom: 6px;
}

.shopify-products-table th:nth-child(2),
.shopify-products-table td:nth-child(2) {
  text-align: left;
  padding-left: 4px !important;
  white-space: nowrap;
}

.shopify-products-table.is-multi-select th:nth-child(3),
.shopify-products-table.is-multi-select td:nth-child(3) {
  text-align: left;
  padding-left: 4px !important;
  white-space: nowrap;
}

.shopify-products-table td:nth-child(2) .row-expand,
.shopify-products-table.is-multi-select td:nth-child(3) .row-expand {
  margin-left: 5px;
  margin-right: 6px;
  vertical-align: middle;
}

.shopify-products-table td:nth-child(2) .status-pill,
.shopify-products-table.is-multi-select td:nth-child(3) .status-pill {
  vertical-align: middle;
}

.shopify-products-table .shopify-inline-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  font: inherit;
  line-height: inherit;
  color: inherit;
  text-align: inherit;
  background: transparent;
  appearance: none;
}

.shopify-products-table .shopify-inline-input:focus {
  outline: none;
  border: 1px solid #9aa3bf;
  border-radius: 6px;
  padding: 2px 6px;
  border-color: #9aa3bf;
  box-shadow: 0 0 0 2px rgba(154, 163, 191, 0.16);
  background: #fff;
}

.shopify-products-table .shopify-inline-input--title {
  max-width: 100%;
}

.shopify-products-table .shopify-inline-input[type="number"] {
  -moz-appearance: textfield;
  width: 100%;
}

.shopify-products-table .shopify-inline-input[type="number"]::-webkit-outer-spin-button,
.shopify-products-table .shopify-inline-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 1500px) {
  .shopify-products-table {
    table-layout: fixed;
    width: 100%;
  }

  .shopify-products-table th,
  .shopify-products-table td {
    font-size: 11px;
    padding: 9px 10px;
  }

  .shopify-products-table .menu-button,
  .shopify-products-table .secondary-button {
    padding: 7px 10px;
    font-size: 11px;
  }
}

@media (max-width: 1280px) {
  .shopify-products-table th,
  .shopify-products-table td {
    font-size: 10px;
    padding: 7px 8px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
  }

  .shopify-products-table .table-image {
    width: 36px;
    height: 36px;
  }

  .shopify-products-table .row-expand {
    width: 24px;
    height: 24px;
    font-size: 14px;
    padding: 0;
  }

  .shopify-products-table .menu-button,
  .shopify-products-table .secondary-button {
    padding: 6px 8px;
    font-size: 10px;
  }

  .shopify-products-table .shopify-inline-input {
    font-size: inherit;
    padding: 0;
  }
}

#preorder-conditions-modal select,
#preorder-conditions-modal input,
#preorder-schedule-modal input,
#preorder-schedule-modal select,
#sale-conditions-modal select,
#sale-conditions-modal input,
#sale-schedule-modal input,
#sale-schedule-modal select,
#preorder-manual-products-modal input,
#sale-manual-products-modal input {
  width: 100%;
}

#preorder-conditions-tag[readonly] {
  background: #f6f7fb;
  color: #374151;
  font-weight: 600;
}

#preorder-conditions-modal .preorder-condition-control {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 14px;
  background: #fff;
  font-family: var(--font-body);
  height: auto;
  min-height: 38px;
  line-height: 1.35;
  box-sizing: border-box;
}

#preorder-conditions-modal .preorder-condition-control:focus {
  outline: none;
  border-color: #c7c9d3;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

#preorder-conditions-modal .preorder-condition-control[type="text"] {
  padding-right: 14px;
}

#preorder-conditions-modal select.preorder-condition-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7b8792 50%),
    linear-gradient(135deg, #7b8792 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

#sale-conditions-modal .sale-condition-control {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 14px;
  background: #fff;
  font-family: var(--font-body);
  height: auto;
  min-height: 38px;
  line-height: 1.35;
  box-sizing: border-box;
}

#sale-conditions-modal .sale-condition-control:focus {
  outline: none;
  border-color: #c7c9d3;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

#sale-conditions-modal .sale-condition-control[type="text"] {
  padding-right: 14px;
}

#sale-conditions-modal select.sale-condition-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7b8792 50%),
    linear-gradient(135deg, #7b8792 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.preorder-action-btn--pending {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.preorder-action-btn--ready {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.sale-action-btn--pending {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.sale-action-btn--ready {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.collection-rules {
  display: grid;
  gap: 6px;
}

.collection-rules-table select,
.collection-rules-table input {
  width: 100%;
}

.collection-rules-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.modal-card--collection {
  height: 80vh !important;
  max-height: 80vh !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.modal-card--collection form {
  overflow: auto;
  align-content: start;
  justify-content: start;
  margin-top: 0;
  width: 100% !important;
  align-self: stretch;
}

.modal-card--collection .form-grid {
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch;
}

.modal-card--collection .modal-head {
  gap: 8px;
}

.modal-card--collection .modal-head .subtle {
  margin-top: 4px;
}

/* modal actions moved to header */

@media (max-width: 960px) {
  .shopify-products-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  .shopify-products-page #shopify-products-metrics-window,
  .shopify-products-page #shopify-products-edit-mode,
  .shopify-products-page #shopify-products-multi-action,
  .shopify-products-page #shopify-products-outlet-toggle,
  .shopify-products-page #shopify-products-filters-toggle {
    display: none !important;
  }

  .shopify-products-page #shopify-products-actions-menu .shopify-mobile-action-item {
    display: block;
  }

  .shopify-products-page #shopify-products-sync,
  .shopify-products-page #shopify-products-log {
    display: none !important;
  }

  .shopify-products-page .shopify-products-panel,
  .shopify-products-page .shopify-products-filters-panel,
  .shopify-products-page .shopify-products-multi-actions-panel {
    margin-left: -6px;
    margin-right: -6px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .shopify-products-page .shopify-products-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .shopify-products-page .shopify-products-panel .panel-head {
    padding-left: 8px;
    padding-right: 8px;
  }

  .shopify-products-page .shopify-products-table-wrap {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .shopify-products-page .shopify-products-panel .table-wrap {
    margin: 0 !important;
    padding: 0 !important;
  }

  .shopify-products-page .shopify-products-table {
    width: 100%;
  }

  .shopify-products-page .shopify-products-table thead {
    display: none;
  }

  .shopify-products-page .shopify-products-table .stock-variants-row {
    display: none !important;
  }

  .shopify-products-page .shopify-mobile-product-row td {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .shopify-products-page .shopify-mobile-product-item {
    padding: 0 8px;
  }

  .shopify-products-page .shopify-mobile-select-col {
    padding-left: 8px !important;
    padding-right: 6px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }

  .shopify-products-page .shopify-mobile-select-col input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  .shopify-products-page .shopify-products-table-wrap {
    overflow-x: hidden !important;
  }

  #shopify-product-mobile-modal {
    z-index: 90000;
  }

  .shopify-products-page #shopify-product-status-modal,
  .shopify-products-page #shopify-product-images-modal {
    z-index: 91000 !important;
  }

  #shopify-product-mobile-modal .shopify-mobile-product-modal-card {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
    margin: 0;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  #shopify-product-mobile-modal .shopify-mobile-product-details {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
  }

  #shopify-product-mobile-modal .shopify-mobile-product-actions {
    justify-content: stretch;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8ecf2;
  }

  #shopify-product-mobile-modal .shopify-mobile-product-actions .secondary-button {
    flex: 1 1 calc(50% - 4px);
    min-height: 38px;
    padding: 9px 10px;
    font-size: 12px;
  }

  #shopify-product-mobile-modal .shopify-mobile-product-actions .menu-button {
    flex: 1 1 100%;
    min-height: 38px;
    padding: 9px 10px;
    font-size: 12px;
  }

  #shopify-product-mobile-modal .brand,
  .shopify-products-page #shopify-product-description-modal .brand {
    font-size: 18px;
    line-height: 1.2;
  }

  .shopify-products-page #shopify-product-description-modal {
    z-index: 91000 !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    place-items: stretch !important;
  }

  .shopify-products-page #shopify-product-description-modal .modal-card--shopify-description {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-self: stretch !important;
    justify-self: stretch !important;
  }

  .shopify-products-page #shopify-product-description-modal .modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding: 10px 10px 6px;
    border-bottom: 1px solid #e8ecf2;
  }

  .shopify-products-page #shopify-product-description-modal .modal-head-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .shopify-products-page #shopify-product-description-close {
    order: 1;
  }

  .shopify-products-page #shopify-product-description-ai {
    order: 2;
    min-width: 132px;
    white-space: nowrap;
  }

  .shopify-products-page #shopify-product-description-modal .form-field,
  .shopify-products-page #shopify-product-description-modal .tag-pill-row,
  .shopify-products-page #shopify-product-description-modal .composer-toolbar,
  .shopify-products-page #shopify-product-description-modal .shopify-description-collections-table-wrap {
    margin-left: 10px;
    margin-right: 10px;
  }

  .shopify-products-page #shopify-product-description-modal .form-field {
    margin-bottom: 8px;
  }

  .shopify-products-page #shopify-product-description-modal .tag-pill-row {
    margin-bottom: 10px;
  }

  .shopify-products-page #shopify-product-description-modal .composer-body--tall {
    min-height: 220px;
    flex: 1;
    overflow: auto;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
  }

  .shopify-products-page #shopify-product-description-modal .shopify-description-collections-table-wrap {
    display: none !important;
  }

  .shopify-products-page #shopify-product-description-ai-modal {
    z-index: 92000 !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    place-items: stretch !important;
  }

  .shopify-products-page #shopify-product-description-ai-modal .modal-card {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-self: stretch !important;
    justify-self: stretch !important;
  }

  .shopify-products-page #shopify-product-description-ai-modal .modal-head-actions {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: end;
    column-gap: 8px;
    row-gap: 10px;
    align-items: center;
  }

  .shopify-products-page #shopify-product-description-ai-accept {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 96px;
  }

  .shopify-products-page #shopify-product-description-ai-cancel {
    grid-column: 1;
    grid-row: 2;
  }

  .shopify-products-page #shopify-product-description-ai-regen {
    grid-column: 2;
    grid-row: 2;
  }

  .shopify-products-page #shopify-product-description-ai-modal .ai-preview-body {
    flex: 1;
    min-height: 0;
    height: auto !important;
    max-height: none !important;
    overflow: auto;
  }
}

.row-actions-portal {
  z-index: 70000;
}

.email-table {
  table-layout: fixed;
}

.email-table th,
.email-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-table td {
  padding-top: 7px;
  padding-bottom: 7px;
}

.email-mobile-received,
.email-mobile-subject {
  display: none;
}

.email-select-cell {
  width: 42px;
  text-align: center;
}

.email-table th.email-select-cell,
.email-table td.email-select-cell {
  padding-left: 8px;
  padding-right: 8px;
}

.email-select-all-inline {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
}

.email-select-all-inline.is-hidden {
  display: none !important;
}

.email-table td:last-child,
.email-table th:last-child,
.table-action-cell {
  overflow: visible;
  position: relative;
}

.email-table th:last-child,
.email-table td:last-child {
  width: 170px;
}

.email-table .email-empty-cell {
  width: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  text-align: left;
}

.email-table th:nth-child(3),
.email-table td:nth-child(3) {
  width: 42%;
}

.email-table th:nth-child(6),
.email-table td:nth-child(6) {
  width: 90px;
  text-align: center;
}

.email-table th:nth-child(2),
.email-table td:nth-child(2),
.email-table th:nth-child(4),
.email-table td:nth-child(4),
.email-table th:nth-child(5),
.email-table td:nth-child(5),
.email-table th:nth-child(3),
.email-table td:nth-child(3) {
  font-size: 13px;
}

.email-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.email-floating-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: -2px 0 6px;
}

.email-controls-toggle {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  width: 34px;
  height: 20px;
  border: 1px solid #d9dde7;
  background: #fff;
  color: #6b7280;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  cursor: pointer;
}

.email-controls-toggle .drawer-toggle-arrow {
  font-size: 11px;
  line-height: 1;
}

.email-controls-toggle:hover {
  background: #f8f9fc;
  border-color: #cfd5e2;
}

.crm-email-page .email-floating-meta {
  margin-top: -26px;
}

.email-floating-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e4e6ef;
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.email-floating-pill--title {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.email-floating-pill--pagination {
  padding: 2px 8px;
}

.email-pagination-summary {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.email-pagination-controls {
  display: inline-flex;
  gap: 4px;
}

.email-pagination-button {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #e0e0e5;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.email-pagination-button svg {
  width: 10px;
  height: 10px;
  fill: #1a1a1a;
}

.email-pagination-button:hover {
  background: #f6f6f9;
  border-color: #d6d6dc;
  transform: translateY(-1px);
}

.email-pagination-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  background: var(--surface);
}

.email-status-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 2px;
}

.crm-email-page #crm-email-panel.email-controls-collapsed .email-status-tiles {
  margin-bottom: 2px;
}

.email-status-tile {
  border-radius: 12px;
  border: 1px solid #e4e6ef;
  background: #fff;
  padding: 10px 12px;
  min-height: 68px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.email-status-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.email-status-tile.is-active {
  border-color: #1f2937;
  box-shadow: 0 0 0 2px rgba(31, 41, 55, 0.14);
}

.email-status-tile-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 7px;
}

.email-status-tile-count {
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  color: #111827;
}

.email-status-tile--urgent {
  border-color: #f29ab0;
  background: #ffc2d2;
}

.email-status-tile--urgent .email-status-tile-label,
.email-status-tile--urgent .email-status-tile-count {
  color: #8f1239;
}

.email-status-tile--reply {
  border-color: #ffd7a4;
  background: #fff8ef;
}

.email-status-tile--pending {
  border-color: #ddc8ff;
  background: #faf5ff;
}

.email-status-tile--unread {
  border-color: rgba(220, 20, 60, 0.28);
  background: rgba(220, 20, 60, 0.08);
}

.email-tiles-toggle {
  display: none;
}

.email-compose-mobile-button {
  display: none;
}

.email-mobile-quick-actions {
  display: none;
}

.email-pagination-mobile {
  display: none;
}

.drawer-mobile-email-controls {
  display: none;
}

@media (max-width: 900px), (pointer: coarse) {
  .crm-email-page #crm-email-panel.email-mobile-tiles-landing {
    min-height: var(--email-mobile-tiles-available, calc(100dvh - 120px));
    height: var(--email-mobile-tiles-available, calc(100dvh - 120px));
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 34px;
  }

  .crm-email-page #crm-email-panel.email-mobile-tiles-hidden {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0;
    padding-bottom: 34px;
  }

  .crm-email-page #crm-email-panel .email-status-tiles {
    transition: transform 220ms ease, opacity 220ms ease, max-height 220ms ease, margin 220ms ease;
    transform-origin: top center;
  }

  .crm-email-page #crm-email-panel.email-mobile-tiles-landing .email-status-tiles {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    flex: 1 1 0;
    min-height: 0;
    height: calc(var(--email-mobile-tiles-available, calc(100dvh - 120px)) - 34px);
    max-height: calc(var(--email-mobile-tiles-available, calc(100dvh - 120px)) - 34px);
    opacity: 1;
    transform: translateY(0);
  }

  .crm-email-page #crm-email-panel.email-mobile-tiles-landing .email-status-tile {
    min-height: 0;
    height: auto;
  }

  .crm-email-page #crm-email-panel .email-status-tile-label {
    font-size: 17px;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .crm-email-page #crm-email-panel .email-status-tile-count {
    font-size: 42px;
    line-height: 1;
  }

  .crm-email-page #crm-email-panel.email-mobile-tiles-hidden .email-status-tiles {
    max-height: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    overflow: hidden;
  }

  .crm-email-page .email-tiles-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 20px;
    border: 1px solid #d9dde7;
    background: #fff;
    color: #6b7280;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    z-index: 90;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 220ms ease;
  }

  .crm-email-page .email-tiles-toggle:hover {
    background: #f8f9fc;
    border-color: #cfd5e2;
  }

  .crm-email-page #crm-email-panel.email-mobile-tiles-landing .email-tiles-toggle {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
  }

  .crm-email-page #crm-email-panel.email-mobile-tiles-hidden .email-tiles-toggle {
    position: fixed;
    left: 50%;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
  }

  .crm-email-page #crm-email-panel.email-mobile-tiles-landing #crm-email-toolbar,
  .crm-email-page #crm-email-panel.email-mobile-tiles-landing #email-select-all-banner,
  .crm-email-page #crm-email-panel.email-mobile-tiles-landing .email-table-wrap,
  .crm-email-page #crm-email-panel.email-mobile-tiles-landing #email-pagination-mobile {
    display: none !important;
  }
}

.email-multi-actions {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}

.email-multi-actions.is-hidden {
  display: none;
}

#email-multi-actions-menu .is-hidden {
  display: none;
}

.email-multi-status-mobile {
  display: none;
}

.folder-visibility-card {
  width: min(60vw, 1100px);
  height: 80vh;
  max-height: 80vh;
  overflow: auto;
}

.email-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-from-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

@media (max-width: 900px), (pointer: coarse) {
  .crm-email-page #email-view-modal {
    place-items: stretch;
    background: #fff;
    z-index: 52000;
  }

  .crm-email-page #email-discard-modal {
    z-index: 53000;
  }

  .crm-email-page #email-discard-modal .modal-card {
    width: min(420px, 92vw);
    max-width: 92vw;
    border-radius: 14px;
  }

  .crm-email-page #email-view-modal .email-view-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #fff;
  }

  .crm-email-page #email-view-modal .email-view-header {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #fff;
    padding: 10px 10px 8px;
    border-bottom: 1px solid #eceff3;
    gap: 8px;
  }

  .crm-email-page #email-view-modal .email-view-header .brand {
    font-size: 14px;
    line-height: 1.2;
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-email-page #email-view-modal .email-view-header .crm-email-meta {
    font-size: 11px;
    line-height: 1.25;
    margin-top: 2px;
    color: #6b7280;
  }

  .crm-email-page #email-view-modal .email-view-header-right {
    gap: 6px;
  }

  .crm-email-page #email-view-modal .email-view-header-right .secondary-button {
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
  }

  .crm-email-page #email-view-modal .email-view-actions {
    position: sticky;
    top: 54px;
    z-index: 3;
    margin: 0;
    padding: 8px 10px;
    background: #fff;
    border-bottom: 1px solid #eceff3;
    gap: 6px;
  }

  .crm-email-page #email-view-modal .email-view-actions .menu-button,
  .crm-email-page #email-view-modal .email-view-actions .primary-button {
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
  }

  .crm-email-page #email-view-modal .email-orders-trigger {
    display: inline-flex;
  }

  .crm-email-page #email-view-modal .email-view-body {
    flex: 1 1 auto;
    min-height: 0;
    border: none;
    border-radius: 0;
    padding: 10px;
    margin: 0;
    background: #fff;
    overflow: auto;
    font-size: 13px;
    line-height: 1.55;
  }

  .crm-email-page #email-view-modal .email-attachments {
    margin: 0;
    padding: 8px 10px;
    border-top: 1px solid #eceff3;
    border-bottom: 1px solid #eceff3;
    border-radius: 0;
    background: #fff;
  }

  .crm-email-page #email-view-modal .email-view-card.is-replying .email-reply {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
    border-top: none;
    padding-top: 0;
  }

  .crm-email-page #email-view-modal .email-reply-top {
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px 10px 0;
    gap: 4px;
    background: #fff;
  }

  .crm-email-page #email-view-modal .email-view-card.is-replying .email-reply-fields {
    gap: 0;
  }

  .crm-email-page #email-view-modal .email-view-card.is-replying .email-reply-fields--subject input {
    border: none;
    border-bottom: 1px solid #e5e7ef;
    border-radius: 0;
    padding: 8px 2px;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
  }

  .crm-email-page #email-view-modal .email-view-card.is-replying .email-reply-fields--addresses {
    border-bottom: 1px solid #e5e7ef;
    padding: 2px 0 4px;
    gap: 2px;
  }

  .crm-email-page #email-view-modal .email-reply-fields input,
  .crm-email-page #email-view-modal .email-reply-fields select {
    border: none;
    border-radius: 0;
    padding: 6px 2px;
    font-size: 13px;
    background: transparent;
  }

  .crm-email-page #email-view-modal #email-reply-toolbar {
    border: none;
    border-radius: 0;
    padding: 6px 0 4px;
    background: transparent;
    overflow-x: auto;
    white-space: nowrap;
  }

  .crm-email-page #email-view-modal #email-reply-toolbar button {
    border-radius: 8px;
    background: #f5f7fb;
    border: 1px solid #e3e8f2;
  }

  .crm-email-page #email-view-modal .email-reply-editor-wrap {
    border: 1px solid #d9e2f1;
    border-radius: 14px;
    background: #fff;
    padding: 0;
    overflow: visible;
  }

  .crm-email-page #email-view-modal .composer-body {
    border: none;
    border-radius: 0;
    min-height: 220px;
    padding: 10px 12px;
    background: #fff;
  }

  .crm-email-page #email-view-modal .signature-block {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
  }

  .crm-email-page #email-view-modal .email-reply-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eceff3;
    background: #fff;
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.06);
  }

  .crm-email-page #email-view-modal .email-reply-actions input[type="file"] {
    font-size: 12px;
  }

  .crm-email-page #email-view-modal .email-reply-mobile-actions #email-reply-mobile-actions-toggle {
    min-height: 34px;
    border-radius: 999px;
    padding: 8px 14px;
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
  }

  .crm-email-page #email-orders-modal {
    place-items: stretch;
    background: #fff;
    z-index: 52100;
  }

  .crm-email-page #email-orders-modal .email-orders-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #fff;
  }

  .crm-email-page #email-orders-modal .email-view-header {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #fff;
    padding: 10px 10px 8px;
    border-bottom: 1px solid #eceff3;
    gap: 8px;
  }

  .crm-email-page #email-orders-modal .email-orders-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 900px), (pointer: coarse) {
  .crm-email-page .container,
  .crm-email-page .wide-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .crm-email-page .panel,
  .crm-email-page #crm-email-panel {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .crm-email-page .email-table-wrap,
  .crm-email-page .table-wrap {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .crm-email-page #crm-toolbar-toggle,
  .crm-email-page #crm-email-toolbar #crm-email-account,
  .crm-email-page #crm-email-toolbar #crm-email-search,
  .crm-email-page #crm-email-toolbar #crm-email-compose,
  .crm-email-page #crm-email-toolbar .email-floating-pill--pagination,
  .crm-email-page #crm-email-toolbar .email-multi-actions {
    display: none !important;
  }

  .crm-email-page #crm-email-toolbar {
    display: flex !important;
  }

  .crm-email-page .email-mobile-quick-actions {
    display: inline-flex;
    position: absolute;
    right: 10px;
    top: 8px;
    z-index: 121;
  }

  .crm-email-page .email-compose-mobile-button {
    display: inline-flex;
    width: 26px;
    height: 26px;
    border: 1px solid #d9dde7;
    background: #fff;
    color: #374151;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  }

  .crm-email-page #email-mobile-quick-actions-menu {
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    min-width: 220px;
    z-index: 36000;
  }

  .crm-email-page #email-mobile-quick-actions-menu.active {
    display: block;
  }

  .crm-email-page #email-mobile-quick-actions-menu .is-disabled {
    opacity: 0.45;
  }

  .crm-email-page .email-pagination-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid #e0e0e5;
    border-radius: 10px;
    background: #fff;
  }

  .crm-email-page .email-pagination-mobile .email-pagination-summary {
    flex: 1 1 auto;
    text-align: center;
    font-size: 11px;
    white-space: nowrap;
  }

  .crm-email-page .email-pagination-mobile .email-pagination-button {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }

  .crm-email-page .drawer-mobile-email-controls {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
  }

  .crm-email-page .drawer-mobile-email-controls select,
  .crm-email-page .drawer-mobile-email-controls input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #dfe0e6;
    font-size: 14px;
    background-color: #fff;
  }

  .crm-email-page .email-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .crm-email-page .email-table thead th:nth-child(3),
  .crm-email-page .email-table thead th:nth-child(4),
  .crm-email-page .email-table thead th:nth-child(5),
  .crm-email-page .email-table thead th:nth-child(6),
  .crm-email-page .email-table thead th:nth-child(7),
  .crm-email-page .email-table tbody td:nth-child(3),
  .crm-email-page .email-table tbody td:nth-child(4),
  .crm-email-page .email-table tbody td:nth-child(5),
  .crm-email-page .email-table tbody td:nth-child(6),
  .crm-email-page .email-table tbody td:nth-child(7) {
    display: none !important;
  }

  .crm-email-page .email-table th.email-select-cell,
  .crm-email-page .email-table td.email-select-cell {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    text-align: center;
    padding-left: 6px;
    padding-right: 0;
    vertical-align: top;
    padding-top: 14px;
  }

  .crm-email-page .email-table th.email-select-cell {
    overflow: visible !important;
    white-space: nowrap;
  }

  .crm-email-page .email-select-all-inline {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    margin-left: 0;
    font-size: 11px;
    line-height: 1;
    z-index: 2;
  }

  .crm-email-page .email-table th:nth-child(2),
  .crm-email-page .email-table td:nth-child(2) {
    width: auto;
    min-width: 0;
    padding-left: 4px;
    padding-right: 8px;
  }

  .crm-email-page .email-table tbody td {
    border-bottom: 1px solid #eceff3 !important;
    background: #fff;
  }

  .crm-email-page .email-gmail-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-width: 0;
  }

  .crm-email-page .email-gmail-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8edf4;
    color: #445468;
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
  }

  .crm-email-page .email-gmail-content {
    min-width: 0;
    display: grid;
    gap: 2px;
    text-align: left;
  }

  .crm-email-page .email-gmail-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  .crm-email-page .email-gmail-from {
    min-width: 0;
    font-size: 13px;
    color: #111827;
    font-weight: 600;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-email-page .email-gmail-time {
    flex: 0 0 auto;
    font-size: 11px;
    color: #6b7280;
  }

  .crm-email-page .email-gmail-subject {
    font-size: 13px;
    line-height: 1.25;
    color: #1f2937;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .crm-email-page .email-gmail-preview {
    font-size: 12px;
    line-height: 1.2;
    color: #6b7280;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .crm-email-page .email-gmail-status {
    margin-top: 2px;
  }

  .crm-email-page .email-gmail-row.is-unread .email-gmail-from,
  .crm-email-page .email-gmail-row.is-unread .email-gmail-time,
  .crm-email-page .email-gmail-row.is-unread .email-gmail-subject {
    font-weight: 700;
  }

  .crm-email-page .email-table .email-mobile-main {
    gap: 3px;
    min-width: 0;
  }

  .crm-email-page .email-table .email-mobile-from {
    font-size: 12px;
    color: var(--muted);
  }

  .crm-email-page .email-table .email-mobile-received {
    display: block;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.2;
  }

  .crm-email-page .email-table .email-mobile-subject {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .crm-email-page .email-table .email-from-cell .email-cell {
    white-space: normal;
  }

  .crm-email-page .email-table .email-empty-cell {
    display: table-cell !important;
    width: auto !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  .crm-email-page .email-table-wrap {
    overflow-x: hidden !important;
  }

  .crm-email-page .email-multi-status-mobile {
    display: block;
  }

  .crm-email-page .email-reply-buttons > #email-reply-toggle-quote,
  .crm-email-page .email-reply-buttons > #email-reply-cancel,
  .crm-email-page .email-reply-buttons > #email-reply-draft,
  .crm-email-page .email-reply-buttons > .email-reply-send-dropdown {
    display: none !important;
  }

  .crm-email-page .email-reply-editor-wrap {
    position: relative;
  }

  .crm-email-page .email-reply-controls-toggle {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 20px;
    border-radius: 999px;
    z-index: 3;
  }

  .crm-email-page .email-reply-controls-toggle .drawer-toggle-arrow {
    position: relative;
    top: -2px;
    transition: transform 0.2s ease;
  }

  .crm-email-page .email-reply-controls-toggle.is-open .drawer-toggle-arrow {
    position: relative;
    top: 2px;
    transform: rotate(180deg);
  }

  .crm-email-page .email-view-card.is-replying .email-reply-quote-toggle-bottom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 20px;
    border-radius: 999px;
    position: absolute;
    left: 50%;
    top: auto !important;
    bottom: -10px;
    transform: translateX(-50%);
    margin: 0;
    border: 1px solid #d9dde7;
    background: #fff;
    color: #6b7280;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    z-index: 4;
  }

  .crm-email-page .email-view-card.is-replying .email-reply-quote-toggle-bottom .drawer-toggle-arrow {
    display: inline-block;
    font-size: 11px;
    line-height: 1;
    color: #6b7280;
    transition: none;
    transform: none !important;
  }

  .crm-email-page .email-view-card.is-replying .email-reply-quote-toggle-bottom.is-open .drawer-toggle-arrow {
    transform: none !important;
  }

  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed .email-reply-fields--subject,
  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed .email-reply-fields--addresses,
  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed .email-reply-toolbar,
  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed #email-reply-toolbar {
    display: none;
  }

  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed .email-view-header,
  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed .email-view-actions,
  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed #email-view-body,
  .crm-email-page .email-view-card.is-replying.reply-controls-collapsed #email-attachments {
    display: none;
  }

  .crm-email-page .email-reply-mobile-actions {
    display: inline-flex !important;
    margin-left: auto;
    margin-right: 10px;
    position: relative;
    max-width: calc(100% - 12px);
  }

  .crm-email-page .email-reply-actions {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .crm-email-page .email-reply-actions input[type="file"] {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    width: auto;
  }

  .crm-email-page .email-reply-buttons {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    min-width: 0;
  }

  .crm-email-page .email-reply-mobile-actions .dropdown-menu {
    right: 0;
    left: auto;
    top: auto;
    bottom: 42px;
    min-width: 220px;
  }

  .crm-email-page .email-reply-mobile-actions .dropdown-menu.active {
    display: block;
  }

  .crm-email-page .email-compose-card .email-reply-buttons > #crm-compose-cancel,
  .crm-email-page .email-compose-card .email-reply-buttons > #crm-compose-draft,
  .crm-email-page .email-compose-card .email-reply-buttons > #crm-compose-send {
    display: none !important;
  }

  .crm-email-page .email-compose-card .email-reply-editor-wrap {
    position: relative;
  }

  .crm-email-page .email-compose-controls-toggle {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 20px;
    border-radius: 999px;
    z-index: 3;
  }

  .crm-email-page .email-compose-controls-toggle .drawer-toggle-arrow {
    transition: transform 0.2s ease;
  }

  .crm-email-page .email-compose-controls-toggle.is-open .drawer-toggle-arrow {
    transform: rotate(180deg);
  }

  .crm-email-page .email-compose-card.compose-controls-collapsed .email-view-header,
  .crm-email-page .email-compose-card.compose-controls-collapsed .email-reply-fields,
  .crm-email-page .email-compose-card.compose-controls-collapsed .composer-toolbar,
  .crm-email-page .email-compose-card.compose-controls-collapsed .subtle {
    display: none;
  }

  .crm-email-page .email-compose-mobile-actions {
    display: inline-flex !important;
    margin-left: auto;
    margin-right: 10px;
    position: relative;
    max-width: calc(100% - 12px);
  }

  .crm-email-page .email-compose-mobile-actions .dropdown-menu {
    right: 0;
    left: auto;
    top: auto;
    bottom: 42px;
    min-width: 180px;
  }

  .crm-email-page .email-compose-mobile-actions .dropdown-menu.active {
    display: block;
  }
}

.email-status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.email-status-pill--urgent {
  background: #ffdbe2;
  color: #9b1234;
}

.email-status-pill--to-reply {
  background: #ffe6bf;
  color: #92400e;
}

.email-status-pill--pending {
  background: #eadbff;
  color: #6d28d9;
}

.newsletter-shell {
  border: 1px solid #e6e7ec;
  border-radius: 16px;
  overflow: hidden;
  background: #f9fafb;
}

#newsletter-editor {
  min-height: 680px;
  background: #ffffff;
}

.newsletter-shell .gjs-pn-panel select,
.newsletter-shell .gjs-pn-panel .gjs-pn-select {
  height: 28px;
  line-height: 1.2;
  padding: 4px 28px 4px 10px;
  background-position: right 10px center;
}

.newsletter-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.newsletter-form-grid .form-field--full {
  grid-column: 1 / -1;
}

.newsletter-source {
  margin-top: 0;
}

.newsletter-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.newsletter-product-results {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  border-radius: 12px;
  padding: 0;
  background: transparent;
}

.newsletter-product-results .menu-button {
  justify-content: space-between;
  text-align: left;
}

.selected-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e2e3e7;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.selected-pill__clear {
  border: none;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.newsletter-product-modal-card {
  width: min(460px, 92vw);
  max-height: min(70vh, 620px);
}

.newsletter-product-modal-card .modal-actions .menu-button,
.newsletter-product-modal-card .modal-actions .secondary-button {
  padding: 10px 16px;
  height: 38px;
}


.newsletter-product-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.image-option {
  border: 1px solid #e6e7ec;
  border-radius: 12px;
  padding: 6px;
  display: grid;
  gap: 6px;
  background: #fff;
  cursor: pointer;
  width: 100%;
  text-align: left;
  appearance: none;
}

.image-option img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.data-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.data-table th[data-sort]::after {
  content: '';
  margin-left: 6px;
  font-size: 11px;
  color: var(--muted);
}

.data-table th[data-sort].is-asc::after {
  content: '▲';
}

.data-table th[data-sort].is-desc::after {
  content: '▼';
}

.orders-limit {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e0e0e5;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

#orders-clear-filters {
  background: rgba(168, 68, 68, 0.14);
  color: #7b2323;
  border-color: rgba(168, 68, 68, 0.35);
}

.range-values {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

#orders-range-slider {
  margin: 6px 4px 10px;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-height: 50vh;
  overflow: auto;
  padding: 4px;
}

.heatmap-cell {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(26, 94, 74, 0.08);
  border: 1px solid rgba(26, 94, 74, 0.12);
  display: grid;
  gap: 4px;
}

.heatmap-cell .code {
  font-weight: 600;
  font-size: 12px;
  color: #123c2d;
}

.heatmap-cell .count {
  font-size: 12px;
  color: var(--muted);
}

.data-table th:not(:first-child),
.data-table td:not(:first-child) {
  text-align: center;
}

.data-table td .compare-inline {
  display: inline-block;
  margin-left: 16px;
}

.data-table tbody tr:hover {
  background: #f2f2f5;
}

.docket-variant-table.data-table tbody tr:hover,
.docket-variant-table.data-table tbody tr:hover td {
  background: #fff !important;
}

.docket-variants-row .data-table tbody tr:hover,
.docket-variants-row .data-table tbody tr:hover td {
  background: #fff !important;
}

.no-hover tbody tr:hover,
.no-hover tbody tr:hover td {
  background: #fff !important;
}

.docket-variant-table tr:hover,
.docket-variant-table tr:hover td {
  background: #fff !important;
}

/* Force-disable hover tint inside expanded print tables */
.docket-variants-row:hover,
.docket-variants-row:hover td {
  background: #f6f7fa !important;
}

.docket-variants-row table tbody tr:hover,
.docket-variants-row table tbody tr:hover td {
  background: #fff !important;
}

.dockets-table tbody tr.docket-variants-row:hover,
.dockets-table tbody tr.docket-variants-row:hover td {
  background: transparent !important;
}

.data-table tbody tr {
  cursor: pointer;
}

.dockets-table tbody tr:hover {
  background: transparent;
}

.dockets-table tbody tr {
  cursor: default;
}

.data-table--wide th,
.data-table--wide td {
  white-space: nowrap;
  font-size: 12px;
}

@media (max-width: 900px), (pointer: coarse) {
  .shipping-dashboard-mobile-hide {
    display: none;
  }

  #shipping-orders-table .col-order {
    width: 34%;
  }

  #shipping-orders-table .col-created {
    width: 28%;
  }

  #shipping-orders-table .col-actions {
    width: 38%;
  }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timesheets-clock-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 26px 20px;
  border: 1px solid #ededf0;
  border-radius: 16px;
  background: var(--surface);
}

.timesheets-clock-timer {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 54px);
  letter-spacing: 1px;
  line-height: 1;
}

.timesheets-clock-actions {
  display: flex;
  justify-content: center;
}

.timesheets-clock-button {
  border: none;
  border-radius: 999px;
  padding: 14px 34px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.timesheets-clock-button.is-in {
  background: #1f9d4a;
}

.timesheets-clock-button.is-out {
  background: #c43b3b;
}

@media (max-width: 900px), (pointer: coarse) {
  .timesheets-clock-page .timesheets-clock-main-panel {
    margin-top: 0 !important;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    gap: 10px;
  }

  .timesheets-clock-page .timesheets-clock-main-heading,
  .timesheets-clock-page .timesheets-history-head,
  .timesheets-clock-page .timesheets-history-wrap {
    display: none;
  }

  .timesheets-clock-page .timesheets-correction-controls {
    justify-content: center !important;
    margin-top: 8px !important;
  }
}

#timesheets-date-from,
#timesheets-date-to {
  font-family: var(--font-body);
  font-size: 14px;
}

.newsletter-sticky-head {
  position: sticky;
  top: 12px;
  z-index: 140;
  border-radius: 16px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.newsletter-sticky-head.is-stuck {
  background: #ffffff;
  border-color: #ededf0;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.segment {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid #e2e3e7;
  gap: 4px;
}

.segment-button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.segment-button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 15, 15, 0.08);
}

.segment-toggle {
  border: none;
  background: rgba(45, 135, 79, 0.15);
  color: #155a34;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  cursor: pointer;
}

.shipping-filters-button {
  display: none;
}

@media (max-width: 720px) {
  .shipping-filters-button {
    display: inline-flex;
  }

  .panel-controls .shipping-filter-controls {
    display: none;
  }

  #shipping-filters-modal .shipping-filter-controls {
    display: grid;
    gap: 12px;
  }
}

.segment-toggle.is-worst {
  background: rgba(168, 68, 68, 0.15);
  color: #7b2323;
}

.segment-toggle.is-compare {
  background: rgba(255, 122, 0, 0.15);
  color: #b35a00;
}

.segment-toggle.is-show {
  background: rgba(168, 68, 68, 0.15);
  color: #7b2323;
}

.segment-toggle.is-hide {
  background: rgba(45, 135, 79, 0.15);
  color: #155a34;
}

.folder-visibility-status {
  display: inline-flex;
  min-width: 64px;
}

.folder-visibility-status.is-hidden {
  color: #7b2323;
}

.folder-visibility-status.is-shown {
  color: #155a34;
}

.compare-highlight-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid #e0e0e5;
  font-size: 12px;
  color: var(--muted);
}

.compare-highlight-pill.active {
  display: inline-flex;
}

.compare-highlight-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.compare-highlight-pill .dot.main {
  background: #1a5e4a;
}

.compare-highlight-pill .dot.compare {
  background: #ff7a00;
}

.size-hit--best {
  background: rgba(45, 135, 79, 0.15);
  color: #155a34;
  font-weight: 600;
}

.size-hit--worst {
  background: rgba(168, 68, 68, 0.15);
  color: #7b2323;
  font-weight: 600;
}

.size-hit--best-compare {
  background: rgba(255, 122, 0, 0.18);
  color: #8a4a00;
  font-weight: 600;
}

.size-hit--worst-compare {
  background: rgba(255, 122, 0, 0.1);
  color: #8a4a00;
  font-weight: 600;
}

.size-hit--split-best {
  background: linear-gradient(to right, rgba(45, 135, 79, 0.18) 50%, rgba(255, 122, 0, 0.18) 50%);
  color: #0b3b2c;
  font-weight: 600;
}

.size-hit--split-worst {
  background: linear-gradient(to right, rgba(168, 68, 68, 0.16) 50%, rgba(255, 122, 0, 0.16) 50%);
  color: #7b2323;
  font-weight: 600;
}

.size-hit--split-best,
.size-hit--split-worst {
  text-align: center;
}

.event {
  background: var(--surface-muted);
  padding: 12px 14px;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  border: 1px solid #ededf0;
}

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

.login-wrap {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

body {
  overflow: visible;
}

.login-card {
  background: var(--surface);
  padding: 34px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(420px, 88vw);
  display: grid;
  gap: 22px;
  border: 1px solid #ededf0;
  transform: translateY(-60px);
}

.login-body {
  overflow: hidden;
}

.login-card form {
  display: grid;
  gap: 4px;
}

.login-card form .secondary-button {
  margin-top: 18px;
}

@media (max-width: 900px), (pointer: coarse) {
  .login-wrap {
    padding: 20px;
    min-height: 100svh;
    height: 100svh;
    align-items: center;
    justify-content: center;
  }

  .login-card {
    width: 92vw;
    max-width: 560px;
    padding: 36px 28px;
    gap: 18px;
    transform: translateY(0);
    margin: 0;
    min-height: auto;
    font-size: 17px;
  }

  .login-card .brand {
    font-size: 30px;
    line-height: 1.2;
  }

  .login-card .subtle {
    font-size: 15px;
  }

  .login-card label {
    font-size: 14px;
  }

  .login-card input {
    height: 56px;
    font-size: 18px;
  }

  .login-card form {
    gap: 10px;
  }

  .login-card form .secondary-button {
    height: 56px;
    font-size: 17px;
  }
}
.login-card.is-submitting {
  animation: loginSubmit 240ms ease forwards;
}

@keyframes loginSubmit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field--stacked {
  gap: 6px;
  margin-bottom: 14px;
}

.form-field--stacked label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.form-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.modal-card .panel-head {
  margin-bottom: 12px;
}

.threshold-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.threshold-input-row input {
  flex: 1;
}

.threshold-toggle {
  border: 1px solid rgba(15, 31, 25, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: #7f1d1d;
  cursor: pointer;
  min-width: 90px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.threshold-toggle.is-active {
  background: rgba(16, 185, 129, 0.18);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.3);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

#compare-range {
  display: none;
}

.form-field .value-toggle {
  justify-self: start;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 14px;
  background: #fff;
  font-family: var(--font-body);
}

.form-field--full {
  grid-column: 1 / -1;
}

.dashboard-page #config-modal input,
.dashboard-page #config-modal select {
  font-family: var(--font-body);
}

.dashboard-page #config-modal .form-grid {
  align-items: start;
  grid-auto-rows: min-content;
}

.dashboard-page #config-modal .form-field {
  align-self: start;
}

.dashboard-page #config-modal #config-apply {
  white-space: nowrap;
}

.dashboard-page #config-modal .config-apply-slot {
  display: flex;
  align-items: center;
}

#doc-address,
#doc-globale-address {
  font-family: var(--font-body);
}

.dashboard-page #config-modal .form-field .value-toggle {
  margin-top: 5px;
}

select,
.menu-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7b8792 50%),
    linear-gradient(135deg, #7b8792 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.form-field select[multiple] {
  min-height: 140px;
}

.suggestion-wrap {
  position: relative;
  width: 100%;
}

.suggestion-wrap input {
  width: 100%;
}

.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #dfe0e6;
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(15, 31, 25, 0.12);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}

.suggestions.is-open {
  display: block;
}

.suggestion-item {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.suggestion-item:hover {
  background: var(--bg-strong);
}

.selected-rows {
  display: grid;
  gap: 8px;
}

.selected-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 31, 25, 0.12);
  background: rgba(15, 31, 25, 0.04);
  font-weight: 600;
}

.selected-row--compact {
  padding: 8px 12px;
  font-weight: 600;
}

.selected-row__remove {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 31, 25, 0.12);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.compact-table .data-table {
  margin-top: 0;
}

.data-table--compact th,
.data-table--compact td {
  padding: 8px 12px;
}

.data-table--compact td {
  vertical-align: middle;
}

.selected-table__name {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.table-input-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-selected .selected-row {
  margin: 0;
}

.table-input-cell .menu-button {
  width: 100%;
}

.table-selected {
  flex: 1;
}

.range-inline {
  min-width: 220px;
}

.data-table--compact .menu-button,
.data-table--compact .menu-select,
.data-table--compact input {
  width: 100%;
}

.data-table--compact .menu-button,
.data-table--compact .menu-select,
.data-table--compact input {
  min-height: 40px;
}

.printer-config-table .table-action-cell {
  white-space: nowrap;
}

.printer-config-table .menu-button {
  width: auto;
  min-height: 32px;
  padding: 6px 10px;
}

.printer-config-table .menu-button + .menu-button {
  margin-left: 6px;
}

.printer-config-table .role-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.printer-config-table .role-pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e0e0e5;
  background: #fff;
}

.printer-config-table td {
  overflow: visible;
}

.printer-config-table tr {
  position: relative;
  z-index: 1;
}

.printer-config-table tr.row-actions-open {
  z-index: 100001;
}

.printer-config-table tr.row-actions-open td {
  z-index: 100001;
}

.printer-config-table .row-actions,
.printer-config-table .row-actions-menu {
  z-index: 2147483000;
}

.printer-config-table td:nth-child(7),
.printer-config-table td:nth-child(8) {
  text-align: center;
}

.printer-config-table td:nth-child(7) .checkbox-row,
.printer-config-table td:nth-child(8) .checkbox-row {
  width: 100%;
  justify-content: center;
  align-items: center;
  min-height: 32px;
}

.printer-config-table td:nth-child(7) .checkbox-row input[type="checkbox"],
.printer-config-table td:nth-child(8) .checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.form-field--wide {
  grid-column: 1 / -1;
}

.spam-pill {
  background: rgba(168, 68, 68, 0.12);
  color: #7b2323;
  border: 1px solid rgba(168, 68, 68, 0.35);
}

.spam-rules {
  display: grid;
  gap: 6px;
  margin-top: -16px;
}

.info-card {
  background: var(--surface-muted);
  border: 1px solid #e0e0e5;
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 12px;
}

.info-card .info-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.info-card li strong {
  color: var(--text);
}

.spam-rule-header {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.4fr 0.6fr 0.7fr 0.7fr auto;
  gap: 8px;
  padding: 2px 8px;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spam-rule-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.4fr 0.6fr 0.7fr 0.7fr auto;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid #e0e0e5;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.spam-rule-row input,
.spam-rule-row select {
  width: 100%;
  min-height: 32px;
  border-radius: 8px;
}

@media (max-width: 980px) {
  .spam-rule-header {
    display: none;
  }
  .spam-rule-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.spam-rule-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.spam-config-modal .form-grid {
  margin-top: 6px;
}

.spam-config-modal .panel-head {
  margin-top: 6px;
  margin-bottom: 4px;
}

.spam-config-modal .modal-actions {
  margin-top: 16px;
}

.spam-config-modal .spam-rules {
  max-height: 42vh;
  overflow: auto;
  padding-right: 6px;
}

.spam-config-modal .modal-card {
  max-height: 88vh;
  overflow: auto;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 24, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40020;
  display: flex;
}

.modal {
  z-index: 50000;
}

.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-toggle {
  position: fixed;
  left: clamp(6px, calc((100vw - 1180px) / 2 - 18px), 18px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40021;
  border: 1px solid #e0e0e5;
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0;
  width: 26px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.drawer-toggle.is-muted {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
}

.drawer-toggle-arrow {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.drawer-toggle.is-open .drawer-toggle-arrow {
  transform: rotate(180deg);
}

.drawer-toggle.is-open {
  transform: translateY(-50%) translateX(calc(min(420px, 90vw) + 8px));
}

@media (max-width: 720px) {
  .drawer-toggle {
    left: 6px;
    height: 72px;
    width: 22px;
  }
  .drawer-toggle--right {
    right: 6px;
    left: auto;
  }
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(420px, 90vw);
  background: var(--surface);
  box-shadow: 20px 0 40px rgba(15, 15, 15, 0.2);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 16px;
}

.drawer-overlay.is-open .drawer-panel {
  transform: translateX(0);
}

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

.drawer-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.drawer-header-actions .menu-button {
  white-space: nowrap;
  padding: 8px 12px;
}

.drawer-search input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 14px;
  background: #fff;
}

.drawer-list {
  flex: 1;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface-muted);
  cursor: pointer;
  transition: var(--transition);
}

.folder-item:hover,
.folder-item.is-active {
  background: var(--surface);
  border-color: #e0e0e5;
  box-shadow: var(--shadow);
}

.folder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.folder-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.folder-action-button {
  border: 1px solid #e0e0e5;
  background: var(--surface);
  border-radius: 10px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.folder-action-button svg {
  width: 14px;
  height: 14px;
  fill: #1a1a1a;
}

.folder-name {
  font-size: 13px;
  color: var(--text);
}

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

.folder-badge {
  background: var(--bg-strong);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
}

.folder-badge.unread {
  background: rgba(168, 68, 68, 0.12);
  color: #7b2323;
}

.drawer-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.drawer-footer input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 14px;
  background: #fff;
}

.row-actions {
  position: relative;
  display: inline-block;
}

.row-actions-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid #ececef;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 180px;
  padding: 8px;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  z-index: 60000;
}

.picking-no-stock-table .is-missing td {
  background: rgba(170, 68, 68, 0.12);
  color: #7b2323;
  font-weight: 600;
}

#shipping-orders-table td {
  overflow: visible;
}

#preorder-schedules-table td {
  overflow: visible;
}

#preorder-schedules-table tr {
  position: relative;
  z-index: 1;
}

#preorder-schedules-table tr.row-actions-open {
  z-index: 100001;
}

#preorder-schedules-table .row-actions,
#preorder-schedules-table .row-actions-menu {
  z-index: 100000;
}

#shipping-orders-table tr {
  position: relative;
  z-index: 1;
}

#shipping-orders-table tr.row-actions-open {
  z-index: 100001;
}

#shipping-orders-table tr.shipping-order-type-internal td.col-order,
#shipping-orders-table tr.shipping-order-type-next-day td.col-order,
#shipping-orders-table tr.shipping-order-type-standard td.col-order {
  position: relative;
  padding-left: 18px;
}

#shipping-orders-table tr.shipping-order-type-internal td.col-order::before,
#shipping-orders-table tr.shipping-order-type-next-day td.col-order::before,
#shipping-orders-table tr.shipping-order-type-standard td.col-order::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 7px;
  bottom: 7px;
  width: 4px;
  border-radius: 999px;
}

#shipping-orders-table tr.shipping-order-type-internal td.col-order::before {
  background: #efe7ff;
}

#shipping-orders-table tr.shipping-order-type-next-day td.col-order::before {
  background: #ffe1e5;
}

#shipping-orders-table tr.shipping-order-type-standard td.col-order::before {
  background: #fff0df;
}

#shipping-orders-table .row-actions,
#shipping-orders-table .row-actions-menu {
  z-index: 100000;
}

#finalised-orders-table td {
  overflow: visible;
}

#finalised-orders-table tr {
  position: relative;
  z-index: 1;
}

#finalised-orders-table tr.row-actions-open {
  z-index: 100001;
}

#finalised-orders-table .row-actions,
#finalised-orders-table .row-actions-menu {
  z-index: 100000;
}

#internal-shipments-table td,
#shipping-collections-table td {
  overflow: visible;
}

#internal-shipments-table tr,
#shipping-collections-table tr {
  position: relative;
  z-index: 1;
}

#internal-shipments-table tr.row-actions-open,
#shipping-collections-table tr.row-actions-open {
  z-index: 100001;
}

#internal-shipments-table .row-actions,
#internal-shipments-table .row-actions-menu,
#shipping-collections-table .row-actions,
#shipping-collections-table .row-actions-menu {
  z-index: 100000;
}

#dress-costings-table td {
  overflow: visible;
}

#dress-costings-table tr {
  position: relative;
  z-index: 1;
}

#dress-costings-table tr.row-actions-open {
  z-index: 100001;
}

#dress-costings-table .row-actions,
#dress-costings-table .row-actions-menu {
  z-index: 100000;
}

#newsletter-campaigns-list td {
  overflow: visible;
}

#newsletter-campaigns-list tr {
  position: relative;
  z-index: 1;
}

#newsletter-campaigns-list tr.row-actions-open {
  z-index: 100001;
}

#newsletter-campaigns-list .row-actions,
#newsletter-campaigns-list .row-actions-menu {
  z-index: 100000;
}

#finalised-search {
  min-width: 240px;
}

@media (max-width: 720px) {
  #invoice-bulk-modal .bulk-pdf-button {
    display: none;
  }
}

@media (max-width: 1024px) and (orientation: landscape) {
  #invoice-bulk-modal .bulk-pdf-button {
    display: none;
  }
}

.stock-locations-table td {
  overflow: visible;
}

.stock-locations-table thead th:first-child {
  border-top-left-radius: 16px;
}

.stock-locations-table thead th:last-child {
  border-top-right-radius: 16px;
}

.stock-locations-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.stock-locations-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

.stock-locations-table tr {
  position: relative;
  z-index: 1;
}

.stock-locations-table tr.row-actions-open {
  z-index: 2001;
}

.stock-locations-table .row-actions,
.stock-locations-table .row-actions-menu {
  z-index: 2000;
}

.stock-locations-table tr.stock-check-row--discrepancy td {
  background: rgba(245, 158, 11, 0.18);
}

.stock-locations-table tr.stock-locations-row--error td {
  background: rgba(239, 68, 68, 0.18);
}

@media (max-width: 720px) {
  #warehouse-items-modal .warehouse-items-table th:nth-child(1),
  #warehouse-items-modal .warehouse-items-table td:nth-child(1),
  #warehouse-items-modal .warehouse-items-table th:nth-child(4),
  #warehouse-items-modal .warehouse-items-table td:nth-child(4),
  #warehouse-items-modal .warehouse-items-table th:nth-child(6),
  #warehouse-items-modal .warehouse-items-table td:nth-child(6) {
    display: none;
  }

  #warehouse-items-modal .warehouse-items-table th:nth-child(2),
  #warehouse-items-modal .warehouse-items-table td:nth-child(2),
  #warehouse-items-modal .warehouse-items-table th:nth-child(3),
  #warehouse-items-modal .warehouse-items-table td:nth-child(3),
  #warehouse-items-modal .warehouse-items-table th:nth-child(5),
  #warehouse-items-modal .warehouse-items-table td:nth-child(5) {
    white-space: normal;
  }

  .stock-locations-table {
    table-layout: fixed;
    width: 100%;
  }

  .stock-locations-table th,
  .stock-locations-table td {
    padding: 8px 8px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stock-locations-table .menu-button {
    padding: 6px 10px;
    font-size: 11px;
  }

  .stock-locations-table th:nth-child(1),
  .stock-locations-table td:nth-child(1) {
    width: 48px;
    text-align: center;
  }

  .stock-locations-table th:nth-child(2),
  .stock-locations-table td:nth-child(2) {
    width: 48px;
    text-align: center !important;
  }

  .stock-locations-table th:nth-child(4),
  .stock-locations-table td:nth-child(4) {
    width: 56px;
    text-align: center;
  }

  .stock-locations-table th:nth-child(3),
  .stock-locations-table td:nth-child(3) {
    width: calc(100% - 48px - 48px - 56px - 96px);
  }

  .stock-locations-table th:nth-child(3) {
    white-space: normal;
    line-height: 1.1;
  }

  .stock-locations-table .table-action-cell {
    width: 96px;
    text-align: right;
    overflow: visible;
  }
}

.stock-locations-table .loc-mobile {
  display: none;
}

@media (max-width: 720px) {
  .stock-locations-table .loc-desktop {
    display: none;
  }

  .stock-locations-table .loc-mobile {
    display: inline;
  }
}

.global-e-reports-page .data-table td {
  overflow: visible;
}

.global-e-reports-page .data-table tr {
  position: relative;
  z-index: 1;
}

.global-e-reports-page .data-table tr.row-actions-open {
  z-index: 100001;
}

.global-e-reports-page .row-actions,
.global-e-reports-page .row-actions-menu {
  z-index: 100000;
}

#globale-boxes-table td {
  overflow: visible;
}

#globale-boxes-table tr {
  position: relative;
  z-index: 1;
}

#globale-boxes-table tr.row-actions-open {
  z-index: 100001;
}

#globale-boxes-table .row-actions,
#globale-boxes-table .row-actions-menu {
  z-index: 100000;
}

#globale-box-orders-modal .modal-card {
  width: min(1100px, 96vw);
}

.shipping-global-e-boxes-page .globale-box-create-inline {
  display: none;
}

@media (max-width: 900px), (pointer: coarse) {
  .shipping-global-e-boxes-page {
    overflow-x: hidden;
  }

  .shipping-global-e-boxes-page .container,
  .shipping-global-e-boxes-page .wide-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 96px !important;
  }

  .shipping-global-e-boxes-page .container > .header {
    margin-bottom: 0 !important;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel {
    margin-top: 0 !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .panel-head {
    display: none;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .table-wrap {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow: visible !important;
    max-width: 100vw;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .data-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .data-table--wide th,
  .shipping-global-e-boxes-page .globale-boxes-panel .data-table--wide td {
    white-space: normal;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .data-table th,
  .shipping-global-e-boxes-page .globale-boxes-panel .data-table td {
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .data-table th:nth-child(1),
  .shipping-global-e-boxes-page .globale-boxes-panel .data-table td:nth-child(1) {
    width: 36%;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .data-table th:nth-child(3),
  .shipping-global-e-boxes-page .globale-boxes-panel .data-table td:nth-child(3) {
    width: 24%;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .data-table th:last-child,
  .shipping-global-e-boxes-page .globale-boxes-panel .data-table td:last-child {
    width: 40%;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel .table-action-cell {
    white-space: normal;
    width: auto;
  }

  .shipping-global-e-boxes-page #globale-boxes-table .row-actions .menu-button {
    min-width: 0;
    width: auto;
    padding: 7px 10px;
    font-size: 12px;
  }

  .shipping-global-e-boxes-page .globale-boxes-panel #globale-boxes-status {
    padding: 8px 10px 0;
  }

  .shipping-global-e-boxes-page .globale-box-col-desktop {
    display: none !important;
  }

  .shipping-global-e-boxes-page .globale-box-actions-head {
    text-align: right !important;
  }

  .shipping-global-e-boxes-page .globale-box-actions-head > span {
    margin-right: 6px;
    position: relative;
    top: 2px;
  }

  .shipping-global-e-boxes-page .globale-box-create-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    margin-left: 8px;
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
    vertical-align: middle;
  }

  .shipping-global-e-boxes-page #globale-box-create {
    display: none !important;
  }

  #globale-box-orders-modal .modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    position: relative;
  }

  #globale-box-orders-modal .modal-card > div:first-child {
    padding: 0 10px;
    padding-right: 78px;
  }

  #globale-box-orders-modal .table-wrap {
    flex: 1 1 auto;
    width: 100%;
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow: auto;
  }

  #globale-box-orders-modal .table-wrap .data-table {
    width: 100% !important;
    min-width: 0 !important;
  }

  #globale-box-orders-modal .modal-actions {
    position: absolute;
    top: 8px;
    right: 10px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    justify-content: flex-end;
  }

  #globale-box-orders-modal .modal-actions .secondary-button {
    min-width: 0;
    padding: 6px 10px;
  }
}

#globale-box-tracking-modal .modal-card {
  width: min(560px, 92vw);
}

#globale-box-tracking-modal table th,
#globale-box-tracking-modal table td {
  text-align: left;
}

.global-e-approve-pdf {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
  background: #fff;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 16px;
}

.calendar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}

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

.calendar-header-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-header-actions [data-view],
.calendar-mobile-view-picker {
  display: none !important;
}

.calendar-title-wrap {
  display: grid;
  gap: 4px;
}

.calendar-mobile-appbar {
  display: none;
}

.calendar-mobile-view-picker {
  display: none;
}

.menu-button.is-danger {
  border-color: rgba(228, 80, 80, 0.35);
  background: rgba(228, 80, 80, 0.12);
  color: #7b2323;
}


.filter-group {
  display: grid;
  gap: 4px;
}

.filter-group label {
  font-size: 12px;
  color: var(--muted);
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e0e0e5;
  background: var(--surface);
  font-size: 12px;
  color: var(--text);
}

.calendar-root {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid #e0e0e5;
  padding: 12px;
  flex: 1;
  min-height: 0;
}

.fc .fc-toolbar-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
}

.fc .fc-button {
  background: var(--surface-muted);
  border: 1px solid #e0e0e5;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.fc .fc-daygrid-day-number {
  font-weight: 600;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e0e0e5;
  background: var(--surface-muted);
}

.linked-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid #e0e0e5;
  background: var(--surface-muted);
  margin-bottom: 8px;
}

.attachment-link {
  color: inherit;
  text-decoration: underline;
}

.calendar-event-card {
  gap: 10px;
  padding: 18px;
  max-height: 85vh;
  overflow: auto;
}

.calendar-event-card .form-field {
  gap: 6px;
}

.calendar-event-card label {
  font-size: 12px;
}

.calendar-event-card .form-field input,
.calendar-event-card .form-field select,
.calendar-event-card .form-field textarea {
  min-height: 36px;
  padding: 10px 12px;
}

.calendar-event-card .form-field textarea {
  min-height: 110px;
}

.calendar-event-card .form-grid {
  gap: 8px;
}

.calendar-event-card .modal-actions .menu-button,
.calendar-event-card .modal-actions .secondary-button {
  padding: 8px 14px;
  font-size: 12px;
}


.calendar-task-new-modal .form-field input,
.calendar-task-new-modal .form-field select,
.calendar-task-new-modal .form-field textarea {
  min-height: 40px;
}

.calendar-task-new-modal .form-field textarea {
  min-height: 140px;
}

.calendar-task-new-modal select {
  background: var(--surface);
  border: 1px solid #e0e0e5;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}

.calendar-button-row {
  display: flex;
  gap: 10px;
  margin: 2px 0 4px;
}

.calendar-linked-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.calendar-linked-grid .linked-task-row {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .calendar-linked-grid {
    grid-template-columns: 1fr;
  }
}

.assign-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.assign-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e0e0e5;
  background: var(--surface-muted);
}

.linked-task-row .pill {
  background: var(--bg-strong);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

html,
body.calendar-page {
  height: 100%;
}

body.calendar-page {
  overflow: hidden;
}

.calendar-page .container {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 0 18px;
  box-sizing: border-box;
}

.calendar-page .panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
}

.calendar-page .panel-head {
  flex-shrink: 0;
}

.calendar-page .panel-body,
.calendar-page .panel > .calendar-root {
  flex: 1;
  min-height: 0;
}

.calendar-page .calendar-root {
  flex: 1;
  overflow: hidden;
}

.calendar-page .fc {
  height: 100%;
}

@media (max-width: 960px) {
  .calendar-page .calendar-root {
    min-height: 520px;
    overflow: auto;
  }
  body.calendar-page {
    overflow: auto;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  body.calendar-page {
    background: #fff;
  }

  .calendar-page .container,
  .calendar-page .wide-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
  }

  .calendar-page .header {
    margin-bottom: 4px !important;
  }

  .calendar-page .panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    padding: 0;
    gap: 0;
  }

  .calendar-page .panel-head {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    background: #fff;
    border-bottom: 0;
    padding: 5px 8px 0;
    gap: 4px;
  }

  .calendar-page .calendar-title-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
  }

  .calendar-page .calendar-title-wrap > h2,
  .calendar-page .calendar-title-wrap > .subtle {
    display: none;
  }

  .calendar-mobile-appbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0;
    width: 100%;
  }

  .calendar-mobile-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .calendar-mobile-nav .menu-button {
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #f4f6fb;
    border-color: #d9deea;
  }

  .calendar-page .calendar-header-actions {
    width: auto;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 6px;
    padding: 0;
    margin-left: 8px;
    flex: 0 0 auto;
  }

  .calendar-page .calendar-header-actions::-webkit-scrollbar {
    display: none;
  }

  .calendar-page .calendar-header-actions .menu-button,
  .calendar-page .calendar-header-actions .primary-button {
    min-height: 34px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .calendar-page .calendar-header-actions [data-view].is-active {
    background: #dbe7ff;
    border-color: #b8cdfc;
    color: #1f4db0;
  }

  .calendar-page #calendar-add {
    display: none !important;
  }

  .calendar-page #calendar-mobile-title {
    display: inline-block;
    margin-left: 2px;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: #2f3d5c;
  }

  .calendar-page #calendar-filters-open {
    margin-left: 0;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #f4f6fb;
    border-color: #d9deea;
  }

  .calendar-page .calendar-root {
    margin-top: 1px;
    position: relative;
    border: 0;
    border-radius: 0;
    padding: 0;
    min-height: calc(100dvh - 190px);
  }

  .calendar-page .fc {
    background: #fff;
    border-radius: 0;
  }

  .calendar-page .fc .fc-scrollgrid {
    border: 0;
  }

  .calendar-page .fc .fc-col-header-cell-cushion {
    padding: 8px 0;
    font-size: 11px;
    color: #647087;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .calendar-page .fc .fc-daygrid-day-number {
    font-size: 13px;
    font-weight: 600;
    color: #2f3d5c;
  }

  .calendar-page .fc .fc-daygrid-event {
    border-radius: 8px;
    padding: 1px 5px;
    font-size: 11px;
  }

  .calendar-page .fc .fc-timegrid-slot-label-cushion,
  .calendar-page .fc .fc-timegrid-axis-cushion {
    font-size: 11px;
    color: #7b869d;
  }

  .calendar-page .fc .fc-timegrid-event {
    border-radius: 10px;
  }
}

.row-actions-menu.is-open {
  display: flex;
}

.row-actions-menu button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.row-actions-subitem {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-actions-subitem-title {
  justify-content: space-between;
  font-weight: 400 !important;
}

.row-actions-subitem-title::after {
  content: '▸';
  margin-left: auto;
  font-size: 11px;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.row-actions-subitem.is-open .row-actions-subitem-title::after {
  transform: rotate(90deg);
}

.row-actions-submenu--nested {
  display: none;
  padding-left: 8px;
  border-left: 1px solid #ececef;
  margin-left: 8px;
}

.row-actions-subitem.is-open .row-actions-submenu--nested {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-actions-menu button:hover {
  background: var(--bg-strong);
}

.row-actions-menu button.is-danger {
  color: #7b2323;
}

.row-actions-menu button.is-danger:hover {
  background: rgba(228, 80, 80, 0.12);
}

.crm-email-cleaner-page #cleaner-table td {
  overflow: visible;
}

.crm-email-cleaner-page #cleaner-table tr {
  position: relative;
  z-index: 1;
}

.crm-email-cleaner-page #cleaner-table tr.cleaner-row-processed td {
  background: rgba(34, 197, 94, 0.16);
}

.crm-email-cleaner-page #cleaner-table tr.cleaner-row-processing td {
  background: rgba(249, 115, 22, 0.16);
}

.crm-email-cleaner-page #cleaner-table tr.row-actions-open {
  z-index: 2200;
}

.crm-email-cleaner-page #cleaner-table .row-actions,
.crm-email-cleaner-page #cleaner-table .row-actions-menu {
  z-index: 2100;
}

.crm-email-cleaner-page #cleaner-table tr.row-actions-open .row-actions {
  z-index: 2300;
}

.crm-email-cleaner-page #cleaner-table tr.row-actions-open .row-actions-menu {
  z-index: 2400;
}

.crm-email-cleaner-page #cleaner-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

#accounts-table td {
  overflow: visible;
}

#accounts-table tr {
  position: relative;
  z-index: 1;
}

#accounts-table tr.row-actions-open {
  z-index: 2200;
}

#accounts-table .row-actions,
#accounts-table .row-actions-menu {
  z-index: 2100;
}

#accounts-table tr.row-actions-open .row-actions {
  z-index: 2300;
}

#accounts-table tr.row-actions-open .row-actions-menu {
  z-index: 2400;
}

.crm-email-cleaner-page .email-cleaner-panel .panel-actions {
  align-items: end;
  gap: 10px;
}

.crm-email-cleaner-page .email-cleaner-panel .menu-select,
.crm-email-cleaner-page .email-cleaner-panel .menu-input {
  min-width: 170px;
}

.crm-email-cleaner-page .email-cleaner-panel .filter-group--wide .menu-input {
  min-width: 280px;
}

.crm-email-cleaner-page #cleaner-action-move-wrap {
  align-items: end;
}

.crm-email-cleaner-page .cleaner-create-folder-warning {
  min-height: 18px;
  margin-top: 6px;
}

.crm-email-cleaner-page .cleaner-create-folder-warning.is-error {
  color: #b42318;
}

.crm-email-cleaner-page #cleaner-action-modal .modal-card {
  width: 95vw;
  max-width: 95vw;
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.crm-email-cleaner-page #cleaner-action-modal .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.crm-email-cleaner-page #cleaner-action-table-body .cleaner-action-email-row {
  cursor: pointer;
}

.crm-email-cleaner-page #cleaner-preview-modal .modal-card {
  width: 95vw;
  max-width: 95vw;
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.crm-email-cleaner-page .cleaner-preview-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.crm-email-cleaner-page .cleaner-preview-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.documents-drive-tree-table td,
.documents-drive-tree-table th {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

.documents-drive-page .container,
.documents-drive-page .wide-container {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 8px 18px 24px;
}

.documents-drive-page .documents-drive-shell {
  margin-top: 0 !important;
  padding: 0;
  gap: 10px;
  border: none;
  box-shadow: none;
  background: transparent;
}

.documents-drive-page .documents-drive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 0 2px;
}

.documents-drive-page .documents-drive-head--inline {
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  transform: translateY(3px);
}

.documents-drive-page .documents-drive-head-path {
  flex: 1 1 auto;
  min-width: 0;
  width: 1px;
  font-size: 13px;
  color: #5f6c7d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.documents-drive-page .documents-drive-head-back {
  flex: 0 0 auto;
  width: auto !important;
  min-height: 28px;
  line-height: 1;
  padding: 6px 10px;
  white-space: nowrap;
}

.documents-drive-page .documents-drive-head-back.is-empty {
  opacity: 0.5;
}

.documents-drive-page .documents-drive-shell .table-wrap {
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.documents-drive-page .documents-drive-tree-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.documents-drive-page .documents-drive-tree-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.documents-drive-page .documents-drive-tree-table th {
  background: #f7f9fc;
  color: #536074;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e7ebf2;
  padding: 10px 12px !important;
}

.documents-drive-page .documents-drive-tree-table thead .documents-drive-toolbar-row th {
  background: #f7f9fc;
  padding: 6px 12px !important;
}

.documents-drive-page .documents-drive-tree-table thead .documents-drive-toolbar-row + tr th {
  padding-top: 8px !important;
}

.documents-drive-page .documents-drive-tree-table thead .documents-drive-toolbar-row + tr th:first-child {
  background: #fff;
  padding: 0 !important;
  border-bottom-color: transparent;
}

.documents-drive-page .documents-drive-tree-table th:first-child {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.documents-drive-page .documents-drive-tree-table td {
  padding: 9px 12px !important;
  border-bottom: 1px solid #edf1f6;
}

.documents-drive-page .documents-drive-tree-table tr:last-child td {
  border-bottom: 0;
}

.documents-drive-page .documents-drive-tree-table tbody tr:hover td {
  background: #f8fbff;
}

.documents-drive-page .documents-drive-tree-table .documents-drive-name-button {
  min-height: 28px;
  gap: 8px;
  text-decoration: none !important;
}

.documents-drive-page .documents-drive-tree-table .documents-drive-name-button:hover {
  text-decoration: none;
}

.documents-drive-page .documents-drive-tree-table .row-actions .menu-button {
  min-height: 28px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.documents-drive-page #documents-drive-status {
  padding: 2px 2px 0;
}

.documents-drive-mobile-nav {
  display: none;
}

.documents-drive-tree-table td {
  overflow: visible;
}

.documents-drive-tree-table tr {
  position: relative;
  z-index: 1;
}

.documents-drive-tree-table tr.row-actions-open {
  z-index: 100001;
}

.documents-drive-tree-table tr.row-actions-open td {
  position: relative;
  z-index: 100002;
}

.documents-drive-tree-table .row-actions,
.documents-drive-tree-table .row-actions-menu {
  z-index: 200000 !important;
}

.documents-drive-tree-table .documents-drive-name-button {
  width: 100%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 0;
  padding-bottom: 0;
  min-height: 22px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.documents-drive-tree-table .documents-drive-name-button:hover {
  text-decoration: underline;
}

.documents-drive-tree-table .documents-drive-tree-arrow {
  width: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex: 0 0 10px;
}

.documents-drive-tree-table th:nth-child(2),
.documents-drive-tree-table td:nth-child(2),
.documents-drive-tree-table th:nth-child(3),
.documents-drive-tree-table td:nth-child(3),
.documents-drive-tree-table th:nth-child(4),
.documents-drive-tree-table td:nth-child(4) {
  font-size: 12px;
}

.documents-drive-tree-table.is-dragging {
  outline: 2px dashed rgba(16, 185, 129, 0.55);
  outline-offset: 4px;
  border-radius: 12px;
}

.documents-drive-tree-table tr.documents-drive-drop-target td {
  background: rgba(16, 185, 129, 0.12);
}

#documents-drive-context-menu {
  right: auto;
  top: auto;
  margin-top: 0;
  min-width: 140px;
  width: auto;
  padding: 6px;
  gap: 4px;
  border-radius: 10px;
}

#documents-drive-context-menu button {
  white-space: nowrap;
  padding: 7px 9px;
}

#documents-drive-move-modal,
#documents-drive-new-folder-modal,
#documents-drive-delete-modal {
  z-index: 130000;
}

@media (max-width: 900px), (pointer: coarse) {
  .documents-drive-page .container,
  .documents-drive-page .wide-container {
    width: 100%;
    padding: 0 0 16px !important;
  }

  .documents-drive-page .documents-drive-shell {
    margin-top: 0;
  }

  .documents-drive-page .documents-drive-shell .table-wrap {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .documents-drive-page .documents-drive-head {
    margin-bottom: 4px;
  }

  .documents-drive-page .documents-drive-head-path {
    font-size: 12px;
  }

  .documents-drive-page .documents-drive-tree-table thead tr:not(.documents-drive-toolbar-row) {
    display: none;
  }

  .documents-drive-tree-table th:nth-child(3),
  .documents-drive-tree-table td:nth-child(3),
  .documents-drive-tree-table th:nth-child(4),
  .documents-drive-tree-table td:nth-child(4),
  .documents-drive-tree-table th:nth-child(5),
  .documents-drive-tree-table td:nth-child(5) {
    display: none;
  }

  .documents-drive-tree-table th:nth-child(2),
  .documents-drive-tree-table td:nth-child(2) {
    display: none;
  }

  .documents-drive-tree-table .documents-drive-tree-arrow {
    display: none;
  }

  .documents-drive-page .documents-drive-tree-table {
    table-layout: auto !important;
    width: 100%;
  }

  .documents-drive-page .documents-drive-tree-table th:first-child,
  .documents-drive-page .documents-drive-tree-table td:first-child {
    width: 100%;
  }

  .documents-drive-page .documents-drive-tree-table .documents-drive-name-button {
    display: flex;
    width: 100%;
  }

  .documents-drive-page .documents-drive-tree-table .documents-drive-name-button > span:last-child {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.global-e-details-modal .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.global-e-details-modal .data-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.global-e-details-modal .data-table th,
.global-e-details-modal .data-table td {
  white-space: nowrap;
}

.global-e-details-modal .panel {
  min-width: 0;
}

.global-e-details-modal .modal-card {
  overflow: hidden;
}

.global-e-details-modal .tiles {
  margin-top: 0;
  margin-bottom: 14px;
}

.global-e-details-card {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
}

.global-e-details-modal .modal-body-scroll {
  background: transparent;
}

.global-e-details-modal {
  background: transparent;
}

.chart-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.chart-wrap {
  background: rgba(15, 31, 25, 0.06);
  border: 1px solid rgba(15, 31, 25, 0.08);
  border-radius: 14px;
  padding: 16px;
}

.chart-wrap svg {
  width: 100%;
  height: 240px;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.primary-button--solid {
  box-shadow: 0 10px 20px rgba(45, 135, 79, 0.3);
}

.danger-button {
  background: #e45050;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.danger-button:hover {
  filter: brightness(0.95);
}

.is-hidden {
  display: none !important;
}

.login-card .primary-button {
  margin-top: 6px;
  box-shadow: var(--shadow);
}

.primary-button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.secondary-button {
  background: var(--surface-muted);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e2e3e7;
  font-weight: 600;
  cursor: pointer;
}

.secondary-button.is-empty {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  color: #991b1b;
}

.secondary-button.is-empty:hover {
  filter: brightness(0.98);
}

.secondary-button.is-present {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.4);
  color: #166534;
}

.secondary-button.is-present:hover {
  filter: brightness(0.98);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(15, 15, 15, 0.4);
  z-index: 50000;
  overflow: hidden;
}

.modal.active {
  display: grid;
}

.modal:target {
  display: grid;
}

#crm-controls-modal:target {
  display: grid !important;
  z-index: 60000;
}

.modal-card {
  background: var(--surface);
  padding: 26px;
  border-radius: var(--radius);
  width: min(720px, 92vw);
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow);
  border: 1px solid #ededf0;
  max-height: 90vh;
  overflow: auto;
}

.assignment-overview-card {
  width: min(980px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.assignment-overview-head {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  padding-bottom: 10px;
  border-bottom: 1px solid #ececef;
}

.assignment-overview-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding-top: 16px;
}

.modal-card--compact {
  width: min(420px, 92vw);
}

.modal#internal-shipments-create-modal .modal-card {
  width: 90vw;
  max-width: 90vw;
}

.modal#shipping-collections-create-modal .modal-card {
  width: 80vw;
  max-width: 80vw;
}

.modal#internal-shipments-create-modal .internal-order-reference-field {
  width: min(100%, calc(50% - 8px));
}

.modal#internal-product-select-modal .internal-product-select-card {
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal#internal-product-select-modal .internal-product-select-card .modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  padding-bottom: 10px;
  margin-bottom: 0;
  border-bottom: 1px solid #ececef;
}

.modal#internal-product-select-modal #internal-product-select-search {
  min-width: 280px;
}

.modal#internal-product-select-modal .internal-product-select-scroll {
  margin-top: 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.modal#internal-product-select-modal .internal-product-select-table th,
.modal#internal-product-select-modal .internal-product-select-table td {
  padding-top: 7px;
  padding-bottom: 7px;
}

.modal#internal-product-select-modal .internal-variant-row td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.modal#internal-product-select-modal input[data-action="variant-qty"]::-webkit-outer-spin-button,
.modal#internal-product-select-modal input[data-action="variant-qty"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal#internal-product-select-modal input[data-action="variant-qty"] {
  -moz-appearance: textfield;
  text-align: center;
}

.modal#internal-shipments-create-modal #internal-form-items input[data-action="item-qty"] {
  text-align: center;
}

.modal#internal-shipments-create-modal #internal-form-items input[data-action="item-weight"]::-webkit-outer-spin-button,
.modal#internal-shipments-create-modal #internal-form-items input[data-action="item-weight"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal#internal-shipments-create-modal #internal-form-items input[data-action="item-weight"] {
  -moz-appearance: textfield;
  text-align: center;
}

.modal#internal-shipments-create-modal #internal-form-items input[data-action="item-edit"][data-field="productTitle"] {
  text-align: center;
}

@media (max-width: 720px) {
  .modal#internal-shipments-create-modal .internal-order-reference-field {
    width: 100%;
  }
  .modal#internal-product-select-modal #internal-product-select-search {
    min-width: 180px;
  }
}

.modal-card--wide {
  width: min(1100px, 94vw);
}

#shopify-products-update-errors-modal .modal-card--update-errors {
  width: 80vw !important;
  max-width: 80vw !important;
  height: auto !important;
  max-height: 80vh !important;
  padding: 18px;
  gap: 10px;
  align-items: stretch;
}

.modal-card--update-errors .modal-head {
  margin-bottom: 6px;
}

.modal-card--update-errors .table-wrap {
  margin-top: 0;
}

.modal-card--collection,
.modal-card--collection.modal-card--wide {
  width: 80vw !important;
  max-width: 80vw !important;
  height: 80vh !important;
  max-height: 80vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

#docket-description-tags-modal .modal-card,
#docket-tags-editor-modal .modal-card {
  padding-top: 18px;
}

#docket-description-editor-modal .modal-card {
  padding-top: 0;
  width: 80vw;
  height: 80vh;
  max-height: 80vh;
  gap: 0;
}

#docket-description-editor-modal .modal-head {
  margin-bottom: 0;
  padding-bottom: 0;
}

#docket-description-editor-modal .composer-toolbar {
  margin-bottom: 0;
  margin-top: -52px;
}

#docket-description-editor-modal .composer-body {
  margin-top: -32px;
  padding-top: 6px;
  padding-left: 16px;
  padding-right: 12px;
}

#docket-description-editor-modal .composer-body ul,
#docket-description-editor-modal .composer-body ol {
  padding-left: 18px;
}

#docket-description-ai-modal .modal-card {
  padding-top: 0;
  width: 80vw;
  height: 60vh;
  max-height: 60vh;
  gap: 0;
  display: flex;
  flex-direction: column;
}

#docket-description-ai-modal .modal-head {
  margin-bottom: 0;
  padding-top: 30px;
  padding-bottom: 40px;
}

#docket-description-ai-modal .composer-body {
  margin-top: 0;
  padding-top: 6px;
  padding-left: 16px;
  padding-right: 12px;
}

#docket-description-ai-modal .composer-body ul,
#docket-description-ai-modal .composer-body ol {
  padding-left: 18px;
}

#docket-description-ai-modal .ai-preview-body {
  min-height: 0;
  flex: 1;
}

#docket-description-ai-status {
  margin-top: 0;
  padding: 0 16px 12px;
}

#docket-description-ai-status:empty {
  display: none;
}

.docket-retail-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 0;
  text-align: center;
}

.docket-retail-input:focus {
  outline: none;
  box-shadow: inset 0 -1px 0 #111;
}

.docket-retail-input.is-empty {
  background: rgba(220, 38, 38, 0.12);
  border-radius: 10px;
}

.dropzone {
  border: 1px dashed #cbd5f5;
  background: #f8fafc;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone.is-dragging {
  border-color: #6366f1;
  background: #eef2ff;
}

.dropzone input[type="file"] {
  display: none;
}

.dropzone-text {
  color: #6b7280;
  font-size: 13px;
}

.image-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.image-swatch {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: grid;
  gap: 6px;
  padding: 8px;
  position: relative;
}

.image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.image-remove:hover {
  background: rgba(15, 23, 42, 0.95);
}

.image-swatch img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.table-image--empty {
  cursor: pointer;
}

.image-swatch .swatch-action {
  border: none;
  background: #111827;
  color: #fff;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
}

.image-swatch.is-feature .swatch-action {
  background: #16a34a;
}

#shopify-product-images-modal .modal-card {
  width: fit-content !important;
  max-width: min(96vw, 1120px) !important;
  height: auto !important;
  max-height: 90vh !important;
  align-content: start;
  justify-items: start;
  position: relative;
}

#shopify-product-images-modal .modal-head {
  padding-right: 76px;
}

#shopify-product-images-modal .image-swatch-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 170px));
  width: fit-content;
  max-width: 90vw;
  justify-content: start;
}

.shopify-image-upload {
  display: grid;
  gap: 8px;
  width: 100%;
}

.shopify-image-upload .subtle:empty {
  display: none;
}

#shopify-product-images-modal .modal-head-actions {
  position: absolute;
  top: 18px;
  right: 18px;
}

#shopify-product-images-modal .dropzone {
  width: 100%;
}

.shopify-image-preview-card {
  width: min(980px, 94vw);
}

.shopify-image-preview-body {
  display: grid;
  place-items: center;
}

.shopify-image-preview-body img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.tag-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 12px;
}

.tag-pill button {
  border: none;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.modal-card--tight {
  padding: 18px;
  gap: 12px;
  max-height: none;
}

.modal-card--tall {
  height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
}

.modal-body-scroll {
  max-height: min(70vh, 720px);
  overflow: auto;
  padding-right: 4px;
}

.modal-card--tall .modal-body-scroll {
  max-height: none;
  height: auto;
  flex: 1;
}

.modal-card.stock-type-modal-card {
  padding: 16px;
  gap: 10px;
}

.tags-list {
  border: 1px solid #e0e0e5;
  border-radius: 14px;
  padding: 10px;
  max-height: 190px;
  overflow: auto;
  background: #f7f7f9;
  display: grid;
  gap: 8px;
}

.tag-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid #ececef;
  font-size: 13px;
  color: var(--text);
}

.tag-option input {
  accent-color: #1a5e4a;
}

.range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

#custom-range {
  display: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-grid .modal-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.users-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.users-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
}

.order-items {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}

.order-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.order-detail-card {
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #ececef;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.size-table th,
.size-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #ececef;
  text-align: left;
}

.size-table th {
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

#order-customer-card {
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#order-customer-card:hover {
  border-color: #d6d9e5;
  box-shadow: 0 6px 18px rgba(34, 37, 48, 0.12);
  transform: translateY(-1px);
}

.order-detail-card .detail-line {
  font-size: 12px;
  color: var(--text);
  margin-top: 4px;
}

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

.panel-actions--below {
  justify-content: flex-end;
  margin-top: -4px;
}

.table-search {
  min-width: 240px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e3e4ea;
  background: #fff;
  font-size: 13px;
}

.table-select {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid #e3e4ea;
  background: #fff;
  font-size: 13px;
}

.is-sortable {
  cursor: pointer;
  user-select: none;
}

.sort-indicator {
  display: inline-block;
  width: 10px;
  margin-left: 6px;
  color: #8b90a0;
}

.sort-indicator.is-asc::after {
  content: '▲';
  font-size: 9px;
}

.sort-indicator.is-desc::after {
  content: '▼';
  font-size: 9px;
}

.inline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.inline-chips .chip {
  font-size: 11px;
  padding: 3px 8px;
}

.customers-table th,
.customers-table td {
  padding: 8px 10px;
}

.customers-table .inline-chips {
  margin-top: 4px;
}

@media (max-width: 900px), (pointer: coarse) {
  .crm-page .panel-head {
    flex-wrap: wrap;
  }

  .crm-page .panel-head .panel-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .crm-page .panel-head .table-search,
  .crm-page #crm-customers-search {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.crm-page {
    overflow-x: hidden !important;
  }

  .crm-page .panel .table-wrap {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .crm-page .customers-table,
  .crm-page .customers-table thead,
  .crm-page .customers-table tbody {
    display: block;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    table-layout: fixed !important;
  }

  .crm-page .customers-table thead tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px 86px;
    align-items: center;
    column-gap: 0;
  }

  .crm-page .customers-table thead th {
    display: none;
    padding: 8px 0;
    border-bottom: 0;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .crm-page .customers-table thead tr {
    border-bottom: 1px solid #ededf0;
  }

  .crm-page .customers-table thead th:nth-child(1),
  .crm-page .customers-table thead th:nth-child(4),
  .crm-page .customers-table thead th:nth-child(5) {
    display: block;
  }

  .crm-page .customers-table thead th:nth-child(4) {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }

  .crm-page .customers-table thead th:nth-child(5) {
    text-align: right;
    padding-right: 10px;
  }

  .crm-page .customers-table thead th:nth-child(1) {
    padding-left: 10px;
  }

  .crm-page .customers-table tbody td {
    display: block;
    border-bottom: 0;
    min-width: 0;
    box-sizing: border-box;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 0;
    padding-right: 0;
  }

  .crm-page .customers-table tbody tr {
    display: block;
    border-bottom: 1px solid #ededf0;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .crm-page .customers-table tbody tr:last-child {
    border-bottom: 0;
  }

  .crm-page .customers-table * {
    box-sizing: border-box;
    max-width: 100%;
  }

  .crm-page .customers-table .customer-mobile-wrap {
    width: 100%;
    padding: 10px 8px 10px 0;
    max-width: 100vw;
    overflow: hidden;
  }

  .crm-page .customers-table .customer-mobile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px 86px;
    align-items: center;
    column-gap: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .crm-page .customers-table .customer-name-cell {
    white-space: normal;
    line-height: 1.15;
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-left: 10px;
    padding-right: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }

  .crm-page .customers-table .customer-mobile-spend {
    white-space: nowrap;
    font-size: 11px;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    min-width: 0;
    overflow: hidden;
  }

  .crm-page .customers-table .customer-mobile-actions {
    text-align: right;
    padding-left: 2px;
    padding-right: 8px;
    min-width: 0;
    overflow: hidden;
    width: 86px;
    justify-self: end;
    box-sizing: border-box;
  }

  .crm-page .customers-table .customer-mobile-actions .menu-button {
    min-width: 0;
    width: 72px;
    max-width: 72px !important;
    display: block;
    padding: 5px 4px;
    font-size: 9px;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .crm-page .customers-table .customer-mobile-actions .row-actions {
    width: 72px;
    max-width: 72px;
    display: inline-flex;
    justify-content: flex-end;
    margin-left: auto;
  }
}

.order-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-muted);
}

.order-item .title {
  font-weight: 600;
  font-size: 13px;
}

.order-item .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.order-item .price {
  font-weight: 600;
  font-size: 13px;
  text-align: right;
}

.crm-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
  align-items: center;
}

.crm-page #crm-tab-orders .crm-toolbar {
  margin-top: -5px;
  margin-bottom: 10px;
}

.crm-toolbar #crm-email-account {
  flex: 0 0 230px;
  max-width: 230px;
  min-width: 210px;
}

.crm-toolbar #crm-email-search {
  flex: 1 1 320px;
}

.crm-toolbar.is-collapsed {
  display: none;
}

.crm-email-page .crm-toolbar .email-multi-actions {
  margin-left: auto;
  margin-right: 0;
}

.crm-email-page .crm-toolbar .email-floating-pill--pagination {
  border-radius: 999px;
  padding: 10px 12px;
  min-height: 37px;
  box-sizing: border-box;
  box-shadow: none;
  border-color: #e0e0e5;
}

.email-select-all-banner {
  display: none !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #e2e5ee;
  border-radius: 12px;
  background: #f7f8fb;
  color: #3a3f4b;
  font-size: 13px;
  margin: -6px 0 16px;
}

.email-select-all-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-toolbar input,
.crm-toolbar textarea,
.crm-toolbar select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 14px;
  background: #fff;
}

.crm-toolbar input:focus,
.crm-toolbar textarea:focus,
.crm-toolbar select:focus {
  outline: none;
  border-color: #c7c9d3;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.crm-toolbar input,
.crm-toolbar textarea,
.crm-toolbar select {
  flex: 1 1 220px;
}

.crm-load-more {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.crm-email-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.crm-email-detail {
  background: var(--surface);
  border: 1px solid #ececef;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.crm-email-body {
  border: 1px solid #ececef;
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-muted);
  max-height: 260px;
  overflow: auto;
  font-size: 13px;
}

.crm-email-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.crm-email-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-email-thread {
  border-top: 1px solid #ececef;
  padding-top: 8px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.crm-email-actions select {
  min-width: 140px;
}

.crm-tab textarea {
  width: 100%;
}

.composer-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.composer-toolbar button {
  border: 1px solid #e0e0e5;
  background: var(--surface);
  border-radius: 10px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  line-height: 1;
  cursor: pointer;
}

.composer-toolbar svg {
  width: 14px;
  height: 14px;
  fill: #1a1a1a;
}

.composer-body {
  min-height: 220px;
  flex: 1;
  border: 1px solid #e0e0e5;
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
}

.ai-preview-body {
  min-height: 140px;
  max-height: 360px;
  overflow: auto;
}

@media (max-width: 1024px) {
  .crm-email-grid {
    grid-template-columns: 1fr;
  }
}

.user-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #eadfd4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

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

.wide-container {
  width: min(1480px, 96vw);
}

.order-detail-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 6px;
}

.order-detail-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 8px 10px;
  border: 1px solid #ededf0;
  box-shadow: 0 10px 24px rgba(15, 15, 15, 0.06);
}

.detail-line {
  margin-top: 6px;
  font-weight: 600;
  color: var(--text);
}

.order-shipping-row {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid #ededf0;
  background: var(--surface);
}

.order-shipping-row .meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.order-total-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.order-total-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid #ededf0;
  text-align: left;
}

.order-total-card .value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 6px;
}

.order-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.order-top-grid > .panel {
  margin-top: 0;
  height: 100%;
}

.order-top-grid + .panel {
  margin-top: 18px;
}

.order-details-panel {
  display: flex;
  flex-direction: column;
}

.previous-orders-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.email-toggle {
  min-width: 200px;
}

.modal-card.modal-card--wide {
  width: min(1440px, 96vw);
  max-height: 94vh;
  height: 94vh;
}

.modal-card.modal-card--wide.modal-card--tight {
  height: auto;
  max-height: none;
}

#shipping-internal-shortages-modal .modal-card {
  height: auto;
  max-height: 90vh;
}

#shipping-internal-shortages-modal .modal-body-scroll {
  max-height: min(60vh, 620px);
}

.picking-modal-card {
  display: flex;
  flex-direction: column;
  max-height: none;
  padding: 0;
  overflow: hidden;
  width: min(620px, 40vw);
  position: relative;
}

.modal-card.modal-card--wide.picking-modal-card {
  width: min(620px, 40vw);
}

@media (max-width: 900px), (pointer: coarse) {
  .picking-modal-card,
  .modal-card.modal-card--wide.picking-modal-card {
    width: 100vw;
    max-width: 100vw;
  }
}

.picking-modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  padding: 20px 24px;
  border-bottom: 1px solid #ececf1;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.picking-modal-card .panel-head {
  margin-bottom: 0;
}

.picking-modal-body {
  position: static;
  display: grid;
  gap: 8px;
  padding: 5px 24px 24px;
  overflow: visible;
}

.picking-steps {
  margin-top: 0;
}

.picking-location-modal {
  width: min(90vw, 1400px);
  max-height: 90vh;
  overflow: hidden;
}

.picking-location-modal--box {
  width: min(60vw, 1100px);
}

.modal-card.modal-card--wide.picking-location-modal--box {
  width: min(60vw, 1100px);
}

.picking-location-body {
  overflow: auto;
}

.picking-top-row {
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 45%);
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.picking-map {
  position: relative;
  width: 100%;
  min-height: 320px;
  border: 1px solid #e3e3ea;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(248, 248, 252, 0.9), rgba(240, 240, 247, 0.9));
  overflow: hidden;
  max-width: 100%;
  margin: 0;
}

.picking-map--modal {
  max-height: 70vh;
}

.picking-front-view--modal {
  max-height: 70vh;
  overflow: auto;
}

@media (max-width: 900px), (pointer: coarse) {
  .picking-location-modal--box,
  .modal-card.modal-card--wide.picking-location-modal--box {
    width: 100vw;
    max-width: 100vw;
  }

  .picking-front-view--modal {
    width: 100%;
    max-width: 100%;
  }

  #picking-show-bay,
  #picking-show-box {
    display: none !important;
  }
}

.picking-map__item {
  position: absolute;
  border: 1px solid #c9cbd6;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px;
}

.picking-map__item--bench,
.picking-map__item--folding_bench {
  background: rgba(15, 118, 110, 0.15);
  border-color: rgba(15, 118, 110, 0.6);
  color: #0f766e;
}

.picking-auto-actions {
  justify-content: flex-end;
}

@media (max-width: 900px), (pointer: coarse) {
  .picking-auto-actions {
    width: 100%;
  }

  .picking-auto-actions .menu-button {
    width: 100%;
  }
}

.picking-map__item.is-target {
  border: 2px solid #f97316;
  background: rgba(249, 115, 22, 0.15);
  color: #9a3412;
  z-index: 2;
}

.picking-steps {
  display: grid;
  gap: 12px;
}

.picking-steps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.picking-steps-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.picking-steps-actions .picking-modal-action {
  width: auto;
  padding: 8px 12px;
}

.picking-step-summary {
  font-weight: 600;
  color: #0f172a;
  margin-top: 0;
}

.picking-step-location {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.picking-step-location-spacer {
  height: 10px;
}

.picking-step-items {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ececf1;
  background: #fbfbfd;
  max-height: 220px;
  overflow: auto;
}

.picking-front-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 8px;
}

.picking-front-view {
  display: grid;
  gap: 10px;
}

.picking-front-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: center;
}

.picking-front-row__label {
  font-weight: 600;
  color: #1f2937;
}

.picking-front-row__shelf {
  position: relative;
  padding: 8px 8px 12px;
  background: linear-gradient(180deg, #f6f7f9 0%, #eceff3 100%);
  border: 2px solid #a8b1bd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -6px 0 rgba(120, 130, 145, 0.25);
}

.picking-front-row__shelf::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -6px;
  height: 6px;
  background: linear-gradient(180deg, #9aa3af 0%, #7c8796 100%);
  border: 2px solid #7c8796;
  border-top: none;
}

.picking-front-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  align-items: center;
}

.picking-front-box {
  height: 32px;
  border: 1px solid #15803d;
  background: linear-gradient(145deg, #bbf7d0 0%, #4ade80 60%, #22c55e 100%);
  color: #14532d;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.picking-front-box.is-target {
  border-color: #f97316;
  background: linear-gradient(145deg, #fed7aa 0%, #fb923c 60%, #f97316 100%);
  color: #7c2d12;
}

.picking-modal-action {
  align-self: flex-start;
}

.picking-guidance-overlay {
  position: absolute;
  inset: 0;
  transform: none;
  width: auto;
  height: auto;
  max-height: none;
  overflow: auto;
  z-index: 1600;
  border: 1px solid #ededf0;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: none;
  padding: 18px 24px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.picking-guidance-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.picking-guidance-box {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 800;
  color: #0f172a;
}

.picking-guidance-location {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 800;
  color: #0b4a6f;
}

.picking-guidance-checklist {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.picking-guidance-check {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.picking-guidance-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: transparent;
  background: #fff;
}

.picking-guidance-check.is-complete {
  display: inline-flex;
  color: #166534;
}

.picking-guidance-check.is-complete .picking-guidance-check-icon {
  border-color: #16a34a;
  color: #166534;
  background: #dcfce7;
}

.picking-guidance-item {
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
  color: #1e293b;
}

.picking-guidance-hint {
  margin-top: 10px;
  font-size: 15px;
  color: #334155;
}

.picking-guidance-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 68px;
  padding: 6px 10px;
  font-size: 12px;
}

.picking-scan-error-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 84px;
  z-index: 13;
  border: 2px solid #dc2626;
  border-radius: 14px;
  background: rgba(254, 242, 242, 0.97);
  box-shadow: 0 14px 30px rgba(127, 29, 29, 0.24);
  padding: 14px 14px 12px;
}

.picking-scan-error-title {
  font-size: 19px;
  font-weight: 800;
  color: #991b1b;
}

.picking-scan-error-message {
  margin-top: 4px;
  font-size: 14px;
  color: #7f1d1d;
}

.picking-scan-error-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 82px;
  padding: 6px 10px;
  font-size: 12px;
}

.picking-front-view .layout-box {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #6b7280;
}

.picking-front-view .layout-box.is-selected {
  background: linear-gradient(145deg, #bbf7d0 0%, #4ade80 60%, #22c55e 100%);
  border-color: #15803d;
  color: #14532d;
}

.picking-scan-field {
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.picking-scan-field + .picking-scan-field {
  margin-top: -10px;
}

.picking-scan-field.is-hidden {
  display: none;
}

.picking-scan-field.is-success input {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.picking-scan-field.is-locked input {
  background: #eef0f3;
  color: #6b7280;
}

.picking-scan-field .scan-success {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: rgba(220, 252, 231, 0.9);
  border: 1px solid rgba(134, 239, 172, 0.8);
  padding: 4px 8px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.picking-scan-field.is-success .scan-success {
  opacity: 1;
  transform: translateY(0);
}

.picking-scan-field .scan-required {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.9);
  border: 1px solid rgba(252, 165, 165, 0.9);
  padding: 4px 8px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.picking-scan-field.is-required .scan-required {
  opacity: 1;
  transform: translateY(0);
}

.picking-step-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #0f172a;
}

.picking-step-item span {
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1024px) {
  .picking-top-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .picking-layout {
    grid-template-columns: 1fr;
  }
  .picking-map {
    min-height: 240px;
  }
  .picking-guidance-location {
    font-size: 19px;
  }
  .picking-guidance-overlay {
    padding: 14px 16px;
  }
  .picking-guidance-box {
    font-size: 24px;
  }
  .picking-guidance-item {
    font-size: 18px;
  }
  .picking-scan-error-overlay {
    top: 74px;
  }
}

.email-view-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.email-view-card.is-replying .email-view-body {
  display: none;
}

.email-view-card.is-replying .email-reply {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-view-card.is-replying .email-view-actions {
  display: none;
}

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

.email-view-header-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.convo-task-pills {
  display: none;
  align-items: center;
  gap: 8px;
}

.pill.pill--success {
  background: rgba(16, 185, 129, 0.18);
  color: #065f46;
}

.email-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.email-actions-dropdown {
  position: relative;
}

.email-actions-dropdown .dropdown-menu {
  right: 0;
  left: auto;
  top: calc(100% + 8px);
}

.email-actions-dropdown .dropdown-menu.active {
  display: block;
}

.modal-body-scroll .form-field + .form-field {
  margin-top: 12px;
}

.email-view-actions select {
  min-width: 180px;
}

.email-view-actions input,
.email-view-actions select,
.email-reply-fields input,
.email-task input {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 13px;
  background: #fff;
}

.email-view-actions .menu-button {
  border-radius: 999px;
}

.email-orders-trigger {
  display: inline-flex;
}

.email-orders-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.email-orders-card .table-wrap {
  border: none;
  border-radius: 0;
  margin: 0;
}

.email-orders-card .data-table th,
.email-orders-card .data-table td {
  vertical-align: middle;
}

.email-orders-card .data-table tr.email-orders-row-linked td {
  background: #e9f9ef;
  border-top: 1px solid #9ad7ac;
  border-bottom: 1px solid #9ad7ac;
}

.email-orders-card .data-table tr.email-orders-row-linked td:first-child {
  border-left: 1px solid #9ad7ac;
}

.email-orders-card .data-table tr.email-orders-row-linked td:last-child {
  border-right: 1px solid #9ad7ac;
}

.email-orders-actions {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.email-task {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 240px;
}

.email-task input {
  flex: 1;
  min-width: 140px;
}

.email-view-body {
  border: 1px solid #ececef;
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
  max-height: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  font-size: 14px;
  line-height: 1.6;
}

.email-convo-entry {
  border: 1px solid #e6e7ec;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 46px;
}

.email-convo-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b6f7a;
  margin-bottom: 8px;
}

.email-body-wrap {
  position: relative;
  padding-bottom: 42px;
}

.email-track-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}

.email-track-pill.is-unopened {
  background: #ffe6e6;
  color: #b4362d;
  border-color: #f4b4b4;
}

.email-track-pill.is-opened {
  background: #e4f6eb;
  color: #1f6d38;
  border-color: #9ad3ae;
}

.email-track-pill.is-unknown {
  background: #f0f1f5;
  color: #6d7280;
  border-color: #d7dbe5;
}

.email-convo-divider {
  margin: 10px 0 14px;
}

.email-convo-divider-line {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(231, 116, 42, 0.2), rgba(231, 116, 42, 0.9), rgba(231, 116, 42, 0.2));
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin: 6px 0 10px;
}

.email-convo-divider-line:hover {
  transform: scaleY(1.15);
  box-shadow: 0 2px 8px rgba(34, 37, 48, 0.2);
}

.email-convo-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.email-convo-note {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6f7fb;
  border: 1px solid #e1e4f0;
  cursor: pointer;
}

.email-convo-note-left {
  flex: 1;
  min-width: 0;
}

.email-convo-note-right {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  white-space: nowrap;
}

.email-convo-note-text {
  font-size: 13px;
  color: #2a2d37;
  line-height: 1.5;
  white-space: pre-wrap;
}

.email-convo-note-subtle {
  font-size: 12px;
  color: #7b8190;
  margin-top: 4px;
}

.email-convo-note-meta {
  font-size: 11px;
  color: #7b8190;
  margin-top: 0;
}

.email-convo-note-delete {
  border: none;
  background: transparent;
  color: #c4514a;
  font-size: 14px;
  cursor: pointer;
  padding: 0 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1f7;
  border: 1px solid #d7dce9;
  font-size: 12px;
  color: #2a2d37;
}

.chip button {
  border: none;
  background: transparent;
  color: #c4514a;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.convo-note-users {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.modal-body-scroll textarea#order-conversation-note-body {
  font-family: var(--font-body);
}

.convo-note-users select {
  flex: 1;
  min-width: 180px;
}

.convo-note-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.email-convo-note-mentions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.modal-body-scroll textarea#order-conversation-note-body {
  width: 100%;
  box-sizing: border-box;
}

.email-reply {
  border-top: 1px solid #ececef;
  padding-top: 8px;
  display: none;
  gap: 8px;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.email-reply-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.email-reply-fields + .email-reply-fields {
  margin-top: 4px;
}

.email-reply-fields--inline {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.email-reply-fields input,
.email-reply-fields select {
  height: 32px;
  font-family: var(--font-body);
}

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

.email-reply-actions input[type="file"] {
  max-width: 320px;
}

.email-reply-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-reply-send-dropdown {
  display: inline-flex;
}

.email-reply-mobile-actions {
  display: none;
}

.email-compose-mobile-actions {
  display: none;
}

.email-reply-quote-toggle-bottom {
  display: none;
}

.email-reply-send-dropdown .dropdown-menu {
  top: auto;
  bottom: 44px;
  right: 0;
  min-width: 280px;
}

.email-reply-send-dropdown .dropdown-menu .dropdown-item {
  white-space: nowrap;
}

.email-view-card.is-replying .email-reply {
  min-height: 0;
}

.email-view-card.is-replying .composer-body {
  min-height: 0;
}

.email-view-card {
  display: flex;
  flex-direction: column;
  height: 90vh;
}

.email-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-view-card.is-replying .email-view-body {
  display: none;
}

.email-view-card.is-replying .email-reply {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-reply-top,
.email-reply-bottom {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.email-reply-top {
  gap: 6px;
  flex: 1;
}

.email-reply-editor-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.email-reply-bottom {
  border-top: 1px solid #ececef;
  padding-top: 10px;
  overflow: auto;
  display: none;
}

.email-view-card.is-replying.show-quote .email-reply-bottom .email-quote {
  display: block;
  margin: 0;
  color: var(--text);
}

.email-view-card.is-replying.show-quote .email-quote-header {
  color: #6b7280;
}

.email-view-card.is-replying.show-quote .email-reply {
  display: grid;
  grid-template-rows: 1fr 1fr;
  height: 100%;
}

.email-view-card.is-replying.show-quote .email-reply-bottom {
  display: flex;
  flex: 1;
}

.email-view-card.is-replying.show-quote .email-reply-top,
.email-view-card.is-replying.show-quote .email-reply-bottom {
  min-height: 0;
}

.email-view-card.is-replying.show-quote .email-reply-bottom .email-quote {
  flex: 1;
  overflow: auto;
}

.email-reply-top .composer-body,
.email-reply .composer-body {
  flex: 1;
  min-height: 0;
}

.email-reply-top .composer-toolbar {
  margin-bottom: 6px;
}

#email-view-modal.is-replying #email-view-close {
  display: none;
}

.email-quote-card {
  display: flex;
  flex-direction: column;
  height: 85vh;
}

.email-quote-card .email-view-body {
  flex: 1;
  min-height: 0;
}

.email-view-card .composer-toolbar {
  padding: 4px;
  gap: 6px;
}

.email-view-card .composer-toolbar button {
  padding: 4px 6px;
}

.email-compose-card {
  width: min(1200px, 94vw);
  height: 90vh;
  max-height: 90vh;
  overflow: hidden;
  gap: 8px;
}

.email-compose-card .compose-like-reply {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.email-compose-card .email-reply-top {
  flex: 1;
  min-height: 0;
}

.email-compose-card .composer-toolbar {
  background: var(--surface);
  border: 1px solid #e0e0e5;
  border-radius: 14px;
  padding: 6px 8px;
  gap: 6px;
}

.email-compose-template-row .menu-button {
  white-space: nowrap;
}

.email-templates-modal-card {
  width: min(520px, 92vw);
}

.email-templates-modal-card .menu-select {
  width: 100%;
}

.composer-body--tall {
  min-height: 42vh;
  flex: 1;
}

.modal-card--shopify-description {
  width: 86vw !important;
  max-width: 86vw !important;
  height: 95vh !important;
  max-height: 95vh !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card--shopify-description .form-field input {
  height: 36px;
}

.modal-card--shopify-description .tag-pill-row {
  align-items: center;
}

.modal-card--shopify-description .tag-pill {
  min-height: 26px;
}

.modal-card--shopify-description .composer-body--tall {
  min-height: 34vh;
}

.shopify-description-collections {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.shopify-description-collections-table-wrap {
  overflow: auto;
  max-height: 22vh;
  border: 1px solid #ededf0;
  border-radius: 10px;
}

.shopify-description-collections-table-wrap table {
  margin: 0;
}

.modal-card--shopify-collections {
  width: 80vw !important;
  max-width: 80vw !important;
  height: 80vh !important;
  max-height: 80vh !important;
  display: flex;
  flex-direction: column;
}

.modal-card--shopify-collections .table-wrap {
  overflow: auto;
}

.email-compose-card .modal-actions {
  margin-top: auto;
}

.previous-orders-panel {
  max-height: none;
}

.email-quote {
  border-left: 3px solid #e0e0e5;
  padding-left: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  display: none;
}

.email-quote-header {
  font-size: 12px;
  color: #8a8f9b;
  margin-bottom: 8px;
}

.signature-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e0e0e5;
}

.signature-editor .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.signature-editor input,
.signature-editor select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 14px;
  background: #fff;
}

.signature-editor .panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.signature-details-card {
  width: min(560px, 94vw);
}

@media (max-width: 900px), (pointer: coarse) {
  .signature-table-wrap {
    overflow: visible !important;
  }

  .signature-table,
  .signature-table tbody,
  .signature-table tr,
  .signature-table td {
    overflow: visible !important;
  }

  .signature-table thead th:nth-child(2),
  .signature-table thead th:nth-child(3),
  .signature-table thead th:nth-child(4),
  .signature-table tbody td:nth-child(2),
  .signature-table tbody td:nth-child(3),
  .signature-table tbody td:nth-child(4) {
    display: none !important;
  }

  .signature-table {
    table-layout: fixed;
    width: 100%;
  }

  .signature-table th:nth-child(1),
  .signature-table td:nth-child(1) {
    width: 58%;
    text-align: left;
  }

  .signature-table th:nth-child(5),
  .signature-table td:nth-child(5) {
    width: 42%;
    text-align: right;
  }

  .signature-table .signature-mobile-name {
    white-space: normal;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .signature-table .signature-mobile-actions .menu-button {
    padding: 6px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .signature-table .signature-mobile-actions {
    overflow: visible !important;
    position: relative;
  }

  .signature-table .signature-mobile-actions .row-actions {
    overflow: visible !important;
    position: relative;
  }

  .signature-table .signature-mobile-actions .dropdown-menu {
    right: 0;
    left: auto;
    top: calc(100% + 6px);
    z-index: 5000;
  }

  #signature-details-modal .modal-card {
    width: min(96vw, 96vw);
    max-width: 96vw;
    box-sizing: border-box;
  }

  #signature-details-modal .form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.ai-summary-body {
  background: var(--surface-muted);
  border-radius: 14px;
  border: 1px solid #ececef;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
}

#ai-convo-content {
  white-space: normal;
}

.ai-summary-block + .ai-summary-block {
  margin-top: 12px;
}

.ai-summary-block--keypoints {
  margin-top: 18px;
}

.ai-summary-text ul {
  margin: 8px 0 0 18px;
}

.ai-summary-text--reply {
  white-space: pre-wrap;
}

.ai-error-body {
  background: var(--surface-muted);
  border-radius: 14px;
  border: 1px solid #ececef;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

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

.ai-convo-version {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}

.ai-convo-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ai-convo-section {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #e6e6eb;
}

.ai-convo-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ai-convo-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ai-convo-reply {
  background: #fff;
  border: 1px solid #e6e6eb;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.ai-convo-divider {
  border: 0;
  border-top: 1px solid #e6e6eb;
  margin: 0;
}

.ai-convo-spacer {
  height: 10px;
}

.ai-convo-loading {
  background: rgba(8, 10, 12, 0.4);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 20000;
}

.ai-convo-loading.is-active {
  display: flex;
}

.ai-convo-loading-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 32px;
  border: 1px solid #e6e6eb;
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: center;
  min-width: 280px;
  box-shadow: 0 18px 40px rgba(12, 14, 18, 0.18);
  animation: convoPop 220ms ease;
}

.ai-convo-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(34, 197, 94, 0.2);
  border-top-color: #16a34a;
  animation: convoSpin 900ms linear infinite;
}

.ai-convo-loading-text {
  font-size: 13px;
  color: var(--text);
}

.ai-convo-card .ai-summary-body {
  max-height: none;
  overflow: visible;
}

.convo-task-assign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.convo-task-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.convo-task-assignees .chip {
  background: rgba(45, 135, 79, 0.12);
  border-color: rgba(45, 135, 79, 0.25);
}

.convo-task-users-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.convo-task-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e6e6eb;
  background: #fff;
  cursor: pointer;
}

.convo-task-user.active {
  border-color: rgba(45, 135, 79, 0.4);
  background: rgba(45, 135, 79, 0.08);
}

.convo-task-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@keyframes convoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes convoPop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.ai-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-summary__headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ai-summary__quality {
  font-size: 16px;
  font-weight: 600;
}

.ai-summary__score {
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid #e6e6eb;
  padding: 4px 10px;
  border-radius: 999px;
}

.ai-summary__section {
  display: grid;
  gap: 4px;
}

.ai-summary__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ai-summary__value {
  font-size: 13px;
}

.ai-summary__list {
  margin-left: 16px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
}

.order-total-row.is-hidden {
  display: none;
}

.previous-orders-list {
  display: grid;
  gap: 10px;
  max-height: none;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.previous-order-row {
  border: 1px solid #ededf0;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.previous-order-row .title {
  font-weight: 600;
}

.previous-order-row .meta {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .order-lower-body {
    grid-template-columns: 1fr;
  }

  .crm-order-page .order-top-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .crm-order-page .order-top-grid > .panel {
    height: auto !important;
  }

  .crm-order-page .order-details-panel {
    order: 1;
  }

  .crm-order-page .previous-orders-panel {
    order: 2;
  }
}

.import-pill {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffb347;
  color: #2b1b05;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rule-processing-pill {
  left: 22px;
  right: auto;
  background: #bfd7ff;
  color: #0f274a;
}

.rule-processing-pill .dot {
  background: #1f4f99;
  box-shadow: 0 0 0 4px rgba(31, 79, 153, 0.2);
}

.delete-sync-pill {
  left: 22px;
  right: auto;
  bottom: 70px;
  background: #ffd6b8;
  color: #4a2a0f;
}

.delete-sync-pill .dot {
  background: #b25a1a;
  box-shadow: 0 0 0 4px rgba(178, 90, 26, 0.2);
}

.order-pill {
  top: 22px;
  left: 22px;
  right: auto;
  bottom: auto;
  background: #bff3cc;
  color: #0b3b1a;
}

.order-pill .dot {
  background: #1c8c3a;
  box-shadow: 0 0 0 4px rgba(28, 140, 58, 0.25);
}

.order-pill.is-pulse {
  animation: pillPulse 900ms ease;
}

.orders-import-pill {
  bottom: 22px;
  background: #ffb347;
  color: #2b1b05;
}

.shopify-products-sync-pill {
  left: 22px;
  right: auto;
  bottom: 22px;
  background: #c6e6ff;
  color: #0f274a;
}

.shopify-products-sync-pill .dot {
  background: #1f6fb2;
  box-shadow: 0 0 0 4px rgba(31, 111, 178, 0.2);
}

.cell-positive {
  background: rgba(31, 141, 62, 0.12) !important;
}

.cell-warning {
  background: rgba(242, 153, 74, 0.18) !important;
}

.stock-type-modal-card td.cell-positive,
.stock-type-modal-card td.cell-warning {
  background-clip: padding-box;
}

.variant-orders-card {
  height: 80vh;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  gap: 0;
}

.variant-orders-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 8px 0;
  margin: 0;
}

.variant-orders-table {
  flex: 1;
  overflow: auto;
  margin-top: 10px;
}

.notes-pill {
  left: 22px;
  right: auto;
  background: #bfe8e1;
  color: #103c34;
}

.notes-pill .dot {
  background: #0f6b5e;
  box-shadow: 0 0 0 4px rgba(15, 107, 94, 0.2);
}

.import-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8a3d00;
  box-shadow: 0 0 0 4px rgba(138, 61, 0, 0.2);
}

.header-clock-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  margin-right: 6px;
  border-radius: 999px;
  background: #1f9d4a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.header-clock-pill.is-visible {
  display: inline-flex;
}

.header-clock-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.header .header-user-pills-section {
  display: inline-flex;
  align-items: center;
  height: var(--top-nav-height);
  padding: 0 4px;
}

.header .header-clock-others-pill {
  display: none;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.import-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.warehouse-updated-pill {
  left: 50%;
  right: auto;
  transform: translate(-50%, 10px);
  background: #ffb347;
  color: #2b1b05;
}

.print-pill {
  left: 50%;
  right: auto;
  bottom: 22px;
  transform: translate(-50%, 10px);
  background: #cfe8ff;
  color: #123457;
}

.print-pill .dot {
  background: #1f5ea8;
  box-shadow: 0 0 0 4px rgba(31, 94, 168, 0.2);
}

.print-pill.is-success {
  background: #c9f1d7;
  color: #0c3b1b;
}

.print-pill.is-success .dot {
  background: #1f8f44;
  box-shadow: 0 0 0 4px rgba(31, 143, 68, 0.2);
}

.print-pill.is-error {
  background: #ffd6d6;
  color: #5a0b0b;
}

.print-pill.is-error .dot {
  background: #c0392b;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.2);
}

.print-pill.is-visible {
  transform: translate(-50%, 0);
}

.warehouse-updated-pill .dot {
  background: #8a3d00;
  box-shadow: 0 0 0 4px rgba(138, 61, 0, 0.2);
}

.warehouse-updated-pill.is-visible {
  transform: translate(-50%, 0);
}

.warehouse-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.layout-stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layout-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.layout-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6f7b8e;
}

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

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.legend-swatch--shelf {
  background: rgba(59, 130, 246, 0.75);
}

.legend-swatch--bench {
  background: rgba(234, 179, 8, 0.85);
}

.legend-swatch--folding {
  background: rgba(34, 197, 94, 0.85);
}

.legend-swatch--small-shelf {
  background: rgba(14, 116, 144, 0.85);
}

.legend-swatch--wide-shelf {
  background: rgba(37, 99, 235, 0.85);
}

.layout-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 96 / 82;
  border-radius: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background-color: rgba(248, 250, 252, 0.7);
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.2) 1px, transparent 1px),
    linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 10.417% 12.195%, 10.417% 12.195%, 2.083% 2.439%, 2.083% 2.439%;
  overflow: hidden;
  touch-action: none;
}

.layout-stage--no-grid {
  background-image: none;
}

.layout-item {
  position: absolute;
  border-radius: 0;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: #0f172a;
  font-size: 0.78rem;
  line-height: 1.1;
  cursor: grab;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.08);
  user-select: none;
  touch-action: none;
  -webkit-user-drag: none;
}

.layout-item:active {
  cursor: grabbing;
}

.layout-item__label {
  font-weight: 600;
  color: #0f172a;
}

.layout-item__meta {
  color: #3f4a5a;
  font-size: 0.7rem;
}

.layout-item__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: #64748b;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
}

.layout-item__badge.is-complete {
  background: #16a34a;
  color: #fff;
  font-weight: 700;
}

.layout-item__badge.is-incomplete {
  background: #ef4444;
  color: #fff;
  font-weight: 700;
}

.layout-item--shelf {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.35);
}

.layout-item--bench {
  background: rgba(234, 179, 8, 0.25);
  border-color: rgba(234, 179, 8, 0.45);
}

.layout-item--folding_bench {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.45);
}

.layout-item--small_shelf {
  background: rgba(14, 116, 144, 0.22);
  border-color: rgba(14, 116, 144, 0.45);
}

.layout-item--wide_shelf {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(37, 99, 235, 0.52);
}

.layout-box-panel {
  display: grid;
  grid-template-columns: max-content 240px;
  gap: 18px;
  align-items: start;
  justify-content: start;
}

#layout-box-modal .modal-card {
  width: fit-content;
  min-width: min(760px, 96vw);
  max-width: 96vw;
}

#layout-box-rows {
  width: max-content;
  max-width: min(900px, 70vw);
}

.layout-box-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layout-box-row {
  display: grid;
  grid-template-columns: 110px max-content;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
}

.layout-box-row__label {
  font-weight: 600;
  color: #1f2937;
  text-align: left;
}

.layout-box-row__shelf {
  position: relative;
  padding: 8px 8px 12px;
  background: linear-gradient(180deg, #f6f7f9 0%, #eceff3 100%);
  border: 2px solid #a8b1bd;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -6px 0 rgba(120, 130, 145, 0.25);
}

.layout-box-row__shelf::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -6px;
  height: 6px;
  background: linear-gradient(180deg, #9aa3af 0%, #7c8796 100%);
  border: 2px solid #7c8796;
  border-top: none;
}

.layout-box-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  width: max-content;
}

.layout-box {
  position: relative;
  width: 40px;
  min-width: 40px;
  height: 38px;
  border: 1px solid #15803d;
  background: linear-gradient(145deg, #bbf7d0 0%, #4ade80 60%, #22c55e 100%);
  color: #14532d;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(15, 23, 42, 0.15);
}

.layout-box::after,
.layout-box::before {
  content: '';
  position: absolute;
  background: rgba(20, 83, 45, 0.35);
  opacity: 0;
}

.layout-box.is-empty::after {
  width: 70%;
  height: 1px;
  top: 50%;
  left: 15%;
  opacity: 1;
}

.layout-box.is-empty::before {
  height: 70%;
  width: 1px;
  left: 50%;
  top: 15%;
  opacity: 1;
}

.layout-box.is-unavailable {
  background: linear-gradient(145deg, #fecaca 0%, #f87171 60%, #ef4444 100%);
  border-color: #b91c1c;
  color: #7f1d1d;
}

.layout-box.is-selected {
  outline: 2px solid rgba(59, 130, 246, 0.7);
  outline-offset: 2px;
}

.layout-box-number {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 6px;
}

.layout-box-number label {
  font-size: 0.8rem;
  color: #64748b;
}

.layout-box-number-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

#layout-box-assign {
  width: 100%;
  justify-content: center;
}

#layout-box-apply.is-saved {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
}

#layout-box-apply.is-unsaved {
  background: #ef4444;
  color: #fff;
  border-color: #b91c1c;
}

.layout-box-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(148, 163, 184, 0.1);
  cursor: pointer;
  font-weight: 600;
}

.layout-box-toggle.is-inactive {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #7f1d1d;
}

.layout-box-toggle .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #10b981;
}

.layout-box-toggle.is-inactive .dot {
  background: #ef4444;
}

.layout-box-error {
  color: #b91c1c;
  font-size: 0.75rem;
}

.layout-box-label {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#layout-box-label {
  width: 100%;
  justify-content: center;
}

#layout-box-label[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


.layout-item.is-selected {
  outline: 2px solid rgba(15, 118, 110, 0.65);
  outline-offset: 2px;
}

.layout-inspector {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.layout-inspector__section + .layout-inspector__section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.layout-inspector__title {
  font-weight: 600;
  margin-bottom: 10px;
}

.layout-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.layout-field-row {
  display: flex;
  gap: 12px;
}

.layout-field-row .field {
  flex: 1 1 0;
}

.layout-fields .field label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
  margin-bottom: 6px;
}

.layout-empty {
  color: #6b7280;
  font-size: 0.85rem;
  padding: 10px 0;
}

.layout-button-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.layout-button-row .menu-button,
.layout-button-row .secondary-button {
  flex: 1 1 0;
}

#layout-floor-usable {
  margin-top: 2px;
}

#layout-box-config {
  margin: 8px 0 6px;
}

.layout-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

#layout-box-config {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.layout-save-status {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #0f766e;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.layout-save-status[data-state="saving"] {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.25);
}

.layout-save-status[data-state="error"] {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.25);
}

.document-save-pill {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

@media (max-width: 1100px) {
  .warehouse-layout-grid {
    grid-template-columns: 1fr;
  }
}

.email-row--read {
  background: rgba(34, 139, 34, 0.08);
}

.email-row--unread {
  background: rgba(220, 20, 60, 0.08);
}

.email-row--read td,
.email-row--unread td {
  transition: background 0.2s ease;
}

.attachment-pill {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e3e4ea;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
}

.attachment-pill svg {
  width: 16px;
  height: 16px;
}

.attachment-pill:hover {
  background: var(--bg-strong);
}

.email-attachments {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-attachments.is-hidden {
  display: none;
}

.email-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e3ea;
  background: #fff;
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
}

.email-attachment-link svg {
  width: 14px;
  height: 14px;
}

.data-table tbody tr.email-row--read:hover {
  background: rgba(34, 139, 34, 0.14);
}

.data-table tbody tr.email-row--unread:hover {
  background: rgba(220, 20, 60, 0.14);
}

.order-unread td {
  background: rgba(220, 20, 60, 0.08);
}

.order-read td {
  background: rgba(34, 139, 34, 0.08);
}

.order-unread:hover td {
  background: rgba(220, 20, 60, 0.16);
}

.order-return-highlight td {
  box-shadow: inset 0 0 0 2px rgba(255, 193, 7, 0.65);
  background: rgba(255, 193, 7, 0.12);
}

.order-read:hover td {
  background: rgba(34, 139, 34, 0.16);
}

.danger-active {
  box-shadow: 0 0 0 3px rgba(228, 80, 80, 0.2);
}

.slider-wrap {
  margin: 12px 0 6px;
}

.slider-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.gjs-sm-sector[data-sector-id="product-link"] .gjs-sm-properties {
  padding: 8px 10px 12px;
}

.gjs-sm-sector[data-sector-id="product-link"] #product-link-readonly {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e2e3e7;
  background: var(--surface-muted);
  font-size: 12px;
  color: var(--text);
}

.shopify-block-icon {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 292'%3E%3Cpath fill='%2395BF47' d='M229.6 50.2c-.2-1.6-1.8-2-2.9-2.1-1.1-.1-24.6-1.6-24.6-1.6s-16.2-15.8-17.8-17.5c-1.6-1.7-4.9-1.2-6.1-.8-.2 0-4.1 1.3-10.3 3.2-1.1-3.1-2.6-6.9-4.7-10.8C155.2 5.9 143.4.3 128.2 0c-.1 0-.2 0-.3 0-1 0-2 0-3 .1-2.9-3.7-6.6-5.6-11-5.6-33.6 0-49.7 41.8-54.8 63-17.9 5.5-30.6 9.5-32.2 10-9.6 3-9.9 3.3-11.1 12.4-.9 6.9-26.1 201.1-26.1 201.1l211.4 36.6 57.5-12.5s-27.9-253.7-28.1-255z'/%3E%3Cpath fill='%235E8E3E' d='M183.7 46.5s-16.2-15.8-17.8-17.5c-1.6-1.7-4.9-1.2-6.1-.8-.2 0-4.1 1.3-10.3 3.2-1.1-3.1-2.6-6.9-4.7-10.8C137.3 9.8 125.5 4.2 110.3 4c-1 0-2 0-3 .1l21.5 287.4 57.5-12.5s-27.9-253.7-28.1-255z'/%3E%3Cpath fill='%23FFF' d='M109.3 88.6c-1 6.1-6.2 37.6-7.1 43.2-1.1-.6-2.7-1.2-5.2-1.2-7.6 0-13.8 4.7-17 8.8-6.9 8.8-9.7 21.9-7.9 33.7 2.2 14.4 12.6 21.4 27.3 21.4 11.1 0 22-3.6 29.2-7.3l-1.1-24.4c-7.9 4-16.9 6.7-22.7 6.7-6.1 0-9.5-2.2-10.1-6.1-.8-5.1 2.5-11.9 8.4-11.9 3.3 0 5.5 1.2 6.9 2.3l8.2-65c-2.1-.9-4.8-1.9-8-1.9-14.8 0-30.9 9.1-35.5 29.2-2.9 12.8-.7 25.4 2 32.4 5.3 13.8 18.8 20.1 33.8 20.1 10.6 0 20-2.4 26.7-5.6l-1.6-30.4c-5.6 2.8-13.7 5.2-21.1 5.2-8.6 0-14.2-3.4-15.1-9.7-1.4-9.8 6.7-20.9 16.2-20.9 3 0 5.1.6 6.7 1.4 1-6 5.9-34.5 6.9-40.5 1.8-.4 3.7-.8 5.7-1.1l1.1-25.5c-4.4.7-9.3 1.8-14.3 3.4z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.shopify-block-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.data-table tr.is-clickable {
  cursor: pointer;
}

.data-table tr.is-clickable:hover {
  background: #f7f7f9;
}

.row-expand {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e2e3e7;
  background: #f6f6f8;
  color: var(--text);
  font-weight: 600;
}

.orders-expand-cell {
  width: 42px;
}

.order-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.order-expand.is-open {
  background: #fff;
  border-color: #cfd4dd;
  box-shadow: inset 0 0 0 1px #e3e7ee;
}

.orders-items-row td {
  padding-top: 4px;
}

.orders-items-panel {
  display: grid;
  gap: 10px;
}

.orders-items-table th,
.orders-items-table td {
  font-size: 12px;
}

.stock-product-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.stock-product-name {
  font-weight: 600;
}

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

.input-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.input-compact {
  width: 80px;
}

.menu-input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dfe0e6;
  font-size: 13px;
  background: #fff;
}

.small-button {
  height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}

.stock-variants-row > td {
  background: #fafafb;
  padding: 16px;
}

.stock-variants-row.is-hidden {
  display: none;
}

.stock-variant-table {
  margin: 0;
}

.stock-variant-table th,
.stock-variant-table td {
  text-align: center;
  vertical-align: middle;
}

.stock-variant-table .menu-input {
  width: 100%;
  min-width: 120px;
  text-align: center;
}

.stock-variant-table .input-compact {
  width: 90px;
}

.stock-variant-table .is-low-stock td {
  background: #fff5f5;
}

.docket-variants-card {
  width: auto;
  max-width: 92vw;
}

.docket-variants-table-wrap {
  overflow-x: visible;
  display: inline-block;
}

.docket-variants-table {
  width: auto;
  table-layout: auto;
}

.docket-variants-table th,
.docket-variants-table td {
  text-align: center;
}

.docket-variants-table .menu-input {
  width: 72px;
  min-width: 0;
  text-align: center;
}

.docket-variant-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 12px;
  color: var(--text);
  outline: none;
  box-shadow: none;
  appearance: textfield;
  height: 16px;
  line-height: 16px;
  box-sizing: border-box;
  min-height: 0;
  display: block;
}

.docket-sample-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 12px;
  color: var(--text);
  outline: none;
  box-shadow: none;
  appearance: textfield;
  height: 16px;
  line-height: 16px;
  box-sizing: border-box;
  min-height: 0;
  display: block;
}

.docket-sample-input::-webkit-outer-spin-button,
.docket-sample-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.docket-sample-input.is-below-material {
  background: rgba(168, 68, 68, 0.16);
  border-radius: 8px;
}

.docket-variant-input::-webkit-outer-spin-button,
.docket-variant-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.docket-variant-table {
  width: 100%;
  table-layout: fixed;
  margin: 0;
  border: 1px solid #ededf0;
  background: #eef0f5;
  border-radius: 10px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.docket-variant-table th,
.docket-variant-table td {
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid #ededf0;
  height: 16px;
  line-height: 16px;
  padding: 0;
  border-bottom: 1px solid #ededf0;
}

.docket-variant-table thead th {
  background: #eef0f5;
}

.docket-variant-table thead th:first-child {
  border-top-left-radius: 10px;
}

.docket-variant-table thead th:last-child {
  border-top-right-radius: 10px;
}

.docket-variant-table tbody td {
  background: #fff;
}

.docket-variant-table tbody {
  background: #fff;
}

.docket-variant-table tbody tr {
  background: #fff !important;
}

.docket-variant-table tbody tr td {
  background: #fff !important;
}

.docket-variant-table tbody tr:hover,
.docket-variant-table tbody tr:hover td {
  background: #fff !important;
}

.docket-variant-table tbody tr td {
  border-bottom: 1px solid #ededf0;
}

.docket-variant-table tbody tr + tr td {
  border-top: 1px solid #ededf0;
}

.docket-print-row {
  display: grid;
  grid-template-columns: 1fr 36px;
  align-items: center;
  column-gap: 8px;
}

.docket-print-row .secondary-button {
  width: 100%;
  height: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
  line-height: 1.25;
}

.docket-print-thumb {
  width: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.docket-print-cell .table-image {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.docket-variant-table th:first-child,
.docket-variant-table td:first-child {
  text-align: left;
  width: 240px;
}

.docket-variant-table th:not(:first-child),
.docket-variant-table td:not(:first-child) {
  width: calc((100% - 240px) / 12);
}

.docket-print-delete-cell {
  text-align: center;
}

.docket-print-delete {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #e3e4ea;
  background: #fff;
  color: #8c1d1d;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
}

.docket-variant-table td {
  padding-top: 0;
  padding-bottom: 0;
}

.docket-variants-row > td {
  padding: 0;
  background: #f6f7fa;
}

.dockets-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.dockets-table-wrap {
  position: relative;
  overflow: visible;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.dockets-table-clip {
  position: relative;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #ededf0;
  overflow: visible;
}

.dockets-table-wrap .row-actions,
.dockets-table-wrap .row-actions-menu {
  z-index: 1000;
}

.dockets-table td {
  overflow: visible;
}

.dockets-table tr {
  position: relative;
  z-index: 1;
}

.dockets-table tr.row-actions-open {
  z-index: 100001;
}

.dockets-table .row-actions,
.dockets-table .row-actions-menu {
  z-index: 100000;
}

.dockets-table thead th {
  border-bottom: 1px solid #ededf0;
}

.dockets-table th,
.dockets-table td {
  padding: 10px 12px;
}

.dockets-period-col,
.dockets-period-cell {
  width: 110px;
  white-space: nowrap;
  text-align: left;
}

.dockets-period-cell {
  vertical-align: middle;
}

.dockets-ref-col,
.dockets-ref-cell {
  width: 18%;
}

.dockets-table th.dockets-ref-col {
  text-align: left;
}

.dockets-table th.table-action-cell,
.dockets-table td.table-action-cell {
  text-align: right;
}

.dockets-dress-col,
.dockets-dress-cell {
  width: 26%;
}

.dockets-dress-cell {
  overflow: hidden;
}

.dockets-table td.dockets-period-cell {
  padding-right: 6px;
}

.dockets-table td.dockets-dress-cell {
  padding-left: 8px;
}

.dockets-period-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dockets-table th:nth-child(4),
.dockets-table td:nth-child(4),
.dockets-table th:nth-child(5),
.dockets-table td:nth-child(5),
.dockets-table th:nth-child(6),
.dockets-table td:nth-child(6) {
  width: 90px;
}

.dockets-table .table-action-cell {
  width: 110px;
}

.dockets-table tbody tr.stock-row {
  background: #fff;
}

.dockets-table tbody tr.stock-row td {
  background: #fff;
}

.dockets-table thead th:first-child {
  border-top-left-radius: 16px;
}

.dockets-table thead th:last-child {
  border-top-right-radius: 16px;
}

.dockets-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.dockets-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

.dockets-table tbody tr.docket-variants-row:last-child > td,
.dockets-table tbody tr.docket-variants-row.is-last-visible > td {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.dockets-table tbody tr.stock-row.is-last-visible td:first-child {
  border-bottom-left-radius: 16px;
}

.dockets-table tbody tr.stock-row.is-last-visible td:last-child {
  border-bottom-right-radius: 16px;
}

.dockets-table tbody tr:last-child td,
.dockets-table tbody tr.docket-variants-row > td {
  border-bottom: none !important;
}

.dockets-table tbody tr.docket-variants-row:hover,
.dockets-table tbody tr.docket-variants-row:hover > td {
  background: #f6f7fa !important;
}

.dockets-table tbody tr.stock-row:last-child td {
  border-bottom: none !important;
}

.dockets-table tbody tr.stock-row.has-variants td {
  border-bottom: none;
}

@media (max-width: 900px), (pointer: coarse) {
  .products-dockets-page .panel-head {
    flex-wrap: wrap;
  }

  .products-dockets-page .panel-head .panel-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .products-dockets-page .panel-head .table-search,
  .products-dockets-page #dockets-search {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .products-dockets-page .dockets-table-wrap,
  .products-dockets-page .dockets-table-clip {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .products-dockets-page #dockets-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
  }

  .products-dockets-page #dockets-table th,
  .products-dockets-page #dockets-table td {
    min-width: 0;
  }

  .products-dockets-page #dockets-table .dockets-ref-col,
  .products-dockets-page #dockets-table .dockets-ref-cell {
    width: auto;
  }

  .products-dockets-page #dockets-table .table-action-cell {
    width: 92px;
    min-width: 92px;
    white-space: nowrap;
    text-align: right;
  }

  .products-dockets-page #dockets-table .table-action-cell .menu-button {
    min-width: 0;
    width: auto;
    padding-left: 8px;
    padding-right: 8px;
  }

  .products-dockets-page #dockets-table .dockets-ref-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .products-dockets-page #docket-stock-arrival-warehouse-boxes-section {
    display: none;
  }
}

.docket-variant-table th:last-child,
.docket-variant-table td:last-child {
  border-right: none;
}

.docket-variant-table tbody tr:last-child td {
  border-bottom: 1px solid #ededf0;
}

.docket-variant-table tbody tr:hover td {
  background: #fff !important;
}

.docket-variant-table tbody tr:hover {
  background: #fff !important;
}

.docket-variant-table tbody td {
  border-radius: 0 !important;
}

.docket-print-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pill-button {
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #dfe0e6;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.pill-button--green {
  background: #e8f7e6;
  border-color: #bfe6c1;
  color: #1c7c2b;
}

.docket-dress-cell {
  text-align: center;
}

.docket-dress-wide .table-select {
  width: 100%;
  min-width: 220px;
}

.docket-dress-cell .table-select {
  border: none;
  background: transparent;
  text-align: center;
  box-shadow: none;
  min-width: 0;
}

.docket-product-names-table th:first-child,
.docket-product-names-table td:first-child {
  width: 360px;
  white-space: nowrap;
}

.modal-card--product-names {
  width: min(980px, 94vw);
}

.modal-card--link-existing-products {
  width: min(1100px, 96vw);
}

.docket-link-existing-table {
  table-layout: fixed;
  width: 100%;
}

.docket-link-existing-table th,
.docket-link-existing-table td {
  vertical-align: top;
}

.docket-link-existing-table th:nth-child(1),
.docket-link-existing-table td:nth-child(1) {
  width: 22%;
}

.docket-link-existing-table th:nth-child(2),
.docket-link-existing-table td:nth-child(2) {
  width: 28%;
  text-align: center;
}

.docket-link-existing-table th:nth-child(3),
.docket-link-existing-table td:nth-child(3) {
  width: 18%;
  text-align: center;
}

.docket-link-existing-table th:nth-child(4),
.docket-link-existing-table td:nth-child(4) {
  width: 32%;
  text-align: center;
}

.docket-link-existing-product {
  width: 100%;
  min-width: 0;
  text-align: center;
  text-align-last: center;
}

.docket-link-existing-picker {
  display: grid;
  gap: 6px;
}

.docket-link-existing-search {
  width: 100%;
}

.docket-link-existing-mode {
  width: 100%;
  min-width: 0;
  text-align: center;
  text-align-last: center;
}

.docket-link-qty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: 420px;
  margin: 0 auto;
}

.docket-link-qty-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.docket-link-qty-item label {
  min-width: 34px;
  color: var(--muted);
}

.docket-link-qty-item input {
  width: 100%;
  min-width: 0;
  text-align: center;
}

@media (max-width: 900px) {
  .docket-link-qty-grid {
    grid-template-columns: repeat(2, minmax(72px, 1fr));
  }
}

#docket-photography-modal .modal-card {
  width: 90vw;
  max-width: 90vw;
}

#docket-sku-config-modal .modal-card {
  width: 90vw;
  max-width: 90vw;
}

#docket-description-tags-modal .modal-card {
  width: 60vw;
  max-width: 60vw;
}

#docket-retail-prices-modal .modal-card {
  width: 90vw;
  max-width: 90vw;
}

#docket-material-modal .modal-card,
#docket-material-editor-modal .modal-card {
  width: 90vw;
  max-width: 90vw;
}

.docket-product-names-table td:last-child {
  width: auto;
  text-align: center;
}

.docket-product-name-input {
  width: 100%;
  min-width: 260px;
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  text-align: center;
  outline: none;
  padding: 0;
}

.docket-product-name-input:focus {
  outline: none;
  box-shadow: none;
}

.docket-validation-list {
  margin: 0;
  padding-left: 18px;
}

.docket-validation-list li + li {
  margin-top: 6px;
}

.dockets-ref-input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  text-align: center;
  outline: none;
}

.dockets-ref-input:focus {
  outline: none;
  box-shadow: none;
}

.cost-breakdown-section {
  margin-top: 16px;
}

.cost-breakdown-section:first-child {
  margin-top: 0;
}

.cost-breakdown-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cost-breakdown-style {
  margin: 0 0 10px;
}

.cost-breakdown-divider {
  margin: 34px 0;
  border-top: none;
}

.cost-breakdown-tiles {
  margin-bottom: 26px;
}

.docket-print-image-row .docket-print-preview {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  display: none;
  border: none;
}

.docket-image-modal-card {
  width: fit-content;
  max-width: min(1100px, 92vw);
  padding: 18px;
}

.docket-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.docket-image-preview img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 16px;
  border: 1px solid #ededf0;
  box-shadow: var(--shadow);
}

.docket-cost-cell {
  cursor: pointer;
}

.modal-math {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.cost-breakdown-table {
  margin-top: 10px;
  font-size: 12px;
}

.cost-modal-card {
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow: auto;
}

.modal-spacer {
  height: 8px;
}

.cost-breakdown-table--rounded {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ededf0;
}

.cost-breakdown-table--rounded thead th:first-child {
  border-top-left-radius: 14px;
}

.cost-breakdown-table--rounded thead th:last-child {
  border-top-right-radius: 14px;
}

.cost-breakdown-table--rounded tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}

.cost-breakdown-table--rounded tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

.cost-breakdown-table--rounded thead th {
  border-bottom: none;
  background: var(--surface-muted);
}

.cost-breakdown-wrap {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.cost-breakdown-table th,
.cost-breakdown-table td {
  text-align: center;
  white-space: nowrap;
}

.cost-breakdown-table th:first-child,
.cost-breakdown-table td:first-child {
  text-align: left;
}

.cost-breakdown-total td {
  background: #f9ecec;
  font-weight: 600;
}

.campaign-tracking-tiles {
  margin-top: 0;
}
.modal.is-scrollable {
  overflow: auto;
}

body.modal-open {
  overflow: hidden;
}

.chat-panel {
  padding: 0;
  margin-top: 0;
  height: auto;
  flex: 1;
  min-height: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.chat-layout,
.chat-sidebar,
.chat-main {
  min-height: 0;
}

.chat-page {
  overflow: hidden;
}

.chat-page .container,
.chat-page .wide-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 10px 10px;
  height: calc(100vh - var(--top-nav-height));
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-sidebar,
.chat-main {
  background: var(--surface);
  border: 1px solid #e6e6eb;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-sidebar-head .primary-button,
.chat-sidebar-head .secondary-button {
  margin-top: 6px;
}

.chat-channel-list {
  display: grid;
  grid-template-rows: minmax(0, 2fr) minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding-right: 4px;
}

.chat-channel-section {
  min-height: 0;
  border: 1px solid #ececf2;
  border-radius: 12px;
  background: #fafafe;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-channel-section-head {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #3f4761;
  border-bottom: 1px solid #ececf2;
  background: #f3f5fb;
}

.chat-channel-section-body {
  min-height: 0;
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.chat-channel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.chat-channel-row.is-active .chat-channel-delete {
  color: #9b3b3b;
}

.chat-channel-delete {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #b14a4a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.chat-channel-delete:hover {
  border-color: #e6bcbc;
  background: #fff5f5;
}

.chat-channel-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f7f7fb;
  text-align: left;
  transition: all 0.2s ease;
}

.chat-channel-item:hover {
  border-color: #d6d6df;
  background: #ffffff;
}

.chat-channel-item.is-active {
  border-color: #2f6fed;
  background: #eef3ff;
}

.chat-channel-item.is-unread {
  border-color: #d86a6a;
  background: #fff1f1;
}

.chat-channel-row.is-unread .chat-channel-name {
  color: #b33636;
}

.chat-channel-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.chat-channel-preview {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-main-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-main-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.chat-search-wrap {
  position: relative;
  width: min(360px, 42vw);
}

.chat-search-wrap input {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #e1e1ea;
  border-radius: 10px;
  background: #ffffff;
  font-size: 13px;
}

.chat-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 100%;
  max-height: 360px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  z-index: 25;
  display: none;
}

.chat-search-results.is-open {
  display: block;
}

.chat-search-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f0f2f7;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.chat-search-result:last-child {
  border-bottom: 0;
}

.chat-search-result:hover {
  background: #f8f9fd;
}

.chat-search-channel {
  font-size: 12px;
  font-weight: 600;
  color: #2f6fed;
}

.chat-search-meta {
  margin-top: 3px;
  font-size: 11px;
  color: #7c8294;
}

.chat-search-snippet {
  margin-top: 3px;
  font-size: 12px;
  color: #22263a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-channel-title {
  font-size: 18px;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 6px;
}

.chat-message {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f7fb;
  border: 1px solid #ececf2;
}

.chat-message-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.chat-message-author {
  font-weight: 600;
  color: var(--text);
}

.chat-message-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.chat-message-attachments {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.chat-attachment-link {
  font-size: 12px;
  color: #2f6fed;
  text-decoration: none;
}

.chat-composer {
  display: grid;
  gap: 10px;
  border-top: 1px solid #ececf2;
  padding-top: 12px;
}

.chat-composer textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e1e1ea;
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
}

.chat-composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.chat-composer-actions input[type='file'] {
  display: none;
}

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

.chat-attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e1e1ea;
  background: #ffffff;
  font-size: 12px;
}

.chat-attachment-pill button {
  border: 0;
  background: transparent;
  color: #d14f4f;
  font-size: 11px;
  cursor: pointer;
}

.chat-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
}

.chat-user-list,
.chat-members-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #ececf2;
  border-radius: 12px;
  padding: 14px 12px;
  background: #fafafe;
}

.chat-user-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  column-gap: 10px;
  gap: 8px;
  font-size: 13px;
}

.chat-user-item input[type='checkbox'] {
  margin: 0;
  align-self: center;
}

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

.chat-member-name {
  font-weight: 600;
  font-size: 13px;
}

.chat-modal-card {
  gap: 4px;
}

.chat-modal-card .form-label {
  display: block;
  margin-bottom: 0;
  line-height: 1.1;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-modal-card input,
.chat-modal-card textarea {
  font-family: inherit;
  margin-bottom: 2px;
  margin-top: 0;
}

.chat-modal-card input {
  margin-bottom: 10px;
}

.chat-modal-card textarea {
  margin-bottom: 12px;
}

.chat-modal-card .modal-actions {
  margin-top: 12px;
}

.data-table .table-image {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e3e7;
  background: #f4f5f7;
  cursor: pointer;
}

.fabric-print-image-wrap {
  display: grid;
  place-items: center;
  max-height: 70vh;
  overflow: auto;
}

.fabric-print-image-wrap img {
  max-width: min(90vw, 1000px);
  max-height: 70vh;
  border-radius: 16px;
  border: 1px solid #e2e3e7;
  box-shadow: var(--shadow);
}

/* Dockets table: keep hover from tinting expanded blocks */
.dockets-table.data-table tbody tr.stock-row:hover,
.dockets-table.data-table tbody tr.stock-row:hover td {
  background: #fff !important;
}

.dockets-table.data-table tbody tr.docket-variants-row,
.dockets-table.data-table tbody tr.docket-variants-row > td {
  background: #f6f7fa !important;
}

.dockets-table.data-table tbody tr.docket-variants-row:hover,
.dockets-table.data-table tbody tr.docket-variants-row:hover > td {
  background: #f6f7fa !important;
}

/* Prints table rows should stay white */
.docket-variant-table tbody tr,
.docket-variant-table tbody tr td {
  background: #fff !important;
}

.docket-variants-row .docket-variant-table tbody tr,
.docket-variants-row .docket-variant-table tbody tr td {
  background: #fff !important;
}

.dockets-table .docket-variant-table tbody,
.dockets-table .docket-variant-table tbody tr,
.dockets-table .docket-variant-table tbody td {
  background: #fff !important;
}

@media (max-width: 900px), (pointer: coarse) {
  .chat-page .container,
  .chat-page .wide-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
    height: calc(100dvh - var(--top-nav-height));
  }

  .chat-page .chat-panel {
    height: calc(100dvh - 110px);
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
  }

  .chat-page .chat-layout {
    display: block;
    height: 100%;
    min-height: 0;
  }

  .chat-page .chat-sidebar,
  .chat-page .chat-main {
    height: 100%;
    min-height: 0;
    border-radius: 14px;
    padding: 10px;
    gap: 10px;
  }

  .chat-page .chat-main {
    display: none;
  }

  .chat-page.chat-mobile-thread-open .chat-sidebar {
    display: none;
  }

  .chat-page.chat-mobile-thread-open .chat-main {
    display: flex;
  }

  .chat-page .chat-sidebar-head h2 {
    margin: 0;
    font-size: 16px;
  }

  .chat-page .chat-sidebar-head .subtle {
    font-size: 11px;
  }

  .chat-page .chat-sidebar-head .secondary-button {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 0;
  }

  .chat-page .chat-channel-list {
    grid-template-rows: 1fr;
    overflow: auto;
    padding-right: 0;
  }

  .chat-page .chat-channel-section {
    overflow: visible;
  }

  .chat-page .chat-channel-section-head {
    font-size: 11px;
    padding: 6px 8px;
  }

  .chat-page .chat-channel-section-body {
    max-height: none;
    overflow: visible;
    padding: 6px;
    gap: 6px;
  }

  .chat-page .chat-channel-item {
    padding: 10px;
    border-radius: 10px;
  }

  .chat-page .chat-main-head {
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ececf2;
  }

  .chat-page .chat-main-actions {
    margin-left: auto;
    gap: 6px;
  }

  .chat-page .chat-main-actions .chat-search-wrap {
    width: 148px;
  }

  .chat-page .chat-main-actions #chat-manage-members {
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 12px;
  }

  .chat-page .chat-mobile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    min-height: 26px;
    border-radius: 999px;
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .chat-page .chat-channel-title {
    font-size: 15px;
    line-height: 1.2;
  }

  .chat-page .chat-channel-meta {
    font-size: 11px;
  }

  .chat-page .chat-messages {
    gap: 8px;
    padding-right: 0;
    padding-bottom: 6px;
  }

  .chat-page .chat-message {
    max-width: 88%;
    width: fit-content;
    padding: 10px 11px;
    border-radius: 12px;
    background: #ffffff;
    border-color: #e5e7ef;
  }

  .chat-page .chat-message.is-own {
    margin-left: auto;
    background: #e9f2ff;
    border-color: #cfe0ff;
  }

  .chat-page .chat-message-head {
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
  }

  .chat-page .chat-message-body {
    font-size: 13px;
    line-height: 1.42;
  }

  .chat-page .chat-composer {
    position: sticky;
    bottom: 0;
    padding-top: 8px;
    margin-top: auto;
    background: var(--surface);
    border-top: 1px solid #e7e9f0;
    gap: 8px;
  }

  .chat-page .chat-composer textarea {
    min-height: 74px;
    max-height: 160px;
    resize: none;
    border-radius: 12px;
  }

  .chat-page .chat-composer-actions {
    justify-content: space-between;
  }

  .chat-page .chat-composer-actions .menu-button,
  .chat-page .chat-composer-actions .secondary-button {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
  }
}

.chat-mobile-back {
  display: none;
}

@media (max-width: 900px), (pointer: coarse) {
  body.crm-order-page {
    padding-top: 0 !important;
  }

  .header {
    flex-direction: row !important;
    justify-content: flex-start !important;
  }

  .header .header-actions {
    order: 1 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .header .header-user-pills-section {
    order: 2 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    height: 34px !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    transform: translate(40px, 3px) !important;
  }

  .header .header-user-chat-pill {
    width: 26px !important;
    height: 26px !important;
    font-size: 13px !important;
    line-height: 26px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 1px !important;
  }

  .header .header-clock-pill {
    order: 3 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: center !important;
    transform: translate(34px, 3px) !important;
  }

  .header-logo-link {
    order: 4 !important;
    margin-left: 0 !important;
    margin-right: -8px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .header-logo-link::before {
    transform: translateX(6px) !important;
  }

  /* Final mobile override for main hamburger section titles */
  .header .dropdown-menu .dropdown-section-title {
    height: 34px !important;
    min-height: 34px !important;
    line-height: 1.2 !important;
    padding: 10px 8px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    font-size: 12px !important;
  }

  .header .dropdown-menu .dropdown-item {
    font-family: var(--font-body) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  }

  .header .dropdown-menu #logout-button,
  .header .dropdown-menu .dropdown-item.dropdown-logout {
    font-family: var(--font-body) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    min-height: 34px !important;
    height: auto !important;
    padding: 13px 8px !important;
    letter-spacing: 0.04em !important;
  }

  .header .dropdown-menu .dropdown-submenu .dropdown-item,
  .header .dropdown-menu .dropdown-submenu--nested .dropdown-item,
  .header .dropdown-menu .dropdown-submenu .dropdown-subitem-title,
  .header .dropdown-menu .dropdown-submenu--nested .dropdown-subitem-title {
    font-family: var(--font-body) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    min-height: 34px !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  }

  .header .dropdown-menu .dropdown-submenu .dropdown-subitem-title::after,
  .header .dropdown-menu .dropdown-submenu--nested .dropdown-subitem-title::after {
    margin-left: auto !important;
    padding-left: 10px !important;
    text-align: right !important;
  }

  .header .dropdown-section.system-menu-section > #header-user-pills-section,
  .header .dropdown-section.system-menu-section > .header-clock-pill {
    display: none !important;
  }

  .header .dropdown-menu .dropdown-section.system-menu-section > .dropdown-section-title {
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 8px !important;
    transform: none !important;
    text-indent: 0 !important;
    left: 0 !important;
  }

  .global-e-details-modal .modal-body-scroll > .panel {
    display: none !important;
  }

  .global-e-details-modal #global-e-summary-tiles {
    display: grid !important;
    margin-bottom: 0 !important;
  }

  .global-e-details-modal #global-e-summary-tiles .tile {
    background: transparent !important;
    box-shadow: none !important;
  }

  .global-e-details-modal .modal-head {
    padding: 8px 10px !important;
    min-height: 0 !important;
    margin-bottom: 6px !important;
  }

  .global-e-details-modal .modal-head .brand {
    font-size: 16px !important;
    line-height: 1.1 !important;
  }

  .global-e-details-modal .modal-head .secondary-button {
    height: 30px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
  }

  .crm-order-page .header {
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: var(--top-nav-height) !important;
    min-height: var(--top-nav-height) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .crm-order-page .header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--surface);
    border-bottom: 1px solid #e5e6ea;
    z-index: -1;
    pointer-events: none;
  }

  .crm-order-page .header-actions {
    width: auto !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    margin-right: auto !important;
  }

  .crm-order-page #crm-menu {
    display: block !important;
  }

  .crm-order-page #crm-menu-button {
    display: none !important;
  }

  .crm-order-page #crm-menu-dropdown {
    display: none !important;
  }

  .crm-order-page .header-mobile-back {
    display: inline-flex !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
  }

  .crm-order-page .header-mobile-back::before {
    content: '←';
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
    color: #1f2937;
  }

  .crm-order-page .header-logo-link::before {
    transform: translateX(16px) !important;
  }

  .crm-order-page #order-mobile-summary {
    display: grid !important;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .crm-order-page #order-mobile-summary:empty {
    display: none !important;
    margin: 0 !important;
  }

  .crm-order-page #order-mobile-summary .order-mobile-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 8px;
  }

  .crm-order-page #order-mobile-summary .order-mobile-meta-col {
    min-width: 0;
    display: grid;
    gap: 0;
  }

  .crm-order-page #order-mobile-summary .order-mobile-meta-col .brand {
    font-size: 22px;
    line-height: 1.1;
  }

  .crm-order-page #order-mobile-summary .order-mobile-meta-col #order-meta {
    margin-top: 0;
    max-width: 170px;
    white-space: normal;
    line-height: 1.2;
  }

  .crm-order-page #order-mobile-summary .order-mobile-pill-col {
    display: grid;
    justify-items: end;
    gap: 4px;
  }

  .crm-order-page #order-mobile-summary #marketing-pill {
    padding: 3px 8px;
    font-size: 10px;
    line-height: 1;
    border-radius: 999px;
    white-space: nowrap;
  }

  .crm-order-page #order-mobile-summary #order-shipped-pill {
    padding: 3px 8px;
    font-size: 10px;
    line-height: 1;
    border-radius: 999px;
    min-height: 0;
    white-space: nowrap;
  }

  .crm-order-page .order-mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .crm-order-page .order-shipping-row {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .crm-order-page .order-shipping-row > div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #ececef;
  }

  .crm-order-page .order-shipping-row > div:last-child {
    border-bottom: 0;
  }

  .crm-order-page .order-shipping-row .subtle,
  .crm-order-page .order-shipping-row .detail-line {
    font-size: 13px;
    margin-top: 0;
    line-height: 1.2;
  }

  .crm-order-page .order-shipping-row .detail-line {
    text-align: right;
  }

  .crm-order-page .order-shipping-row .meta {
    grid-column: 1 / -1;
    margin-top: 2px;
    font-size: 12px;
  }

  .crm-order-page #order-email-table .order-email-mobile-main {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .crm-order-page #order-email-table .order-email-mobile-received {
    font-size: 12px;
    color: var(--muted);
  }

  .crm-order-page #order-email-table .order-email-mobile-subject {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
  }

  .crm-order-page #order-email-table .order-email-mobile-actions {
    white-space: normal;
    text-align: right;
    vertical-align: middle;
    min-width: 0;
  }

  .crm-order-page #order-email-table .order-email-mobile-actions .menu-button {
    padding: 8px 10px;
    font-size: 12px;
  }

  .crm-order-page #order-email-table {
    width: 100%;
    max-width: 100%;
  }

  .crm-order-page #order-email-table tr td {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .crm-order-page #order-email-table tr td:first-child {
    width: 65%;
    overflow: hidden;
  }

  .crm-order-page #order-email-table tr td:last-child {
    width: 35%;
  }

  .crm-order-page #order-email-table {
    table-layout: fixed;
  }

  .crm-order-page #order-email-list-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }

  .crm-order-page #order-email-list-table .order-email-mobile-subject {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .crm-order-page #order-email-list-table .order-email-mobile-actions .menu-button {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }

  .crm-order-page #order-email-list-table,
  .crm-order-page #order-email-list-table tbody,
  .crm-order-page #order-email-list-table tr {
    max-width: 100%;
  }

  .crm-order-page #order-email-list-table {
    display: block;
    width: 100% !important;
  }

  .crm-order-page #order-email-list-table tbody {
    display: block;
    width: 100%;
  }

  .crm-order-page #order-email-list-table tbody tr {
    display: flex !important;
    align-items: stretch;
    width: 100%;
  }

  .crm-order-page #order-email-list-table tbody tr td {
    min-width: 0;
    overflow: hidden;
  }

  .crm-order-page #order-email-list-table tbody tr td:first-child {
    flex: 1 1 auto;
    width: auto !important;
    padding-right: 8px;
  }

  .crm-order-page #order-email-list-table tbody tr td:last-child {
    flex: 0 0 120px;
    width: 120px !important;
    padding-left: 4px;
  }

  .crm-order-page .panel .table-wrap {
    overflow-x: hidden !important;
  }

  .crm-order-page #order-email-table {
    border-top: 0;
  }

  .crm-order-page #order-email-list-table thead {
    display: none;
  }

  .crm-order-page #order-emails-panel .panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .crm-order-page #order-emails-panel .email-toggle-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    width: auto;
    margin-left: auto;
  }

  .crm-order-page #order-emails-panel .email-toggle-row .segment {
    width: auto;
    min-width: 0;
  }

  .crm-order-page #order-email-toggle {
    width: auto;
    max-width: 100%;
    display: inline-grid;
    grid-template-columns: repeat(3, auto);
    gap: 4px;
  }

  .crm-order-page #order-email-toggle .segment-button {
    min-width: 76px;
    height: 30px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
  }

  .crm-order-page #order-email-toggle .segment-button:nth-child(2),
  .crm-order-page #order-email-toggle .segment-button:nth-child(3) {
    min-width: 62px;
  }

  .crm-order-page #order-conversation-toggle {
    width: auto;
    min-width: 172px;
    height: 30px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
  }

  .crm-order-page .header-actions #back-to-crm,
  .crm-order-page #order-mobile-summary #back-to-crm {
    display: none !important;
  }

  .crm-order-page #email-view-modal {
    place-items: stretch;
    background: #fff;
    z-index: 52000;
  }

  .crm-order-page #email-discard-modal {
    z-index: 53000;
  }

  .crm-order-page #email-discard-modal .modal-card {
    width: min(420px, 92vw);
    max-width: 92vw;
    border-radius: 14px;
  }

  .crm-order-page #email-view-modal .email-view-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #fff;
  }

  .crm-order-page #email-view-modal .email-view-header {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #fff;
    padding: 10px 10px 8px;
    border-bottom: 1px solid #eceff3;
    gap: 8px;
  }

  .crm-order-page #email-view-modal .email-view-header .brand {
    font-size: 14px;
    line-height: 1.2;
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crm-order-page #email-view-modal .email-view-header .crm-email-meta {
    font-size: 11px;
    line-height: 1.25;
    margin-top: 2px;
    color: #6b7280;
  }

  .crm-order-page #email-view-modal .email-view-actions {
    position: sticky;
    top: 54px;
    z-index: 3;
    margin: 0;
    padding: 8px 10px;
    background: #fff;
    border-bottom: 1px solid #eceff3;
    gap: 6px;
  }

  .crm-order-page #email-view-modal .email-view-actions .menu-button,
  .crm-order-page #email-view-modal .email-view-actions .primary-button {
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
  }

  .crm-order-page #email-view-modal .email-view-body {
    flex: 1 1 auto;
    min-height: 0;
    border: none;
    border-radius: 0;
    padding: 10px;
    margin: 0;
    background: #fff;
    overflow: auto;
    font-size: 13px;
    line-height: 1.55;
  }

  .crm-order-page #email-view-modal .email-attachments {
    margin: 0;
    padding: 8px 10px;
    border-top: 1px solid #eceff3;
    border-bottom: 1px solid #eceff3;
    border-radius: 0;
    background: #fff;
  }

  .crm-order-page #email-view-modal .email-view-card.is-replying .email-reply {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
    border-top: none;
    padding-top: 0;
  }

  .crm-order-page #email-view-modal .email-reply-top {
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px 10px 0;
    gap: 4px;
    background: #fff;
  }

  .crm-order-page #email-view-modal .email-reply-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eceff3;
    background: #fff;
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.06);
  }

  .crm-order-page .order-reply-controls-toggle {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 20px;
    border-radius: 999px;
    z-index: 3;
  }

  .crm-order-page .order-reply-controls-toggle .drawer-toggle-arrow {
    transition: transform 0.2s ease;
  }

  .crm-order-page .order-reply-controls-toggle.is-open .drawer-toggle-arrow {
    transform: rotate(180deg);
  }

  .crm-order-page .email-view-card.is-replying.reply-controls-collapsed .email-reply-fields--subject,
  .crm-order-page .email-view-card.is-replying.reply-controls-collapsed .email-reply-fields--addresses,
  .crm-order-page .email-view-card.is-replying.reply-controls-collapsed .email-reply-toolbar {
    display: none;
  }

  .crm-order-page .email-view-card.is-replying.reply-controls-collapsed .email-view-header {
    display: none;
  }

  .crm-order-page .email-reply-buttons > #email-reply-toggle-quote,
  .crm-order-page .email-reply-buttons > #email-reply-cancel,
  .crm-order-page .email-reply-buttons > #email-reply-draft,
  .crm-order-page .email-reply-buttons > .email-reply-send-dropdown {
    display: none !important;
  }

  .crm-order-page .email-reply-mobile-actions {
    display: inline-flex !important;
    margin-left: auto;
    position: relative;
  }

  .crm-order-page .email-reply-mobile-actions .dropdown-menu {
    right: 0;
    left: auto;
    top: auto;
    bottom: 42px;
    min-width: 220px;
  }

  .crm-order-page .email-reply-mobile-actions .dropdown-menu.active {
    display: block;
  }
}
#permissions-modal .permissions-modal-card {
  width: min(980px, calc(100vw - 32px));
  max-height: min(85vh, 980px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
}

#permissions-modal .permissions-copy-grid {
  grid-template-columns: 1fr auto;
  gap: 10px;
}

#permissions-modal .permissions-copy-field {
  margin: 0;
}

#permissions-modal .permissions-copy-actions {
  align-self: end;
}

#permissions-modal .permissions-modal-body {
  flex: 1;
  overflow: auto;
  min-height: 260px;
}

#permissions-modal .permissions-group-panel {
  margin: 0 0 12px 0;
  padding: 0;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
}

#permissions-modal .permissions-group-head {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #ededf0;
}

#permissions-modal .permissions-group-table {
  border: none;
  border-radius: 0;
}

#permissions-modal tr.permission-row {
  cursor: pointer;
}

#permissions-modal tr.permission-row.permission-row-allow > td {
  background: rgba(34, 197, 94, 0.14);
}

#permissions-modal tr.permission-row.permission-row-deny > td {
  background: rgba(239, 68, 68, 0.14);
}

#permissions-modal tr.permission-row.permission-row-allow select[data-field="allowed"] {
  border-color: rgba(34, 197, 94, 0.6);
  color: #166534;
  background: #f0fdf4;
}

#permissions-modal tr.permission-row.permission-row-deny select[data-field="allowed"] {
  border-color: rgba(239, 68, 68, 0.6);
  color: #991b1b;
  background: #fef2f2;
}

/* Keep global header/system menu above page row-action menus and table overlays. */
.header .dropdown-menu {
  z-index: 210000 !important;
}

.header .dropdown-submenu {
  z-index: 210001 !important;
}

.header .dropdown-submenu--nested {
  z-index: 210002 !important;
}

.returns-page {
  overflow-y: auto;
}

.returns-page .returns-container {
  padding-bottom: 40px;
}

.returns-page .returns-login-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.returns-page .returns-nav-item {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.returns-page .returns-tiles {
  margin-top: 10px;
  margin-bottom: 16px;
}

.returns-page .returns-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.returns-page .returns-tiles > .tile:nth-child(1) {
  grid-column: 2;
}

.returns-page .returns-tiles > .tile:nth-child(2) {
  grid-column: 3;
}

.returns-page .returns-tiles > .tile:nth-child(3) {
  grid-column: 4;
}

.returns-page .returns-tiles .tile {
  text-align: center;
  align-items: center;
  border: none;
}

.returns-page .returns-filter-tile {
  cursor: pointer;
}

.returns-page .returns-filter-tile.is-active {
  border: none !important;
  box-shadow: var(--shadow);
  transform: none;
  background: var(--surface);
}

.returns-page .returns-tiles .tile h3,
.returns-page .returns-tiles .tile .value,
.returns-page .returns-tiles .tile .subtle {
  text-align: center;
}

.returns-page .returns-tiles .tile h3 {
  justify-content: center;
  width: 100%;
}

.returns-page .returns-dashboard-panel {
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.returns-page .returns-modal-order-grid {
  margin-bottom: 14px;
}

.returns-page .returns-photo-upload {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed #d6dae3;
  border-radius: 12px;
  background: #fcfcfd;
  display: grid;
  gap: 8px;
}

.returns-page .returns-photo-list {
  word-break: break-word;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.returns-page .returns-photo-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e5ed;
  background: #fff;
}

.returns-page .returns-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.returns-page .returns-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.returns-page #returns-submit-reason {
  margin-bottom: 8px;
}

.returns-page input:focus,
.returns-page select:focus,
.returns-page textarea:focus,
.returns-page button:focus,
.returns-page input:focus-visible,
.returns-page select:focus-visible,
.returns-page textarea:focus-visible,
.returns-page button:focus-visible,
.returns-page .menu-button:focus,
.returns-page .menu-button:focus-visible,
.returns-page .secondary-button:focus,
.returns-page .secondary-button:focus-visible,
.returns-page .menu-select:focus,
.returns-page .menu-select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.returns-page .returns-orders-table th,
.returns-page .returns-orders-table td {
  text-align: center;
  vertical-align: middle;
}

.returns-page .returns-orders-table tbody tr > td {
  background: #fff;
}

.returns-page .returns-action-cell {
  min-width: 130px;
}

.returns-page .returns-action-button,
.returns-page .menu-button--small {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.1;
}

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

.returns-page .returns-status-error {
  color: #c62828;
}

@media (max-width: 900px), (pointer: coarse) {
  .returns-page .container.returns-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 96px !important;
  }

  .returns-page .panel.panel--spaced {
    margin-top: 0 !important;
  }

  .returns-page .returns-orders-table th,
  .returns-page .returns-orders-table td {
    white-space: nowrap;
    font-size: 12px;
  }

  .returns-page .returns-tiles {
    grid-template-columns: 1fr;
  }

  .returns-page .returns-tiles > .tile:nth-child(1),
  .returns-page .returns-tiles > .tile:nth-child(2),
  .returns-page .returns-tiles > .tile:nth-child(3) {
    grid-column: auto;
  }

  .returns-page .returns-nav-item {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 11px;
  }
}
