body.orders_view #page-main .main-area {
    background: #F5F5F5 !important;
    border-radius: 8px;
    font-family: "SegoeUI";
    color: #1e1e1e;
}

body.orders_view .order-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.orders_view .order-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.orders_view .order-top .page-h1-title {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

body.orders_view .order-top a.btn {
    font-size: 14px !important;
    padding: 6px 12px;
    border-radius: 6px;
}

body.orders_view .order-info-grid {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: var(--Spacing-spacer-05, 24px);

    flex: 1 0 0;
    align-self: stretch;
}

body.orders_view .order-info-grid .order-card {
    flex: 1 1 calc(33.333% - 16px);
    min-width: 320px;
    box-sizing: border-box;
}

body.orders_view .order-info-grid {
    margin-right: -12px;
    margin-left: -12px;
    overflow-x: clip;
}

@media (max-width: 1199px) {
    body.orders_view .order-info-grid .order-card {
        flex: 1 1 calc(50% - 24px);
    }
}

body.orders_view .order-card {
    display: flex;
    flex-direction: column;
    flex: 1 0 0;
    border-radius: var(--Border-radius-border-radius-2, 8px);
    background-color: var(--Colors-Surface-surfacePrimary, #FFF);
    overflow: clip;
    min-width: 0;
    position: relative;
    margin-bottom: 16px
}

body.orders_view .order-card .card-header {
    display: flex;
    align-items: center;
    padding: var(--Spacing-spacer-04, 16px);
    border-bottom: 1px solid var(--Colors-Borders-borderOpaque, #E3E3E3);
    background-color: var(--Colors-Surface-surfacePrimary, #FFF);
    font-size: 15px !important;
    font-weight: 600;
    margin: 0;
    border-top-left-radius: var(--Border-radius-border-radius-2, 8px);
    border-top-right-radius: var(--Border-radius-border-radius-2, 8px);
}

body.orders_view .order-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--Spacing-spacer-03, 12px);
    padding: var(--Spacing-spacer-04, 16px);
    width: 100%;
    background-color: transparent;
    border-bottom-left-radius: var(--Border-radius-border-radius-2, 8px);
    border-bottom-right-radius: var(--Border-radius-border-radius-2, 8px);
}

body.orders_view .order-card ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: flex;
    flex-direction: column;
    gap: var(--Spacing-spacer-03, 12px);
}

body.orders_view .order-card li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    padding: 2px 0;
}

body.orders_view .order-card li strong {
    flex: 0 0 auto;
    text-align: left;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

body.orders_view .order-card li span {
    flex: 0 1 auto;
    text-align: right;
    color: #1e1e1e;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.orders_view .order-card li strong,
body.orders_view .order-card li span {
    line-height: 1.4;
    align-self: baseline;
    display: inline-block;
    vertical-align: middle;
}

body.orders_view .order-products table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px !important;
}

body.orders_view .order-summary-card table {
    width: 100%;
    border-collapse: collapse;
}

body.orders_view .order-summary-card td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px !important;
}

body.orders_view .order-summary-card td.amount {
    text-align: right;
    font-weight: 500;
    color: #1e1e1e;
}

body.orders_view .order-summary-card tr:last-child td.amount {
    font-weight: 700;
    color: #007a48;
    font-size: 15px !important;
}

body.orders_view .order-card li strong {
    margin: 0;
    padding: 0;
    display: block;
    text-align: left;
}

body.orders_view .order-card li span {
    display: block;
    text-align: right;
    margin: 0;
    padding: 0;
}

body.orders_view .order-card li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    padding: 0;
}

body.orders_view .order-card li strong {
    flex: 0 0 auto;
    text-align: left;
    font-weight: 500;
    color: #555;
    margin: 0;
}

body.orders_view .order-card li span {
    flex: 1;
    text-align: right;
    color: #1e1e1e;
    margin: 0;
    padding-right: 0;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.orders_view .order-card .card-body ul {
    width: 100%;
}

body.orders_view .order-card .card-body li {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.orders_view .order-card .card-body li strong {
    flex: 0 0 auto !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #000 !important;
    font-size:16px;
    font-weight:600;
}

body.orders_view .order-card .card-body li span {
    flex: 1 1 auto !important;
    text-align: right !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    color: #313131 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    background: none !important;
    font-size: 16px;
    font-weight:400;
}

body.orders_view .order-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.orders_view .order-card .card-body ul {
    width: 100%;
}

body.orders_view .show-order-history-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--Spacing-spacer-01, 4px);
    flex: 1 0 0;
    padding: 8px 12px;
    margin-top: 8px;

    border: none !important;
    border-radius: var(--Border-radius-border-radius-2, 8px);
    background: transparent !important;
    box-shadow: none !important;

    color: var(--Colors-Content-contentBrand, #93117E);
    text-align: center;
    font-family: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px !important;
    font-style: normal;
    font-weight: 600;
    line-height: 150%;
    /* 24px */
    cursor: pointer;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    align-self: center;
}

body.orders_view .show-order-history-modal:hover {
    text-decoration: underline;
    color: var(--Colors-Content-contentBrandHover, #7c0e6a);
}

body.orders_view .show-order-history-modal:focus,
body.orders_view .show-order-history-modal:active {
    box-shadow: none !important;
    outline: none !important;
}

body.orders_view .show-order-history-modal .ripple-container {
    display: none !important;
}

body.orders_view .order-products table {
    width: 100%;
    border-collapse: collapse;
}
body.orders_view .order-products th,
body.orders_view .order-products td {
    padding: 10px 12px;
    border-bottom: 1px solid #E3E3E3;
    vertical-align: middle;
}

body.orders_view .order-products th {
    color: var(--Colors-Content-contentTertiary, #6A6A6A);
    font-family: "Segoe UI";
    font-size: 16px !important;
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0.019px;
}
body.orders_view .order-products td {
    font-family: "Segoe UI";
    font-size: 16px !important;
    font-weight: 600;
    line-height: 150%;
    color: var(--Colors-Content-contentSecondary, #313131);
}

body.orders_view .order-products td:nth-child(3),
body.orders_view .order-products .price {
    color: var(--Colors-Content-contentSuccess, #048259);
    font-weight: 600;
}

body.orders_view .prod-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
body.orders_view .prod-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #E3E3E3;
    border-radius: 4px;
}
body.orders_view .prod-name,
body.orders_view .prod-code {
    color: var(--Colors-Content-contentSecondary, #313131);
    text-decoration: none;
}
body.orders_view .prod-name:hover,
body.orders_view .prod-code:hover {
    color: #860F73;
}

body.orders_view .order-products,
body.orders_view .order-products .table,
body.orders_view .order-products table,
body.orders_view .order-products tbody,
body.orders_view .order-products tr,
body.orders_view .order-products td {
    overflow: visible !important;
}

body.orders_view .action-menu {
    position: relative !important;
    overflow: visible !important;
}

body.orders_view .action-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--Border-radius-border-radius-2, 8px);
    color: #5B0B4F;
    transition: background 0.15s ease, color 0.15s ease;
}

body.orders_view .action-toggle:hover,
body.orders_view .action-toggle:focus,
body.orders_view .action-toggle:active {
    background: #EFDBEC;
    outline: none;
}

body.orders_view .action-popup {
    display: none;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    z-index: 99999 !important;
    flex-direction: column !important;
    padding: var(--Spacing-spacer-02, 8px) 0 !important;
    border-radius: var(--Border-radius-border-radius-2, 8px) !important;
    border: 1px solid var(--Colors-Borders-borderOpaque, #E3E3E3) !important;
    background: var(--Colors-Surface-surfacePrimary, #FFF) !important;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.05),
    0 4px 10px 0 rgba(0, 0, 0, 0.05) !important;
    margin-top: 4px !important;
    overflow: hidden;
}

body.orders_view .action-popup:not([style*="display: flex"]) {
    display: none;
}

/* Popup item lines */
body.orders_view .action-item {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: var(--Spacing-spacer-02, 8px);
    padding: var(--Spacing-spacer-02, 8px) var(--Spacing-spacer-04, 16px);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;

    color: var(--Colors-Content-contentPrimary, #000);
    font-family: "Segoe UI" !important;
    font-size: 14px !important;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    /* 21px */
    letter-spacing: 0.017px;
}

body.orders_view .action-item:hover {
    background: #EFDBEC;
    color: #5B0B4F;
    /* brand accent */
}

body.orders_view .action-item a {
    color: inherit;
    text-decoration: none;
    font: inherit;
}

body.orders_view .action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 17px;
    flex-shrink: 0;
}
body.orders_view .action-icon svg {
    height: 17px;
}
body.orders_view .action-icon svg path {
    stroke: #454545;
}
body.orders_view .action-item:hover .action-icon svg path {
    stroke: #5B0B4F;
}

body.orders_view .sort-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

body.orders_view .sort-header select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: "Segoe UI" !important;
    font-size: 16px !important;
    background-color: #fff;
    color: var(--Colors-Content-contentSecondary, #313131);
    cursor: pointer;
}

body.orders_view .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.orders_view .card-header .sort-header {
    margin-left: auto;
    /* pushes it to the far right */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

body.orders_view .card-header .sort-header select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: "Segoe UI";
    font-size: 16px !important;
    background-color: #fff;
    color: var(--Colors-Content-contentSecondary, #313131);
    cursor: pointer;
}

body.orders_view {
    overflow-x: hidden;
}
@media (max-width: 1400px) {
    body.orders_view .order-info-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 16px !important;
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    body.orders_view .order-info-grid .order-card {
        flex: 1 1 45% !important;
        min-width: 320px !important;
        max-width: 600px !important;
        box-sizing: border-box !important;
    }

    body.orders_view .order-info-grid .order-card.order-delivery {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

body.orders_view .main-area,
body.orders_view .order-info-grid,
body.orders_view .order-card {
    overflow: visible !important;
    position: relative !important;
    z-index: auto !important;
}

body.orders_view .order-products {
    position: relative;
    clear: both;
}

body.orders_view .content-wrapper,
body.orders_view .main-area {
    max-width: none !important;
    width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.orders_view .page-content,
body.orders_view .content-wrapper,
body.orders_view .main-area {
    max-width: none !important;
    width: 100% !important;
    overflow: visible !important;
}

body.orders_view #page-main,
body.orders_view #page-main .main-area,
body.orders_view #page-main .order-info-grid,
body.orders_view #page-main .order-info-grid * {
    max-width: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.orders_view footer.footer-black.footer-big,
body.orders_view footer.footer-black.footer-big * {
    width: initial !important;
    max-width: initial !important;
    overflow: visible !important;
}

body.orders_view #page-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    body.orders_view #page-main {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

body.orders_view #page-main .main-area {
    max-width: 100% !important;
    margin: 0 auto !important;
}

body.orders_view footer.footer-black.footer-big {
    clear: both !important;
    float: none !important;
    width: 100% !important;
    position: relative !important;
    display: block !important;
    margin-top: 40px !important;
    text-align: center;
}

body.orders_view .order-info-grid {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

body.orders_view .order-info-grid .order-card {
    flex: 1 1 calc(33.333% - 28px) !important;
    max-width: calc(33.333% - 28px) !important;
    min-width: 320px !important;
    box-sizing: border-box !important;
}


body.orders_view .order-products table.table-hover tbody tr:hover {
    background-color: transparent !important;
}

@media (max-width: 900px) {
    body.orders_view .order-products {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body.orders_view .order-products table {
        min-width: 700px;
        width: 100%;
        display: block;
    }

    body.orders_view .order-products::-webkit-scrollbar {
        height: 8px;
    }
    body.orders_view .order-products::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }
    body.orders_view .order-products::-webkit-scrollbar-track {
        background: transparent;
    }
}

body.orders_view .bottom50.main-area.col-md-12 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.orders_view .order-info-grid {
  align-items: stretch !important; 
}

body.orders_view .show-order-history-modal {
  text-transform: capitalize !important;
}

body.orders_view #sortDropdown {
  color: var(--Colors-Content-contentTertiary, #6A6A6A) !important;
  font-family: "Segoe UI" !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 150% !important;
  letter-spacing: 0.019px !important;
}

body.orders_view .order-top {
  display: flex !important;
  padding: var(--Spacing-spacer-04, 16px) !important;
  align-items: center !important;
  gap: var(--Spacing-spacer-04, 16px) !important;
  align-self: stretch !important;
  border-radius: var(--Border-radius-border-radius-2, 8px) !important;
  background: var(--Colors-Surface-surfacePrimary, #FFF) !important;
  justify-content: space-between !important;
}

body.orders_view .order-top a.btn.btn-info {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 4px !important;

  padding: var(--Spacing-spacer-03, 12px) var(--Spacing-spacer-04, 16px) !important;
  border-radius: var(--Border-radius-border-radius-2, 8px) !important;
  background: var(--Colors-Surface-surfaceBrand, #93117E) !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.2s ease, opacity 0.2s ease !important;

  color: var(--Colors-Content-contentBrandLight, #F9F1F7) !important;
  text-align: center !important;

  font-family: "Segoe UI" !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 150% !important; /* 24px */
  text-transform: capitalize !important;
  box-shadow: none;

}

body.orders_view .btn,
body.orders_view .navbar .navbar-nav > li > a.btn {
  margin: 0 !important;
}

body.orders_view .order-top a.btn.btn-info:hover {
  background: #860F73 !important;
  box-shadow: none !important;
}

body.orders_view .order-top a.btn.btn-info svg {
  width: 20px !important;
  height: 20px !important;
  stroke: var(--Colors-Content-contentBrandLight, #F9F1F7) !important;
  flex-shrink: 0 !important;
}

body.orders_view footer.footer.footer-black.footer-big {
  border-radius: var(--Border-radius-border-radius-2, 8px) !important;
  background: var(--Colors-Surface-surfacePrimary, #FFF) !important;
}


body.orders_view .order-products table.table-hover,
body.orders_view .order-products table.table-hover th,
body.orders_view .order-products table.table-hover td,
body.orders_view .order-products table.table-hover tbody tr {
  border: none !important;
  box-shadow: none !important;
}

body.orders_view .order-products table.table-hover tbody tr {
  position: relative;
}

body.orders_view .order-products table.table-hover tbody tr::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background-color: #E3E3E3;
}

body.orders_view .order-products table.table-hover thead tr {
  position: relative;
}

body.orders_view .order-products table.table-hover thead tr::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;  
  right: 16px;
  height: 1px;
  background-color: #E3E3E3;
}

body.orders_view .order-products table.table-hover th,
body.orders_view .order-products table.table-hover td {
  padding: 16px !important;
}



/* ============================================================
   MOBILE TABLE + BOTTOM DRAWER
   ============================================================ */

/* Hidden by default â€” only shows under 900px */
body.orders_view .mobile-table-wrap { display: none; }

@media (max-width: 900px) {
  /* Hide desktop table + pagination + sort dropdown on mobile */
  body.orders_view .order-products > table,
  body.orders_view .order-products table.table-hover,
  body.orders_view .order-products .table-pagination,
  body.orders_view .order-products .sort-header {
    display: none !important;
  }

  /* Card had flex: 1 0 0 from .order-card rule, collapsing to height 0 in the
     flex-direction:column parent. Force block + flex:none to size by content. */
  body.orders_view .order-card.order-products {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
    align-self: flex-start !important;
  }

  /* Show mobile transposed table. !important to win against any later rules
     in the file that touch display on children of .order-products. */
  body.orders_view .order-products .mobile-table-wrap {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 230px !important;
    grid-template-columns: 110px !important;
    grid-template-rows: repeat(6, auto) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    background: #fff !important;
    min-width: 0 !important;
    border-left: 1px solid #E3E3E3 !important;
    padding-bottom: 8px;
  }

  /* CRITICAL: each product column wrapper must use display:contents so its
     6 child cells become direct grid items of .mobile-table-wrap. Without
     this, the whole column is one grid cell and cells stack vertically
     inside it instead of aligning with the label column rows. */
  body.orders_view .order-products .m-product-col {
    display: contents !important;
  }

  /* Scrollbar: thick black thumb on light track, like a mobile drag handle */
  body.orders_view .order-products .mobile-table-wrap::-webkit-scrollbar {
    height: 4px;
  }
  body.orders_view .order-products .mobile-table-wrap::-webkit-scrollbar-thumb {
    background: #1e1e1e;
    border-radius: 4px;
  }
  body.orders_view .order-products .mobile-table-wrap::-webkit-scrollbar-track {
    background: #E3E3E3;
    border-radius: 4px;
  }
  /* Firefox */
  body.orders_view .order-products .mobile-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: #1e1e1e #E3E3E3;
  }

  body.orders_view .order-products .m-cell {
    padding: 16px;
    border-bottom: 1px solid #E3E3E3;
    border-left: 1px solid #E3E3E3;
    font-size: 15px;
    color: #313131;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
    line-height: 1.4;
  }

  body.orders_view .order-products .m-label {
    color: #6A6A6A;
    font-weight: 400;
    background: #F5F5F5;
    position: sticky;
    left: 0;
    z-index: 2;
    border-left: none;
  }

  body.orders_view .order-products .m-price {
    color: #048259;
    font-weight: 600;
  }

  body.orders_view .order-products .m-prod-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
  }
  body.orders_view .order-products .m-prod-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid #E3E3E3;
    border-radius: 4px;
    flex-shrink: 0;
  }
  body.orders_view .order-products .m-prod-name {
    font-size: 15px;
    line-height: 1.35;
    color: #313131;
  }

  body.orders_view .order-products .m-options-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }
  body.orders_view .order-products .m-options-btn:hover {
    background: #EFDBEC;
  }

  body.orders_view .order-products > .card-header {
    padding: 16px;
  }
  body.orders_view .order-products > .card-header .filter-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
  }
}

/* Desktop: hide the mobile-only filter button */
@media (min-width: 901px) {
  body.orders_view .order-products > .card-header .filter-btn {
    display: none !important;
  }
}

/* Bottom drawer (mobile only, orders_view only) */
body.orders_view .m-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 99999;
}
body.orders_view .m-drawer-backdrop.open {
  display: flex;
}

body.orders_view .m-drawer {
  background: #fff;
  width: 100%;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 8px 0 24px;
  animation: mDrawerSlideUp 0.25s ease;
  max-height: 70vh;
  overflow-y: auto;
}

@keyframes mDrawerSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

body.orders_view .m-drawer-handle {
  width: 40px;
  height: 4px;
  background: #D3D1C7;
  border-radius: 2px;
  margin: 8px auto 16px;
}

/* Drawer reuses the original .action-item markup, restyled */
body.orders_view .m-drawer-backdrop .action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-size: 16px;
  color: #1e1e1e;
  cursor: pointer;
  font-family: "Segoe UI", sans-serif;
  font-weight: 400;
}
body.orders_view .m-drawer-backdrop .action-item:hover,
body.orders_view .m-drawer-backdrop .action-item:active {
  background: #EFDBEC;
  color: #5B0B4F;
}
body.orders_view .m-drawer-backdrop .action-item a {
  color: inherit;
  text-decoration: none;
}
body.orders_view .m-drawer-backdrop .action-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.orders_view .m-drawer-backdrop .action-icon svg {
  width: 20px;
  height: 20px;
}

/* Drawer is mobile-only */
@media (min-width: 901px) {
  body.orders_view .m-drawer-backdrop { display: none !important; }
}

/* ============================================================
   ORDER FILES CARD
   ============================================================ */

body.orders_view .order-files-card {
  margin-top: 0;
}

body.orders_view .order-files-card > .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  font-size: 15px !important;
  font-weight: 600;
}

body.orders_view .files-export-all-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: var(--Spacing-spacer-03, 12px) var(--Spacing-spacer-04, 16px);
  border: none;
  border-radius: var(--Border-radius-border-radius-2, 8px);
  background: var(--Colors-Surface-surfaceBrand, #93117E);
  color: var(--Colors-Content-contentBrandLight, #F9F1F7);
  text-align: center;
  font-family: "Segoe UI", sans-serif;
  font-size: 16px !important;
  font-style: normal;
  font-weight: 600;
  line-height: 150%;
  text-transform: capitalize;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  box-shadow: none;
}
body.orders_view .files-export-all-btn:hover {
  background: #860F73;
  box-shadow: none;
}
body.orders_view .files-export-all-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Mobile: icon-only, fixed 48x48 tap target */
@media (max-width: 900px) {
  body.orders_view .files-export-all-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    gap: 0;
    font-size: 0 !important;
  }
}

body.orders_view .files-body {
  display: flex;
  flex-direction: column;
}

/* Shared row/header layout â€” 3 columns */
body.orders_view .files-table-head,
body.orders_view .files-table-row {
  display: grid;
  grid-template-columns: 1fr 200px 80px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #E3E3E3;
}

body.orders_view .files-table-head {
  color: #6A6A6A;
  font-size: 14px !important;
  font-weight: 400;
}

body.orders_view .files-table-head span,
body.orders_view .files-table-head .files-col-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

body.orders_view .files-table-row:last-child {
  border-bottom: none;
}

body.orders_view .files-table-row:hover {
  background: #faf5f9;
}

body.orders_view .files-col-name {
  font-family: "Segoe UI", sans-serif;
  font-size: 14px !important;
  color: #313131;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.orders_view .files-col-date {
  font-family: "Segoe UI", sans-serif;
  font-size: 14px !important;
  color: #313131;
}

body.orders_view .files-col-date strong,
body.orders_view .files-date strong {
  font-weight: 700;
}

body.orders_view .files-col-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

body.orders_view .files-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  color: #93117E;
  transition: background 0.15s ease;
  text-decoration: none;
}
body.orders_view .files-download-btn:hover {
  background: #EFDBEC;
}
body.orders_view .files-download-btn svg path {
  stroke: #93117E;
}

body.orders_view .files-empty {
  padding: 24px 16px;
  color: #6A6A6A;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 600px) {
  body.orders_view .files-table-head,
  body.orders_view .files-table-row {
    grid-template-columns: 1fr 80px;
  }
  body.orders_view .files-col-date {
    display: none;
  }
}

/* ============================================================
   ORDER FILES CARD â€” MOBILE (transposed, sidescrolling)
   Mirrors the products mobile table behaviour.
   ============================================================ */

/* Hidden by default â€” only shows under 900px */
body.orders_view .files-mobile-wrap { display: none; }

@media (max-width: 900px) {
  /* On mobile, hide the desktop rows + header columns inside the files card
     and show the transposed grid instead. The card header (with the
     Download all button) stays visible. */
  body.orders_view .order-files-card .files-table-head,
  body.orders_view .order-files-card .files-table-row {
    display: none !important;
  }

  body.orders_view .order-files-card .files-body {
    /* The grid is appended as a sibling of .files-body so .files-body
       being empty visually is fine â€” just collapse its padding. */
    padding: 0;
  }

  body.orders_view .order-files-card .files-mobile-wrap {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 230px !important;
    grid-template-columns: 110px !important;
    grid-template-rows: repeat(3, auto) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    background: #fff !important;
    min-width: 0 !important;
    border-top: 1px solid #E3E3E3 !important;
    padding-bottom: 8px;
  }

  /* Each file column wraps 3 cells; display:contents promotes them to
     direct grid items so they align with the label-column rows. */
  body.orders_view .order-files-card .fm-col {
    display: contents !important;
  }

  /* Thick black thumb scrollbar like the products table */
  body.orders_view .order-files-card .files-mobile-wrap::-webkit-scrollbar {
    height: 4px;
  }
  body.orders_view .order-files-card .files-mobile-wrap::-webkit-scrollbar-thumb {
    background: #1e1e1e;
    border-radius: 4px;
  }
  body.orders_view .order-files-card .files-mobile-wrap::-webkit-scrollbar-track {
    background: #E3E3E3;
    border-radius: 4px;
  }
  body.orders_view .order-files-card .files-mobile-wrap {
    scrollbar-width: thin;
    scrollbar-color: #1e1e1e #E3E3E3;
  }

  body.orders_view .order-files-card .fm-cell {
    padding: 16px;
    border-bottom: 1px solid #E3E3E3;
    border-left: 1px solid #E3E3E3;
    font-size: 15px;
    color: #313131;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
    line-height: 1.4;
    min-height: 64px;
  }

  body.orders_view .order-files-card .fm-label {
    color: #6A6A6A;
    font-weight: 400;
    background: #F5F5F5;
    position: sticky;
    left: 0;
    z-index: 2;
    border-left: none;
  }

  body.orders_view .order-files-card .fm-name {
    color: #313131;
    font-weight: 500;
    word-break: break-all;
  }

  body.orders_view .order-files-card .fm-date {
    color: #313131;
    white-space: nowrap;
  }
  body.orders_view .order-files-card .fm-date strong {
    font-weight: 700;
  }

  body.orders_view .order-files-card .fm-action .files-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    color: #93117E;
    text-decoration: none;
  }
  body.orders_view .order-files-card .fm-action .files-download-btn:hover {
    background: #EFDBEC;
  }
}

/* ============================================================
   TRACKING LINKS (Order information card: Tracking # + Replace tracking #)
   ============================================================ */

body.orders_view .order-card .card-body li span.tracking-number-value a.tracking-link,
body.orders_view .order-card .card-body li span.replace-tracking-value a.tracking-link {
  color: var(--Colors-Content-contentBrand, #93117E) !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.orders_view .order-card .card-body li span.tracking-number-value a.tracking-link:hover,
body.orders_view .order-card .card-body li span.replace-tracking-value a.tracking-link:hover {
  color: #860F73 !important;
}
body.orders_view a.tracking-link:focus-visible {
  outline: 2px solid #93117E;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
   MESSAGES CARD
   ============================================================ */

body.orders_view .order-messages-card .card-body {
  align-items: stretch;
  gap: 16px;
}

body.orders_view .order-messages-card .messages-list {
  width: 100%;
  max-height: 480px;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

body.orders_view .order-messages-card #comments-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Native wrapper div around each message */
body.orders_view .order-messages-card #comments-section > div {
  display: flex;
  flex-direction: column;
}

body.orders_view .order-messages-card .commentTextBox {
  float: none !important;
  width: auto !important;
  max-width: 80%;
  margin: 0 auto 0 0 !important;
  padding: 12px 16px !important;
  border: 1px solid #E3E3E3 !important;
  border-radius: 8px !important;
  background: #F5F5F5 !important;
  box-shadow: none !important;
}

body.orders_view .order-messages-card .commentTextBox.message-right {
  margin: 0 0 0 auto !important;
  background: #F9F1F7 !important;
  border-color: #EFDBEC !important;
}

body.orders_view .order-messages-card pre.order-message {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: "Segoe UI", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5;
  color: #1e1e1e;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
}

body.orders_view .order-messages-card .message-sent-by {
  margin-top: 6px;
  font-size: 12px !important;
  color: #6A6A6A;
}

body.orders_view .order-messages-card .messages-empty {
  padding: 8px 0;
  color: #6A6A6A;
  font-size: 14px;
  text-align: center;
}

body.orders_view .order-messages-card .messages-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid #E3E3E3;
}

body.orders_view #new_order_message_textarea {
  width: 100% !important;
  min-height: 96px;
  padding: 12px;
  border: 1px solid #E3E3E3;
  border-radius: 8px;
  background: #fff;
  font-family: "Segoe UI", sans-serif;
  font-size: 16px !important; /* 16px stops iOS zooming on focus */
  line-height: 1.5;
  color: #1e1e1e;
  resize: vertical;
  box-sizing: border-box;
}
body.orders_view #new_order_message_textarea::placeholder {
  color: #6A6A6A;
}
body.orders_view #new_order_message_textarea:focus {
  outline: none;
  border-color: #93117E;
  box-shadow: 0 0 0 3px rgba(147, 17, 126, 0.15);
}

body.orders_view #new_order_message_send_button {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--Spacing-spacer-03, 12px) var(--Spacing-spacer-04, 16px) !important;
  border: none !important;
  border-radius: var(--Border-radius-border-radius-2, 8px) !important;
  background: var(--Colors-Surface-surfaceBrand, #93117E) !important;
  color: var(--Colors-Content-contentBrandLight, #F9F1F7) !important;
  font-family: "Segoe UI", sans-serif;
  font-size: 16px !important;
  font-weight: 600;
  line-height: 150%;
  box-shadow: none !important;
  cursor: pointer;
  transition: background 0.2s ease;
}
body.orders_view #new_order_message_send_button:hover {
  background: #860F73 !important;
}
body.orders_view #new_order_message_send_button:focus-visible {
  outline: 2px solid #93117E;
  outline-offset: 2px;
}
body.orders_view #new_order_message_send_button[disabled] {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 900px) {
  body.orders_view .order-messages-card .commentTextBox {
    max-width: 92%;
  }
  body.orders_view #new_order_message_send_button {
    align-self: stretch;
  }
}