:root {
    --ink: #20334d;
    --muted: #64758e;
    --line: #dce5f2;
    --surface: #ffffff;
    --canvas: #f8fafd;
    --navy: #20334d;
    --navy-2: #31568f;
    --primary: #3565b7;
    --primary-dark: #2854a0;
    --green: #168b68;
    --green-soft: #e7f6f1;
    --red: #c14c55;
    --red-soft: #fbecef;
    --orange: #d77a24;
    --purple: #8057d9;
    --radius: 14px;
    --shadow: 0 7px 20px rgba(37, 72, 118, .07);
}

/* Shopify read-only product and order views */
.shopify-panel { margin-bottom: 18px; overflow: visible; }
.shopify-product-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 5px; }
.shopify-product-heading h2 { margin: 0; }
.shopify-exclusions-dialog.shopify-tags-dialog { width: min(660px, calc(100vw - 32px)); }
.shopify-tag-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.shopify-tag-form .field { min-width: 0; }
.shopify-tag-form .btn { justify-self: start; }
.shopify-tag-managed { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.shopify-tag-managed > strong { color: #354158; font-size: 12px; }
.shopify-tag-managed > span { color: var(--muted); font-size: 11px; }
.shopify-tag-managed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.shopify-tag-managed-row span { min-width: 0; display: grid; gap: 3px; }
.shopify-tag-managed-row b { overflow-wrap: anywhere; font-size: 12px; }
.shopify-tag-managed-row small { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 580px) { .shopify-tag-form { grid-template-columns: 1fr; } }
.shopify-alert { margin: 20px 24px; padding: 13px 16px; border: 1px solid #f0d6ab; border-radius: 10px; background: #fff9ed; color: #79531b; line-height: 1.6; }
.shopify-filter-shell { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: #f7f9fd; }
.shopify-filter-main { min-width: 0; flex: 1 1 680px; display: grid; grid-template-columns: minmax(190px, 2fr) minmax(130px, 1.1fr) repeat(2, minmax(118px, 1fr)); gap: 10px; align-items: end; }
.shopify-order-filter-main { grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(118px, 1fr)); }
.shopify-order-filter-main.abandoned { grid-template-columns: minmax(190px, 1.5fr) repeat(2, minmax(130px, 1fr)); }
.shopify-filter-shell .field { min-width: 0; gap: 5px; }
.shopify-filter-shell .field > span, .shopify-date-field > span { min-height: 16px; color: #424b60; font-size: 11px; font-weight: 750; line-height: 16px; }
.shopify-filter-shell .field input, .shopify-filter-shell .field select { min-width: 0; height: 40px; min-height: 40px; }
.shopify-filter-bottom { flex: 0 0 auto; display: flex; align-items: end; gap: 10px; }
.shopify-date-field { width: 170px; display: grid; gap: 5px; }
.shopify-date-dropdown { min-width: 0; }
.shopify-filter-shell .shopify-date-dropdown summary { width: 100%; min-height: 40px; justify-content: flex-start; overflow: hidden; }
.shopify-date-dropdown summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.shopify-date-dropdown[open] { z-index: 30; }
.shopify-date-popover { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 320px; max-width: calc(100vw - 32px); padding: 14px; background: #fff; border: 1px solid #dfe3eb; border-radius: 12px; box-shadow: 0 14px 36px rgba(26,34,54,.15); }
.shopify-date-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.shopify-date-presets a { padding: 9px 10px; border-radius: 8px; color: #4d5669; font-size: 11px; font-weight: 650; }
.shopify-date-presets a:hover, .shopify-date-presets a.active { color: var(--primary); background: #e9f1fe; }
.shopify-custom-dates { display: grid; gap: 10px; padding-top: 12px; }
.shopify-custom-dates label { display: grid; gap: 5px; color: #788093; font-size: 11px; }
.shopify-custom-dates input { width: 100%; min-width: 0; height: 44px; padding: 0 10px; color: #30384a; background: #fff; border: 1px solid #dfe3eb; border-radius: 8px; }
.shopify-filter-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.shopify-filter-actions .btn { height: 40px; min-height: 40px; padding: 8px 12px; }
.shopify-custom-dates .btn { height: 44px; min-height: 44px; }
.shopify-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; padding: 22px 24px 26px; }
.shopify-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d0dff0; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(37, 72, 118, .06); }
.shopify-card-image { position: relative; flex: 0 0 210px; height: 210px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #f3f7fd; color: #8b9eb7; }
.shopify-card-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.shopify-card-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.shopify-card-heading { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.shopify-card-status-wrap { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.shopify-storefront-link { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 4px 10px; border: 1px solid #d0dff0; border-radius: 7px; background: #fff; color: var(--primary); font-size: 11px; font-weight: 700; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.shopify-storefront-link:hover, .shopify-storefront-link:focus-visible { border-color: #9cbbea; background: #f3f7fd; }
.shopify-card-heading h3 { min-width: 0; flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.shopify-card-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 7px; color: #637086; background: #f0f2f6; font-size: 11px; font-weight: 700; white-space: nowrap; }
.shopify-card-status.active { color: #117a5b; background: #e7f6f1; }
.shopify-card-status.draft { color: #926521; background: #fff4df; }
.shopify-card-id, .shopify-muted, .shopify-hint { color: var(--muted); }
.shopify-card-id { font-size: 11px; }
.shopify-card-primary { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 12px 14px; border-radius: 10px; background: #f3f7fd; }
.shopify-card-primary > div { min-width: 0; display: grid; gap: 3px; }
.shopify-card-primary span, .shopify-card-meta span { color: #818ba0; font-size: 11px; }
.shopify-card-primary strong { min-width: 0; color: var(--navy); font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.shopify-card-meta { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shopify-card-meta > div { min-width: 0; display: grid; gap: 3px; }
.shopify-card-meta strong { overflow: hidden; color: #354158; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.shopify-tags { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; min-height: 24px; }
.shopify-tags span { padding: 4px 7px; border-radius: 6px; color: #345ca0; background: #eaf1fd; font-size: 11px; }
.detail-product-tags { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 9px 14px; margin: 12px 0 18px; padding: 12px 16px; border: 1px solid #dfe5ef; border-radius: 12px; background: #fff; }
.panel > .detail-product-tags { margin: 14px 24px 18px; }
.detail-product-tags > strong { flex: none; color: #56627a; font-size: 12px; line-height: 24px; }
.detail-product-tags .shopify-tags { gap: 6px; }
.detail-product-tags .shopify-tags span { padding: 4px 9px; font-size: 12px; }
.detail-product-tags-empty { color: #8992a3; font-size: 12px; line-height: 24px; }
.password-reset-form { margin-top: 5px; }
.issued-password { display: block; color: #265f45; user-select: all; }
.password-hidden { color: #9aa4b4; }
.shopify-card-dates { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); color: #8992a3; font-size: 11px; }
.shopify-detail-box dl { display: grid; gap: 8px; margin: 0; }
.shopify-detail-box dl div { min-width: 0; display: flex; justify-content: space-between; gap: 8px; }
.shopify-detail-box dt { color: #8992a3; }
.shopify-detail-box dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.shopify-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 4px 24px 24px; color: var(--muted); }
.shopify-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 18px 24px 0; }
.shopify-tabs a { padding: 10px 15px; color: #6d7485; border-radius: 9px; font-weight: 700; }
.shopify-tabs a.active { color: var(--primary); background: #e9f1fe; }
.shopify-exclusions-open { margin-left: 8px; min-height: 36px; padding: 7px 13px; }
.shopify-exclusions-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: auto; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px rgba(15, 23, 42, .25); }
.shopify-exclusions-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.shopify-exclusions { display: grid; gap: 16px; padding: 22px; background: #fff; }
.shopify-exclusions-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shopify-exclusions-head > div { display: grid; gap: 5px; }
.shopify-exclusions-head strong { color: #27344d; font-size: 13px; }
.shopify-exclusions-head span { color: var(--muted); font-size: 11px; }
.shopify-exclusions-close { flex: 0 0 auto; padding: 0 6px; color: #778196; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 24px; line-height: 1; }
.shopify-exclusions-close:hover { background: #f2f4f8; }
.shopify-exclusions-add { display: flex; flex-wrap: wrap; gap: 8px; }
.shopify-exclusions-add input { flex: 1 1 240px; max-width: 400px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #d9dfeb; border-radius: 8px; background: #fff; }
.shopify-exclusions-add .btn { min-height: 40px; }
.shopify-exclusions-list { display: flex; flex-wrap: wrap; gap: 7px; }
.shopify-exclusion-item { max-width: 100%; display: flex; align-items: center; gap: 7px; padding: 5px 8px 5px 10px; border: 1px solid #dfe5f1; border-radius: 7px; background: #fff; color: #4a5670; font-size: 11px; }
.shopify-exclusion-item span { min-width: 0; overflow-wrap: anywhere; }
.shopify-exclusion-item button { flex: 0 0 auto; padding: 0 3px; border: 0; background: transparent; color: #9b5960; font-size: 18px; line-height: 1; cursor: pointer; }
.shopify-exclusion-item button:hover { color: #b82937; }
.shopify-hint { margin: 0 24px 20px; font-size: 12px; }
.shopify-order-list { display: grid; gap: 12px; padding: 0 24px 22px; }
.shopify-order { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.shopify-order-head, .shopify-order-head > div, .shopify-order-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shopify-order-head { justify-content: space-between; }
.shopify-order-head > div:first-child { flex-direction: column; align-items: flex-start; gap: 4px; }
.shopify-order-head strong { font-size: 16px; }
.shopify-order-head span { color: var(--muted); font-size: 12px; }
.shopify-order-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; }
.shopify-order-facts .shopify-order-state { padding: 0; }
.shopify-order-customer { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shopify-order-customer > span { max-width: 100%; min-width: 0; display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 8px; border-radius: 6px; background: #f4f6fa; line-height: 1.5; }
.shopify-order-customer small { flex: 0 0 auto; color: #8992a3; font-size: 11px; }
.shopify-order-customer strong { min-width: 0; color: #354158; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.shopify-order-customer > .shopify-attribution-alert { background: #fff4df; }
.shopify-order-customer > .shopify-attribution-alert strong { color: #926521; }
.shopify-order-state { padding: 10px 0; }
.shopify-order-state span { padding: 5px 8px; border-radius: 6px; background: #f4f6fa; font-size: 11px; line-height: 1.5; }
.shopify-order-state .cancelled { color: #ac3e47; background: #fff0f2; }
.shopify-line-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.shopify-line-preview > div { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; background: #f8f9fc; }
.shopify-line-preview > div > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.shopify-line-preview small { display: block; margin-top: 3px; color: var(--muted); }
.shopify-thumb { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: #edf0f6; color: #9ba5b6; font-size: 10px; text-align: center; }
.shopify-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shopify-back { margin-bottom: 16px; color: #52627b; }
.shopify-back a:hover, .shopify-detail-box a:hover { color: var(--primary); }
.shopify-detail-content { display: grid; gap: 18px; padding: 24px; }
.shopify-detail-content > .shopify-alert { margin: 0; }
.shopify-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shopify-detail-summary > div { display: grid; gap: 7px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f9faff; }
.shopify-detail-summary span, .shopify-detail-box small { color: var(--muted); font-size: 11px; }
.shopify-detail-summary strong { overflow-wrap: anywhere; }
.shopify-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.shopify-detail-box { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.shopify-detail-box h3 { margin: 0 0 17px; font-size: 15px; }
.shopify-detail-box h3 small { margin-left: 7px; font-weight: 400; }
.shopify-related-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.shopify-related-actions { display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.shopify-related-actions .btn { white-space: nowrap; }
.shopify-manual-dialog { width: min(720px, calc(100vw - 32px)); }
.shopify-manual-results { display: grid; gap: 12px; }
.shopify-manual-results > .btn { justify-self: start; }
.shopify-manual-candidates { max-height: min(44vh, 430px); display: grid; gap: 8px; overflow: auto; padding: 2px; }
.shopify-manual-candidate { min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.shopify-manual-candidate:has(input:checked) { border-color: var(--primary); background: #f3f7ff; }
.shopify-manual-candidate input { flex: 0 0 auto; margin-top: 4px; }
.shopify-manual-candidate span { min-width: 0; display: grid; gap: 4px; }
.shopify-manual-candidate strong { overflow-wrap: anywhere; font-size: 13px; }
.shopify-manual-candidate small { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.shopify-related-head h3 { margin-bottom: 5px; }
.shopify-related-head p { margin-bottom: 15px; font-size: 12px; }
.shopify-related-head .shopify-related-explanation { display: grid; gap: 2px; }
.shopify-related-source { color: #2f4f89; }
.shopify-related-source-missing { color: #9a6428; font-weight: 700; }
.shopify-related-owner { display: grid; gap: 3px; min-width: 110px; padding: 9px 12px; border-radius: 9px; background: #eef2ff; }
.shopify-related-owner strong { color: #314ab4; }
.shopify-related-uncertain { padding: 8px 10px; border-radius: 8px; background: #fff4df; color: #926521; font-size: 11px; font-weight: 700; }
.shopify-related-list { display: grid; gap: 10px; }
.shopify-related-item { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfe; }
.shopify-related-item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.shopify-related-item-head > div { min-width: 0; display: grid; gap: 3px; }
.shopify-related-item-head small, .shopify-related-item-head span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.shopify-related-item-head strong { font-size: 13px; overflow-wrap: anywhere; }
.shopify-related-item-head .btn { flex: 0 0 auto; }
.shopify-related-material { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.shopify-related-material video, .shopify-related-material img { display: block; width: min(100%, 220px); height: 150px; border: 1px solid var(--line); border-radius: 9px; background: #111827; object-fit: contain; }
.shopify-related-material img { background: #f2f4f8; }
.shopify-related-material a { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--primary); font-size: 12px; font-weight: 700; }
.shopify-related-material.large video, .shopify-related-material.large img { width: min(100%, 420px); height: 280px; }
.shopify-related-metrics { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.shopify-related-metrics b { margin-left: 3px; color: #273552; }
.shopify-related-note { margin: 12px 0 0 !important; font-size: 11px; }
.shopify-detail-box p { margin: 0 0 10px; line-height: 1.6; overflow-wrap: anywhere; }
.shopify-detail-box .shopify-shipping-address { display: flex; align-items: flex-start; gap: 5px; }
.shopify-shipping-address b { flex: 0 0 auto; }
.shopify-address-lines { min-width: 0; display: grid; gap: 2px; }
.shopify-address-lines span { display: block; overflow-wrap: anywhere; }
.shopify-detail-box dl .total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; }
.shopify-detail-box a { color: var(--primary); }
.shopify-detail-lines { display: grid; gap: 0; }
.shopify-detail-line { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.shopify-line-copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.shopify-line-copy > strong, .shopify-line-copy > small { display: block; margin-bottom: 6px; }
.shopify-line-maker { margin: 4px 0 7px; color: #66738c; font-size: 11px; }
.shopify-line-tags { margin: 4px 0 8px; }
.shopify-line-total { white-space: nowrap; }
.shopify-attributes { display: grid; gap: 5px; padding: 10px 12px; border-radius: 8px; background: #f7f9fc; font-size: 12px; }
.shopify-attributes > div { overflow-wrap: anywhere; }
.shopify-attribute-preview { display: grid; gap: 5px; width: fit-content; margin-top: 8px; }
.shopify-attribute-preview img { width: min(180px, 100%); max-height: 150px; padding: 4px; border-radius: 7px; object-fit: contain; background-color: #f1f1f1; background-image: linear-gradient(45deg,#e7e7e7 25%,transparent 25%),linear-gradient(-45deg,#e7e7e7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7e7e7 75%),linear-gradient(-45deg,transparent 75%,#e7e7e7 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }
.shopify-load-more { margin-top: 14px; }
.shopify-shipment { display: grid; gap: 5px; padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .shopify-filter-main, .shopify-order-filter-main, .shopify-order-filter-main.abandoned { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 950px) { .shopify-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shopify-detail-columns { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .shopify-filter-bottom { width: 100%; align-items: stretch; flex-direction: column; } .shopify-date-field { width: 100%; } .shopify-filter-actions { justify-content: flex-start; } }
@media (max-width: 580px) { .shopify-filter-shell { padding: 14px 16px; } .shopify-filter-main, .shopify-order-filter-main, .shopify-order-filter-main.abandoned { grid-template-columns: 1fr; } .shopify-grid { grid-template-columns: 1fr; padding: 16px; } .shopify-order-list { padding: 0 16px 20px; } .shopify-detail-content { padding: 16px; } .shopify-detail-summary { grid-template-columns: 1fr 1fr; } .shopify-detail-line { flex-wrap: wrap; } .shopify-line-total { margin-left: 62px; } }
@media (max-width: 580px) { .shopify-related-item-head { align-items: flex-start; flex-direction: column; } }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px 18px; color: var(--ink); background: linear-gradient(180deg, #a8c2fd 0%, #e8eefd 52%, #d7e4fd 100%); border-right: 1px solid #c7d8f3; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 3px 28px; }
.brand-mark { display: block; flex: 0 0 98px; width: 98px; height: 44px; object-fit: contain; }
.brand-copy { min-width: 0; }
.brand strong, .brand span { display: block; }
.brand strong { color: #20334d; font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.brand span { margin-top: 5px; color: #7184a0; font-size: 10px; letter-spacing: .2px; white-space: nowrap; }
.nav { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: #586a84; border-radius: 10px; transition: .15s ease; }
.nav-link:hover { color: #2059b6; background: rgba(200, 218, 253, .68); }
.nav-link.active { color: #2059b6; background: #c8dafd; font-weight: 750; }
.nav-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.nav-icon { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.test-product-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.test-product-inline-tags { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.test-product-inline-tags b { color: #8792a4; font-size: 11px; font-weight: 600; }
.test-product-inline-tags > span { display: inline-block; padding: 2px 7px; border-radius: 5px; color: var(--primary); background: #eaf1fd; font-size: 11px; line-height: 1.5; }
.test-upload-form { padding: 20px 24px; }
.test-upload-form .field { max-width: 720px; }
.test-creative-overview { width: calc(100% - 48px); max-width: 1080px; display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: center; gap: 24px; margin: 22px auto; padding: 18px; background: #f5f8fd; border: 1px solid #d7e4f3; border-radius: 14px; }
.test-creative-media { width: 210px; height: 300px; display: grid; place-items: center; overflow: hidden; background: #101827; border-radius: 11px; }
.test-creative-media .test-asset-preview { display: block; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; object-fit: contain; background: #101827; }
.test-creative-missing { display: grid; gap: 8px; padding: 18px; color: #f4f6fb; text-align: center; }
.test-creative-missing strong { font-size: 13px; }
.test-creative-missing span { color: #9da8bc; font-size: 11px; }
.test-creative-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.test-creative-kicker { color: var(--primary); font-size: 10px; font-weight: 750; letter-spacing: 1px; }
.test-creative-info h3 { max-width: 100%; max-height: 3em; display: -webkit-box; margin: 0; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #242d43; font-size: 17px; line-height: 1.5; }
.test-creative-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.test-creative-info p { margin: 0; color: #828da1; font-size: 11px; }
.test-creative-stats { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 5px 0; }
.test-creative-stats > div { min-width: 0; display: grid; gap: 8px; padding: 15px; background: #fff; border: 1px solid #e9edf5; border-radius: 10px; }
.test-creative-stats span { color: #8490a2; font-size: 10px; }
.test-creative-stats strong { overflow-wrap: anywhere; color: #2a344b; font-size: 16px; font-variant-numeric: tabular-nums; }
.test-daily-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 24px; border-top: 1px solid var(--line); }
.test-daily-heading strong { font-size: 13px; }
@media (max-width: 900px) { .test-creative-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .test-creative-overview { grid-template-columns: 1fr; gap: 18px; } .test-creative-media { width: min(100%, 210px); height: 270px; justify-self: center; } .test-creative-info { width: 100%; } }
.test-asset-search { display: flex; gap: 10px; padding: 18px 24px; }
.test-asset-search input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; }
.test-rename-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.test-rename-actions form { margin: 0; }
.api-management-intro, .api-token-issued { margin-bottom: 18px; }
.settings-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.settings-tabs a { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #52627b; font-size: 12px; font-weight: 700; }
.settings-tabs a:hover { border-color: #9cbbea; color: var(--primary); }
.settings-tabs a.active { border-color: #b7cff3; background: #e9f1fe; color: var(--primary); }
.settings-panel[hidden] { display: none !important; }
.settings-section { margin-bottom: 18px; scroll-margin-top: 20px; }
.settings-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 22px 24px; }
.settings-info-card { min-width: 0; display: grid; align-content: start; gap: 7px; padding: 18px; border: 1px solid #d7e4f3; border-radius: 10px; background: #f5f8fd; }
.settings-info-card span { color: #778298; font-size: 11px; }
.settings-info-card strong { color: #1e2a45; font-size: 20px; }
.settings-info-card small { color: #7e89a0; font-size: 11px; }
@media (max-width: 620px) { .settings-info-grid { grid-template-columns: 1fr; padding: 16px; } }
.shopify-config-panel { margin-bottom: 18px; }
.shopify-config-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; padding: 22px 24px 16px; }
.shopify-config-form .field { min-width: 0; }
.shopify-config-form .field small { min-height: 16px; }
.shopify-config-actions { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; }
.shopify-config-test { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0 24px 22px; }
.shopify-config-test small { color: var(--muted); }
@media (max-width: 960px) { .shopify-config-form { grid-template-columns: 1fr; } }
.api-token-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 18px; }
.api-token-once { display: grid; gap: 8px; padding: 20px 24px; }
.api-token-once .field { max-width: 760px; }
.api-token-once input { width: 100%; font-family: Consolas, monospace; }
.api-token-once small { color: var(--muted); }
@media (max-width: 1050px) { .api-token-layout { grid-template-columns: 1fr; } }
.user-card { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: auto; padding: 13px 8px 0; border-top: 1px solid #b7c9ed; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e8c779; color: #405678; font-weight: 800; }
.user-meta strong, .user-meta span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta strong { font-size: 12px; }
.user-meta span { margin-top: 3px; color: #7b8990; font-size: 10px; }
.logout-form button { padding: 5px 7px; color: #657680; border: 0; background: transparent; font-size: 11px; }
.logout-form button:hover { color: #20334d; }
.main { min-width: 0; }
.topbar { min-height: 98px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 25px 32px 20px; background: #fff; border-bottom: 1px solid #d5e3f1; }
.topbar h1 { margin: 5px 0 0; font-size: 24px; line-height: 1.2; letter-spacing: -.3px; }
.eyebrow { color: #7992b7; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
.topbar-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.role-pill { padding: 7px 10px; border: 1px solid #d5e2f1; border-radius: 999px; background: #f5f8fc; color: #526984; }
.content { padding: 25px 32px 40px; }
.footer { padding: 0 32px 28px; color: #9aa1af; font-size: 11px; text-align: right; }
.flash { margin: 18px 32px 0; padding: 12px 16px; border-radius: 10px; font-size: 13px; }
.flash.success { color: #12664e; background: #e9f8f2; border: 1px solid #c9ebdf; }
.flash.error { color: #9d3540; background: #fff0f2; border: 1px solid #f2ccd1; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; min-height: 126px; padding: 21px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card::after { content: ""; position: absolute; right: -16px; top: -18px; width: 76px; height: 76px; border-radius: 50%; opacity: .12; background: currentColor; }
.stat-card span, .stat-card strong, .stat-card small { display: block; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { margin: 12px 0 8px; color: var(--ink); font-size: 27px; font-weight: 750; }
.stat-card small { color: #a0a6b3; font-size: 10px; }
.accent-blue { color: var(--primary); border-top: 3px solid var(--primary); }
.accent-green { color: var(--green); border-top: 3px solid var(--green); }
.accent-purple { color: var(--purple); border-top: 3px solid var(--purple); }
.accent-orange { color: var(--orange); border-top: 3px solid var(--orange); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 22px; background: #fff; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.panel-head.compact { padding: 18px 20px; }
.panel-head h2 { margin: 0 0 5px; font-size: 16px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 11px; }
.btn { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 650; font-size: 12px; line-height: 1; }
.btn.primary { color: #fff; background: var(--primary); box-shadow: 0 5px 13px rgba(53,101,183,.16); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary { color: #344055; background: #fff; border-color: #d9dee8; }
.btn.ghost { color: #6d7485; background: #f7f8fa; border-color: #eceef3; }
.btn.danger { color: #fff; background: var(--red); }
.btn.danger-soft { color: #a13d47; background: var(--red-soft); border-color: #f3cbd0; }
.btn.success { color: #126b51; background: var(--green-soft); border-color: #c0e6da; }
.btn.small { min-height: 30px; padding: 6px 10px; font-size: 11px; }
.btn.wide { width: 100%; }
.filter-bar { display: grid; grid-template-columns: minmax(260px,1fr) 145px 145px auto auto; gap: 10px; padding: 15px 22px; background: #f7f9fd; border-bottom: 1px solid var(--line); }
.filter-bar.admin-filters { grid-template-columns: minmax(220px,1fr) 165px 145px 145px auto auto; }
.filter-bar.test-filters { grid-template-columns: minmax(260px,1fr) 170px auto auto; }
.filter-bar.test-filters.admin-filters { grid-template-columns: minmax(220px,1fr) 170px 170px auto auto; }
.filter-bar select, .inline-form select { min-height: 38px; padding: 0 10px; color: #434b5e; background: #fff; border: 1px solid #dfe3eb; border-radius: 9px; }
.search-field { display: flex; align-items: center; min-height: 38px; padding: 0 12px; background: #fff; border: 1px solid #dfe3eb; border-radius: 9px; }
.search-field span { color: #a3aab8; font-size: 18px; }
.search-field input { width: 100%; padding: 8px; border: 0; outline: 0; color: var(--ink); }
.table-wrap { width: 100%; overflow-x: scroll; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: #8794b2 #e9edf5; }
.table-wrap::-webkit-scrollbar { width: 12px; height: 14px; }
.table-wrap::-webkit-scrollbar-track { background: #e9edf5; border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #8794b2; border: 3px solid #e9edf5; border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #5f6f94; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { padding: 13px 14px; color: #697d9b; background: #f3f7fc; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 750; letter-spacing: .3px; text-align: left; }
.data-table td { padding: 14px; border-bottom: 1px solid #eef0f4; color: #4d5568; font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfe; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .strong { color: #242c40; font-weight: 750; }
.product-cell { min-width: 260px; white-space: normal; }
.product-cell a { display: block; margin-bottom: 6px; color: #26314a; font-weight: 750; }
.product-cell a:hover { color: var(--primary); }
.product-cell span { display: block; max-width: 320px; overflow: hidden; color: #9aa1af; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.status i { width: 6px; height: 6px; border-radius: 50%; }
.status.active { color: #11684f; background: var(--green-soft); }
.status.active i { background: #27a47c; box-shadow: 0 0 0 3px rgba(39,164,124,.12); }
.status.stopped { color: #8c5960; background: #f5eff0; }
.status.stopped i { background: #a76d75; }
.status.pending { color: #8b611b; background: #fff4dc; }
.status.pending i { background: #e0a330; }
.platform-list { display: flex; flex-wrap: wrap; gap: 5px; }
.platform { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .2px; }
.platform.tiktok { color: #313747; background: #edf0f4; }
.platform.facebook { color: #3159a7; background: #eaf1fd; }
.text-link { color: var(--primary); font-size: 11px; font-weight: 700; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 36px; color: #9198a7; }
.empty-state strong { color: #444d61; font-size: 14px; }
.empty-state.large { padding: 80px 30px; }
.empty-state.large .btn { margin-top: 12px; }
.back-row { margin-bottom: 14px; color: #6e7689; font-size: 12px; }
.back-row a:hover { color: var(--primary); }
.form-layout { display: grid; grid-template-columns: minmax(0, 760px) 250px; gap: 18px; align-items: start; }
.stack-form { display: grid; gap: 16px; padding: 22px; }
.field { display: grid; gap: 7px; }
.field > span, .checkbox-field legend { color: #424b60; font-size: 11px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid #dce1e9; border-radius: 9px; outline: 0; }
.field textarea { resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7fa6ee; box-shadow: 0 0 0 3px rgba(53,101,183,.14); }
.field small, .read-only-field small, .checkbox-field small { color: #949baa; font-size: 10px; line-height: 1.5; }
.field-label-with-note { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.field-label-with-note small { font-weight: 400; }
.test-asset-link-control { display: grid; gap: 9px; padding: 15px; border: 1px solid #dce5f2; border-radius: 10px; background: #f7f9fd; }
.test-asset-link-toggle { display: inline-flex; align-items: center; gap: 9px; width: fit-content; color: #30394e; font-size: 12px; font-weight: 700; cursor: pointer; }
.test-asset-link-toggle input { width: 16px; height: 16px; accent-color: var(--primary); }
.test-asset-link-control > small { color: #858fa2; font-size: 10px; line-height: 1.5; }
.test-asset-link-picker[hidden] { display: none; }
.test-asset-link-picker select { max-width: 100%; }
.request-reference-panel { margin-top: 16px; }
.request-reference-body { display: grid; gap: 12px; padding: 18px 22px; }
.request-reference-body video, .request-reference-body img { display: block; width: min(100%, 380px); max-height: 440px; object-fit: contain; background: #111827; border-radius: 10px; }
.request-reference-body strong { overflow-wrap: anywhere; }
.request-reference-edit { border-top: 1px solid var(--line); }
.read-only-field { display: grid; gap: 4px; padding: 13px 14px; background: #f7f8fb; border: 1px solid #e7eaf0; border-radius: 9px; }
.read-only-field span { color: #777f91; font-size: 10px; }
.read-only-field strong { font-size: 13px; }
.checkbox-field { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; padding: 14px; border: 1px solid #dce1e9; border-radius: 9px; }
.checkbox-field legend { padding: 0 6px; }
.checkbox-field label { display: inline-flex; align-items: center; gap: 4px; }
.checkbox-field small { width: 100%; }
.checkbox-field .platform-choice { gap: 9px; min-width: 145px; padding: 10px 14px; background: #f8faff; border: 1px solid #dce5f2; border-radius: 10px; cursor: pointer; }
.checkbox-field .platform-choice input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: #3568b8; box-shadow: none; }
.checkbox-field .platform-choice .platform { white-space: nowrap; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 7px; border-top: 1px solid #eef0f4; }
.help-card { padding: 22px; color: #e4e8f7; background: linear-gradient(160deg, #1a2440, #243254); border-radius: var(--radius); box-shadow: var(--shadow); }
.help-card h3 { margin: 7px 0 7px; color: #fff; font-size: 13px; }
.help-card p { margin: 0 0 22px; color: #aab4d0; font-size: 11px; line-height: 1.75; }
.help-number { display: inline-grid; width: 25px; height: 25px; place-items: center; color: #fff; background: rgba(112,132,244,.35); border-radius: 7px; font-size: 9px; font-weight: 800; }
.product-hero { display: flex; justify-content: space-between; gap: 22px; padding: 23px 25px; color: var(--ink); background: linear-gradient(110deg, #e3ecf9, #eef3fa); border: 1px solid #d0def0; border-radius: var(--radius); box-shadow: 0 7px 20px rgba(37,72,118,.07); }
.product-hero > div:first-child { min-width: 0; flex: 1 1 auto; }
.product-title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.external-title { font-size: 21px; font-weight: 760; overflow-wrap: anywhere; }
.external-title:hover { color: var(--primary); }
.product-hero p { max-width: 650px; margin: 9px 0 16px; overflow: hidden; color: #4b688c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 9px 22px; color: #506782; font-size: 10px; }
.hero-meta strong { margin-left: 4px; color: #263f63; font-weight: 650; }
.hero-actions { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.owner-assign-form { display: flex; gap: 7px; }
.owner-assign-form select { min-height: 38px; padding: 0 9px; color: #3c465a; background: #fff; border: 1px solid #d9dee8; border-radius: 9px; }
.product-name-dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px rgba(15, 23, 42, .25); }
.product-name-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.product-name-dialog-form { display: grid; gap: 20px; padding: 22px; }
.product-name-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-name-dialog-head h2 { margin: 0; font-size: 17px; }
.product-name-dialog-head button { padding: 2px 8px; color: #778196; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 24px; line-height: 1; }
.product-name-dialog-head button:hover { background: #f2f4f8; }
.product-name-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.platform-switcher { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 17px 0 10px; }
.platform-tabs { display: flex; gap: 8px; }
.platform-tab { display: flex; min-width: 145px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.platform-tab small { color: #8c93a2; font-size: 9px; }
.platform-tab.active { border-color: #9bb9eb; box-shadow: 0 0 0 3px rgba(53,101,183,.1); }
.inline-form { display: flex; gap: 8px; }
.platform-status-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.platform-status-bar > div { display: flex; align-items: center; gap: 10px; }
.platform-status-bar strong { font-size: 12px; }
.platform-status-bar small { color: #8e95a4; font-size: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.metric-grid.six-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
.metric-grid.outcome-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.outcome-note { margin: 0 0 14px; color: #718098; font-size: 12px; line-height: 1.5; }
.metric-grid.video-summary-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.metric-grid article { padding: 15px 17px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.metric-grid span, .metric-grid strong { display: block; }
.metric-grid span { color: #8b92a1; font-size: 10px; }
.metric-grid strong { margin-top: 7px; font-size: 18px; font-variant-numeric: tabular-nums; }
.metric-panel { min-width: 0; }
.table-horizontal-control { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 9px 15px; color: #63718e; background: #f7f9fe; border-top: 1px solid #dce3f0; border-radius: 0 0 12px 12px; }
.table-horizontal-control[hidden] { display: none; }
.table-horizontal-control span { flex: 0 0 auto; font-size: 16px; font-weight: 700; }
.table-horizontal-control input[type="range"] { flex: 1 1 auto; min-width: 0; height: 16px; margin: 0; border: 0; border-radius: 99px; background: #dbe3f3; cursor: ew-resize; appearance: none; -webkit-appearance: none; }
.table-horizontal-control input[type="range"]::-webkit-slider-thumb { width: var(--horizontal-thumb-width, 88px); height: 16px; border: 0; border-radius: 99px; background: #8faad5; box-shadow: 0 0 0 2px #fff inset; appearance: none; -webkit-appearance: none; }
.table-horizontal-control input[type="range"]::-moz-range-thumb { width: var(--horizontal-thumb-width, 88px); height: 16px; border: 0; border-radius: 99px; background: #8faad5; box-shadow: 0 0 0 2px #fff inset; }
.table-horizontal-control input[type="range"]:focus-visible { outline: 2px solid #3565b7; outline-offset: 3px; }
.wide-table { max-height: 60vh; scrollbar-gutter: auto; }
.wide-table.enhanced-horizontal-scroll { scrollbar-width: none; }
.wide-table.enhanced-horizontal-scroll::-webkit-scrollbar { display: none; }
.metrics-table { min-width: 1600px; }
.metric-summary-table { min-width: 1680px; }
.metrics-table thead { position: sticky; top: 0; z-index: 1; }
.metrics-table .editing-row { background: #f3f7fd; box-shadow: inset 3px 0 var(--primary); }
.video-cell { max-width: 260px; white-space: normal; }
.video-cell strong, .video-cell span { display: block; }
.video-cell strong { color: #313a4e; font-size: 11px; }
.video-cell span { margin-top: 5px; color: #9ba2b0; font-size: 9px; }
.video-ad-status-cell { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; white-space: nowrap; }
.video-ad-status-cell small { color: #8e95a4; font-size: 9px; }
.single-video-label { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 11px 20px; color: #7c8494; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 10px; }
.single-video-label strong { flex: 1 1 280px; min-width: 0; color: #30394e; font-size: 12px; overflow-wrap: anywhere; }
.single-video-label .btn { flex: 0 0 auto; margin-left: auto; }
.record-count { padding: 6px 9px; color: #657086; background: #f3f5f8; border-radius: 7px; font-size: 10px; white-space: nowrap; }
.metric-entry-bottom { margin-top: 14px; scroll-margin-top: 18px; }
.metric-entry-bottom.edit-mode { border-color: #afc8f0; box-shadow: 0 0 0 3px rgba(53,101,183,.08), var(--shadow); }
.horizontal-entry-form { padding: 18px 20px 20px; }
.entry-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 13px; }
.entry-grid .span-2 { grid-column: span 2; }
.horizontal-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 15px; border-top: 1px solid #edf0f4; }
.horizontal-form-footer .calculation-note { flex: 1; }
.dense-form { padding: 17px; gap: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dense-form .field input { min-height: 38px; }
.suffix-input { position: relative; }
.suffix-input input { padding-right: 30px; }
.suffix-input i { position: absolute; right: 11px; top: 50%; color: #939aa9; font-style: normal; transform: translateY(-50%); }
.prefix-input { position: relative; }
.prefix-input input { padding-left: 28px; }
.prefix-input i { position: absolute; left: 11px; top: 50%; color: #697184; font-style: normal; font-weight: 700; transform: translateY(-50%); }
.calculation-note { padding: 10px 11px; color: #7b678c; background: #f6f1fa; border-radius: 8px; font-size: 10px; line-height: 1.55; }
.calculation-note span { display: block; }
.calculation-note span + span { margin-top: 3px; }
.compact-hero { align-items: center; margin-bottom: 12px; }
.video-metric-title { font-size: 19px; overflow-wrap: anywhere; }
.account-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; align-items: start; }
.account-layout > .panel { min-width: 0; }
.account-layout .entry-panel { max-width: 620px; }
.account-table { min-width: 1120px; }
.account-table th, .account-table td { padding-left: 9px; padding-right: 9px; }
.account-password { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-password code { font-size: 11px; white-space: nowrap; }
.account-password .password-reset-form { flex: none; margin: 0; }
.person { display: flex; align-items: center; gap: 9px; }
.person span { width: 30px; height: 30px; display: grid; place-items: center; color: #36405a; background: #e9edf7; border-radius: 50%; font-weight: 800; }
.person strong { color: #30384c; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.row-actions form { margin: 0; }
.metric-actions { min-width: 112px; }
code { padding: 3px 6px; color: #4f5b78; background: #f2f4f8; border-radius: 5px; font: 11px Consolas, monospace; }
.role-tag { display: inline-flex; padding: 5px 8px; border-radius: 7px; font-size: 10px; font-weight: 750; }
.role-tag.buyer { color: #3159a7; background: #eaf1fd; }
.role-tag.editor { color: #7250a8; background: #f0eafd; }
.role-tag.maker { color: #805b12; background: #fff2d5; }
.request-filter { grid-template-columns: 220px auto auto; justify-content: start; }
.request-entry-panel, .delivered-panel, .upload-panel { margin-top: 16px; }
.request-table { min-width: 1050px; }
.request-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.request-actions form { margin: 0; }
.maker-account-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.maker-account-tools small { color: var(--muted); }
.maker-account-credentials { margin: 16px 20px; padding: 14px; border: 1px solid #e6ca80; border-radius: 10px; background: #fff9e9; }
.maker-account-credentials > strong { display: block; margin-bottom: 10px; }
.making-delivery { display: flex; align-items: flex-start; gap: 18px; min-width: 0; padding: 20px 24px; }
.making-delivery img { width: 180px; height: 180px; border-radius: 10px; background: #f4f6fa; object-fit: contain; }
.making-delivery > div { min-width: 0; overflow-wrap: anywhere; }
.making-delivery h3 { margin: 0 0 12px; font-size: 17px; }
.making-delivery p { margin: 0 0 9px; color: var(--muted); }
.making-delivery-tags { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px 12px; margin-top: 14px; }
.making-delivery-tags > strong { color: #56627a; font-size: 11px; line-height: 24px; }
.making-delivery-tags-empty { color: var(--muted); font-size: 11px; line-height: 24px; }
@media (max-width: 580px) { .making-delivery { flex-direction: column; } }
.duplicate-badge { display: inline-block; padding: 4px 7px; color: #9d4a26; background: #fff0e8; border-radius: 6px; font-size: 10px; font-weight: 750; }
.table-note { display: block; max-width: 220px; margin-top: 5px; overflow: hidden; color: #8b92a2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.request-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 25px; color: var(--ink); background: linear-gradient(110deg, #e3ecf9, #eef3fa); border: 1px solid #d0def0; border-radius: var(--radius); box-shadow: 0 7px 20px rgba(37,72,118,.07); }
.request-hero h2 { margin: 8px 0; font-size: 22px; }
.request-hero .eyebrow.light { color: #496788; }
.request-hero a { color: #3565b7; font-size: 11px; }
.request-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-top: 16px; align-items: start; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; padding: 10px 22px 22px; }
.detail-list > div { padding: 14px 0; border-bottom: 1px solid #edf0f4; }
.detail-list .wide { grid-column: 1 / -1; }
.detail-list dt, .single-detail-list dt { margin-bottom: 6px; color: #8991a1; font-size: 10px; }
.detail-list dd, .single-detail-list dd { margin: 0; color: #30394e; line-height: 1.7; }
.making-image-field input[type="file"] { padding: 10px 12px; cursor: pointer; }
.making-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.making-image-grid a { min-width: 0; display: grid; gap: 7px; padding: 8px; color: var(--primary); background: #f7faff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.making-image-grid a:hover { border-color: #a7bee2; }
.making-image-grid img { width: 100%; height: 140px; object-fit: contain; border-radius: 6px; background: #fff; }
.making-image-grid span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.warning-detail { padding: 14px !important; background: #fff8ec; border: 1px solid #f4dfb9 !important; border-radius: 9px; }
.warning-detail small { display: block; margin-top: 8px; color: #9a7a45; }
.action-stack { display: grid; gap: 12px; padding: 16px; }
.compact-form { padding: 0; gap: 10px; }
.reject-form { padding-top: 12px; border-top: 1px solid var(--line); }
.action-message { padding: 15px; color: #858d9d; background: #f7f8fa; border-radius: 9px; font-size: 11px; line-height: 1.6; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px; }
.library-grid { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
.video-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #d0dff0; border-radius: 12px; box-shadow: 0 5px 16px rgba(37, 72, 118, .06); }
.video-card-preview { aspect-ratio: 16 / 9; background: #111827; }
.video-card-preview video { width: 100%; height: 100%; object-fit: contain; }
.video-unavailable { width: 100%; height: 100%; min-height: 150px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 22px; color: #aab3c6; background: #151d2e; text-align: center; }
.video-unavailable strong { color: #f0f2f7; font-size: 13px; }
.video-unavailable span { max-width: 440px; font-size: 10px; line-height: 1.65; }
.video-unavailable.detail { min-height: 380px; border-radius: 9px; }
.video-card-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 14px; }
.video-card-body > strong { color: #293247; }
.video-card-body > strong, .video-card-body > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-card-body > span { color: #9299a8; font-size: 10px; }
.video-title-row { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.video-title-row strong { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-title-row .status { flex: 0 0 auto; white-space: nowrap; }
.video-card-stats { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px 0; border-top: 1px solid #edf0f4; color: #596276; font-size: 10px; }
.video-card-stats b { white-space: nowrap; }
.video-card-stats b:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.video-card-stats .text-link { justify-self: end; align-self: center; white-space: nowrap; }
.video-platform-panel { margin-top: 14px; }
.video-platform-table { min-width: 760px; }
.video-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.video-player-panel { padding: 15px; background: #111827; }
.main-video-player { display: block; width: 100%; max-height: 68vh; background: #000; border-radius: 9px; }
.video-playback-note { margin: 11px 3px 0; color: #8f99ad; font-size: 10px; line-height: 1.6; }
.single-detail-list { display: grid; gap: 0; margin: 0; padding: 5px 20px 18px; }
.single-detail-list > div { padding: 11px 0; border-bottom: 1px solid #edf0f4; }
.single-detail-list dd { overflow-wrap: anywhere; }
.panel-footer-form { padding: 16px; border-top: 1px solid var(--line); }
.video-filter-area { position: relative; padding: 17px 22px 18px; background: #f7f9fd; border-bottom: 1px solid var(--line); }
.video-filter-row { display: flex; align-items: center; gap: 9px; flex-wrap: nowrap; }
.video-name-search { min-width: 260px; flex: 1 1 420px; display: flex; align-items: center; gap: 8px; }
.video-name-search .search-field { min-width: 180px; flex: 1; }
.usage-filter-button { min-height: 40px; display: inline-flex; align-items: center; padding: 0 15px; color: #4b5569; background: #fff; border: 1px solid #dfe3eb; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.usage-filter-button:hover { color: var(--primary); border-color: #a9c3ee; }
.usage-filter-button.active { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 6px 14px rgba(53,101,183,.18); }
.filter-pill-dropdown { position: relative; flex: 0 0 auto; }
.filter-pill-dropdown summary { min-height: 40px; display: inline-flex; align-items: center; gap: 9px; padding: 0 15px; color: #31568f; background: #e9f1fe; border-radius: 999px; font-size: 11px; font-weight: 700; list-style: none; cursor: pointer; user-select: none; white-space: nowrap; }
.filter-pill-dropdown summary::-webkit-details-marker { display: none; }
.filter-pill-dropdown summary::marker { content: ""; font-size: 0; }
.filter-pill-dropdown[open] summary { color: #fff; background: var(--primary); box-shadow: 0 7px 18px rgba(53,101,183,.18); }
.calendar-glyph { position: relative; width: 18px; height: 17px; display: inline-block; border: 2px solid currentColor; border-radius: 5px; }
.calendar-glyph::before { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; border-top: 2px solid currentColor; }
.calendar-glyph::after { content: ""; position: absolute; left: 3px; top: -4px; width: 8px; height: 4px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.calendar-glyph.range { width: 20px; }
.filter-pill-menu, .date-range-popover { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; min-width: 150px; padding: 7px; background: #fff; border: 1px solid #dfe3eb; border-radius: 12px; box-shadow: 0 14px 36px rgba(26,34,54,.15); }
.filter-pill-menu { display: grid; gap: 3px; }
.filter-pill-menu a { padding: 9px 11px; color: #4d5669; border-radius: 8px; font-size: 11px; }
.filter-pill-menu a:hover, .filter-pill-menu a.active { color: var(--primary); background: #e9f1fe; }
.date-range-popover { width: 330px; display: grid; gap: 10px; padding: 14px; }
.range-dropdown .date-range-popover { left: auto; right: 0; max-width: calc(100vw - 32px); }
.date-range-popover label { display: grid; gap: 5px; color: #788093; font-size: 9px; }
.date-range-popover input { width: 100%; min-width: 0; min-height: 39px; padding: 0 10px; color: #30384a; background: #fff; border: 1px solid #dfe3eb; border-radius: 8px; }
.video-filter-reset { flex: 0 0 auto; min-height: 40px; padding: 9px 14px; color: #5f687b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.video-filter-reset:hover { color: var(--primary); }
.editor-work-summary { background: #fff; border-bottom: 1px solid var(--line); }
.editor-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px 13px; }
.editor-summary-head h3 { margin: 0 0 5px; color: #273047; font-size: 15px; }
.editor-summary-head p { margin: 0; color: #9299a8; font-size: 10px; }
.editor-summary-head > span { padding: 6px 10px; color: #626b7e; background: #f2f4f7; border-radius: 8px; font-size: 10px; white-space: nowrap; }
.editor-work-table { min-width: 950px; }
.editor-work-table td:first-child strong, .editor-work-table td:first-child small { display: block; }
.editor-work-table td:first-child small { margin-top: 3px; color: #9aa1af; font-size: 9px; }
.editor-work-count { color: var(--primary); font-size: 14px; }
.netdisk-upload { margin-top: 16px; }
.compact-video-edit { padding: 16px; gap: 10px; border-top: 1px solid var(--line); }

.login-body { min-height: 100vh; color: var(--ink); background: #f8fafd; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(420px, .85fr); }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; padding: 45px 55px; color: var(--ink); background: linear-gradient(180deg, #a8c2fd 0%, #e8eefd 55%, #d7e4fd 100%); border-right: 1px solid #c7d8f3; }
.brand-light { padding: 0; }
.login-copy { max-width: 610px; margin: auto 0; }
.eyebrow.light { color: #697c88; }
.login-copy h1 { margin: 16px 0 20px; font-size: clamp(38px, 5vw, 70px); line-height: 1.13; letter-spacing: -2px; }
.login-copy p { max-width: 510px; margin: 0; color: #60717c; font-size: 15px; line-height: 1.8; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #f8fafd; }
.login-card { width: min(390px, 100%); padding: 34px; background: var(--surface); border: 1px solid #dce5f2; border-radius: 18px; box-shadow: 0 15px 34px rgba(37,72,118,.08); }
.login-heading span { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.login-heading h2 { margin: 8px 0; font-size: 25px; }
.login-heading p { margin: 0 0 24px; color: #8c93a2; font-size: 12px; }
.login-card .field { margin-bottom: 15px; }
.login-card .flash { margin: 0 0 16px; }

@media (max-width: 1180px) {
    .sidebar { width: 200px; }
    .brand-mark { flex-basis: 82px; width: 82px; }
    .app-shell { grid-template-columns: 200px minmax(0,1fr); }
    .account-layout { grid-template-columns: 1fr; }
    .request-detail-grid, .video-detail-layout { grid-template-columns: 1fr; }
    .video-grid, .library-grid { grid-template-columns: 1fr 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .metric-grid { grid-template-columns: repeat(3,1fr); }
    .metric-grid.six-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .metric-grid.video-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .entry-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 820px) {
    .app-shell { display: block; }
    .sidebar { position: static; width: 100%; height: auto; padding: 14px; }
    .brand { padding-bottom: 12px; }
    .nav { grid-template-columns: 1fr 1fr; }
    .user-card { margin-top: 12px; }
    .topbar { min-height: 82px; padding: 18px 18px 15px; }
    .topbar-meta > span:first-child { display: none; }
    .content { padding: 18px; }
    .flash { margin: 14px 18px 0; }
    .filter-bar, .filter-bar.admin-filters, .filter-bar.test-filters, .filter-bar.test-filters.admin-filters, .filter-bar.request-filter, .filter-bar.video-filter { grid-template-columns: 1fr 1fr; padding: 13px; }
    .search-field { grid-column: 1 / -1; }
    .video-filter-area { overflow-x: auto; }
    .video-filter-row { min-width: 780px; }
    .form-layout { grid-template-columns: 1fr; }
    .help-card { display: none; }
    .product-hero { display: block; }
    .hero-actions { margin-top: 17px; }
    .platform-switcher, .platform-status-bar { align-items: stretch; flex-direction: column; }
    .platform-tabs { overflow-x: auto; }
    .platform-status-bar > div { flex-wrap: wrap; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .metric-grid.six-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .metric-grid.video-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .entry-grid { grid-template-columns: 1fr 1fr; }
    .entry-grid .span-2 { grid-column: 1 / -1; }
    .horizontal-form-footer { align-items: stretch; flex-direction: column; }
    .horizontal-form-footer .btn { width: 100%; }
    .login-shell { grid-template-columns: 1fr; }
    .login-intro { min-height: 330px; padding: 28px; }
    .login-copy h1 { font-size: 38px; }
    .login-panel { padding: 25px; }
}

@media (max-width: 520px) {
    .product-name-dialog-actions .btn { flex: 1 1 auto; }
    .topbar h1 { font-size: 20px; }
    .stat-grid { grid-template-columns: 1fr; }
    .panel-head { align-items: flex-start; flex-direction: column; }
    .filter-bar, .filter-bar.admin-filters, .filter-bar.test-filters, .filter-bar.test-filters.admin-filters, .filter-bar.request-filter, .filter-bar.video-filter { grid-template-columns: 1fr; }
    .search-field { grid-column: auto; }
    .video-filter-row { min-width: 760px; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-grid.six-grid { grid-template-columns: 1fr; }
    .metric-grid.video-summary-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .entry-grid { grid-template-columns: 1fr; }
    .entry-grid .span-2 { grid-column: auto; }
    .product-title-line { align-items: flex-start; flex-direction: column; }
    .external-title { font-size: 17px; }
    .platform-tab { min-width: 132px; }
    .video-grid, .library-grid { grid-template-columns: 1fr; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-list .wide { grid-column: auto; }
}

.panel-head-actions, .import-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-panel { margin-bottom: 20px; }
.import-guidance { display: grid; gap: 7px; padding: 20px 24px; color: #52617a; line-height: 1.6; }
.import-guidance strong { color: #17243b; }
.import-upload-form { display: flex; align-items: end; gap: 16px; padding: 0 24px 24px; flex-wrap: wrap; }
.import-upload-form .field, .import-upload-form .read-only-field { min-width: 260px; flex: 1 1 290px; }
.import-upload-form input[type="file"] { width: 100%; }
.import-counts { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 24px 8px; }
.import-counts span { padding: 9px 13px; background: #f2f5fb; border-radius: 9px; color: #53617a; }
.import-counts strong { color: #152238; }
.import-note { margin: 8px 24px; color: #69788f; line-height: 1.5; }
.import-errors { margin: 16px 24px; padding: 14px 18px; background: #fff2f1; border: 1px solid #f3c4c1; border-radius: 10px; color: #9c2f2d; }
.import-errors p { margin: 5px 0; }
.import-table-wrap { width: calc(100% - 48px); margin: 16px 24px; overflow-x: auto; }
.import-table-wrap table { min-width: 1320px; table-layout: fixed; white-space: normal; }
.import-table-wrap th, .import-table-wrap td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.import-table-wrap th:nth-child(1) { width: 68px; }
.import-table-wrap th:nth-child(2), .import-table-wrap th:nth-child(3) { width: 255px; }
.import-table-wrap th:nth-child(4) { width: 108px; }
.import-table-wrap th:nth-child(5) { width: 95px; }
.import-table-wrap th:nth-child(6), .import-table-wrap th:nth-child(7), .import-table-wrap th:nth-child(8), .import-table-wrap th:nth-child(9) { width: 72px; }
.import-table-wrap th:nth-child(10) { width: 245px; }
.import-table-wrap td:nth-child(4), .import-table-wrap td.num { white-space: nowrap; }
.import-status.ready { color: #168269; }
.import-status.replace { color: #b86a1f; }
.import-status.same { color: #69829d; }
.import-status.duplicate { color: #8b6d27; }
.import-status.error { color: #ba3535; }
.import-message { display: block; margin-top: 4px; line-height: 1.35; }
.import-actions { justify-content: flex-end; padding: 0 24px 24px; }
.import-actions form { margin: 0; }

@media (max-width: 1340px) {
    .video-filter-area { overflow: visible; }
    .video-filter-row { min-width: 0; flex-wrap: wrap; }
    .video-name-search { min-width: 0; flex: 1 1 100%; }
}

