/* Admin UI refresh: orders (OrderManagement orderList + orderView) */

/* ---------- shared: dark table headers become calm card headers ---------- */

body.admin-new-theme.OrderManagement-css.orderList-css .bg-dark,
body.admin-new-theme.OrderManagement-css.orderView-css .bg-dark
{
    background-color: var(--adm-surface-alt) !important;
    color: var(--adm-muted) !important;
    font-weight: 600 !important;
}

body.admin-new-theme.OrderManagement-css.orderView-css .bg-dark > th,
body.admin-new-theme.OrderManagement-css.orderView-css .bg-dark > td,
body.admin-new-theme.OrderManagement-css.orderView-css .bg-dark > tr > th,
body.admin-new-theme.OrderManagement-css.orderView-css .bg-dark > tr > td
{
    font-size: 12px;
    letter-spacing: .01em;
    border-bottom: 1px solid var(--adm-border);
}

/* soft grey page so the white cards stand out */

body.admin-new-theme.orderList-css,
body.admin-new-theme.orderView-css
{
    background-color: var(--adm-page);
}

/* ======================================================================
   orderList
   ====================================================================== */

body.admin-new-theme.orderList-css .orderList-buttons-wrapper
{
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.orderList-css .orderList-buttons-wrapper #orderList_see_more_buttons
{
    color: var(--adm-muted);
}

body.admin-new-theme.orderList-css .orderList-buttons-wrapper #orderList_see_more_buttons:hover
{
    color: var(--adm-brand);
}

/* filter panel */

body.admin-new-theme.orderList-css .orders-filters-wrapper
{
    margin: 16px 0 0;
    background: transparent;
}

body.admin-new-theme.orderList-css .orders-filters-wrapper form
{
    padding: 24px 12px 8px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.orderList-css .orders-filters-wrapper form > .row
{
    display: flex;
    flex-wrap: wrap;
}

body.admin-new-theme.orderList-css .orders-filters-wrapper form > .row::before,
body.admin-new-theme.orderList-css .orders-filters-wrapper form > .row::after
{
    display: none;
}

body.admin-new-theme.orderList-css .orders-filters-wrapper form > .row > [class*="col-"]
{
    margin-bottom: 14px;
}

body.admin-new-theme.orderList-css .orders-filters-wrapper .control-label
{
    display: block;
    padding-top: 0;
    margin-bottom: 6px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--adm-muted);
}

body.admin-new-theme.orderList-css .orders-filters-wrapper .close-filter-wrapper
{
    top: 6px;
    right: 8px;
    font-size: 1.4em;
    color: var(--adm-muted);
    z-index: 1;
}

body.admin-new-theme.orderList-css .orders-filters-wrapper .close-filter-wrapper:hover
{
    color: var(--adm-text);
}

/* status tabs above the table */

body.admin-new-theme.orderList-css .order-list-tabs
{
    border-bottom: 0;
}

body.admin-new-theme.orderList-css .order-list-tabs > li > .btn
{
    border-radius: var(--adm-radius-pill);
    padding: 4px 12px;
}

body.admin-new-theme.orderList-css .order-list-tabs > li.active > .btn
{
    background: var(--adm-brand-tint);
    border-color: var(--adm-brand);
    color: var(--adm-brand);
    font-weight: 600;
}

body.admin-new-theme.orderList-css #editPreferedOrderStatuses .btn
{
    border-radius: var(--adm-radius-pill);
}

/* orders table */

body.admin-new-theme.orderList-css .story.row
{
    margin-left: 0;
    margin-right: 0;
}

body.admin-new-theme.orderList-css .table-order-list
{
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
    padding-top: 6px;
    padding-bottom: 6px;
}

body.admin-new-theme.orderList-css #orders > thead > tr
{
    background: var(--adm-surface-alt);
    border-bottom: 1px solid var(--adm-border);
}

body.admin-new-theme.orderList-css #orders > thead > tr > th
{
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--adm-muted);
}

body.admin-new-theme.orderList-css #orders > tbody > tr
{
    border-bottom: 1px solid var(--adm-border);
}

body.admin-new-theme.orderList-css #orders > tbody > tr:not(.order_details):hover
{
    background: var(--adm-page);
}

body.admin-new-theme.orderList-css #orders .order.selected
{
    background: var(--adm-brand-tint);
}

body.admin-new-theme.orderList-css #orders .order td
{
    padding-top: 16px;
    padding-bottom: 16px;
    color: var(--adm-text);
}

body.admin-new-theme.orderList-css #orders .order td.order-date-row
{
    color: var(--adm-muted);
    font-size: 13px;
}

body.admin-new-theme.orderList-css #orders .order td.order-value,
body.admin-new-theme.orderList-css #orders .order td.customer_name
{
    font-weight: 600;
}

body.admin-new-theme.orderList-css #orders .shipping-method
{
    color: var(--adm-muted);
}

/* status pill: keeps the configured colour (set inline by colorizeRows) */

body.admin-new-theme.orderList-css #orders .order-status-wrapper
{
    border-radius: var(--adm-radius-pill) !important;
    box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .08);
}

body.admin-new-theme.orderList-css #orders .order-status-wrapper .order-status-text a
{
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--adm-text);
}

/* status change list opened from the pill */

body.admin-new-theme.orderList-css .order-status-list
{
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    box-shadow: 0 12px 24px -12px rgba(16, 24, 40, .25);
    padding: 4px 0;
}

body.admin-new-theme.orderList-css .order-status-list li
{
    padding: 4px 10px;
}

body.admin-new-theme.orderList-css .order-status-list li:nth-child(even)
{
    background-color: transparent;
}

body.admin-new-theme.orderList-css .order-status-list li:hover
{
    background-color: var(--adm-brand-tint);
}

/* ======================================================================
   orderView
   ====================================================================== */

/* header strip: order number + status, tags, change status */

body.admin-new-theme.orderView-css #order_status_panel
{
    padding: 12px 16px 12px 18px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: inset 4px 0 0 var(--adm-brand), var(--adm-shadow);
}

body.admin-new-theme.orderView-css #order_status_panel #order_status
{
    font-size: 18px;
    font-weight: 600;
    color: var(--adm-text);
}

body.admin-new-theme.orderView-css #order_status_panel #order_status.shipped
{
    color: var(--adm-success);
}

body.admin-new-theme.orderView-css #order_status_panel #order_status.canceled
{
    color: var(--adm-danger);
}

body.admin-new-theme.orderView-css #order_status_panel .change-order-status-selector .control-label
{
    font-weight: 600;
    color: var(--adm-muted);
}

body.admin-new-theme.orderView-css #order_data h2
{
    font-size: 18px;
    font-weight: 600;
    color: var(--adm-text);
}

/* cards: addresses, products, supplier tables */

body.admin-new-theme.orderView-css #order_data .table-responsive
{
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
    margin-bottom: 16px;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table
{
    margin-bottom: 0;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > thead > tr > th,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > thead > tr > td,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr > td,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr > th
{
    border-color: var(--adm-border);
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > thead:first-child > tr:first-child > th,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > thead:first-child > tr:first-child > td,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody:first-child > tr:first-child > th,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody:first-child > tr:first-child > td
{
    border-top: 0;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table-bordered
{
    border: 0;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table-bordered > thead > tr > :first-child,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table-bordered > tbody > tr > :first-child
{
    border-left: 0;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table-bordered > thead > tr > :last-child,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table-bordered > tbody > tr > :last-child
{
    border-right: 0;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table-bordered > tbody > tr:last-child > td
{
    border-bottom: 0;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table-striped > tbody > tr:nth-of-type(odd)
{
    background-color: var(--adm-page);
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table-condensed > tbody > tr > td,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table-condensed > thead > tr > th
{
    padding: 7px 12px;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table-condensed > tbody > tr > td:first-child
{
    color: var(--adm-muted);
}

body.admin-new-theme.orderView-css #order_data .upper-tabe-buttons
{
    margin-top: 8px;
}

/* sidebar: every block becomes a card with a light header */

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight
{
    padding: 0 12px 10px;
    margin-bottom: 12px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    box-shadow: var(--adm-shadow);
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight > .ui-widget-header
{
    margin: 0 -12px 10px;
    padding: 10px 12px;
    background: var(--adm-surface-alt);
    color: var(--adm-text);
    font-size: 13px;
    font-weight: 600;
    border: 0;
    border-bottom: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg) var(--adm-radius-lg) 0 0;
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight > .sidebar-content
{
    padding-left: 0;
    padding-right: 0;
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight:not(:has(*))
{
    display: none;
}

/* comments: the header, the customer comment and the list read as one card
   (the add-comment modal and its script sit between the header block and the rest) */

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight:has(> .comment-header-main)
{
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: none;
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight:has(> .comment-header-main) > .comment-header-main
{
    margin-bottom: 0;
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight:has(> .comment-header-main) + #OrderAddComment + script + .orderSideBarRight,
body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight:has(> .comment-header-main) + #OrderAddComment + script + .orderSideBarRight + .orderSideBarRight
{
    display: block;
    margin-top: 0;
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight:has(> .comment-header-main) + #OrderAddComment + script + .orderSideBarRight:has(> .comment_text)
{
    margin-bottom: 0;
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: none;
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight:has(> .comment-header-main) + #OrderAddComment + script + .orderSideBarRight > .ui-widget-header
{
    border-radius: 0;
}

body.admin-new-theme.orderView-css #order_sidebar .comment-wrapper:not(:last-of-type)
{
    border-bottom-color: var(--adm-border);
}

body.admin-new-theme.orderView-css #order_sidebar .comment-wrapper .comment-information
{
    font-size: 12px;
    color: var(--adm-muted);
}

body.admin-new-theme.orderView-css #order_sidebar .comment_text.is_important
{
    background-color: var(--adm-success-bg);
    box-shadow: inset 3px 0 0 var(--adm-success);
    padding-left: 8px;
    border-radius: 6px;
}

body.admin-new-theme.orderView-css #order_sidebar .orderSideBarRight.orderInvoices,
body.admin-new-theme.orderView-css #order_sidebar .orderSideBarRight.orderOptions
{
    background-color: var(--adm-surface);
}

body.admin-new-theme.orderView-css #order_sidebar > .orderSideBarRight > .ui-widget-header :is(h1, h2, h3, h4, h5)
{
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

body.admin-new-theme.orderList-css #orders .order td.order-value
{
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.admin-new-theme.orderView-css #order_products .order-view-totals .totals
{
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--adm-text);
}

body.admin-new-theme.orderList-css .orders-filters-wrapper .apply-filter-btn .btn-primary
{
    color: #fff;
    background-color: var(--adm-brand);
    border-color: var(--adm-brand);
    font-weight: 600;
}

body.admin-new-theme.orderList-css .orders-filters-wrapper .apply-filter-btn .btn-primary:hover
{
    background-color: var(--adm-brand-strong);
    border-color: var(--adm-brand-strong);
}

/* ═════════════════════════════════════════
 *  Order page and order list: less white-on-white, label vs value
 * ═════════════════════════════════════════ */

body.admin-new-theme.orderView-css,
body.admin-new-theme.orderList-css
{
    --adm-order-page: #eceef4;
    --adm-order-card-border: #dadfe8;
    --adm-order-card-head: #f2f4f8;
    --adm-order-label-bg: #eff1f6;

    background-color: var(--adm-order-page);
}

body.admin-new-theme.orderView-css #order_data .table-responsive,
body.admin-new-theme.orderView-css #order_status_panel,
body.admin-new-theme.orderView-css .col-md-3 .panel,
body.admin-new-theme.orderList-css #orders
{
    border-color: var(--adm-order-card-border);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .07);
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > thead > tr > th,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > thead > tr > td,
body.admin-new-theme.orderView-css .col-md-3 .panel > .panel-heading
{
    background: var(--adm-order-card-head);
    color: var(--adm-text);
    font-weight: 600;
    border-bottom: 1px solid var(--adm-order-card-border);
}

body.admin-new-theme.orderView-css #order_data h2
{
    color: var(--adm-text);
    font-weight: 700;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td:first-child
{
    width: 32%;
    background: var(--adm-order-label-bg);
    border-right: 1px solid var(--adm-order-card-border);
    color: var(--adm-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .01em;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td:last-child
{
    color: var(--adm-text);
    font-size: 13.5px;
    font-weight: 600;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td:last-child,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table-striped > tbody > tr:has(> td:nth-child(2):last-child):nth-of-type(odd) > td:last-child
{
    background: var(--adm-surface);
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td
{
    border-top-color: #e6e9f0;
}

body.admin-new-theme.orderView-css #order_data label,
body.admin-new-theme.orderView-css #order_data .control-label
{
    color: var(--adm-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
}

/* Order page: the address cards read as label → value lists, not as striped tables */

body.admin-new-theme.orderView-css #order_data .table-responsive > .table:has(> tbody > tr > td:nth-child(2):last-child) > thead > tr > th
{
    padding: 12px 14px;
    font-size: 13px;
    letter-spacing: 0;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table:has(> tbody > tr > td:nth-child(2):last-child) > thead > tr > th i
{
    color: var(--adm-brand);
    margin-right: 4px;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td
{
    padding: 9px 14px;
    vertical-align: middle;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td:first-child
{
    width: 28%;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child):hover > td
{
    background: var(--adm-row-hover);
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child):hover > td:first-child
{
    background: var(--adm-order-label-bg);
}

body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td:last-child .btn-xs,
body.admin-new-theme.orderView-css #order_data .table-responsive > .table > tbody > tr:has(> td:nth-child(2):last-child) > td:last-child .copy-to-clipboard
{
    margin-left: 6px;
    font-weight: 500;
}
