/*
 * ShopAccount Admin Workbench v3
 * A shared visual system for product, catalog, supplier, warehouse and order operations.
 */
body.admin-surface {
    --aw-bg: #f4f6f9;
    --aw-surface: #ffffff;
    --aw-surface-subtle: #f8fafc;
    --aw-text: #172033;
    --aw-heading: #101828;
    --aw-muted: #667085;
    --aw-line: #e2e7ef;
    --aw-line-strong: #d5dce7;
    --aw-accent: #ff4f67;
    --aw-accent-hover: #ec3e59;
    --aw-accent-soft: #fff0f3;
    --aw-success: #138a5b;
    --aw-success-soft: #eaf8f1;
    --aw-warning: #c66a16;
    --aw-warning-soft: #fff5e8;
    --aw-danger: #cf3c4f;
    --aw-danger-soft: #fff0f2;
    --aw-info: #2d6cdf;
    --aw-info-soft: #edf4ff;
    --aw-radius: 14px;
    --aw-radius-sm: 10px;
    --aw-shadow: 0 1px 2px rgba(16, 24, 40, .035), 0 8px 24px rgba(16, 24, 40, .035);
    background: var(--aw-bg);
}

body.admin-surface .workspace-main {
    background:
        linear-gradient(rgba(255,255,255,.56), rgba(255,255,255,0) 220px),
        var(--aw-bg);
}

body.admin-surface .admin-workbench-v3,
body.admin-surface .admin-workbench-v3 * {
    box-sizing: border-box;
}

body.admin-surface .admin-workbench-v3 {
    width: min(100%, 1536px);
    max-width: 1536px !important;
    margin-inline: auto;
    padding: 34px 34px 72px !important;
    color: var(--aw-text);
    font-size: 14px;
}

body.admin-surface .admin-workbench-v3 > :is(.inline-notice, .notice) {
    margin: 0 0 16px;
}

/* Page identity */
body.admin-surface .admin-workbench-v3 .admin-command-header {
    min-height: 0 !important;
    margin: 0 0 20px !important;
    padding: 0 2px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--aw-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-heading {
    gap: 13px;
}

body.admin-surface .admin-workbench-v3 .admin-command-icon {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px;
    border: 1px solid #ffd1d8 !important;
    border-radius: 12px !important;
    background: var(--aw-accent-soft) !important;
    color: var(--aw-accent) !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-icon .ui-icon {
    width: 20px !important;
    height: 20px !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-header .eyebrow {
    display: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-header h1 {
    margin: 0 !important;
    color: var(--aw-heading) !important;
    font-size: clamp(24px, 2vw, 30px) !important;
    font-weight: 790 !important;
    letter-spacing: -.035em !important;
    line-height: 1.18 !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-heading p:last-child {
    max-width: 720px;
    margin: 5px 0 0 !important;
    color: var(--aw-muted) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-header > :is(a, button),
body.admin-surface .admin-workbench-v3 .admin-command-header .button {
    min-height: 42px !important;
    padding: 0 16px !important;
    border: 1px solid var(--aw-accent) !important;
    border-radius: 10px !important;
    background: var(--aw-accent) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(255,79,103,.17) !important;
    font-size: 13px !important;
    font-weight: 740 !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-header > :is(a, button):hover {
    border-color: var(--aw-accent-hover) !important;
    background: var(--aw-accent-hover) !important;
    transform: translateY(-1px);
}

/* Operational summary: one rail, not a collection of cards */
body.admin-surface .admin-workbench-v3 .admin-summary-rail {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 0 !important;
    margin: 0 0 18px !important;
    overflow: hidden;
    border: 1px solid var(--aw-line) !important;
    border-radius: var(--aw-radius) !important;
    background: var(--aw-surface) !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.025) !important;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail > article,
body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:nth-child(n) {
    display: flex !important;
    min-width: 0;
    min-height: 86px !important;
    align-items: center !important;
    gap: 11px !important;
    padding: 15px 16px !important;
    border: 0 !important;
    border-right: 1px solid var(--aw-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:last-child {
    border-right: 0 !important;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:hover {
    background: var(--aw-surface-subtle) !important;
    transform: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail .kpi-icon,
body.admin-surface .admin-workbench-v3 .warehouse-metric-icon {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail small {
    color: var(--aw-muted) !important;
    font-size: 10px !important;
    font-weight: 760 !important;
    letter-spacing: .045em !important;
    line-height: 1.2 !important;
    text-transform: uppercase;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail strong {
    display: block;
    margin: 3px 0 1px !important;
    color: var(--aw-heading) !important;
    font-size: 22px !important;
    font-weight: 790 !important;
    letter-spacing: -.025em !important;
    line-height: 1.15 !important;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail em {
    display: block;
    overflow: hidden;
    color: var(--aw-muted) !important;
    font-size: 10px !important;
    font-style: normal;
    line-height: 1.3 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Shared surfaces */
body.admin-surface .admin-workbench-v3 :is(.mock-panel, .admin-panel, .admin-form) {
    border: 1px solid var(--aw-line) !important;
    border-radius: var(--aw-radius) !important;
    background: var(--aw-surface) !important;
    box-shadow: var(--aw-shadow) !important;
}

body.admin-surface .admin-workbench-v3 :is(.mock-panel, .admin-panel, .admin-form):hover {
    transform: none !important;
}

body.admin-surface .admin-workbench-v3 .panel-heading {
    min-height: 62px;
    align-items: center;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--aw-line);
}

body.admin-surface .admin-workbench-v3 .panel-heading h2,
body.admin-surface .admin-workbench-v3 .detail-pane-heading h2 {
    color: var(--aw-heading) !important;
    font-size: 16px !important;
    font-weight: 760 !important;
    letter-spacing: -.015em !important;
}

body.admin-surface .admin-workbench-v3 .panel-heading p,
body.admin-surface .admin-workbench-v3 .detail-pane-heading p {
    color: var(--aw-muted) !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
}

body.admin-surface .admin-workbench-v3 :is(input, select, textarea, button) {
    font: inherit;
}

body.admin-surface .admin-workbench-v3 :is(input, select, textarea) {
    border-color: var(--aw-line-strong) !important;
    border-radius: 9px !important;
    color: var(--aw-text) !important;
    background: #fff !important;
}

body.admin-surface .admin-workbench-v3 :is(input, select):focus,
body.admin-surface .admin-workbench-v3 textarea:focus {
    border-color: #ff91a1 !important;
    outline: 3px solid rgba(255,79,103,.11) !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 :is(.button, .mock-primary, .mock-secondary, .table-action, .danger-action) {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 710 !important;
    line-height: 1 !important;
    white-space: nowrap;
}

body.admin-surface .admin-workbench-v3 .mock-primary {
    border-color: var(--aw-accent) !important;
    background: var(--aw-accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(255,79,103,.14) !important;
}

body.admin-surface .admin-workbench-v3 .mock-primary:hover {
    border-color: var(--aw-accent-hover) !important;
    background: var(--aw-accent-hover) !important;
}

body.admin-surface .admin-workbench-v3 :is(.table-action, .mock-secondary) {
    border: 1px solid var(--aw-line-strong) !important;
    background: var(--aw-surface) !important;
    color: #344054 !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 :is(.table-action, .mock-secondary):hover {
    border-color: #b9c2d0 !important;
    background: var(--aw-surface-subtle) !important;
    color: var(--aw-heading) !important;
}

body.admin-surface .admin-workbench-v3 .danger-action {
    border: 1px solid #f4b8c0 !important;
    background: #fff !important;
    color: var(--aw-danger) !important;
}

body.admin-surface .admin-workbench-v3 .danger-action:hover {
    background: var(--aw-danger-soft) !important;
}

body.admin-surface .admin-workbench-v3 :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid rgba(45,108,223,.18) !important;
    outline-offset: 2px;
}

/* Tabs and filters */
body.admin-surface .admin-workbench-v3 .mock-tabs {
    min-height: 50px;
    gap: 4px !important;
    padding: 0 12px !important;
    border-bottom: 1px solid var(--aw-line) !important;
    background: #fff !important;
}

body.admin-surface .admin-workbench-v3 .mock-tabs :is(a, span) {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px !important;
    border-bottom-width: 2px !important;
    color: var(--aw-muted) !important;
    font-size: 12px !important;
    font-weight: 690 !important;
}

body.admin-surface .admin-workbench-v3 .mock-tabs .active {
    border-color: var(--aw-accent) !important;
    color: var(--aw-accent) !important;
}

body.admin-surface .admin-workbench-v3 .page-tabs {
    margin-bottom: 16px !important;
    border: 1px solid var(--aw-line) !important;
    border-radius: var(--aw-radius) !important;
}

body.admin-surface .admin-workbench-v3 .admin-filter-bar {
    display: grid !important;
    grid-template-columns: minmax(280px, 1.5fr) minmax(160px, .55fr) minmax(160px, .55fr) auto auto !important;
    align-items: center !important;
    gap: 9px !important;
    margin: 0 !important;
    padding: 11px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--aw-line) !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-filter-bar > :is(select, .mock-primary, .table-action),
body.admin-surface .admin-workbench-v3 .admin-filter-bar .unified-search-field {
    min-height: 42px !important;
    margin: 0 !important;
}

body.admin-surface .admin-workbench-v3 .admin-filter-bar .unified-search-field {
    display: flex !important;
    align-items: center;
    gap: 9px;
    padding: 0 12px !important;
    border: 1px solid var(--aw-line-strong) !important;
    border-radius: 9px !important;
    background: #fff !important;
}

body.admin-surface .admin-workbench-v3 .admin-filter-bar .unified-search-field input {
    min-height: 40px !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    font-size: 13px !important;
}

body.admin-surface .admin-workbench-v3 .admin-filter-bar > select {
    min-height: 42px !important;
    padding: 0 34px 0 11px !important;
    font-size: 12px !important;
}

body.admin-surface .admin-workbench-v3 .admin-advanced-filters {
    grid-column: 1 / -1;
    margin: 0 !important;
    border-top: 1px dashed var(--aw-line);
}

body.admin-surface .admin-workbench-v3 .admin-advanced-filters > summary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--aw-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 680;
}

body.admin-surface .admin-workbench-v3 .admin-advanced-filters > div {
    gap: 10px !important;
    padding: 2px 0 12px !important;
}

/* Commands: primary tools stay visible; bulk/destructive tools are subordinate */
body.admin-surface .admin-workbench-v3 .table-command-bar {
    min-height: 54px;
    padding: 9px 12px !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--aw-line) !important;
    color: var(--aw-muted);
    font-size: 12px !important;
}

body.admin-surface .admin-workbench-v3 .table-command-bar > div {
    flex-wrap: wrap;
    gap: 7px !important;
}

body.admin-surface .admin-workbench-v3 .product-bulk-adjustments {
    min-height: 0;
    padding: 0 !important;
    background: var(--aw-surface-subtle);
}

body.admin-surface .admin-workbench-v3 .product-bulk-adjustments > div {
    width: 100%;
    padding: 9px 12px;
}

/* Tables */
body.admin-surface .admin-workbench-v3 :is(.mock-table, .data-table) {
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    overscroll-behavior: auto !important;
    scrollbar-gutter: stable;
    border: 0 !important;
    background: #fff !important;
}

body.admin-surface .admin-workbench-v3 :is(.mock-tr, .data-row) {
    min-height: 66px;
    padding: 10px 14px !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--aw-line) !important;
    color: #344054 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

body.admin-surface .admin-workbench-v3 :is(.mock-tr, .data-row):not(.mock-th, .data-head):hover {
    background: #f9fafb !important;
}

body.admin-surface .admin-workbench-v3 :is(.mock-th, .data-head) {
    min-height: 42px !important;
    padding-block: 8px !important;
    background: var(--aw-surface-subtle) !important;
    color: #667085 !important;
    font-size: 10px !important;
    font-weight: 780 !important;
    letter-spacing: .045em !important;
    text-transform: uppercase;
}

body.admin-surface .admin-workbench-v3 :is(.mock-tr, .data-row) small {
    margin-top: 3px !important;
    color: var(--aw-muted) !important;
    font-size: 10px !important;
    line-height: 1.3;
}

body.admin-surface .admin-workbench-v3 .product-cell {
    gap: 10px !important;
}

body.admin-surface .admin-workbench-v3 .product-cell > :is(i, img),
body.admin-surface .admin-workbench-v3 .detail-product-row i {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px;
    border-radius: 10px !important;
    object-fit: cover;
}

body.admin-surface .admin-workbench-v3 .product-cell b {
    color: var(--aw-heading);
    font-size: 12px;
    line-height: 1.35;
}

body.admin-surface .admin-workbench-v3 .table-actions {
    gap: 5px !important;
}

body.admin-surface .admin-workbench-v3 .table-actions :is(a, button) {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    display: inline-grid !important;
    place-items: center;
    padding: 0 !important;
    border: 1px solid var(--aw-line-strong) !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #475467 !important;
    font-size: 14px !important;
}

body.admin-surface .admin-workbench-v3 .table-actions :is(a, button):hover {
    border-color: #ffb5c0 !important;
    background: var(--aw-accent-soft) !important;
    color: var(--aw-accent) !important;
}

body.admin-surface .admin-workbench-v3 .status-pill {
    padding: 5px 8px !important;
    border-radius: 7px !important;
    font-size: 10px !important;
    font-weight: 720 !important;
}

body.admin-surface .admin-workbench-v3 .status-pill.success {
    background: var(--aw-success-soft) !important;
    color: var(--aw-success) !important;
}

body.admin-surface .admin-workbench-v3 .status-pill.warning {
    background: var(--aw-warning-soft) !important;
    color: var(--aw-warning) !important;
}

body.admin-surface .admin-workbench-v3 .status-pill.danger {
    background: var(--aw-danger-soft) !important;
    color: var(--aw-danger) !important;
}

body.admin-surface .admin-workbench-v3 .pagination {
    min-height: 54px;
    margin: 0 !important;
    padding: 10px 12px !important;
    border-top: 0 !important;
    background: #fff;
}

/* Product operations */
body.admin-surface .admin-products-page .products-admin-grid {
    display: block !important;
}

body.admin-surface .admin-products-page .products-table-column,
body.admin-surface .admin-products-page .products-table-column > .mock-panel {
    min-width: 0;
}

body.admin-surface .admin-products-page .products-management-table .mock-tr {
    grid-template-columns: minmax(300px, 1.7fr) minmax(160px, .8fr) minmax(110px, .55fr) 80px 80px minmax(130px, .65fr) 116px !important;
    min-width: 1100px;
}

body.admin-surface .admin-products-page .product-admin-forms {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    margin-top: 16px !important;
}

body.admin-surface .admin-products-page .category-side-panel {
    display: none !important;
}

/* Categories */
body.admin-surface .admin-categories-page .category-management-grid {
    grid-template-columns: minmax(0, 1fr) 360px !important;
    align-items: start;
    gap: 16px !important;
}

body.admin-surface .admin-categories-page .category-row {
    grid-template-columns: minmax(260px, 1.45fr) minmax(170px, .9fr) 100px 120px !important;
    min-width: 760px;
}

body.admin-surface .admin-categories-page .category-tree-item {
    border-bottom: 1px solid var(--aw-line) !important;
}

body.admin-surface .admin-categories-page .category-tree-item[open] {
    background: #fbfcfe !important;
}

body.admin-surface .admin-categories-page .category-inline-editor {
    margin: 0 12px 12px !important;
    border-radius: 11px !important;
    box-shadow: none !important;
}

body.admin-surface .admin-categories-page #category-create {
    position: sticky;
    top: 86px;
    padding: 18px !important;
}

body.admin-surface .admin-categories-page #category-create h2 {
    margin: 0 0 14px;
    color: var(--aw-heading);
    font-size: 17px;
}

/* Taxonomy */
body.admin-surface .admin-taxonomy-page .taxonomy-layout {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr) !important;
    gap: 16px !important;
}

body.admin-surface .admin-taxonomy-page .editor-section {
    overflow: hidden;
}

body.admin-surface .admin-taxonomy-page .editor-grid {
    padding: 14px 16px !important;
}

body.admin-surface .admin-taxonomy-page .editor-grid textarea {
    min-height: 250px;
    padding: 13px !important;
    font-size: 12px !important;
    line-height: 1.6;
}

body.admin-surface .admin-taxonomy-page .taxonomy-help {
    margin: 0 16px 12px !important;
    border: 1px solid #f3d19f !important;
    border-radius: 9px !important;
    background: var(--aw-warning-soft) !important;
    color: #8c4d16 !important;
    font-size: 11px !important;
}

body.admin-surface .admin-taxonomy-page .taxonomy-list {
    margin: 0 !important;
    border-top: 1px solid var(--aw-line);
}

body.admin-surface .admin-taxonomy-page .taxonomy-list > span {
    min-height: 48px;
    padding: 10px 14px !important;
    border-color: var(--aw-line) !important;
    font-size: 11px !important;
}

body.admin-surface .admin-taxonomy-page .editor-savebar {
    margin-top: 16px !important;
    border: 1px solid var(--aw-line) !important;
    border-radius: 12px !important;
    box-shadow: 0 -8px 24px rgba(16,24,40,.045) !important;
}

/* Supplier connections */
body.admin-surface .admin-suppliers-page .supplier-list-panel {
    overflow: visible !important;
}

body.admin-surface .admin-suppliers-page .supplier-sync-row {
    grid-template-columns: minmax(140px, .85fr) minmax(190px, 1.2fr) minmax(125px, .78fr) minmax(115px, .62fr) 238px !important;
    min-width: 910px;
}

body.admin-surface .admin-suppliers-page .supplier-sync-row code {
    color: #344054;
    font-size: 11px !important;
    overflow-wrap: anywhere;
}

body.admin-surface .admin-suppliers-page .supplier-actions {
    justify-content: flex-end;
    gap: 6px;
}

body.admin-surface .admin-suppliers-page .supplier-actions .supplier-delete {
    display: inline-grid;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    place-items: center;
    padding: 0;
}

body.admin-surface .admin-suppliers-page .supplier-actions .supplier-delete .ui-icon {
    width: 15px;
    height: 15px;
}

body.admin-surface .admin-suppliers-page .supplier-editor,
body.admin-surface .admin-suppliers-page .admin-create-drawer {
    margin: 10px 12px 12px !important;
    border-radius: 11px !important;
    box-shadow: none !important;
}

body.admin-surface .admin-suppliers-page .supplier-editor > summary,
body.admin-surface .admin-suppliers-page .admin-create-drawer > summary {
    min-height: 48px;
    padding: 0 14px !important;
    background: var(--aw-surface-subtle) !important;
    color: #344054 !important;
    font-size: 12px !important;
}

body.admin-surface .admin-suppliers-page .supplier-editor[open] > summary {
    border-bottom: 1px solid var(--aw-line);
}

body.admin-surface .admin-suppliers-page .supplier-saved-config {
    border-color: var(--aw-line) !important;
    border-radius: 11px !important;
    background: #f8fafc !important;
}

body.admin-surface .admin-suppliers-page .supplier-config-section {
    border: 1px solid var(--aw-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.admin-surface .admin-suppliers-page .supplier-sync-grid {
    gap: 0 !important;
    border: 1px solid var(--aw-line);
    border-radius: 11px;
    overflow: hidden;
}

body.admin-surface .admin-suppliers-page .supplier-sync-option {
    min-height: 78px;
    margin: 0 !important;
    padding: 12px !important;
    border: 0 !important;
    border-right: 1px solid var(--aw-line) !important;
    border-bottom: 1px solid var(--aw-line) !important;
    border-radius: 0 !important;
    background: #fff !important;
}

body.admin-surface .admin-suppliers-page .supplier-sync-option:nth-child(2n) {
    border-right: 0 !important;
}

body.admin-surface .admin-suppliers-page .supplier-sync-option :is(input, select) {
    min-height: 38px;
    font-size: 11px !important;
}

/* Warehouse */
body.admin-surface .warehouse-browser-page .warehouse-browser {
    grid-template-columns: 290px minmax(0, 1fr) !important;
    gap: 16px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-selector {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16,24,40,.03) !important;
}

body.admin-surface .warehouse-browser-page .warehouse-selector-head {
    padding: 14px !important;
    border-bottom: 1px solid var(--aw-line);
}

body.admin-surface .warehouse-browser-page .warehouse-selector-search {
    margin: 10px !important;
    min-height: 40px;
    border-radius: 9px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-category-list {
    max-height: calc(100vh - 220px) !important;
    padding: 0 8px 12px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-product-link {
    min-height: 56px;
    margin: 2px 0;
    padding: 8px 10px !important;
    border: 1px solid transparent;
    border-radius: 10px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-product-link.active {
    border-color: #ffc4cd !important;
    background: var(--aw-accent-soft) !important;
    color: var(--aw-accent) !important;
}

body.admin-surface .warehouse-browser-page .warehouse-selected-card > header {
    min-height: 70px;
    padding: 12px 14px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-metric-grid {
    grid-template-columns: repeat(6, minmax(120px, 1fr)) !important;
}

body.admin-surface .warehouse-browser-page .warehouse-status-tabs {
    min-height: 52px;
    padding: 7px 9px !important;
    border: 1px solid var(--aw-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
}

body.admin-surface .warehouse-browser-page .warehouse-status-tabs > a {
    min-height: 36px;
    padding: 0 12px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-tool-drawers {
    gap: 12px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-tool-drawer {
    border: 1px solid var(--aw-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.admin-surface .warehouse-browser-page .warehouse-tool-drawer > summary {
    min-height: 52px;
    padding: 0 14px !important;
    font-size: 12px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-data-panel,
body.admin-surface .warehouse-browser-page .warehouse-sales-panel {
    margin-top: 14px !important;
}

body.admin-surface .warehouse-browser-page .warehouse-filter-bar {
    gap: 8px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--aw-line);
}

body.admin-surface .warehouse-browser-page .warehouse-inventory-table .mock-tr {
    grid-template-columns: 110px minmax(260px, 1.4fr) 150px 110px 140px 150px 150px !important;
    min-width: 1080px;
}

/* Orders */
body.admin-surface .admin-orders-page .admin-order-filter {
    grid-template-columns: minmax(280px, 1.3fr) minmax(170px, .55fr) minmax(330px, .9fr) auto auto !important;
    margin-bottom: 16px !important;
    border: 1px solid var(--aw-line) !important;
    border-radius: var(--aw-radius) !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.025) !important;
}

body.admin-surface .admin-orders-page .admin-date-range {
    min-height: 42px !important;
    align-self: stretch;
    padding: 0 10px;
    border: 1px solid var(--aw-line-strong);
    border-radius: 9px;
}

body.admin-surface .admin-orders-page .admin-date-range > span {
    display: none !important;
}

body.admin-surface .admin-orders-page .admin-date-range > div {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.admin-surface .admin-orders-page .admin-date-range input {
    min-width: 0;
    min-height: 38px !important;
    padding: 0 4px !important;
    border: 0 !important;
    font-size: 11px !important;
}

body.admin-surface .admin-orders-page .admin-order-grid {
    grid-template-columns: minmax(0, 1fr) 340px !important;
    gap: 16px !important;
    align-items: start;
}

body.admin-surface .admin-orders-page .admin-order-grid > .mock-panel {
    overflow: hidden;
}

body.admin-surface .admin-orders-page .admin-order-table .mock-tr {
    grid-template-columns: 130px 160px minmax(230px, 1.35fr) 48px 105px 105px 115px 105px 96px !important;
    min-width: 1110px;
}

body.admin-surface .admin-orders-page .admin-order-detail {
    position: sticky !important;
    top: 84px !important;
    overflow: hidden;
    box-shadow: var(--aw-shadow) !important;
}

body.admin-surface .admin-orders-page .admin-order-detail > section {
    padding: 15px !important;
    border-color: var(--aw-line) !important;
}

body.admin-surface .admin-orders-page .admin-order-detail h3 {
    color: var(--aw-muted);
    font-size: 10px !important;
    font-weight: 780;
    letter-spacing: .05em;
    text-transform: uppercase;
}

body.admin-surface .admin-orders-page .admin-order-detail p {
    gap: 16px;
    font-size: 12px !important;
}

body.admin-surface .admin-orders-page .detail-refund {
    padding: 12px 15px !important;
    border-top: 1px solid var(--aw-line);
}

/* Dark scheme */
html[data-color-scheme="dark"] body.admin-surface {
    --aw-bg: #11151d;
    --aw-surface: #181d27;
    --aw-surface-subtle: #1d2330;
    --aw-text: #dfe5ef;
    --aw-heading: #f5f7fb;
    --aw-muted: #98a2b3;
    --aw-line: #2b3342;
    --aw-line-strong: #394355;
}

html[data-color-scheme="dark"] body.admin-surface .workspace-main {
    background: var(--aw-bg);
}

html[data-color-scheme="dark"] body.admin-surface .admin-workbench-v3 :is(.mock-panel, .admin-panel, .admin-form, .admin-summary-rail, .admin-filter-bar, .mock-tabs, .warehouse-status-tabs, .warehouse-tool-drawer, .mock-table, .data-table),
html[data-color-scheme="dark"] body.admin-surface .admin-workbench-v3 :is(input, select, textarea, .table-action, .mock-secondary, .danger-action) {
    background: var(--aw-surface) !important;
    color: var(--aw-text) !important;
}

/* Responsive */
@media (max-width: 1280px) {
    body.admin-surface .admin-workbench-v3 {
        padding-inline: 24px !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-summary-rail,
    body.admin-surface .warehouse-browser-page .warehouse-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:nth-child(3n) {
        border-right: 0 !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:nth-child(-n+3) {
        border-bottom: 1px solid var(--aw-line) !important;
    }

    body.admin-surface .admin-orders-page .admin-order-grid {
        grid-template-columns: 1fr !important;
    }

    body.admin-surface .admin-orders-page .admin-order-detail {
        position: static !important;
    }
}

@media (max-width: 1024px) {
    body.admin-surface .admin-workbench-v3 .admin-filter-bar,
    body.admin-surface .admin-orders-page .admin-order-filter {
        grid-template-columns: 1fr 1fr !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-filter-bar .unified-search-field,
    body.admin-surface .admin-orders-page .admin-order-filter .unified-search-field,
    body.admin-surface .admin-orders-page .admin-date-range {
        grid-column: 1 / -1;
    }

    body.admin-surface .admin-categories-page .category-management-grid,
    body.admin-surface .admin-taxonomy-page .taxonomy-layout {
        grid-template-columns: 1fr !important;
    }

    body.admin-surface .admin-categories-page #category-create {
        position: static;
    }

    body.admin-surface .warehouse-browser-page .warehouse-browser {
        grid-template-columns: 1fr !important;
    }

    body.admin-surface .warehouse-browser-page .warehouse-selector {
        position: static;
        max-height: none;
    }

    body.admin-surface .warehouse-browser-page .warehouse-category-list {
        max-height: 320px !important;
    }
}

@media (max-width: 720px) {
    body.admin-surface .admin-workbench-v3 {
        padding: 20px 14px 56px !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-command-header {
        align-items: flex-start !important;
        gap: 14px !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-command-header > :is(a, button),
    body.admin-surface .admin-workbench-v3 .admin-command-header .button {
        width: 100% !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-summary-rail,
    body.admin-surface .warehouse-browser-page .warehouse-metric-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:nth-child(n) {
        min-height: 78px !important;
        border-right: 1px solid var(--aw-line) !important;
        border-bottom: 1px solid var(--aw-line) !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:nth-child(2n) {
        border-right: 0 !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-summary-rail > article:last-child {
        grid-column: 1 / -1;
        border-right: 0 !important;
        border-bottom: 0 !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-filter-bar,
    body.admin-surface .admin-orders-page .admin-order-filter {
        grid-template-columns: 1fr !important;
    }

    body.admin-surface .admin-workbench-v3 .admin-filter-bar > *,
    body.admin-surface .admin-orders-page .admin-order-filter > * {
        grid-column: 1 !important;
        width: 100%;
    }

    body.admin-surface .admin-products-page .product-admin-forms {
        grid-template-columns: 1fr !important;
    }

    body.admin-surface .admin-workbench-v3 .table-command-bar {
        align-items: flex-start !important;
        gap: 8px;
    }

    body.admin-surface .admin-workbench-v3 .table-command-bar > div {
        width: 100%;
        overflow: visible !important;
    }

    body.admin-surface .admin-workbench-v3 .mock-tabs {
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.admin-surface .admin-workbench-v3 *,
    body.admin-surface .admin-workbench-v3 *::before,
    body.admin-surface .admin-workbench-v3 *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}


/* Progressive disclosure for secondary admin tasks */
body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) {
    scroll-margin-top: 90px;
    overflow: hidden;
    border: 1px solid var(--aw-line);
    border-radius: var(--aw-radius);
    background: var(--aw-surface);
    box-shadow: 0 1px 2px rgba(16,24,40,.025);
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) > summary {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    color: #344054;
    cursor: pointer;
    list-style: none;
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) > summary::-webkit-details-marker {
    display: none;
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) > summary > span {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) > summary > span > .ui-icon {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 9px;
    background: var(--aw-accent-soft);
    color: var(--aw-accent);
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) > summary b {
    display: block;
    color: var(--aw-heading);
    font-size: 13px;
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) > summary small {
    display: block;
    margin-top: 3px;
    color: var(--aw-muted);
    font-size: 10px;
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer) .drawer-chevron {
    width: 17px;
    height: 17px;
    transition: transform .18s ease;
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer)[open] > summary {
    border-bottom: 1px solid var(--aw-line);
    background: var(--aw-surface-subtle);
}

body.admin-surface .admin-workbench-v3 :is(.admin-action-drawer, .admin-create-drawer)[open] .drawer-chevron {
    transform: rotate(180deg);
}

body.admin-surface .admin-workbench-v3 .admin-action-drawer > .admin-form,
body.admin-surface .admin-categories-page .category-create-drawer > .admin-form {
    margin: 0 !important;
    padding: 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.admin-surface .admin-products-page .product-admin-forms {
    align-items: start;
}

body.admin-surface .admin-products-page .bulk-action-menu {
    position: relative;
}

body.admin-surface .admin-products-page .bulk-action-menu > summary {
    cursor: pointer;
    list-style: none;
}

body.admin-surface .admin-products-page .bulk-action-menu > summary::-webkit-details-marker {
    display: none;
}

body.admin-surface .admin-products-page .bulk-action-popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 7px);
    left: 0;
    width: 220px;
    display: grid !important;
    gap: 5px !important;
    padding: 8px;
    border: 1px solid var(--aw-line);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(16,24,40,.15);
}

body.admin-surface .admin-products-page .bulk-action-popover .table-action {
    width: 100%;
    justify-content: flex-start;
    border: 0 !important;
}

body.admin-surface .admin-products-page .bulk-adjustment-drawer {
    border-bottom: 1px solid var(--aw-line);
    background: var(--aw-surface-subtle);
}

body.admin-surface .admin-products-page .bulk-adjustment-drawer > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    color: var(--aw-muted);
    cursor: pointer;
    list-style: none;
    font-size: 11px;
    font-weight: 700;
}

body.admin-surface .admin-products-page .bulk-adjustment-drawer > summary::-webkit-details-marker {
    display: none;
}

body.admin-surface .admin-products-page .bulk-adjustment-drawer > div {
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) auto minmax(200px, .8fr) auto auto;
    gap: 8px !important;
    padding: 0 12px 11px;
}

body.admin-surface .admin-products-page .bulk-adjustment-drawer :is(input, select) {
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    font-size: 12px !important;
}

body.admin-surface .admin-categories-page .category-create-drawer {
    position: sticky;
    top: 84px;
}

body.admin-surface .admin-categories-page #category-create {
    padding: 0 !important;
}

body.admin-surface .admin-workbench-v3 .ui-icon {
    stroke-width: 1.75;
}

body.admin-surface .admin-workbench-v3 .table-actions .ui-icon,
body.admin-surface .admin-workbench-v3 :is(.table-action, .mock-primary, .danger-action) > .ui-icon {
    width: 16px;
    height: 16px;
}

@media (max-width: 1024px) {
    body.admin-surface .admin-categories-page .category-create-drawer {
        position: static;
    }
}

@media (max-width: 720px) {
    body.admin-surface .admin-products-page .bulk-adjustment-drawer > div {
        grid-template-columns: 1fr;
    }

    body.admin-surface .admin-products-page .bulk-action-popover {
        position: fixed;
        inset: auto 14px 82px;
        width: auto;
    }
}


body.admin-surface .admin-workbench-v3 .admin-command-header > .table-action {
    min-height: 40px !important;
    padding: 0 13px !important;
    border: 1px solid var(--aw-line-strong) !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #344054 !important;
    box-shadow: none !important;
}

body.admin-surface .admin-workbench-v3 .admin-command-header > .table-action:hover {
    border-color: #b9c2d0 !important;
    background: var(--aw-surface-subtle) !important;
    color: var(--aw-heading) !important;
    transform: none;
}

body.admin-surface .admin-workbench-v3 .table-hint {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    color: var(--aw-muted);
    font-size: 11px;
    font-weight: 560;
}

body.admin-surface .admin-workbench-v3 .admin-summary-rail:has(> article:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}


/* Warehouse-wide cleanup actions */
body.admin-surface .warehouse-browser-page .warehouse-cleanup-drawer {
    grid-column: 1 / -1;
    border-color: #f2c3ca !important;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid > article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--aw-line);
    border-radius: 11px;
    background: var(--aw-surface-subtle);
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid :is(b, strong) {
    display: block;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid b {
    color: var(--aw-heading);
    font-size: 13px;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid strong {
    margin-top: 4px;
    color: var(--aw-danger);
    font-size: 18px;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid p,
body.admin-surface .warehouse-browser-page .warehouse-cleanup-note {
    color: var(--aw-muted);
    font-size: 11px;
    line-height: 1.45;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid p {
    margin: 5px 0 0;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0 14px 14px;
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-note .ui-icon {
    width: 16px;
    height: 16px;
    color: var(--aw-success);
}

body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

@media (max-width: 720px) {
    body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid {
        grid-template-columns: 1fr;
    }

    body.admin-surface .warehouse-browser-page .warehouse-cleanup-grid > article {
        grid-template-columns: 1fr;
    }
}
