@font-face {
    font-family: "Fira Sans Condensed";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/fira-sans-condensed-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Fira Sans Condensed";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/fonts/fira-sans-condensed-latin-500-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Fira Sans Condensed";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/fonts/fira-sans-condensed-latin-600-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Fira Sans Condensed";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/fonts/fira-sans-condensed-latin-700-normal.woff2") format("woff2");
}

:root {
    --bs-font-sans-serif: "Fira Sans Condensed", sans-serif;
    --bs-body-font-family: "Fira Sans Condensed", sans-serif;
    --bs-body-font-size: 16.5px;
}

html, body {
    font-family: "Fira Sans Condensed", sans-serif !important;
    font-size: 16.5px;
    color: #0b2460;
    background: #eef3fb;
    margin: 0;
}

button, input, select, textarea, label, .btn, .form-control, .form-select {
    font-family: "Fira Sans Condensed", sans-serif !important;
}

.bi, [class^="bi-"], [class*=" bi-"] { font-family: bootstrap-icons !important; }

.page-title { font-size: 1.15rem; font-weight: 650; margin: 0; }
.erp-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
    flex-wrap: wrap;
}
.erp-count { font-size: 0.78rem; color: #52606d; font-variant-numeric: tabular-nums; }
.form-label { font-size: 0.72rem; font-weight: 600; color: #52606d; margin-bottom: 0.12rem; }
.form-control, .form-select {
    font-size: 0.8125rem;
    min-height: 1.85rem;
    padding: 0.18rem 0.45rem;
    border-radius: 0.15rem;
}
.style-fields { display: flex; flex-direction: column; gap: 0.4rem; }
.sf-row {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 0.4rem 0.45rem;
    align-items: end;
}
.style-fields .sf { min-width: 0; }
.sf-name { grid-column: span 2; }
.sf-price, .sf-sku, .sf-gender, .sf-check { grid-column: span 1; }
.sf-look, .sf-color { grid-column: span 2; }
.sf-check .form-label { white-space: nowrap; }
.sf-wide, .sf-note { width: 100%; }
.sf-name .form-control, .sf-sku .form-control, .sf-look .form-control, .sf-color .form-control, .sf-gender .form-control, .sf-price .form-control,
.sf-look .nlkp, .sf-color .nlkp, .sf-gender .nlkp { width: 100%; }
.check-line {
    display: flex;
    align-items: center;
    min-height: 1.85rem;
    margin: 0;
}
.check-line input[type="checkbox"] { width: 0.95rem; height: 0.95rem; margin: 0; }
.btn { font-size: 0.8125rem; padding: 0.22rem 0.6rem; border-radius: 0.15rem; }
.btn-primary { background: #1857d4; border-color: #1857d4; }
.panel {
    background: #fff;
    border: 1px solid #d5e3f7;
    padding: 0.75rem 0.85rem;
    margin: 0.55rem 0 0.9rem;
}
.editor-actions {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    background: #fff;
    border-bottom: 1px solid #d5e3f7;
    margin: -0.75rem -0.85rem 0.7rem;
    padding: 0.45rem 0.85rem;
}
.amt, .dxg td.right, .dxg th.right { text-align: right; font-variant-numeric: tabular-nums; }
.note { background: #fff7e8; border: 1px solid #ecd7a4; padding: 0.5rem 0.7rem; margin: 0.4rem 0; }
.note.bad { background: #fdecec; border-color: #f0c2c2; }
.note.ok { background: #e9f7ef; border-color: #b7e0c6; }
.live-check { margin: 0.2rem 0 0; font-size: 0.75rem; color: #9f1239; font-weight: 700; }

.dxg-wrap { overflow: auto; max-height: calc(100svh - 14rem); border: 1px solid #c5d7f2; background: #fff; }
.dxg { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.dxg th, .dxg td { padding: 0.28rem 0.4rem; border-bottom: 1px solid #e4eef9; white-space: nowrap; }
.dxg thead th {
    position: sticky;
    top: 0;
    background: #1857d4;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    z-index: 2;
}
.dxg thead tr.dxg-filters th { top: 1.65rem; background: #f4f8fd; cursor: default; padding: 0.2rem; }
.dxg-filter {
    width: 100%;
    border: 1px solid #c5d7f2;
    font-size: 0.75rem;
    padding: 0.12rem 0.28rem;
    color: #0b2460;
    background: #fff;
}
.dxg-dir { margin-left: 0.25rem; font-size: 0.65rem; }
.dxg-click { cursor: pointer; }
.dxg tbody tr:hover { background: #e8f2ff; }
.dxg tbody tr.st-pending { background: #fef3c7; color: #a16207; }
.dxg tbody tr.st-confirmed { background: #e8eef8; color: #1e3a5f; }
.dxg tbody tr.st-packed { background: #f8f1de; color: #8a6a2f; }
.dxg tbody tr.st-shipped { background: #dbeafe; color: #1e3a8a; }
.dxg tbody tr.st-delivered { background: #ecfccb; color: #3f6212; }
.dxg tbody tr.st-rejected { background: #ffe4e6; color: #9f1239; }
.dxg tbody tr.st-returned { background: #ffedd5; color: #92400e; }
.dxg tbody tr.st-cancelled { background: #f5f5f4; color: #44403c; }
.dxg tbody tr.st-pending:hover { background: #fde68a; }
.dxg tbody tr.st-confirmed:hover { background: #d5e1f4; }
.dxg tbody tr.st-packed:hover { background: #f0e4c4; }
.dxg tbody tr.st-shipped:hover { background: #bfdbfe; }
.dxg tbody tr.st-delivered:hover { background: #d9f99d; }
.dxg tbody tr.st-rejected:hover { background: #fecdd3; }
.dxg tbody tr.st-returned:hover { background: #fed7aa; }
.dxg tbody tr.st-cancelled:hover { background: #e7e5e4; }
.dxg-foot { font-size: 0.75rem; color: #52606d; margin: 0.25rem 0 0.6rem; }
.dxg-act { white-space: nowrap; }
.order-act { display: flex; align-items: center; gap: 0.35rem; min-width: 16rem; }
.chat-status { max-width: 16rem; margin: 0 0 0.55rem; }
.page .chat { border-color: #c5d7f2; box-shadow: none; }
.page .chat-log { background: #f4f7fb; }
.page .bubble { color: #1e3a5f; }
.page .bubble.mine { background: #1857d4; color: #fff; }
.page .chat-compose button { background: #0c2f7a; }
.page .chat-compose textarea { color: #0b2460; }
.order-act .nlkp { flex: 1; min-width: 8.5rem; }
.dxg-wrap:has(.nlkp-open) { overflow: visible; }
.dxg tbody tr:has(.nlkp-open) { position: relative; z-index: 6; }

.sheet { max-width: 48rem; margin: 1.2rem auto; background: #fff; color: #1c1917; padding: 1.4rem 1.6rem 1.8rem; border-top: 4px solid #9f1239; }
.sheet-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.sheet-brand { letter-spacing: 0.08em; font-size: 1.35rem; margin: 0; }
.sheet-brand span, .sheet p, .sheet address { font-style: normal; color: #44403c; }
.sheet h2 { margin: 0; font-size: 1.35rem; letter-spacing: 0.04em; }
.sheet-meta { text-align: right; }
.sheet-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 1rem; margin: 1rem 0; }
.sheet address, .sheet-pay { border: 1px solid #e7e5e4; padding: 0.7rem 0.8rem; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th { text-align: left; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: #9f1239; border-bottom: 1px solid #9f1239; }
.sheet td { border-bottom: 1px solid #e7e5e4; padding: 0.35rem 0; }
.sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-totals { margin-left: auto; width: min(18rem, 100%); }
.sheet-totals div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.15rem 0; }
.sheet-totals .grand { border-top: 1px solid #1c1917; margin-top: 0.25rem; padding-top: 0.35rem; font-size: 1.05rem; }
.sheet-foot { margin-top: 1.2rem; font-size: 0.8rem; color: #57534e; }
@media print {
    .no-print, .side, .topbar, .page-nav { display: none !important; }
    body { background: #fff !important; }
    .sheet { margin: 0; max-width: none; border-top-color: #9f1239; }
}

.page,
.page :where(*):not(.bi):not([class^="bi-"]):not([class*=" bi-"]) {
    font-weight: 700 !important;
}
.image-strip { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.45rem; }
.image-strip figure { margin: 0; width: 5.6rem; }
.image-strip img { width: 5.6rem; height: 7.4rem; object-fit: cover; display: block; border: 1px solid #c5d7f2; background: #eef3fb; }
.image-strip .btn { width: 100%; margin-top: 0.2rem; }
.slide-preview { width: min(100%, 28rem); height: 9rem; object-fit: cover; display: block; border: 1px solid #c5d7f2; background: #111; }

.nlkp { position: relative; }
.nlkp-back { position: fixed; inset: 0; background: transparent; border: 0; z-index: 30; }
.nlkp-drop {
    position: absolute;
    left: 0; right: 0; top: 100%;
    z-index: 40;
    background: #fff;
    border: 1px solid #9ec4f5;
    max-height: 240px;
    overflow: auto;
    box-shadow: 0 8px 20px rgba(12, 47, 122, 0.12);
}
.nlkp-row, .nlkp-empty {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef3fb;
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
    cursor: pointer;
}
.nlkp-row.sel, .nlkp-row:hover { background: #e8f2ff; }
.nlkp-empty { color: #52606d; cursor: default; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.8rem; }
.kpi {
    position: relative; overflow: hidden; min-height: 5.4rem; border: 0; padding: 0.7rem 0.8rem;
    background: #fff right center / cover no-repeat;
    box-shadow: 0 8px 18px rgba(12, 47, 122, 0.06);
}
.kpi::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 42%, rgba(255,255,255,.28) 68%, rgba(255,255,255,0) 100%);
}
.kpi > * { position: relative; z-index: 1; }
.kpi span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 0.72rem; }
.kpi-today { background-image: url("/brand/dash/kpi-today.jpg?v=1"); color: #a16207; }
.kpi-month { background-image: url("/brand/dash/kpi-month.jpg?v=1"); color: #9f1239; }
.kpi-open { background-image: url("/brand/dash/kpi-open.jpg?v=1"); color: #1e3a5f; }
.kpi-feedback { background-image: url("/brand/dash/kpi-feedback.jpg?v=1"); color: #a16207; }
.kpi-ship { background-image: url("/brand/dash/kpi-delivery.jpg?v=1"); color: #1e3a5f; }
.kpi-done { background-image: url("/brand/dash/kpi-delivered.jpg?v=1"); color: #3f6212; }
.kpi-no { background-image: url("/brand/dash/kpi-rejected.jpg?v=1"); color: #9f1239; }
.kpi-back { background-image: url("/brand/dash/kpi-returned.jpg?v=1"); color: #92400e; }
.kpi-styles { background-image: url("/brand/dash/kpi-styles.jpg?v=1"); color: #9f1239; }
.kpi-stock { background-image: url("/brand/dash/kpi-instock.jpg?v=1"); color: #3f6212; }
.kpi-empty { background-image: url("/brand/dash/kpi-out.jpg?v=1"); color: #44403c; }
.kpi-units { background-image: url("/brand/dash/kpi-units.jpg?v=1"); color: #1e3a5f; }
.chart-range { display: flex; align-items: center; gap: 0.35rem; margin: 0.2rem 0 0.65rem; flex-wrap: wrap; }
.chart-range button {
    border: 1px solid #c5d7f2; background: #fff; color: #0b2460; border-radius: 999px;
    padding: 0.28rem 0.75rem; cursor: pointer;
}
.chart-range button.on { background: #0c2f7a; color: #fff; border-color: #0c2f7a; }
.chart-range span { color: #52606d; font-size: 0.78rem; margin-left: 0.25rem; }
.chart-card { background: #fff; border: 1px solid #d5e3f7; padding: 0.6rem 0.7rem 0.4rem; margin-bottom: 0.7rem; }
.chart-card h2 { font-size: 0.92rem; margin: 0 0 0.35rem; }
.vbars { display: flex; align-items: flex-end; gap: 0.55rem; min-height: 240px; overflow-x: auto; padding-top: 0.35rem; }
.vbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.7rem; min-width: 2.6rem; flex: 1; }
.vbar-col { display: block; width: 100%; max-width: 2.6rem; min-height: 2px; background: #1857d4; }
.vbar-col.alt { background: #c6a15b; }
.vbar-col.bad { background: #9a3b3b; }
.vbar-col.up { background: #166534; }
.vbar-col.down { background: #c2410c; }
.vbar-col.drop { background: #9f1239; }
.vbar-amt, .vbar-lbl { font-size: 0.68rem; color: #52606d; text-align: center; line-height: 1.25; }
.vbar-amt { min-height: 2rem; display: flex; align-items: flex-end; justify-content: center; }
.vbar-lbl { min-height: 1.7rem; }
.hbars { display: flex; flex-direction: column; gap: 0.35rem; }
.hbar { display: grid; grid-template-columns: 1.2rem 1fr 2rem; gap: 0.4rem; align-items: center; font-size: 0.78rem; }
.hbar-track { background: #e8eef6; height: 14px; }
.hbar-fill { display: block; height: 100%; background: currentColor; min-width: 2px; }
.rate-1 { color: #9f1239; }
.rate-2 { color: #c2410c; }
.rate-3 { color: #a16207; }
.rate-4 { color: #3f6212; }
.rate-5 { color: #166534; }
.charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.7rem; }
.line-chart, .scatter { width: 100%; height: auto; display: block; }
.price-chart { display: flex; flex-direction: column; gap: 0.38rem; }
.price-row { display: grid; grid-template-columns: minmax(7.5rem, 1.15fr) minmax(5.5rem, 1.3fr) 5.4rem 3.2rem; gap: 0.45rem; align-items: center; font-size: 0.78rem; }
.price-head { color: #52606d; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.price-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-track { background: #e8eef6; height: 12px; }
.price-fill { display: block; height: 100%; background: #1857d4; min-width: 2px; }
.price-row span:nth-child(3), .price-row span:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.line-labels { display: grid; font-size: 0.68rem; color: #52606d; text-align: center; }
.line-key, .donut-key { font-size: 0.75rem; color: #52606d; }
.line-key { display: flex; gap: 1rem; margin: 0 0 0.25rem; }
.line-key i { display: inline-block; width: 1.1rem; height: 3px; margin-right: 0.35rem; vertical-align: middle; }
.line-key .sales { background: #1857d4; }
.line-key .visits { background: #c6a15b; }
.funnel { display: flex; flex-direction: column; gap: 0.35rem; }
.funnel-step { display: grid; grid-template-columns: 8.4rem 1fr 2.2rem; gap: 0.4rem; align-items: center; font-size: 0.78rem; }
.funnel-track { background: #e8eef6; height: 16px; }
.funnel-fill { display: block; height: 100%; }
.donut-row { display: flex; gap: 1rem; align-items: center; }
.donut { width: 9rem; height: 9rem; border-radius: 50%; display: grid; place-items: center; flex: none; }
.donut span { width: 5.2rem; height: 5.2rem; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.15rem; }
.donut-key { list-style: none; margin: 0; padding: 0; }
.donut-key li { display: flex; gap: 0.4rem; align-items: center; margin: 0.22rem 0; }
.swatch { width: 0.7rem; height: 0.7rem; display: inline-block; }
.heat { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.heat th, .heat td { text-align: center; padding: 0.32rem 0.2rem; font-weight: 700; }
.heat th { color: #52606d; }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.gauge { display: flex; gap: 0.7rem; align-items: center; }
.gauge svg { width: 8.6rem; flex: none; }
.gauge strong { display: block; font-size: 1.35rem; line-height: 1.1; }
.trend.up { color: #166534; }
.trend.down { color: #9f1239; }
.trend.flat { color: #52606d; }
.size-table input { width: 5.5rem; }
.size-table .sku-box { width: 13rem; }
.size-remove {
    width: 1.65rem; height: 1.65rem; padding: 0; display: inline-grid; place-items: center; line-height: 1;
}
.size-remove i { font-size: 0.75rem; }
.size-short { display: none; }
.sku-field { position: relative; }
.sku-field .form-control { padding-right: 1.85rem; }
.sku-gen {
    position: absolute; right: 0.15rem; top: 50%; transform: translateY(-50%);
    width: 1.55rem; height: 1.55rem; padding: 0; border: 0; border-radius: 0.3rem;
    background: transparent; color: #1857d4; display: grid; place-items: center; cursor: pointer;
}
.sku-gen:hover { background: #e8f0ff; color: #0b2460; }
.help { font-size: 0.78rem; color: #52606d; margin: 0.2rem 0 0.55rem; }

@media (max-width: 1100px) {
    .sf-row { grid-template-columns: 1fr 1fr; }
    .style-fields .sf { grid-column: 1 / -1; }
    .style-fields .sf-price, .style-fields .sf-check { grid-column: span 1; }
    .sf-check .form-label { white-space: normal; }
    .size-table { display: table; width: 100%; min-width: 0; table-layout: fixed; }
    .size-table thead { display: table-header-group; }
    .size-table tbody { display: table-row-group; }
    .size-table tr { display: table-row; margin: 0; padding: 0; border: 0; background: transparent; }
    .size-table th, .size-table td {
        display: table-cell; width: auto; padding: 0.22rem 0.15rem;
        white-space: nowrap; text-align: left; vertical-align: middle;
    }
    .size-table th { white-space: nowrap; font-size: 0.62rem; line-height: 1.15; }
    .size-long { display: none; }
    .size-short { display: inline; }
    .size-table td::before { content: none; }
    .size-table th:nth-child(1), .size-table td:nth-child(1) { width: 16%; }
    .size-table th:nth-child(2), .size-table td:nth-child(2) { width: 28%; }
    .size-table th:nth-child(3), .size-table td:nth-child(3) { width: 15%; }
    .size-table th:nth-child(4), .size-table td:nth-child(4) { width: 12%; }
    .size-table th:nth-child(5), .size-table td:nth-child(5) { width: 21%; }
    .size-table th:nth-child(6), .size-table td:nth-child(6) { width: 8%; text-align: center; }
    .size-table input, .size-table .sku-box { width: 100%; min-width: 0; max-width: 100%; padding-left: 0.2rem; padding-right: 0.2rem; }
}
@media (max-width: 900px) {
    .kpis, .charts, .gauges { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .kpis, .charts, .gauges { grid-template-columns: 1fr; }
}
