:root {
  --brand: #ef3f3b;
  --brand-dark: #c52d2a;
  --messenger: #087bff;
  --ink: #17191d;
  --body: #30343a;
  --muted: #737983;
  --line: #dfe2e6;
  --canvas: #f5f6f7;
  --white: #fff;
  --green: #29723c;
  --radius: 12px;
  --shadow: 0 28px 70px rgba(23, 25, 29, .1);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: var(--ink);
  background: white;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--body); background: white; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
img { max-width: 100%; display: block; }
.site-shell { min-height: 100vh; }
.eyebrow { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }

.site-header { min-height: 112px; display: grid; grid-template-columns: 215px auto minmax(260px, 1fr) auto; align-items: center; gap: 25px; padding: 0 24px; border-bottom: 1px solid var(--line); background: white; }
.site-wordmark { color: var(--ink); font-size: 25px; font-weight: 800; letter-spacing: -.05em; }
.site-wordmark span { color: var(--brand); }
.primary-nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 13px; font-weight: 700; }
.primary-nav a:hover { color: var(--brand); }
.header-search { width: min(100%, 520px); justify-self: center; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: var(--canvas); }
.header-search input { min-width: 0; flex: 1; border: 0; padding: 13px 18px; outline: 0; background: transparent; }
.header-search button { border: 0; padding: 0 18px; background: transparent; color: var(--brand); font-weight: 800; }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 8px; padding: 0 20px; font-weight: 750; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button svg, .text-link svg { flex: 0 0 auto; width: 18px; height: 18px; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand); color: white; box-shadow: 0 12px 24px rgba(239,63,59,.18); }
.button-primary:hover { background: var(--brand-dark); }
.button-dark { background: var(--ink); color: white; }
.button-messenger { background: var(--messenger); color: white; white-space: nowrap; }
.button-large { min-height: 58px; padding: 0 27px; }
.messenger-pending { opacity: .62; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-size: 13px; font-weight: 800; }

.hero-section { min-height: 720px; display: grid; grid-template-columns: minmax(400px, .82fr) minmax(580px, 1.18fr); border-bottom: 1px solid var(--line); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 70px 5vw; background: var(--canvas); }
.hero-copy h1 { margin: 21px 0; color: #090a0b; font-size: clamp(64px, 6vw, 98px); line-height: .96; letter-spacing: -.065em; }
.hero-copy > p { max-width: 560px; margin: 0 0 30px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; color: var(--muted); font-size: 12px; font-weight: 700; }
.trust-row > span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.trust-row svg { flex: 0 0 auto; width: 19px; height: 19px; color: var(--brand); }
.hero-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--line); gap: 1px; }
.hero-product-grid .product-card { border: 0; border-radius: 0; }
.hero-product-grid .product-image { aspect-ratio: 1 / 1.1; }
.hero-product-grid .product-card-body { min-height: 152px; }
.hero-empty { grid-column: 1 / -1; align-self: center; justify-self: center; max-width: 520px; padding: 50px; text-align: center; }
.hero-empty h2 { margin: 12px 0; font-size: 46px; line-height: 1; letter-spacing: -.045em; }
.hero-empty p { color: var(--muted); }

.section { padding: 90px 38px; }
.section-bordered { border-bottom: 1px solid var(--line); }
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 38px; }
.section-heading-row h2 { margin: 8px 0 0; font-size: clamp(40px, 5vw, 64px); letter-spacing: -.05em; }
.featured-grid, .catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.marketplace-note { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(360px, 1fr) auto; align-items: center; gap: 50px; background: #f2f3f4; }
.marketplace-note h2 { max-width: 630px; margin: 10px 0 0; font-size: clamp(40px, 5vw, 66px); line-height: 1; letter-spacing: -.055em; }
.marketplace-note p { color: var(--muted); font-size: 17px; line-height: 1.7; }

.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(23,25,29,.1); }
.product-image { display: grid; place-items: center; aspect-ratio: 1 / .9; overflow: hidden; padding: 16px; background: white; }
.hero-product-grid .product-image { padding: 12px; }
.product-image img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.product-card-body { display: grid; gap: 12px; padding: 19px; }
.condition-badge { width: fit-content; padding: 5px 9px; border-radius: 999px; background: #eceff2; color: #555c65; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.condition-new { background: #dff3e3; color: #28683a; }
.condition-like-new { background: #e7f0ff; color: #245f9f; }
.condition-refurbished { background: #fff0cf; color: #76581c; }
.product-card h3 { min-width: 0; margin: 0; font-size: 20px; letter-spacing: -.025em; }
.product-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.price-stack { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.price-stack del { color: #969ba3; font-size: 12px; }
.price-stack strong { color: var(--ink); font-size: 19px; }

.shop-page, .product-page { max-width: 1500px; margin: 0 auto; padding: 66px 38px 110px; }
.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.page-title-row h1 { margin: 8px 0 0; font-size: clamp(48px, 6vw, 78px); line-height: .95; letter-spacing: -.06em; }
.page-title-row > p { color: var(--muted); font-weight: 700; }
.catalog-filters { display: grid; grid-template-columns: minmax(230px, 1.45fr) minmax(175px, .9fr) minmax(155px, .75fr) minmax(175px, .8fr) auto; align-items: end; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); }
.catalog-filters label, .intake-form label, .settings-form label, .inline-sale-form label, .stack-form label { display: grid; gap: 7px; color: var(--body); font-size: 12px; font-weight: 750; }
.catalog-filters input, .catalog-filters select, .intake-form input, .intake-form select, .intake-form textarea, .settings-form input, .settings-form textarea, .inline-sale-form input, .stack-form input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 0 13px; outline: 0; background: white; color: var(--ink); }
.catalog-filters input:focus, .catalog-filters select:focus, .intake-form input:focus, .intake-form select:focus, .intake-form textarea:focus, .settings-form input:focus, .settings-form textarea:focus, .stack-form input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,25,29,.08); }
.catalog-grid { margin-top: 28px; }
.empty-catalog { padding: 90px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); text-align: center; }
.empty-catalog h2 { margin: 10px 0; font-size: 36px; }
.empty-catalog p { color: var(--muted); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 28px; color: var(--muted); font-size: 13px; }
.breadcrumbs a:hover { color: var(--brand); }
.product-detail-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, .75fr); gap: clamp(40px, 6vw, 90px); }
.product-gallery { min-width: 0; }
.product-detail-image { display: grid; place-items: center; aspect-ratio: 4 / 3; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: clamp(14px, 2.5vw, 34px); background: white; }
.product-detail-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; }
.product-thumbnails { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; }
.product-thumbnail { display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border: 2px solid transparent; border-radius: 8px; padding: 5px; background: white; }
.product-thumbnail.active { border-color: var(--brand); }
.product-thumbnail img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.product-detail-copy { padding: 26px 0; }
.product-detail-copy h1 { margin: 17px 0 12px; color: var(--ink); font-size: clamp(44px, 5vw, 70px); line-height: .98; letter-spacing: -.055em; }
.product-detail-sku { margin: 18px 0 0; color: var(--muted); font-family: Consolas, monospace; letter-spacing: .1em; font-size: 12px; }
.product-detail-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 26px 0; }
.product-detail-price del { color: #969ba3; font-size: 23px; }
.product-detail-price strong { color: var(--ink); font-size: 42px; letter-spacing: -.04em; }
.product-description { color: var(--muted); font-size: 17px; line-height: 1.7; }
.product-facts { margin: 28px 0; border-top: 1px solid var(--line); }
.product-facts > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.product-facts dt { color: var(--muted); }
.product-facts dd { margin: 0; font-weight: 750; text-align: right; }
.product-messenger { width: 100%; }
.product-messenger-wrap { display: grid; gap: 10px; }
.product-messenger-wrap p { min-height: 34px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.messenger-unavailable { display: block; padding: 16px; border-radius: 8px; background: #eaf3ff; color: #075bb8; font-weight: 700; text-align: center; }
.product-back-link { display: inline-block; margin-top: 28px; }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 30px; padding: 65px 38px 28px; background: var(--ink); color: white; }
.footer-wordmark { color: white; }
.site-footer p { max-width: 430px; color: #aeb3ba; line-height: 1.6; }
.footer-links { display: flex; gap: 24px; color: #d7dade; font-weight: 700; }
.site-footer small { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid #34373d; color: #8f959d; }

.alert { padding: 15px 18px; border: 1px solid #b9ddc2; border-radius: 9px; background: #eefaf1; color: #235c31; line-height: 1.5; }
.alert-error { border-color: #efbbb9; background: #fff1f0; color: #8c1e1b; }
.public-flash { margin: 18px 38px 0; }
.access-page, .install-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #f6f7f8, #e9edf1); }
.access-card, .install-card { width: min(100%, 610px); padding: 58px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.access-card h1, .install-card h1 { margin: 14px 0; font-size: 50px; line-height: 1; letter-spacing: -.05em; }
.access-card > p, .install-card > p { margin-bottom: 28px; color: var(--muted); line-height: 1.7; }
.brand, .admin-login-wordmark { display: flex; align-items: center; gap: 11px; margin-bottom: 42px; font-size: 19px; font-weight: 800; }
.brand span, .admin-login-wordmark span { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 8px; background: var(--brand); color: white; font-size: 13px; }
.stack-form, .admin-login-form { display: grid; gap: 17px; margin: 28px 0 24px; }
.stack-form small { color: var(--muted); font-weight: 450; }

/* Admin */
.admin-body { background: #f4f5f7; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; background: var(--ink); color: white; }
.admin-wordmark { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; font-size: 18px; font-weight: 800; }
.admin-wordmark span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--brand); font-size: 13px; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a, .admin-sidebar-bottom a { padding: 13px 14px; border-radius: 8px; color: #c6c9ce; font-size: 14px; font-weight: 700; }
.admin-sidebar nav a:hover, .admin-sidebar-bottom a:hover { background: #292c31; color: white; }
.admin-sidebar-bottom { display: grid; gap: 4px; margin-top: auto; border-top: 1px solid #34373d; padding-top: 12px; }
.admin-main { min-width: 0; }
.admin-topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: white; color: var(--muted); font-size: 13px; }
.admin-topbar > div { display: flex; align-items: center; gap: 9px; color: var(--green); font-weight: 750; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #36b35b; box-shadow: 0 0 0 4px #e3f7e8; }
.admin-flash { position: fixed; top: 18px; right: 22px; z-index: 1001; width: min(520px, calc(100vw - 44px)); margin: 0; box-shadow: 0 16px 42px rgba(23,25,29,.2); }
.admin-content { padding: 46px 34px 90px; }
.admin-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 30px; }
.admin-title-row h1 { margin: 7px 0 4px; font-size: clamp(44px, 5vw, 66px); line-height: 1; letter-spacing: -.055em; }
.admin-title-row p { margin: 0; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-grid article { display: grid; gap: 9px; min-height: 166px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stat-grid article > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-grid strong { align-self: end; color: var(--ink); font-size: 34px; letter-spacing: -.045em; }
.stat-grid small { color: var(--muted); }
.stat-grid .profit-stat { border-color: #cfe7d4; background: #f3fbf5; }
.admin-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .6fr); gap: 20px; }
.admin-panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.admin-panel h2 { margin: 7px 0 0; font-size: 27px; letter-spacing: -.035em; }
.compact-table-head, .compact-table-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 100px; align-items: center; gap: 14px; padding: 13px 24px; }
.compact-table-head { color: var(--muted); background: var(--canvas); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.compact-table-row { border-top: 1px solid #edf0f3; font-size: 13px; }
.compact-table-row > span:first-child { display: grid; gap: 3px; }
.compact-table-row small { color: var(--muted); font-family: Consolas, monospace; }
.status-pill { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; background: #eceff2; color: #4f5660; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.status-active { background: #dff4e4; color: #276b39; }
.status-draft { background: #fff0c7; color: #755718; }
.status-sold, .status-archived { background: #e4e6e9; color: #555b63; }
.activity-panel { padding: 24px; }
.activity-panel > p { color: var(--muted); line-height: 1.65; }
.activity-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0; }
.activity-metrics > div { display: grid; gap: 6px; padding: 17px; border-radius: 9px; background: var(--canvas); }
.activity-metrics strong { font-size: 30px; }
.activity-metrics span { color: var(--muted); font-size: 11px; }
.admin-empty { display: grid; justify-items: start; gap: 8px; padding: 45px 24px; }
.admin-empty.large { justify-items: center; padding: 90px 24px; text-align: center; }
.admin-empty h2, .admin-empty h3, .admin-empty p { margin: 0; }
.admin-empty p { max-width: 540px; color: var(--muted); line-height: 1.6; }

.inventory-panel { overflow: hidden; }
.inventory-table-wrap { overflow-x: auto; }
.inventory-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inventory-table th { padding: 13px 15px; background: var(--canvas); color: var(--muted); font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.inventory-table td { min-width: 90px; padding: 15px; border-top: 1px solid #edf0f3; vertical-align: top; }
.inventory-product { min-width: 220px; display: flex; align-items: center; gap: 11px; }
.inventory-product img { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 7px; padding: 3px; object-fit: contain; object-position: center; background: white; }
.inventory-product span { display: grid; gap: 3px; }
.inventory-product small { color: var(--muted); font-family: Consolas, monospace; }
.barcode-link { font-family: Consolas, monospace; font-size: 11px; }
.barcode-link small { display: block; margin-top: 4px; color: var(--brand); font-family: inherit; font-weight: 800; }
.table-actions { min-width: 180px; display: grid; gap: 8px; }
.table-actions > a { color: var(--brand); font-weight: 800; }
.table-actions summary { color: var(--ink); font-weight: 750; }
.inline-sale-form { width: 210px; display: grid; gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.inline-sale-form input { min-height: 36px; }
.inline-sale-form button { border: 0; border-radius: 6px; padding: 9px; background: var(--brand); color: white; font-weight: 750; }
.sold-total { color: var(--green); font-weight: 750; }

.intake-form { display: grid; gap: 18px; }
.form-section { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.form-section-heading { display: flex; align-items: flex-start; gap: 14px; }
.form-section-heading > span, .settings-number { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #ffe6e5; color: var(--brand); font-size: 11px; font-weight: 800; }
.form-section-heading h2 { margin: 2px 0 6px; font-size: 21px; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid-three { grid-template-columns: repeat(3, 1fr); }
.field-wide { grid-column: 1 / -1; }
.intake-form textarea { min-height: 125px; padding: 12px 13px; resize: vertical; }
.intake-form label small, .settings-form label small { color: var(--muted); font-size: 11px; font-weight: 450; line-height: 1.4; }
.money-field { position: relative; }
.money-field b { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money-field input { padding-left: 31px; }
.checkbox-field { grid-template-columns: auto 1fr !important; align-items: center; align-self: end; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
.checkbox-field input { width: 18px; min-height: 18px; }
.checkbox-field > span { display: grid; gap: 3px; }
.form-submit-row { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 24px 28px; border-radius: var(--radius); background: var(--ink); color: white; }
.form-submit-row p { max-width: 650px; margin: 0; color: #bfc3c8; line-height: 1.5; }

.image-manager { display: grid; gap: 24px; }
.existing-images h3 { margin: 0 0 13px; }
.image-choice-grid, .new-image-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.new-image-preview:empty { display: none; }
.image-choice { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.image-choice img { width: 100%; aspect-ratio: 1; padding: 7px; object-fit: contain; object-position: center; background: white; }
.image-choice label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 7px; padding: 10px; }
.image-choice label input { width: 17px; min-height: 17px; }
.image-choice small { display: block; overflow: hidden; padding: 0 10px 10px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.image-delete-button { width: calc(100% - 20px); margin: 0 10px 10px; border: 0; border-radius: 5px; padding: 7px; background: #ffe4e3; color: #982421; font-size: 11px; font-weight: 800; }
.upload-dropzone { min-height: 130px; display: grid; place-items: center; align-content: center; gap: 8px; border: 2px dashed #c8ccd2; border-radius: 10px; padding: 24px; background: var(--canvas); text-align: center; }
.upload-dropzone > span { font-size: 17px; font-weight: 800; }
.upload-dropzone input { max-width: 520px; padding: 12px; background: white; }

.settings-form { max-width: 900px; padding: 32px; }
.settings-section { display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 6px 0 32px; border-bottom: 1px solid var(--line); }
.settings-section + .settings-section { padding-top: 30px; }
.settings-section h2 { margin: 2px 0 6px; }
.settings-section p { max-width: 700px; margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
.settings-info { display: grid; gap: 5px; margin-top: 18px; padding: 15px 17px; border-radius: 9px; background: #eaf3ff; color: #075bb8; font-size: 12px; line-height: 1.5; }
.settings-submit { padding-top: 26px; text-align: right; }
.settings-form textarea { padding: 12px 13px; resize: vertical; line-height: 1.5; }

/* Shipping and connected sales channels */
.channel-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.channel-card { display: grid; align-content: start; gap: 18px; min-height: 230px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.channel-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.channel-card .button { align-self: end; }
.channel-logo { font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.ebay-logo { color: #e53238; }
.facebook-logo { color: #0866ff; }
.marketplace-logo { color: #157873; }
.connection-state { padding: 6px 9px; border-radius: 999px; background: #edf0f3; color: #5b626c; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.connection-state.is-connected { background: #dff4e4; color: #276b39; }
.connection-state.is-assisted { background: #e5f1ff; color: #175eaa; }
.channel-settings { overflow: hidden; }
.channel-settings .settings-section { grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr); padding: 30px; }
.channel-settings .settings-section > div:first-child { align-self: start; }
.section-kicker { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 50%; background: #ffe6e5; color: var(--brand); font-size: 11px; font-weight: 900; }
.channel-settings input, .channel-settings select, .shipping-editor input, .shipping-editor select, .marketplace-finish input, .marketplace-kit textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 0 13px; background: white; color: var(--ink); outline: 0; }
.channel-settings label, .shipping-editor label { display: grid; gap: 7px; color: var(--body); font-size: 12px; font-weight: 750; }
.channel-settings label small, .shipping-editor label small { color: var(--muted); font-weight: 450; line-height: 1.4; }
.messenger-webhook-details { display: grid; gap: 9px; }
.messenger-webhook-details > span { color: var(--body); font-size: 12px; font-weight: 750; }
.messenger-webhook-details > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.messenger-webhook-details code { overflow: auto; min-height: 48px; display: flex; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: #49515a; font-size: 10px; white-space: nowrap; }
.settings-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 24px 30px; background: var(--canvas); }
.policy-list { display: grid; gap: 7px; grid-column: 2; margin-top: 18px; padding: 16px; border-radius: 8px; background: var(--canvas); }
.policy-list span { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }
.policy-list b { color: var(--ink); font-family: inherit; }
.channel-tools { margin-top: 20px; padding: 24px; }
.channel-tools h2 { margin-top: 0; }
.channel-tool-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cron-box { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(280px, 1fr) auto; align-items: center; gap: 14px; margin-top: 22px; padding: 18px; border-radius: 9px; background: var(--canvas); }
.cron-box p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cron-box code { overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: white; color: #49515a; font-size: 10px; white-space: nowrap; }
.shipping-layout { display: grid; grid-template-columns: minmax(420px, .8fr) minmax(520px, 1.2fr); align-items: start; gap: 20px; }
.shipping-profile-list, .shipping-editor { overflow: hidden; }
.shipping-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .7fr) auto; align-items: center; gap: 16px; padding: 18px 22px; border-top: 1px solid var(--line); }
.shipping-rule:hover, .shipping-rule.active { background: #fff7f6; }
.shipping-rule > div { display: grid; gap: 5px; }
.shipping-rule span, .shipping-rule small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.shipping-editor .form-grid { padding: 24px; }
.button-danger { border-color: #efbbb9; background: #fff1f0; color: #8c1e1b; }
.product-channel-panel { margin-top: 20px; overflow: hidden; }
.product-channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-channel-grid article { display: grid; align-content: start; gap: 13px; min-height: 205px; padding: 22px; border-right: 1px solid var(--line); }
.product-channel-grid article:last-child { border-right: 0; }
.product-channel-grid article > div { display: flex; justify-content: space-between; gap: 10px; }
.product-channel-grid form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.product-channel-grid article > a { color: var(--brand); font-size: 12px; font-weight: 800; }
.channel-status { padding: 5px 8px; border-radius: 999px; background: #eceff2; color: #555b63; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.channel-status-published, .channel-status-manual { background: #dff4e4; color: #276b39; }
.channel-status-ready, .channel-status-publishing { background: #e5f1ff; color: #175eaa; }
.channel-status-failed { background: #fff1f0; color: #8c1e1b; }
.channel-error { margin: 0; color: #8c1e1b; font-size: 11px; line-height: 1.45; }
.channel-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.button.is-loading, .button:disabled { cursor: wait; opacity: .68; }
.channel-progress-toast { position: fixed; right: 22px; bottom: 22px; z-index: 1100; display: flex; align-items: center; gap: 13px; width: min(390px, calc(100vw - 44px)); padding: 17px 19px; border-radius: 11px; background: #17191d; color: white; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.channel-progress-toast div { display: grid; gap: 3px; }
.channel-progress-toast small { color: #c7cbd0; line-height: 1.4; }
.channel-progress-spinner { width: 22px; height: 22px; flex: 0 0 auto; border: 3px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: channel-spin .8s linear infinite; }
@keyframes channel-spin { to { transform: rotate(360deg); } }
.text-danger-button { border: 0; background: transparent; color: #a52622; font-size: 11px; font-weight: 850; }
.inventory-channels { display: flex; flex-wrap: wrap; gap: 5px; }
.mini-channel { padding: 4px 6px; border-radius: 5px; background: #eceff2; color: #5b626c; font-size: 9px; font-weight: 900; }
.mini-channel-published, .mini-channel-manual { background: #dff4e4; color: #276b39; }
.mini-channel-failed { background: #fff1f0; color: #8c1e1b; }
.shipping-fact { grid-column: 1 / -1; }
.marketplace-kit { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; }
.marketplace-kit > section { padding-bottom: 24px; overflow: hidden; }
.marketplace-kit textarea { width: calc(100% - 48px); min-height: 78px; margin: 24px; padding: 13px; resize: vertical; line-height: 1.5; }
.marketplace-kit .marketplace-description { min-height: 300px; margin-top: 0; }
.marketplace-price { display: flex; align-items: center; justify-content: space-between; margin: 0 24px; padding: 17px; border-radius: 8px; background: var(--canvas); }
.marketplace-price strong { font-size: 27px; }
.marketplace-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 24px; }
.marketplace-images a { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.marketplace-images img { width: 100%; aspect-ratio: 1; padding: 6px; object-fit: contain; background: white; }
.marketplace-images span { display: block; padding: 9px; color: var(--brand); font-size: 10px; font-weight: 850; text-align: center; }
.marketplace-finish { margin-top: 20px; padding: 24px; }
.marketplace-finish h2 { margin-top: 0; }
.marketplace-finish p { color: var(--muted); }
.marketplace-finish form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 18px; }
.order-list { display: grid; gap: 16px; padding: 16px; background: #eef0f3; }
.order-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.order-card > header, .order-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; }
.order-card > header { border-bottom: 1px solid var(--line); }
.order-card > header > div { display: flex; align-items: center; gap: 14px; }
.order-card > footer { border-top: 1px solid var(--line); background: var(--canvas); }
.order-body { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(240px, 1fr) minmax(260px, 1.2fr); }
.order-body > section { padding: 22px; border-right: 1px solid var(--line); }
.order-body > section:last-child { border-right: 0; }
.order-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.order-body h3 { margin: 0 0 5px; font-size: 18px; }
.order-body p, .order-body address { margin: 0; color: var(--muted); font-size: 12px; font-style: normal; line-height: 1.55; }
.order-body address { margin-top: 12px; color: var(--ink); }
.order-body dl { margin: 13px 0 0; }
.order-body dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12px; }
.order-body dt { color: var(--muted); }
.order-body dd { margin: 0; font-weight: 800; }
.order-items { display: grid; gap: 9px; }
.order-items span { display: grid; gap: 3px; padding: 10px; border-radius: 7px; background: var(--canvas); font-size: 12px; }
.order-items small { color: var(--muted); font-family: Consolas, monospace; }
.order-card footer form { width: 100%; display: grid; grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr) auto; align-items: end; gap: 12px; }
.order-card footer label { display: grid; gap: 6px; color: var(--body); font-size: 11px; font-weight: 800; }
.order-card footer input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; background: white; }
.tracking-complete { display: flex; justify-content: space-between; width: 100%; color: var(--green); }

.label-page { min-height: calc(100vh - 68px); display: grid; place-items: center; align-content: center; gap: 24px; padding: 44px; }
.label-toolbar { width: 420px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.print-label { width: 420px; min-height: 300px; padding: 20px; border: 1px dashed #9da3ab; background: white; color: #111; }
.label-brand { color: var(--brand); font-weight: 800; }
.print-label h1 { margin: 8px 0; font-size: 25px; line-height: 1.05; }
.label-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; font-family: Consolas, monospace; }
.label-meta strong { font-size: 26px; }
.ean-barcode { width: 100%; height: auto; }
.print-label > p { margin: 5px 0 0; color: #444; font-size: 11px; text-transform: capitalize; }

@media (max-width: 1180px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .primary-nav { display: none; }
  .hero-section { grid-template-columns: 1fr; }
  .hero-product-grid { min-height: 600px; }
  .featured-grid, .catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .form-section { grid-template-columns: 1fr; }
  .channel-overview { grid-template-columns: 1fr; }
  .shipping-layout, .marketplace-kit { grid-template-columns: 1fr; }
  .order-body { grid-template-columns: 1fr; }
  .order-body > section { border-right: 0; border-bottom: 1px solid var(--line); }
  .order-body > section:last-child { border-bottom: 0; }
}

@media (max-width: 820px) {
  .site-header { min-height: auto; grid-template-columns: 1fr auto; padding: 16px 18px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .button-messenger { min-height: 40px; padding: 0 13px; font-size: 12px; }
  .hero-copy { padding: 70px 24px; }
  .hero-copy h1 { font-size: 64px; }
  .hero-product-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .marketplace-note { grid-template-columns: 1fr; }
  .shop-page, .product-page, .section { padding-left: 18px; padding-right: 18px; }
  .catalog-filters { grid-template-columns: 1fr 1fr; }
  .catalog-filters label:first-child { grid-column: 1 / -1; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-detail-image, .product-detail-image img { min-height: 0; }
  .product-thumbnails { grid-template-columns: repeat(5, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(4, auto); overflow-x: auto; }
  .admin-sidebar-bottom { display: none; }
  .admin-content { padding: 34px 18px 70px; }
  .admin-title-row { align-items: flex-start; flex-direction: column; }
  .form-grid-three { grid-template-columns: 1fr; }
  .image-choice-grid, .new-image-preview { grid-template-columns: repeat(3, 1fr); }
  .channel-settings .settings-section { grid-template-columns: 1fr; }
  .cron-box { grid-template-columns: 1fr; }
  .policy-list { grid-column: auto; }
  .product-channel-grid { grid-template-columns: 1fr; }
  .product-channel-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .site-wordmark { font-size: 21px; }
  .site-header > .button-messenger { max-width: 150px; overflow: hidden; }
  .hero-copy h1 { font-size: 50px; }
  .hero-product-grid, .featured-grid, .catalog-grid { grid-template-columns: 1fr; }
  .hero-product-grid .product-card:nth-child(n+4) { display: none; }
  .page-title-row { align-items: flex-start; flex-direction: column; }
  .catalog-filters { grid-template-columns: 1fr; }
  .catalog-filters label:first-child { grid-column: auto; }
  .product-detail-image, .product-detail-image img { min-height: 0; }
  .product-thumbnails { grid-template-columns: repeat(4, 1fr); }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer small { grid-column: auto; }
  .access-card, .install-card { padding: 34px 23px; }
  .admin-sidebar nav { grid-template-columns: 1fr 1fr; }
  .admin-topbar { padding: 0 18px; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .form-submit-row { align-items: stretch; flex-direction: column; }
  .image-choice-grid, .new-image-preview { grid-template-columns: repeat(2, 1fr); }
  .settings-form { padding: 20px; }
  .settings-section { grid-template-columns: 1fr; }
  .label-page { padding: 20px; }
  .label-toolbar, .print-label { width: 100%; }
  .shipping-layout { display: block; }
  .shipping-editor { margin-top: 18px; }
  .shipping-rule { grid-template-columns: 1fr; }
  .marketplace-images { grid-template-columns: repeat(2, 1fr); }
  .marketplace-finish form { grid-template-columns: 1fr; }
  .order-card footer form { grid-template-columns: 1fr; }
}

@media print {
  @page { size: 100mm 70mm; margin: 4mm; }
  body { background: white; }
  .admin-sidebar, .admin-topbar, .label-toolbar, .admin-flash { display: none !important; }
  .admin-shell, .admin-main, .label-page { display: block; min-height: 0; padding: 0; background: white; }
  .print-label { width: 92mm; min-height: 62mm; border: 0; padding: 3mm; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
