:root {
    --admin-page-bg: var(--app-background, #f4f6f9);
    --admin-surface-bg: var(--app-surface, #ffffff);
    --admin-text-color: var(--app-text, #17212f);
    --admin-secondary-text: var(--app-secondary-text, #536174);
    --admin-muted-text: var(--app-muted-text, #748196);
    --admin-border-color: var(--app-border, #e2e7ee);
    --admin-sidebar-bg: var(--app-sidebar-bg, #ffffff);
    --admin-sidebar-text: var(--app-sidebar-text, #344155);
    --admin-sidebar-icon: var(--app-sidebar-icon, #536174);
    --admin-primary: var(--app-primary, #1769aa);
    --admin-button-color: var(--app-button, #1769aa);
    --admin-button-hover: var(--app-button-hover, #145b94);
    --admin-button-text: var(--app-button-text, #ffffff);
    --admin-active-button: var(--app-active-button, #145b94);
    --admin-input-bg: var(--app-input-bg, #ffffff);
    --admin-danger: #b54747;
    --admin-success: #18794e;
    --admin-radius-sm: 7px;
    --admin-radius-md: 10px;
    --admin-radius-lg: 14px;
    --admin-focus: 0 0 0 3px rgb(23 105 170 / 22%);
    --admin-shadow: 0 1px 3px rgb(20 32 48 / 5%), 0 4px 16px rgb(20 32 48 / 3%);
}

html[data-theme="dark"] {
    --admin-page-bg: #131b27;
    --admin-surface-bg: #1a2533;
    --admin-text-color: #e8edf4;
    --admin-secondary-text: #bdc8d6;
    --admin-muted-text: #91a0b3;
    --admin-border-color: #2c394a;
    --admin-sidebar-bg: #111b29;
    --admin-sidebar-text: #d2dbe6;
    --admin-primary: #69a9df;
    --admin-button-color: #1769aa;
    --admin-button-hover: #1d7dbd;
    --admin-button-text: #ffffff;
    --admin-active-button: #2480c4;
    --admin-input-bg: #151f2c;
    --admin-danger: #f07878;
    --admin-success: #73d0a0;
    --admin-focus: 0 0 0 3px rgb(105 169 223 / 26%);
    --admin-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 7px 22px rgb(0 0 0 / 10%);
}

body.admin-body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--admin-page-bg);
    color: var(--admin-text-color);
}

.admin-shell,
.admin-shell *,
.admin-shell *::before,
.admin-shell *::after {
    box-sizing: border-box;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    background: var(--admin-page-bg);
    color: var(--admin-text-color);
    font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.admin-shell button,
.admin-shell input,
.admin-shell textarea,
.admin-shell select {
    font-family: inherit;
}

.admin-shell [hidden] {
    display: none !important;
}

.admin-sidebar {
    position: sticky;
    z-index: 20;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 16px;
    border-right: 1px solid var(--admin-border-color);
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
}

.admin-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 6px;
}

.admin-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.admin-brand img {
    display: block;
    width: min(174px, 100%);
    max-height: 68px;
    object-fit: contain;
    object-position: left center;
}

.admin-nav-label {
    margin: 35px 10px 9px;
    color: var(--admin-muted-text);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.admin-nav {
    display: grid;
    gap: 4px;
}

.admin-nav a {
    position: relative;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: var(--admin-radius-sm);
    color: var(--admin-secondary-text);
    font-size: 13px;
    font-weight: 550;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.admin-nav a svg {
    flex: none;
    color: var(--admin-sidebar-icon, var(--admin-muted-text));
}

.admin-nav a:hover {
    background: color-mix(in srgb, var(--admin-primary) 7%, var(--admin-sidebar-bg));
    color: var(--admin-text-color);
}

.admin-nav a:hover svg,
.admin-nav a.active svg {
    color: var(--admin-primary);
}

.admin-nav a.active {
    border-color: color-mix(in srgb, var(--admin-primary) 14%, transparent);
    background: color-mix(in srgb, var(--admin-primary) 10%, var(--admin-sidebar-bg));
    color: var(--admin-primary);
    font-weight: 650;
}

.admin-nav a.active::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: -1px;
    width: 2px;
    border-radius: 0 3px 3px 0;
    background: var(--admin-primary);
    content: "";
}

.sidebar-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 14px 7px 2px;
    border-top: 1px solid var(--admin-border-color);
}

.sidebar-foot-mark {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid var(--admin-border-color);
    border-radius: 8px;
    color: var(--admin-primary);
    font-size: 11px;
    font-weight: 750;
}

.sidebar-foot strong,
.sidebar-foot small {
    display: block;
}

.sidebar-foot strong {
    color: var(--admin-sidebar-text);
    font-size: 12px;
    font-weight: 650;
}

.sidebar-foot small {
    color: color-mix(in srgb, var(--admin-sidebar-text) 72%, var(--admin-sidebar-bg));
    font-size: 11px;
}

.admin-main {
    min-width: 0;
    padding: 0 0 48px;
}

.admin-topbar {
    min-height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-inline: max(clamp(22px, 4vw, 52px), calc((100% - 1380px) / 2 + clamp(22px, 4vw, 52px)));
    border-bottom: 1px solid var(--admin-border-color);
}

.admin-topbar-start,
.admin-topbar-tools {
    display: flex;
    align-items: center;
}

.admin-topbar-start {
    min-width: 0;
    gap: 12px;
}

.admin-topbar-start > div {
    min-width: 0;
}

.admin-topbar-tools {
    flex: none;
    gap: 11px;
}

.admin-kicker,
.eyebrow {
    margin: 0 0 4px;
    color: var(--admin-muted-text);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .095em;
    line-height: 1.35;
    text-transform: uppercase;
}

.admin-kicker span {
    padding: 0 4px;
    color: var(--admin-border-color);
}

.admin-topbar h1 {
    overflow: hidden;
    margin: 0;
    color: var(--admin-text-color);
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -.025em;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-theme-toggle,
.admin-icon-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    background: var(--admin-surface-bg);
    color: var(--admin-secondary-text);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.admin-theme-toggle {
    padding: 0 11px;
    font-size: 12px;
    font-weight: 600;
}

.admin-icon-button {
    width: 38px;
    padding: 0;
}

.admin-theme-toggle:hover,
.admin-icon-button:hover {
    border-color: color-mix(in srgb, var(--admin-primary) 30%, var(--admin-border-color));
    background: color-mix(in srgb, var(--admin-primary) 5%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.admin-theme-toggle:focus-visible,
.admin-icon-button:focus-visible,
.admin-shell a:focus-visible,
.admin-shell button:focus-visible,
.admin-shell input:focus-visible,
.admin-shell textarea:focus-visible {
    outline: none;
    box-shadow: var(--admin-focus);
}

.admin-local-badge {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--admin-success) 22%, var(--admin-border-color));
    border-radius: 99px;
    background: color-mix(in srgb, var(--admin-success) 7%, var(--admin-surface-bg));
    color: var(--admin-success);
    font-size: 11px;
    font-weight: 600;
}

.admin-local-badge i,
.product-status i {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--admin-success);
}

.admin-platform-badge {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
}

.admin-platform-badge i {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
}

.admin-platform-badge.badge-shopify {
    border: 1px solid rgba(0, 128, 96, 0.28);
    background: rgba(0, 128, 96, 0.08);
    color: #008060;
}

.admin-platform-badge.badge-shopify i {
    background: #008060;
}

.admin-platform-badge.badge-ecwid {
    border: 1px solid rgba(0, 102, 204, 0.28);
    background: rgba(0, 102, 204, 0.08);
    color: #0066cc;
}

.admin-platform-badge.badge-ecwid i {
    background: #0066cc;
}

.admin-menu-open,
.admin-menu-close,
.admin-scrim {
    display: none;
}

.admin-content {
    width: min(100%, 1380px);
    margin: 0 auto;
    padding-inline: clamp(22px, 4vw, 52px);
}

.button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: var(--admin-radius-sm);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.button svg {
    flex: none;
}

.button-primary {
    border-color: var(--admin-button-color);
    background: var(--admin-button-color);
    color: var(--admin-button-text);
}

.button-primary:hover:not(:disabled) {
    border-color: var(--admin-button-hover);
    background: var(--admin-button-hover);
    color: var(--admin-button-text);
}

.button-secondary {
    border-color: var(--admin-border-color);
    background: var(--admin-surface-bg);
    color: var(--admin-secondary-text);
}

.button-secondary:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--admin-primary) 34%, var(--admin-border-color));
    background: color-mix(in srgb, var(--admin-primary) 5%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.section-card {
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface-bg);
    box-shadow: var(--admin-shadow);
}

.page-intro {
    min-height: 124px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 23px 0 20px;
}

.page-intro > div {
    min-width: 0;
}

.page-intro h2 {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--admin-text-color);
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.03em;
    line-height: 1.25;
}

.page-intro p:not(.eyebrow) {
    max-width: 680px;
    margin: 7px 0 0;
    color: var(--admin-muted-text);
    font-size: 13px;
    line-height: 1.55;
}

.count-pill {
    flex: none;
    padding: 6px 10px;
    border: 1px solid var(--admin-border-color);
    border-radius: 99px;
    background: var(--admin-surface-bg);
    color: var(--admin-secondary-text);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Dashboard */
.dashboard-page {
    display: grid;
    gap: 18px;
    padding-top: 25px;
}

.dashboard-heading,
.dashboard-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-heading h2 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: clamp(25px, 2.5vw, 32px);
    font-weight: 690;
    letter-spacing: -.04em;
    line-height: 1.15;
}

.dashboard-heading > div > p:last-child {
    margin: 8px 0 0;
    color: var(--admin-muted-text);
    font-size: 13px;
}

.dashboard-heading .eyebrow span {
    padding-inline: 4px;
    color: var(--admin-border-color);
}

.dashboard-periods {
    display: inline-flex;
    flex: none;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--admin-border-color);
    border-radius: 10px;
    background: var(--admin-surface-bg);
    box-shadow: 0 2px 5px rgb(20 32 48 / 3%);
}

.dashboard-periods a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 7px;
    color: var(--admin-muted-text);
    font-size: 11px;
    font-weight: 620;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.dashboard-periods a:hover {
    color: var(--admin-text-color);
}

.dashboard-periods a.is-active {
    background: color-mix(in srgb, var(--admin-primary) 9%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-metric,
.dashboard-panel {
    min-width: 0;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface-bg);
    box-shadow: 0 3px 12px rgb(20 32 48 / 3%);
}

.dashboard-metric {
    min-height: 154px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 16px 13px;
}

.dashboard-metric-featured {
    border-color: color-mix(in srgb, var(--admin-primary) 26%, var(--admin-border-color));
    background: linear-gradient(145deg, color-mix(in srgb, var(--admin-primary) 8%, var(--admin-surface-bg)), var(--admin-surface-bg) 74%);
}

.dashboard-metric-topline {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.dashboard-metric-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--admin-primary) 17%, var(--admin-border-color));
    border-radius: 9px;
    background: color-mix(in srgb, var(--admin-primary) 8%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.dashboard-metric-icon-warm {
    border-color: color-mix(in srgb, #b7791f 18%, var(--admin-border-color));
    background: color-mix(in srgb, #b7791f 8%, var(--admin-surface-bg));
    color: #a66a12;
}

.dashboard-metric-icon-green {
    border-color: color-mix(in srgb, var(--admin-success) 18%, var(--admin-border-color));
    background: color-mix(in srgb, var(--admin-success) 8%, var(--admin-surface-bg));
    color: var(--admin-success);
}

.dashboard-metric-kicker {
    overflow: hidden;
    color: var(--admin-muted-text);
    font-size: 9px;
    font-weight: 730;
    letter-spacing: .08em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-metric-label {
    display: block;
    color: var(--admin-secondary-text);
    font-size: 11px;
    font-weight: 590;
}

.dashboard-metric > strong,
.dashboard-metric-main strong {
    display: block;
    margin-top: 2px;
    color: var(--admin-text-color);
    font-size: 27px;
    font-weight: 690;
    letter-spacing: -.035em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.dashboard-metric > small {
    max-width: 230px;
    margin-top: auto;
    padding-top: 9px;
    color: var(--admin-muted-text);
    font-size: 10px;
    line-height: 1.4;
}

.dashboard-metric-main {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.dashboard-metric-of {
    padding-bottom: 3px;
    color: var(--admin-muted-text);
    font-size: 10px;
    white-space: nowrap;
}

.dashboard-publish-track {
    width: 100%;
    height: 4px;
    overflow: hidden;
    margin-top: 11px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--admin-primary) 13%, var(--admin-surface-bg));
}

.dashboard-publish-track span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--admin-primary);
    transition: width .35s ease;
}

.dashboard-metric-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 8px;
    color: var(--admin-primary);
    font-size: 10px;
    font-weight: 650;
    text-decoration: none;
}

.dashboard-metric-link:hover,
.dashboard-orders-footer:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .85fr);
    align-items: stretch;
    gap: 14px;
}

.dashboard-panel {
    padding: 18px;
}

.dashboard-panel-heading {
    align-items: center;
    gap: 12px;
}

.dashboard-panel-heading .eyebrow {
    margin-bottom: 5px;
    font-size: 9px;
}

.dashboard-panel-heading h3 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 15px;
    font-weight: 680;
    letter-spacing: -.015em;
}

.dashboard-panel-heading p:not(.eyebrow) {
    margin: 4px 0 0;
    color: var(--admin-muted-text);
    font-size: 10px;
}

.dashboard-period-label {
    flex: none;
    padding: 5px 8px;
    border: 1px solid var(--admin-border-color);
    border-radius: 99px;
    color: var(--admin-secondary-text);
    font-size: 9px;
    font-weight: 620;
}

.dashboard-chart-wrap {
    height: 228px;
    margin-top: 14px;
}

.dashboard-chart {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.dashboard-chart-grid line {
    stroke: var(--admin-border-color);
    stroke-dasharray: 3 5;
    stroke-width: 1;
    opacity: .72;
}

.dashboard-chart-grid text,
.dashboard-chart-dates text {
    fill: var(--admin-muted-text);
    font-family: inherit;
    font-size: 10px;
}

.dashboard-chart-area {
    fill: url(#dashboard-chart-fill);
}

.dashboard-chart-line {
    fill: none;
    stroke: var(--admin-primary);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

.dashboard-chart-points circle {
    fill: var(--admin-surface-bg);
    stroke: var(--admin-primary);
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

.dashboard-chart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-border-color);
    color: var(--admin-muted-text);
    font-size: 10px;
}

.dashboard-chart-footer span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.dashboard-chart-footer i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--admin-primary);
}

.dashboard-chart-footer strong {
    color: var(--admin-text-color);
    font-size: 11px;
    font-weight: 660;
    font-variant-numeric: tabular-nums;
}

.dashboard-chart-empty,
.dashboard-orders-empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 16px;
    border: 1px dashed var(--admin-border-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--admin-page-bg) 55%, var(--admin-surface-bg));
}

.dashboard-empty-icon {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid var(--admin-border-color);
    border-radius: 10px;
    background: var(--admin-surface-bg);
    color: var(--admin-primary);
}

.dashboard-chart-empty strong,
.dashboard-orders-empty strong {
    color: var(--admin-text-color);
    font-size: 11px;
    font-weight: 650;
}

.dashboard-chart-empty p,
.dashboard-orders-empty p {
    max-width: 300px;
    margin: 4px 0 0;
    color: var(--admin-muted-text);
    font-size: 10px;
    line-height: 1.5;
}

.dashboard-panel-action {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid var(--admin-border-color);
    border-radius: 8px;
    background: var(--admin-surface-bg);
    color: var(--admin-secondary-text);
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease, transform .15s ease;
}

.dashboard-panel-action:hover {
    transform: translateX(2px);
    border-color: color-mix(in srgb, var(--admin-primary) 35%, var(--admin-border-color));
    color: var(--admin-primary);
}

.dashboard-order-list {
    display: grid;
    gap: 2px;
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
}

.dashboard-order-list li + li {
    border-top: 1px solid var(--admin-border-color);
}

.dashboard-order-link {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 2px;
    color: inherit;
    text-decoration: none;
}

.dashboard-order-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid color-mix(in srgb, var(--admin-primary) 16%, var(--admin-border-color));
    border-radius: 9px;
    background: color-mix(in srgb, var(--admin-primary) 7%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.dashboard-order-copy {
    min-width: 0;
    flex: 1;
}

.dashboard-order-copy strong,
.dashboard-order-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-order-copy strong {
    color: var(--admin-text-color);
    font-size: 11px;
    font-weight: 640;
}

.dashboard-order-copy small {
    margin-top: 3px;
    color: var(--admin-muted-text);
    font-size: 9px;
}

.dashboard-order-arrow {
    flex: none;
    color: var(--admin-muted-text);
    transition: transform .15s ease, color .15s ease;
}

.dashboard-order-link:hover .dashboard-order-arrow {
    transform: translateX(2px);
    color: var(--admin-primary);
}

.dashboard-orders-empty {
    min-height: 155px;
    margin-top: 16px;
}

.dashboard-orders-footer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    color: var(--admin-primary);
    font-size: 10px;
    font-weight: 640;
    text-decoration: none;
}

/* Product and order tables */
.table-heading {
    min-height: 67px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--admin-border-color);
}

.table-heading h3 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 14px;
    font-weight: 650;
}

.table-heading p {
    margin: 3px 0 0;
    color: var(--admin-muted-text);
    font-size: 11px;
}

.product-table-wrap,
.order-table-wrap {
    overflow: hidden;
}

.product-table,
.order-table {
    width: 100%;
    overflow-x: auto;
}

.product-row {
    min-height: 88px;
    display: grid;
    grid-template-columns: minmax(270px, 1fr) 120px minmax(205px, auto);
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--admin-border-color);
}

.product-row:last-child,
.order-row:last-child {
    border-bottom: 0;
}

.product-row-head,
.order-row-head {
    min-height: 38px;
    background: color-mix(in srgb, var(--admin-text-color) 3%, var(--admin-surface-bg));
    color: var(--admin-muted-text);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.product-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-image {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: 8px;
    background: color-mix(in srgb, var(--admin-text-color) 2%, var(--admin-surface-bg));
}

.product-image img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}

.product-copy {
    min-width: 0;
}

.product-copy strong,
.product-copy > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-copy strong {
    color: var(--admin-text-color);
    font-size: 13px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.product-copy > span {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 3px;
    color: var(--admin-muted-text);
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-identity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    margin-top: 5px;
    color: var(--admin-muted-text);
    font-size: 10px;
}

.product-identity-meta strong {
    color: var(--admin-secondary-text);
    font-size: 10px;
    font-weight: 650;
}

.product-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    color: var(--admin-secondary-text);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.customize-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
    white-space: nowrap;
}

.order-row {
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(130px, 1.2fr) 80px minmax(180px, 1.3fr) 120px minmax(135px, auto);
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--admin-border-color);
    color: var(--admin-secondary-text);
    font-size: 12px;
}

.order-row > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--admin-text-color);
    font-size: 12px;
    font-weight: 650;
}

.order-open-button {
    min-height: 33px;
    justify-self: end;
    white-space: nowrap;
}

.product-row:not(.product-row-head):hover,
.order-row:not(.order-row-head):hover {
    background: color-mix(in srgb, var(--admin-primary) 3%, var(--admin-surface-bg));
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 46px 20px;
    color: var(--admin-muted-text);
    text-align: center;
}

.empty-state > svg {
    margin-bottom: 3px;
    color: var(--admin-primary);
}

.empty-state strong {
    color: var(--admin-text-color);
    font-size: 13px;
    font-weight: 650;
}

.empty-state p {
    max-width: 430px;
    margin: 0;
    font-size: 12px;
}

.empty-state .platform-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    background: color-mix(in srgb, var(--admin-muted-text) 10%, var(--admin-surface-bg));
    border: 1px solid var(--admin-border-color);
    color: var(--admin-secondary-text);
}

/* Product detail */
.product-detail-intro {
    align-items: center;
}

.product-detail-intro > div {
    min-width: 0;
}

.product-detail-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, .8fr);
    gap: 13px;
}

.product-detail-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 17px;
}

.product-detail-image {
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    background: color-mix(in srgb, var(--admin-text-color) 2%, var(--admin-surface-bg));
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.product-detail-identity h3 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 16px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.product-detail-identity p:not(.eyebrow) {
    margin: 5px 0 0;
    color: var(--admin-muted-text);
    font-size: 12px;
}

.product-detail-facts {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 17px 19px;
}

.product-detail-facts > div {
    min-width: 0;
}

.product-detail-facts span,
.product-detail-facts strong,
.product-detail-facts small {
    display: block;
    overflow-wrap: anywhere;
}

.product-detail-facts span {
    margin-bottom: 2px;
    color: var(--admin-muted-text);
    font-size: 11px;
}

.product-detail-facts strong {
    color: var(--admin-text-color);
    font-size: 13px;
    font-weight: 650;
}

.product-detail-facts small {
    margin-top: 2px;
    color: var(--admin-muted-text);
    font-size: 10px;
}

.product-detail-card {
    overflow: hidden;
    margin-top: 14px;
}

.detail-section-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 8px;
    background: color-mix(in srgb, var(--admin-primary) 8%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.product-detail-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 18px 18px;
}

.product-detail-option {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
}

.product-detail-option h4,
.brand-logo-variant h4 {
    margin: 0 0 9px;
    color: var(--admin-text-color);
    font-size: 13px;
    font-weight: 650;
}

.product-detail-option ul,
.product-detail-inputs {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-detail-option li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid var(--admin-border-color);
    color: var(--admin-secondary-text);
    font-size: 12px;
}

.product-detail-option li:first-child {
    border-top: 0;
}

.product-detail-option li strong,
.product-detail-option li em {
    flex: none;
    color: var(--admin-muted-text);
    font-size: 11px;
    font-style: normal;
    font-weight: 550;
}

.product-detail-option li strong {
    color: var(--admin-primary);
}

.product-detail-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    padding: 0 18px 10px;
}

.product-detail-inputs li {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--admin-border-color);
    font-size: 12px;
}

.product-detail-inputs strong {
    overflow-wrap: anywhere;
    color: var(--admin-text-color);
    font-weight: 600;
}

.product-detail-inputs span {
    flex: none;
    color: var(--admin-muted-text);
}

.product-detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 13px 16px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-md);
    background: color-mix(in srgb, var(--admin-text-color) 2%, var(--admin-surface-bg));
}

.product-detail-actions p {
    margin: 0;
    color: var(--admin-secondary-text);
    font-size: 12px;
}

/* Order designs */
.order-page-intro {
    align-items: center;
}

.order-design-list {
    display: grid;
    gap: 11px;
}

.order-design-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 154px minmax(0, 1fr) auto;
    align-items: center;
    gap: 17px;
    padding: 14px;
}

.order-design-preview {
    position: relative;
    height: 126px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    background: color-mix(in srgb, var(--admin-text-color) 3%, var(--admin-surface-bg));
}

.order-design-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.order-design-preview > span.order-no-preview {
    color: var(--admin-muted-text);
}

.order-design-preview small {
    position: absolute;
    bottom: 7px;
    left: 7px;
    padding: 3px 6px;
    border: 1px solid var(--admin-border-color);
    border-radius: 5px;
    background: var(--admin-surface-bg);
    color: var(--admin-muted-text);
    font-size: 9px;
}

.order-design-details {
    min-width: 0;
}

.order-design-details .eyebrow {
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
}

.order-design-details h3 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 15px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.order-design-details > p:not(.eyebrow) {
    margin: 4px 0 0;
    color: var(--admin-muted-text);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.order-artwork-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.order-artwork-list a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: 6px;
    background: var(--admin-surface-bg);
}

.order-artwork-list a:hover {
    border-color: var(--admin-primary);
}

.order-artwork-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-design-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

.order-preview-unavailable {
    padding: 0 8px;
    color: var(--admin-muted-text);
    font-size: 10px;
    text-align: center;
}

/* Appearance settings */
.appearance-form {
    display: grid;
    gap: 12px;
    padding-bottom: 10px;
}

.appearance-card {
    min-width: 0;
    padding: 18px;
}

.appearance-card-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.appearance-card-heading h3 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 16px;
    font-weight: 650;
}

.appearance-card-heading p:not(.eyebrow) {
    margin: 4px 0 0;
    color: var(--admin-muted-text);
    font-size: 12px;
    line-height: 1.5;
}

.appearance-theme-options,
.appearance-brand-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.appearance-theme-options > label,
.appearance-brand-choice > label {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    background: var(--admin-input-bg);
    color: var(--admin-secondary-text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 550;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.appearance-theme-options > label:has([data-state="checked"]),
.appearance-brand-choice > label:has([data-state="checked"]) {
    border-color: color-mix(in srgb, var(--admin-primary) 55%, var(--admin-border-color));
    background: color-mix(in srgb, var(--admin-primary) 7%, var(--admin-input-bg));
    color: var(--admin-text-color);
}

.appearance-theme-options > label:hover,
.appearance-brand-choice > label:hover {
    border-color: color-mix(in srgb, var(--admin-primary) 36%, var(--admin-border-color));
}

.admin-radio {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    flex: none;
    padding: 0;
    border: 1px solid var(--admin-muted-text);
    border-radius: 50%;
    background: var(--admin-input-bg);
    color: var(--admin-primary);
    cursor: pointer;
}

.admin-radio[data-state="checked"] {
    border-color: var(--admin-primary);
}

.admin-radio-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.appearance-palette-stack {
    display: grid;
    gap: 15px;
}

.appearance-palette + .appearance-palette {
    padding-top: 15px;
    border-top: 1px solid var(--admin-border-color);
}

.appearance-palette > h4 {
    margin: 0 0 10px;
    color: var(--admin-text-color);
    font-size: 13px;
    font-weight: 650;
}

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

.appearance-variant {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    background: color-mix(in srgb, var(--admin-text-color) 1.5%, var(--admin-surface-bg));
}

.appearance-variant h5 {
    margin: 0 0 9px;
    color: var(--admin-text-color);
    font-size: 12px;
    font-weight: 650;
}

.appearance-brand-choice {
    gap: 6px;
    margin-bottom: 11px;
}

.appearance-brand-choice > label {
    min-height: 34px;
    padding: 0 9px;
    font-size: 10px;
}

.appearance-brand-choice .admin-radio {
    width: 14px;
    height: 14px;
}

.appearance-brand-choice .admin-radio-indicator {
    width: 7px;
    height: 7px;
}

.appearance-color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

.appearance-color-grid > label {
    min-width: 0;
    display: grid;
    gap: 4px;
    color: var(--admin-muted-text);
    font-size: 10px;
    font-weight: 550;
}

.appearance-color-inputs {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.appearance-color-inputs input[type="color"] {
    width: 28px;
    height: 29px;
    flex: none;
    padding: 3px;
    border: 1px solid var(--admin-border-color);
    border-radius: 5px;
    background: var(--admin-input-bg);
    cursor: pointer;
}

.appearance-color-inputs input[type="text"] {
    width: 100%;
    min-width: 0;
    height: 29px;
    padding: 0 7px;
    border: 1px solid var(--admin-border-color);
    border-radius: 5px;
    background: var(--admin-input-bg);
    color: var(--admin-text-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
}

.appearance-color-inputs input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.appearance-note {
    margin: 9px 0 0;
    color: var(--admin-muted-text);
    font-size: 11px;
}

.brand-logo-shared-toggle {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--admin-secondary-text);
    font-size: 12px;
    font-weight: 550;
    cursor: pointer;
}

.admin-checkbox {
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    flex: none;
    padding: 0;
    border: 1px solid var(--admin-muted-text);
    border-radius: 4px;
    background: var(--admin-input-bg);
    color: #fff;
    cursor: pointer;
}

.admin-checkbox[data-state="checked"] {
    border-color: var(--admin-primary);
    background: var(--admin-primary);
}

.admin-checkbox-indicator {
    display: grid;
    place-items: center;
}

.admin-native-bridge {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.brand-logo-setting {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--admin-border-color);
}

.brand-logo-setting:first-child {
    border-top: 0;
}

.brand-logo-preview {
    height: 175px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 10px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    background: color-mix(in srgb, var(--admin-primary) 5%, var(--admin-input-bg));
}

.brand-logo-preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.favicon-preview {
    width: 90px;
    height: 82px;
}

.brand-logo-actions {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.brand-logo-actions p {
    width: 100%;
    margin: 0;
    color: var(--admin-muted-text);
    font-size: 10px;
}

.logo-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.logo-upload-label {
    cursor: pointer;
}

.brand-logo-variants {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.brand-logo-variant {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
}

.brand-logo-variant .brand-logo-setting {
    grid-template-columns: minmax(110px, 1fr);
    padding-top: 0;
    border-top: 0;
}

.appearance-save-row {
    position: sticky;
    z-index: 5;
    bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-md);
    background: color-mix(in srgb, var(--admin-surface-bg) 94%, transparent);
    box-shadow: var(--admin-shadow);
    backdrop-filter: blur(12px);
}

.appearance-save-row p {
    margin: 0;
    color: var(--admin-muted-text);
    font-size: 12px;
}

@media (max-width: 1050px) {
    .admin-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .admin-main {
        padding-right: 0;
        padding-left: 0;
    }

    .admin-topbar,
    .admin-content {
        padding-right: 26px;
        padding-left: 26px;
    }

    .product-row {
        grid-template-columns: minmax(230px, 1fr) 95px minmax(190px, auto);
        gap: 12px;
        padding-right: 13px;
        padding-left: 13px;
    }

    .order-design-card {
        grid-template-columns: 128px minmax(0, 1fr) auto;
        gap: 13px;
    }

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

    .dashboard-panels {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        z-index: 31;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(290px, calc(100vw - 52px));
        height: 100dvh;
        transform: translateX(-102%);
        transition: transform .2s ease;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-menu-open,
    .admin-menu-close {
        display: inline-flex;
    }

    .admin-scrim {
        position: fixed;
        z-index: 30;
        inset: 0;
        display: block;
        background: rgb(10 18 29 / 46%);
    }

    .admin-main {
        padding-right: 0;
        padding-left: 0;
    }

    .admin-topbar,
    .admin-content {
        padding-right: 19px;
        padding-left: 19px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-periods {
        align-self: flex-start;
    }

    .admin-topbar {
        min-height: 74px;
    }

    .admin-topbar h1 {
        font-size: 19px;
    }

    .product-row {
        grid-template-columns: minmax(0, 1fr) 95px;
        gap: 10px 14px;
        padding: 13px;
    }

    .product-row-head {
        display: none;
    }

    .product-identity {
        grid-column: 1 / -1;
    }

    .product-status {
        grid-column: 1;
    }

    .product-actions {
        grid-column: 2;
        grid-row: 2;
    }

    .order-row {
        min-width: 760px;
    }

    .product-detail-summary {
        grid-template-columns: 1fr;
    }

    .order-design-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .order-design-preview {
        height: 110px;
    }

    .order-design-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
    }

    .order-design-actions > * {
        min-width: 130px;
    }
}

@media (max-width: 560px) {
    .admin-main {
        padding-right: 0;
        padding-left: 0;
    }

    .admin-topbar,
    .admin-content {
        padding-right: 14px;
        padding-left: 14px;
    }

    .admin-topbar-tools {
        gap: 6px;
    }

    .admin-local-badge {
        width: 30px;
        min-height: 30px;
        overflow: hidden;
        justify-content: center;
        padding: 0;
        font-size: 0;
    }

    .admin-local-badge i {
        width: 7px;
        height: 7px;
    }

    .admin-theme-toggle {
        width: 35px;
        min-height: 35px;
        overflow: hidden;
        gap: 0;
        padding: 0;
        font-size: 0;
    }

    .admin-theme-toggle svg {
        flex: none;
    }

    .admin-kicker {
        font-size: 9px;
    }

    .admin-topbar h1 {
        font-size: 17px;
    }

    .page-intro {
        min-height: auto;
        align-items: flex-start;
        padding: 21px 0 15px;
    }

    .page-intro h2 {
        font-size: 22px;
    }

    .page-intro p:not(.eyebrow) {
        font-size: 12px;
    }

    .count-pill {
        padding: 5px 8px;
        font-size: 10px;
    }

    .dashboard-page {
        gap: 14px;
        padding-top: 18px;
    }

    .dashboard-heading h2 {
        font-size: 25px;
    }

    .dashboard-heading > div > p:last-child {
        max-width: 360px;
        font-size: 11px;
    }

    .dashboard-metrics {
        gap: 8px;
    }

    .dashboard-metric {
        min-height: 143px;
        padding: 12px;
    }

    .dashboard-metric-topline {
        margin-bottom: 11px;
    }

    .dashboard-metric > strong,
    .dashboard-metric-main strong {
        font-size: 23px;
    }

    .dashboard-panel {
        padding: 14px;
    }

    .dashboard-chart-wrap {
        height: 190px;
    }

    .dashboard-chart-empty {
        min-height: 145px;
    }

    .product-table-wrap,
    .order-table-wrap {
        border-radius: 9px;
    }

    .table-heading {
        padding: 12px;
    }

    .product-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .product-identity {
        grid-column: 1;
    }

    .product-actions {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .product-status {
        grid-column: 1;
    }

    .product-detail-identity {
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .product-detail-image {
        width: 78px;
        height: 78px;
    }

    .product-detail-option-grid,
    .product-detail-inputs {
        grid-template-columns: 1fr;
    }

    .product-detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .order-design-card {
        grid-template-columns: 1fr;
        gap: 11px;
        padding: 11px;
    }

    .order-design-preview {
        height: 170px;
    }

    .order-design-actions {
        grid-column: 1;
    }

    .order-design-actions > * {
        min-width: 0;
        flex: 1;
    }

    .appearance-card {
        padding: 14px;
    }

    .appearance-theme-options > label {
        flex: 1;
        justify-content: center;
        padding: 0 8px;
    }

    .appearance-variant-grid,
    .brand-logo-variants {
        grid-template-columns: 1fr;
    }

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

    .brand-logo-setting {
        grid-template-columns: 1fr;
    }

    .brand-logo-preview {
        max-width: 320px;
    }

    .brand-logo-actions .button {
        flex: 1 1 auto;
    }

    .appearance-save-row {
        bottom: 6px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .appearance-save-row .button {
        width: 100%;
    }
}

.product-source-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.product-source-row > strong {
    min-width: 0;
}

.product-source-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 7px;
    border: 1px solid var(--admin-border-color);
    border-radius: 99px;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
}

.product-source-badge.demo {
    border-color: color-mix(in srgb, var(--admin-muted-text) 28%, var(--admin-border-color));
    background: color-mix(in srgb, var(--admin-muted-text) 7%, var(--admin-surface-bg));
    color: var(--admin-secondary-text);
}

.product-source-badge.ecwid {
    border-color: color-mix(in srgb, var(--admin-primary) 28%, var(--admin-border-color));
    background: color-mix(in srgb, var(--admin-primary) 8%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.product-source-badge.shopify {
    border-color: color-mix(in srgb, #95bf47 40%, var(--admin-border-color));
    background: color-mix(in srgb, #95bf47 14%, var(--admin-surface-bg));
    color: #5e8e3e;
}

.product-source-badge.gpg {
    border-color: color-mix(in srgb, #008060 40%, var(--admin-border-color));
    background: color-mix(in srgb, #008060 12%, var(--admin-surface-bg));
    color: #008060;
}

.product-client-tag {
    color: #008060;
    font-weight: 600;
}

.ecwid-product-row .product-status small {
    color: var(--admin-muted-text);
    font-size: 10px;
    font-weight: 500;
}

.ecwid-product-row .product-status.is-disabled i {
    background: var(--admin-danger, #c2413b);
}

.ecwid-load-error {
    margin: 0 0 13px;
    padding: 12px 15px;
    border: 1px solid color-mix(in srgb, #c2413b 28%, var(--admin-border-color));
    border-radius: var(--admin-radius-sm);
    background: color-mix(in srgb, #c2413b 6%, var(--admin-surface-bg));
    color: var(--admin-secondary-text);
    font-size: 12px;
}

.ecwid-load-error strong {
    display: block;
    color: var(--admin-text-color);
    font-size: 13px;
}

.ecwid-load-error p {
    margin: 4px 0 10px;
}

.ecwid-product-identity {
    align-items: flex-start;
}

.ecwid-product-identity .product-source-badge {
    margin-top: 9px;
}

.ecwid-enabled {
    color: var(--admin-success) !important;
}

.ecwid-disabled {
    color: var(--admin-danger, #c2413b) !important;
}

.ecwid-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding: 16px 18px 18px;
}

.ecwid-gallery-item {
    position: relative;
    min-height: 120px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    background: color-mix(in srgb, var(--admin-text-color) 2%, var(--admin-surface-bg));
}

.ecwid-gallery-item img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    padding: 8px;
}

.ecwid-gallery-item > span {
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--admin-surface-bg);
    color: var(--admin-secondary-text);
    font-size: 9px;
}

.ecwid-gallery-item > svg {
    position: absolute;
    top: 7px;
    right: 7px;
    color: var(--admin-muted-text);
}

.ecwid-description {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--admin-secondary-text);
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-line;
}

.ecwid-option-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: -2px 0 8px;
}

.ecwid-option-meta span {
    padding: 3px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--admin-text-color) 4%, var(--admin-surface-bg));
    color: var(--admin-muted-text);
    font-size: 9px;
}

.ecwid-choice-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ecwid-choice-label img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border: 1px solid var(--admin-border-color);
    border-radius: 4px;
}

.ecwid-color-swatch {
    width: 14px;
    height: 14px;
    flex: none;
    border: 1px solid color-mix(in srgb, var(--admin-text-color) 18%, transparent);
    border-radius: 50%;
}

.ecwid-option li strong small {
    display: block;
    color: var(--admin-muted-text);
    font-size: 9px;
    font-weight: 500;
    text-align: right;
}

.ecwid-option-empty,
.ecwid-empty-state {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 8px 0;
    color: var(--admin-muted-text);
    font-size: 11px;
}

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

.ecwid-metadata-list {
    margin: 0;
    padding: 0 18px 14px;
}

.ecwid-metadata-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid var(--admin-border-color);
    font-size: 11px;
}

.ecwid-metadata-list dt {
    color: var(--admin-muted-text);
}

.ecwid-metadata-list dd {
    margin: 0;
    color: var(--admin-text-color);
    font-weight: 600;
    overflow-wrap: anywhere;
    text-align: right;
}

.ecwid-category-list {
    margin: 0;
    padding: 0 18px 14px;
    list-style: none;
}

.ecwid-category-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--admin-border-color);
    color: var(--admin-secondary-text);
    font-size: 11px;
}

.ecwid-category-list small {
    color: var(--admin-muted-text);
}

.ecwid-variation-list {
    display: grid;
    gap: 8px;
    padding: 0 18px 18px;
}

.ecwid-variation-list article {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-sm);
    color: var(--admin-secondary-text);
    font-size: 10px;
}

.ecwid-variation-list article > img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.ecwid-variation-list article > div,
.ecwid-variation-list article > div span {
    display: block;
}

.ecwid-variation-list article > div strong {
    display: block;
    margin-bottom: 3px;
    color: var(--admin-text-color);
}

.ecwid-additional-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
}

@media (max-width: 800px) {
    .ecwid-detail-columns {
        grid-template-columns: 1fr;
    }

    .ecwid-variation-list article {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .ecwid-variation-list article > strong,
    .ecwid-variation-list article > span {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .ecwid-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-right: 12px;
        padding-left: 12px;
    }

    .ecwid-additional-data {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-shell *,
    .admin-shell *::before,
    .admin-shell *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

/* Keep the existing utility-based Admin pages on the same semantic palette. */
.admin-shell [class~="bg-white"]:not([data-theme-role]) {
    background-color: var(--admin-surface-bg) !important;
}

.admin-shell [class~="bg-slate-50"],
.admin-shell [class~="bg-slate-50/60"],
.admin-shell [class~="bg-slate-50/70"] {
    background-color: var(--admin-page-bg) !important;
}

.admin-shell [class~="bg-slate-100"],
.admin-shell [class~="bg-slate-200"] {
    background-color: color-mix(in srgb, var(--admin-border-color) 42%, var(--admin-surface-bg)) !important;
}

.admin-shell input[class~="bg-white"],
.admin-shell select[class~="bg-white"],
.admin-shell textarea[class~="bg-white"] {
    background-color: var(--admin-input-bg) !important;
    color: var(--admin-text-color) !important;
}

.admin-shell [class~="bg-indigo-50"] {
    background-color: color-mix(in srgb, var(--admin-primary) 11%, var(--admin-surface-bg)) !important;
}

.admin-shell [class~="bg-indigo-100"] {
    background-color: color-mix(in srgb, var(--admin-primary) 17%, var(--admin-surface-bg)) !important;
}

.admin-shell [class~="bg-indigo-600"] {
    background-color: var(--admin-button-color) !important;
    color: var(--admin-button-text) !important;
}

.admin-shell [class~="hover:bg-indigo-700"]:hover {
    background-color: var(--admin-button-hover) !important;
}

.admin-shell [class~="text-indigo-600"],
.admin-shell [class~="text-indigo-700"] {
    color: var(--admin-primary) !important;
}

.admin-shell [class~="border-indigo-600"],
.admin-shell [class~="focus:border-indigo-500"]:focus {
    border-color: var(--admin-primary) !important;
}

.admin-shell [class~="ring-indigo-600"] {
    --tw-ring-color: var(--admin-primary) !important;
}

.admin-shell [class~="text-slate-950"],
.admin-shell [class~="text-slate-900"] {
    color: var(--admin-text-color) !important;
}

.admin-shell [class~="text-slate-800"],
.admin-shell [class~="text-slate-700"],
.admin-shell [class~="text-slate-600"] {
    color: var(--admin-secondary-text) !important;
}

.admin-shell [class~="text-slate-500"],
.admin-shell [class~="text-slate-400"] {
    color: var(--admin-muted-text) !important;
}

.admin-shell [class~="border-slate-100"],
.admin-shell [class~="border-slate-200"],
.admin-shell [class~="divide-slate-100"] > :not(:last-child) {
    border-color: var(--admin-border-color) !important;
}

.admin-shell [class~="focus:border-indigo-500"]:focus,
.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
    box-shadow: var(--admin-focus);
}

.admin-shell [class~="bg-sky-50"],
.admin-shell [class~="bg-violet-50"],
.admin-shell [class~="bg-emerald-50"] {
    background-color: color-mix(in srgb, var(--admin-primary) 9%, var(--admin-surface-bg)) !important;
}

.admin-shell [class~="text-sky-800"],
.admin-shell [class~="text-violet-800"],
.admin-shell [class~="text-emerald-800"],
.admin-shell [class~="text-emerald-700"] {
    color: color-mix(in srgb, var(--admin-primary) 70%, var(--admin-text-color)) !important;
}

.admin-shell [class~="ring-sky-200"],
.admin-shell [class~="ring-violet-200"],
.admin-shell [class~="ring-emerald-200"] {
    --tw-ring-color: var(--admin-border-color) !important;
}

.admin-shell [class~="bg-amber-50"] {
    background-color: color-mix(in srgb, #d97706 13%, var(--admin-surface-bg)) !important;
}

.admin-shell [class~="bg-rose-50"] {
    background-color: color-mix(in srgb, #e11d48 12%, var(--admin-surface-bg)) !important;
}

.admin-shell [class~="text-amber-900"],
.admin-shell [class~="text-amber-700"] {
    color: color-mix(in srgb, #b45309 72%, var(--admin-text-color)) !important;
}

.admin-shell [class~="text-rose-900"],
.admin-shell [class~="text-rose-700"] {
    color: color-mix(in srgb, #be123c 70%, var(--admin-text-color)) !important;
}

.admin-shell [class~="border-amber-200"],
.admin-shell [class~="border-amber-300"],
.admin-shell [class~="border-rose-200"],
.admin-shell [class~="border-rose-300"] {
    border-color: color-mix(in srgb, var(--admin-primary) 40%, var(--admin-border-color)) !important;
}

.admin-shell [class~="hover:bg-slate-50"]:hover,
.admin-shell [class~="hover:bg-slate-50/70"]:hover,
.admin-shell tr:hover [class~="sticky"] {
    background-color: color-mix(in srgb, var(--admin-primary) 5%, var(--admin-surface-bg)) !important;
}

/* Appearance Theme Studio */
.theme-studio {
    display: grid;
    gap: 18px;
    padding-bottom: 12px;
}

.theme-studio-header,
.theme-studio-section-head,
.theme-studio-footer,
.theme-studio-mode-row,
.theme-studio-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.theme-studio-header h2,
.theme-studio-section-head h3 {
    margin: 0;
    color: var(--admin-text-color);
}

.theme-studio-header p,
.theme-studio-section-head p,
.theme-studio-hint {
    margin: 4px 0 0;
    color: var(--admin-secondary-text);
}

.theme-studio-mode-options,
.theme-preview-mode-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.theme-studio-mode-options button,
.theme-preview-mode-options button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--admin-border-color);
    border-radius: 9px;
    background: var(--admin-surface-bg);
    color: var(--admin-secondary-text);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.theme-studio-mode-options button[aria-pressed="true"],
.theme-preview-mode-options button[aria-pressed="true"] {
    border-color: var(--admin-primary);
    background: color-mix(in srgb, var(--admin-primary) 12%, var(--admin-surface-bg));
    color: var(--admin-primary);
}

.theme-studio-section,
.theme-preview-card,
.theme-studio-advanced {
    min-width: 0;
    padding: clamp(16px, 2vw, 22px);
    border: 1px solid var(--admin-border-color);
    border-radius: var(--admin-radius-lg);
    background: var(--admin-surface-bg);
    box-shadow: var(--admin-shadow);
}

.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 12px;
    margin-top: 17px;
}

.theme-preset-card {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--admin-border-color);
    border-radius: 12px;
    background: var(--admin-surface-bg);
    color: var(--admin-text-color);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.theme-preset-card:hover {
    border-color: var(--admin-primary);
    transform: translateY(-1px);
}

.theme-preset-card[aria-pressed="true"] {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--admin-primary) 24%, transparent);
}

.theme-preset-card > span {
    font-size: 12px;
    font-weight: 700;
}

.theme-preset-preview {
    display: grid;
    grid-template-columns: 26% minmax(0, 1fr);
    min-height: 84px;
    overflow: hidden;
    border: 1px solid var(--preview-border);
    border-radius: 8px;
    background: var(--preview-bg);
}

.theme-preset-preview aside {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 9px 6px;
    background: var(--preview-sidebar);
}

.theme-preset-preview aside i {
    height: 4px;
    border-radius: 3px;
    background: var(--preview-sidebar-icon);
    opacity: .65;
}

.theme-preset-preview aside i:first-child {
    background: var(--preview-primary);
    opacity: 1;
}

.theme-preset-preview section {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 9px;
}

.theme-preset-preview section > i {
    width: 52%;
    height: 5px;
    border-radius: 3px;
    background: var(--preview-text);
    opacity: .55;
}

.theme-preset-preview section > div {
    display: flex;
    gap: 5px;
}

.theme-preset-preview section > div i {
    flex: 1;
    height: 25px;
    border: 1px solid var(--preview-border);
    border-radius: 4px;
    background: var(--preview-surface);
}

.theme-preset-preview section > button {
    width: 40%;
    height: 12px;
    border: 0;
    border-radius: 4px;
    background: var(--preview-button);
}

.theme-quick-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr));
    gap: 11px;
    margin-top: 15px;
}

.theme-color-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--admin-border-color);
    border-radius: 10px;
    background: var(--admin-page-bg);
    color: var(--admin-text-color);
    font-size: 12px;
    font-weight: 600;
}

.theme-color-control input[type="color"] {
    width: 42px;
    height: 34px;
    padding: 3px;
    border: 1px solid var(--admin-border-color);
    border-radius: 8px;
    background: var(--admin-surface-bg);
    cursor: pointer;
}

.theme-color-control input[type="text"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid var(--admin-border-color);
    border-radius: 7px;
    background: var(--admin-input-bg);
    color: var(--admin-text-color);
    font: 12px ui-monospace, monospace;
}

.theme-contrast-warning {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, #d97706 38%, var(--admin-border-color));
    border-radius: 9px;
    background: color-mix(in srgb, #d97706 12%, var(--admin-surface-bg));
    color: var(--admin-text-color);
    font-size: 12px;
}

.theme-preview-layout {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    min-height: 270px;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--preview-border);
    border-radius: 12px;
    background: var(--preview-bg);
    color: var(--preview-text);
}

.theme-preview-sidebar {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 16px 11px;
    background: var(--preview-sidebar);
    color: var(--preview-sidebar-text);
}

.theme-preview-sidebar strong {
    margin-bottom: 8px;
    font-size: 12px;
}

.theme-preview-sidebar span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 7px;
    border-radius: 6px;
    color: var(--preview-sidebar-text);
    font-size: 10px;
}

.theme-preview-sidebar span::before {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--preview-sidebar-icon);
    content: "";
}

.theme-preview-sidebar span:first-of-type {
    background: color-mix(in srgb, var(--preview-primary) 17%, var(--preview-sidebar));
}

.theme-preview-main {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 17px;
}

.theme-preview-main h4 {
    margin: 0;
    color: var(--preview-text);
    font-size: 15px;
}

.theme-preview-main p {
    margin: 0;
    color: var(--preview-secondary);
    font-size: 11px;
}

.theme-preview-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.theme-preview-cards article {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--preview-border);
    border-radius: 8px;
    background: var(--preview-surface);
}

.theme-preview-cards article strong {
    color: var(--preview-text);
    font-size: 10px;
}

.theme-preview-cards article span {
    color: var(--preview-secondary);
    font-size: 9px;
}

.theme-preview-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.theme-preview-form-row input {
    flex: 1 1 140px;
    min-width: 0;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid var(--preview-border);
    border-radius: 7px;
    background: var(--preview-input);
    color: var(--preview-text);
    font: inherit;
    font-size: 10px;
}

.theme-preview-form-row button {
    min-height: 34px;
    padding: 0 11px;
    border: 0;
    border-radius: 7px;
    background: var(--preview-button);
    color: var(--preview-button-text);
    font-size: 10px;
    font-weight: 700;
}

.theme-studio-advanced > summary {
    color: var(--admin-text-color);
    font-weight: 700;
    cursor: pointer;
}

.theme-advanced-scope {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border-color);
}

.theme-advanced-variant {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(225px, 100%), 1fr));
    gap: 9px;
    margin-top: 10px;
}

.theme-studio-footer {
    position: sticky;
    z-index: 4;
    bottom: 0;
    flex-wrap: wrap;
    padding: 12px 0 4px;
    background: var(--admin-page-bg);
}

.theme-studio-status {
    min-height: 20px;
    margin: 0;
    color: var(--admin-secondary-text);
    font-size: 12px;
}

.theme-studio-status[data-dirty="true"] {
    color: var(--admin-primary);
    font-weight: 650;
}

/* On-demand product details dialog */
.product-details-overlay {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(8px, 3vw, 26px);
    background: rgb(6 13 23 / 64%);
    overscroll-behavior: contain;
}

.product-details-dialog {
    display: flex;
    flex-direction: column;
    width: min(100%, 780px);
    max-height: min(90dvh, 760px);
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: 15px;
    background: var(--admin-surface-bg);
    color: var(--admin-text-color);
    box-shadow: 0 28px 90px rgb(0 0 0 / 32%);
}

.product-details-dialog-header,
.product-details-dialog-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: none;
    padding: 13px 17px;
    background: var(--admin-surface-bg);
}

.product-details-dialog-header {
    border-bottom: 1px solid var(--admin-border-color);
}

.product-details-heading h2 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.product-details-heading p {
    display: flex;
    gap: 7px;
    margin: 3px 0 0;
    color: var(--admin-muted-text);
    font-size: 11px;
}

.product-details-close {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: none;
    place-items: center;
    border: 1px solid var(--admin-border-color);
    border-radius: 9px;
    background: var(--admin-page-bg);
    color: var(--admin-text-color);
    cursor: pointer;
}

.product-details-close:hover {
    background: var(--admin-surface-bg);
}

.product-details-dialog-body {
    display: grid;
    min-height: 0;
    gap: 17px;
    overflow: auto;
    padding: 17px;
    overscroll-behavior: contain;
}

.product-details-summary {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(0, 1.5fr);
    gap: 18px;
    align-items: start;
}

.product-details-gallery,
.product-details-summary-content {
    min-width: 0;
}

.product-details-main-image {
    display: grid;
    aspect-ratio: 1 / 1;
    max-height: 245px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: 11px;
    background: var(--admin-page-bg);
    color: var(--admin-muted-text);
}

.product-details-main-image img {
    width: 100%;
    height: 100%;
    max-height: 245px;
    padding: 8px;
    object-fit: contain;
}

.product-details-thumbnails {
    display: flex;
    gap: 6px;
    margin-top: 7px;
    overflow-x: auto;
}

.product-details-thumbnails button {
    width: 42px;
    height: 42px;
    flex: none;
    padding: 3px;
    border: 1px solid var(--admin-border-color);
    border-radius: 7px;
    background: var(--admin-surface-bg);
    cursor: pointer;
}

.product-details-thumbnails button[aria-pressed="true"] {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--admin-primary) 20%, transparent);
}

.product-details-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-details-eyebrow {
    margin: 0 0 5px;
    color: var(--admin-muted-text);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .1em;
}

.product-details-summary-content h3 {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.product-details-price {
    margin: 6px 0 12px;
    color: var(--admin-primary);
    font-size: 17px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.product-details-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.product-details-facts div {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid var(--admin-border-color);
    border-radius: 8px;
    background: var(--admin-page-bg);
}

.product-details-facts dt {
    color: var(--admin-muted-text);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.product-details-facts dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    color: var(--admin-text-color);
    font-size: 11px;
    line-height: 1.4;
}

.product-details-section {
    margin: 0;
    padding-top: 13px;
    border-top: 1px solid var(--admin-border-color);
}

.product-details-section h3 {
    margin: 0 0 8px;
    color: var(--admin-text-color);
    font-size: 12px;
    font-weight: 700;
}

.product-details-attributes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 7px;
    margin: 0;
}

.product-details-attributes > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--admin-border-color);
}

.product-details-attributes dt {
    color: var(--admin-muted-text);
    font-size: 10px;
    font-weight: 650;
}

.product-details-attributes dd {
    margin: 0;
    color: var(--admin-text-color);
    font-size: 11px;
    text-align: right;
    overflow-wrap: anywhere;
}

.product-details-description {
    margin: 10px 0 0;
    white-space: pre-wrap;
    color: var(--admin-secondary-text);
    font-size: 11px;
    line-height: 1.55;
}

.product-details-options {
    display: grid;
    gap: 6px;
    margin: 0;
}

.product-details-option {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: 8px;
    background: var(--admin-page-bg);
}

.product-details-option > summary {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    color: var(--admin-text-color);
    cursor: pointer;
    list-style: none;
}

.product-details-option > summary::-webkit-details-marker {
    display: none;
}

.product-details-option > summary::after {
    content: '+';
    color: var(--admin-muted-text);
    font-size: 16px;
    line-height: 1;
}

.product-details-option[open] > summary::after {
    content: '−';
}

.product-details-option > summary > span:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.product-details-option > summary strong {
    font-size: 11px;
}

.product-details-option > summary small,
.product-details-option-type {
    color: var(--admin-muted-text);
    font-size: 10px;
}

.product-details-option-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px 10px;
}

.product-details-option-values span {
    padding: 4px 7px;
    border: 1px solid var(--admin-border-color);
    border-radius: 999px;
    color: var(--admin-secondary-text);
    font-size: 10px;
}

.product-details-option-values p {
    margin: 0;
    color: var(--admin-secondary-text);
    font-size: 11px;
}

.product-details-dialog-footer {
    justify-content: flex-end;
    padding: 11px 17px;
    border-top: 1px solid var(--admin-border-color);
}

.product-details-empty,
.product-details-error {
    display: flex;
    min-height: 130px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--admin-border-color);
    border-radius: 10px;
    background: var(--admin-page-bg);
    color: var(--admin-secondary-text);
    font-size: 12px;
}

.product-details-error {
    justify-content: space-between;
    border-color: color-mix(in srgb, #e11d48 40%, var(--admin-border-color));
    color: var(--admin-text-color);
}

.product-details-error p {
    margin: 4px 0 0;
    color: var(--admin-secondary-text);
    font-size: 11px;
}

@media (max-width: 700px) {
    .theme-studio-header,
    .theme-studio-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .theme-preview-layout {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .theme-preview-main {
        padding: 11px;
    }

    .theme-preview-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .product-details-dialog {
        max-height: min(94dvh, 760px);
    }

    .product-details-summary {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
    }

    .product-details-main-image {
        max-height: 112px;
    }

    .product-details-main-image img {
        max-height: 112px;
    }

    .product-details-facts {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .product-details-facts div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
        padding: 5px 7px;
    }

    .product-details-facts dd {
        margin-top: 0;
        text-align: right;
    }

    .product-details-dialog-footer .button {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .theme-preset-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-preset-preview {
        min-height: 72px;
    }

    .product-details-overlay {
        padding: 0;
    }

    .product-details-dialog {
        width: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }

    .product-details-dialog-body {
        padding: 13px;
    }

    .product-details-dialog-header,
    .product-details-dialog-footer {
        padding-right: 13px;
        padding-left: 13px;
    }
}

.customizer-status-control { display:flex; align-items:center; justify-content:space-between; gap:10px; white-space:nowrap; }
.customizer-status-control .button { min-height:32px; padding:6px 10px; font-size:12px; white-space:nowrap; }
.customizer-status { color:var(--admin-muted-text); font-size:12px; font-weight:600; }
.customizer-status.is-enabled { color:var(--admin-success); }
.catalog-bulk-toolbar { border-top:1px solid var(--admin-border-color); padding-top:12px; }
.catalog-error { display:flex; justify-content:space-between; gap:12px; color:var(--admin-danger); font-size:13px; }
.catalog-page article { min-width:0; }
.catalog-page table { min-width:900px; }
.catalog-page table button { white-space:nowrap; }
.catalog-page article .customizer-status-control { margin-top:10px; }
@media (max-width:640px) { .catalog-page article .customizer-status-control { flex:1; } .catalog-bulk-toolbar .button { min-height:36px; } }

.products-skeleton-block {
    display: block;
    background: linear-gradient(
        100deg,
        color-mix(in srgb, var(--admin-border-color) 38%, var(--admin-surface-bg)) 18%,
        color-mix(in srgb, var(--admin-primary) 13%, var(--admin-surface-bg)) 48%,
        color-mix(in srgb, var(--admin-border-color) 38%, var(--admin-surface-bg)) 78%
    );
    background-size: 220% 100%;
    animation: customcraft-products-shimmer 1.45s ease-in-out infinite;
}

.products-skeleton-category {
    display: flex;
    min-width: 0;
    min-height: 96px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--theme-radius, 16px);
    background: var(--admin-surface-bg);
    box-shadow: var(--theme-shadow);
}

.products-skeleton-category > :first-child {
    display: none;
}

.products-skeleton-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--theme-button-radius, 10px);
    background: var(--admin-page-bg);
}

.products-filter-skeleton {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.products-filter-skeleton-search {
    grid-column: 1 / -1;
}

.products-skeleton-results {
    min-height: 256px;
    background: var(--admin-page-bg);
}

.products-skeleton-card,
.products-skeleton-list,
.products-skeleton-table-scroll {
    overflow: hidden;
    border: 1px solid var(--admin-border-color);
    border-radius: var(--theme-radius, 16px);
    background: var(--admin-surface-bg);
    box-shadow: var(--theme-shadow);
}

.products-skeleton-card > .products-skeleton-block:first-child {
    border-bottom: 1px solid var(--admin-border-color);
}

.products-skeleton-list-row {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--admin-border-color);
}

.products-skeleton-list-row:last-child {
    border-bottom: 0;
}

.products-skeleton-table-scroll {
    overflow-x: auto;
}

.products-skeleton-table {
    min-width: 900px;
}

.products-skeleton-table-row {
    display: grid;
    grid-template-columns: minmax(210px, 2fr) repeat(4, minmax(110px, 1fr)) minmax(150px, 1.3fr);
    min-height: 56px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--admin-border-color);
}

.products-skeleton-table-heading {
    min-height: 44px;
    border-top: 0;
    background: color-mix(in srgb, var(--admin-border-color) 22%, var(--admin-surface-bg));
}

@keyframes customcraft-products-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -120% 0; }
}

@media (min-width: 640px) {
    .products-filter-skeleton {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-skeleton-category {
        min-height: 96px;
    }

    .products-skeleton-category > :first-child {
        display: block;
    }

    .products-skeleton-list-row {
        flex-direction: row;
        align-items: center;
    }

    .products-skeleton-list-row > :last-child {
        margin-left: auto;
    }
}

@media (min-width: 1280px) {
    .products-filter-skeleton {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1536px) {
    .products-filter-skeleton {
        grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(155px, 1fr));
    }

    .products-filter-skeleton-search {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .products-skeleton-block {
        animation: none;
    }
}
