input[type="file"],
select,
button {
    min-height: 38px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    padding: 7px 10px;
    color: var(--text);
}

input[type="file"] {
    width: 100%;
    padding: 6px;
    background: var(--panel-soft);
}

select {
    min-width: 132px;
    font-weight: 650;
}

button {
    cursor: pointer;
    padding-inline: 14px;
    font-size: 12px;
    font-weight: 800;
    background: var(--brand);
    color: white;
    border-color: var(--brand);
    box-shadow: 0 2px 5px rgba(21,58,102,.15);
    transition: transform .12s ease, background .12s ease;
}

button:hover {
    background: var(--brand-2);
    transform: translateY(-1px);
}

button.secondary {
    background: white;
    color: var(--brand);
    border-color: #b8c7d8;
    box-shadow: none;
}

.status-pill {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--brand-soft);
    border: 1px solid #cadcf2;
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    margin-left: auto;
}

.help-text {
    margin: -2px 2px 12px;
    color: var(--muted);
    font-size: 10px;
}

.empty-state {
    padding: 70px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-state__icon {
    display: block;
    margin: 0 auto 12px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--brand-soft);
    color: var(--brand);
    line-height: 44px;
    font-size: 22px;
}

.sales-grid {
    width: 100%;
    min-width: 1550px;
    font-size: 12px;
}

.sales-grid th,
.sales-grid td {
    border-right: 1px solid #e6eaf0;
    border-bottom: 1px solid #e6eaf0;
    padding: 7px 8px;
    text-align: center;
    white-space: nowrap;
    background: white;
}

.sales-grid thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #dbe8f6;
    color: #1d3552;
    font-size: 11px;
    font-weight: 850;
    box-shadow: inset 0 -1px 0 #c5d3e3;
}

.sales-grid th:first-child,
.sales-grid td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 330px;
    max-width: 330px;
    text-align: left;
    box-shadow: 2px 0 5px rgba(25,42,70,.04);
}

.sales-grid thead th:first-child {
    z-index: 7;
}

.product-row td {
    font-weight: 750;
    background: #fcfdff;
    border-top: 2px solid #d7e0eb;
}

.product-row td:first-child {
    background: linear-gradient(90deg, #fff59a, #fffbd0);
}

.metric-label {
    text-align: right !important;
    color: #42536a;
    font-weight: 750;
    background: #fafbfd !important;
}

.total-cell {
    background: #dceafa !important;
    color: #183653;
    font-weight: 850 !important;
}

.spacer-row td {
    height: 8px;
    padding: 0;
    background: #f3f6fa !important;
    border: 0;
}

.positive {
    color: var(--positive);
    font-weight: 800;
}

.negative {
    color: var(--negative);
    font-weight: 800;
}

.alias-input,
.stock-input {
    border: 1px solid #c5cfdb;
    border-radius: 6px;
    padding: 5px 7px;
    background: rgba(255,255,255,.72);
}

.alias-input {
    width: 100%;
    font-size: 12px;
    font-weight: 850;
}

.stock-input {
    width: 74px;
    text-align: center;
    font-weight: 800;
}

.highlight-cell {
    background: var(--warning-bg) !important;
}

.product-description {
    display: block;
    margin-top: 4px;
    color: #748095;
    font-size: 9px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.velocity-good {
    background: var(--positive-bg) !important;
}

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}
::-webkit-scrollbar-track {
    background: #f0f3f7;
}
::-webkit-scrollbar-thumb {
    background: #bcc7d4;
    border: 3px solid #f0f3f7;
    border-radius: 999px;
}


.yearly-grid {
    min-width: 900px;
}

.yearly-grid th:not(:first-child),
.yearly-grid td:not(:first-child) {
    min-width: 120px;
}


.product-filter {
    position: relative;
    display: inline-block;
    margin: 0 0 12px;
}

.product-filter__button {
    min-width: 235px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.product-filter__count {
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 10px;
}

.product-filter__menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 5px);
    left: 0;
    width: min(520px, calc(100vw - 40px));
    background: white;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    box-shadow: 0 16px 40px rgba(25,42,70,.18);
    overflow: hidden;
}

.product-filter__top {
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.product-filter__top input {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
}

.product-filter__actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    background: var(--panel-soft);
    border-bottom: 1px solid var(--border);
}

.mini-button {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 10px;
}

.product-filter__options {
    max-height: 330px;
    overflow: auto;
}

.product-filter__option {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 8px;
    align-items: start;
    padding: 8px 10px;
    border-bottom: 1px solid #eef1f5;
    cursor: pointer;
}

.product-filter__option:hover {
    background: #f6f9fc;
}

.product-filter__option input {
    margin-top: 3px;
}

.product-filter__option strong {
    display: block;
    font-size: 11px;
    line-height: 1.3;
}

.product-filter__option small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.product-filter__footer {
    padding: 9px 10px;
    border-top: 1px solid var(--border);
    background: var(--panel-soft);
}

.product-filter__footer button {
    width: 100%;
}


.financial-grid .metric-label {
    min-width: 190px;
}

.financial-product-banner {
    text-align: left !important;
    color: var(--brand);
    background: #f2f7fc !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
}

.financial-prev-row td {
    background: #fafbfd;
    font-size: 10px;
}

.financial-first-row td {
    border-top: 1px solid var(--border-strong);
}

.positive-money {
    color: #1d4f73;
    font-weight: 750;
}


/* SALES006 visual system */
.brandbar {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.brandbar__mark {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 34px;
}

.brandbar__mark span {
    display: block;
    width: 8px;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(#35a98d, #59b89f);
}

.brandbar__mark span:nth-child(1) { height: 20px; }
.brandbar__mark span:nth-child(2) { height: 28px; }
.brandbar__mark span:nth-child(3) { height: 34px; }

.brandbar__name {
    font-size: 19px;
    font-weight: 850;
    color: #17304f;
}

.brandbar__sub {
    margin-top: 1px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.brandbar__version {
    margin-left: auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 9px;
    font-weight: 850;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin: 0 0 13px;
}

.page-heading h1 {
    margin: 0;
    color: #111d30;
    font-size: 25px;
    letter-spacing: -.03em;
}

.page-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.toolbar--analysis {
    padding: 11px 13px;
    background: rgba(255,255,255,.92);
}

.summary-strip--financial .summary-card:nth-child(1) {
    background: linear-gradient(135deg, #f4f9ff, #eaf4ff);
    border-color: #c8def4;
}

.summary-strip--financial .summary-card:nth-child(3) {
    background: linear-gradient(135deg, #f2fbf5, #e8f8ed);
    border-color: #c8e8d2;
}

.summary-strip--financial .summary-card:nth-child(4) {
    background: linear-gradient(135deg, #fffaf0, #fff3dc);
    border-color: #f0dbb3;
}

.summary-strip--financial .summary-card:nth-child(5) {
    background: linear-gradient(135deg, #faf7ff, #f1eaff);
    border-color: #dfd0f4;
}

.analysis-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin: 0 0 12px;
    padding: 11px 13px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.analysis-controls__item {
    position: relative;
}

.analysis-controls__label {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.analysis-controls .product-filter {
    margin: 0;
}

.line-selector {
    position: relative;
    display: inline-block;
}

.line-selector__button {
    min-width: 210px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.control-icon {
    font-size: 14px;
}

.line-selector__count {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 9px;
    text-align: center;
}

.line-selector__menu {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    left: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    padding: 13px;
    background: white;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(25,42,70,.20);
}

.line-selector__title {
    color: #17243a;
    font-size: 13px;
    font-weight: 850;
}

.line-selector__subtitle {
    margin: 3px 0 10px;
    color: var(--muted);
    font-size: 9px;
}

.line-selector__options {
    max-height: 390px;
    overflow: auto;
    padding-right: 3px;
}

.line-selector__option {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 7px;
    align-items: center;
    min-height: 30px;
    padding: 4px 2px;
    color: #263b58;
    font-size: 11px;
    cursor: pointer;
}

.line-selector__option input {
    width: 15px;
    height: 15px;
    accent-color: #1267c8;
}

.line-selector__option small {
    color: var(--muted);
    font-size: 8px;
}

.line-selector__option--total {
    margin-top: 6px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
    font-weight: 850;
}

.line-selector__actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
    padding-top: 11px;
    margin-top: 7px;
    border-top: 1px solid var(--border);
}

.line-selector__apply {
    background: #0e5da8;
}

.financial-grid .metric-label {
    text-align: left !important;
    padding-left: 18px;
    color: #344963;
}

.financial-product-row td:first-child {
    background: linear-gradient(90deg, #fff6a5, #fffbd1);
}

.financial-product-banner {
    background: #edf5fe !important;
    color: #184a7c;
}

.financial-net-row td {
    background: #e4f1fd !important;
    color: #173c62;
    font-weight: 850 !important;
    border-top: 1px solid #c5dced;
}

.financial-prev-row.financial-net-row td {
    background: #edf5fb !important;
}

.financial-grid td.negative {
    color: #c52020;
}

.financial-grid td.positive-money {
    color: #164d75;
}

@media (max-width: 1100px) {
    .summary-strip {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }
}


/* SALES007: equal-width current / previous year KPI blocks */
.summary-strip--comparison {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch;
}

.summary-strip--comparison .summary-card {
    width: 100%;
    min-width: 0;
}

.summary-strip--comparison .summary-card__value {
    white-space: nowrap;
}

.summary-strip--comparison .summary-card:nth-child(6) {
    background: linear-gradient(135deg, #f4f9ff, #eaf4ff);
    border-color: #c8def4;
}

.summary-strip--comparison .summary-card:nth-child(7) {
    background: linear-gradient(135deg, #f2fbf5, #e8f8ed);
    border-color: #c8e8d2;
}

.summary-strip--comparison .summary-card:nth-child(8) {
    background: linear-gradient(135deg, #fffaf0, #fff3dc);
    border-color: #f0dbb3;
}

.summary-strip--comparison .summary-card:nth-child(9) {
    background: linear-gradient(135deg, #faf7ff, #f1eaff);
    border-color: #dfd0f4;
}

.summary-strip--comparison .summary-card:nth-child(10) {
    background: linear-gradient(135deg, #fff, #f8fafc);
}

@media (max-width: 1250px) {
    .summary-strip--comparison {
        grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
        overflow-x: auto;
    }
}


/* SALES008 approved comparison KPI layout */
.summary-strip--comparison {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.summary-strip--comparison .summary-card {
    min-height: 94px;
    padding: 15px 16px;
}

.summary-strip--comparison .summary-card__label {
    font-size: 10px;
    letter-spacing: .07em;
}

.summary-strip--comparison .summary-card__value {
    margin-top: 7px;
    font-size: 25px;
    line-height: 1;
}

.summary-strip--comparison .summary-card__sub {
    margin-top: 7px;
    font-size: 10px;
}

/* Current-year colour sequence */
.summary-strip--comparison .summary-card:nth-child(1),
.summary-strip--comparison .summary-card:nth-child(6) {
    background: linear-gradient(135deg, #f4f9ff, #eaf4ff);
    border-color: #bfdaf5;
}

.summary-strip--comparison .summary-card:nth-child(2),
.summary-strip--comparison .summary-card:nth-child(7) {
    background: linear-gradient(135deg, #f2fbf5, #e7f8ed);
    border-color: #c5e8d0;
}

.summary-strip--comparison .summary-card:nth-child(3),
.summary-strip--comparison .summary-card:nth-child(8) {
    background: linear-gradient(135deg, #fffaf0, #fff2d9);
    border-color: #efd6a5;
}

.summary-strip--comparison .summary-card:nth-child(4),
.summary-strip--comparison .summary-card:nth-child(9) {
    background: linear-gradient(135deg, #faf7ff, #f1e9ff);
    border-color: #dac8f5;
}

.summary-strip--comparison .summary-card:nth-child(5),
.summary-strip--comparison .summary-card:nth-child(10) {
    background: linear-gradient(135deg, #fff7f7, #fff0f0);
    border-color: #f0caca;
}

/* Selected Products card is neutral when previous-year is hidden */
.summary-strip--comparison .summary-card:nth-child(5):has(.summary-card__label:first-child) {
    background: linear-gradient(135deg, #f7fbff, #eef6ff);
    border-color: #c8def4;
}

@media (max-width: 1300px) {
    .summary-strip--comparison {
        grid-template-columns: repeat(5, minmax(180px, 1fr)) !important;
        overflow-x: auto;
        padding-bottom: 4px;
    }
}


/* SALES009 Financial Summary */
.financial-summary-wrap {
    background: white;
}

.financial-summary-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(#ffffff, #fbfdff);
}

.financial-summary-heading h2 {
    margin: 0;
    color: #17243a;
    font-size: 18px;
    letter-spacing: -.02em;
}

.financial-summary-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.financial-summary-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 10px;
    font-weight: 850;
}

.financial-summary-table {
    min-width: 760px;
}

.financial-summary-table th:first-child,
.financial-summary-table td:first-child {
    position: static;
    min-width: 110px;
    max-width: none;
    box-shadow: none;
}

.financial-summary-table th,
.financial-summary-table td {
    text-align: right;
    padding: 13px 16px;
    font-size: 13px;
}

.financial-summary-table th:first-child,
.financial-summary-table td:first-child {
    text-align: left;
}

.financial-summary-table tbody tr:hover td {
    background: #f8fbff;
}

.financial-summary-table .summary-year {
    color: #183b63;
    font-size: 15px;
    font-weight: 850;
}


/* SALES010 all-years financial summary */
.summary-strip--icons .summary-card {
    position: relative;
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    gap: 12px;
}

.summary-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-right: 1px solid rgba(70, 98, 130, .16);
}

.summary-card__content {
    min-width: 0;
}

.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
}

.kpi-icon--years {
    color: #4f7fd7;
    background: #edf4ff;
}

.kpi-icon--products {
    color: #149657;
    background: #eaf8f0;
}

.kpi-icon--sales {
    color: #437fcc;
    background: #eef5ff;
}

.kpi-icon--net {
    color: #16965a;
    background: #e9f8ef;
}

.kpi-icon--units {
    color: #d99012;
    background: #fff6df;
}

.financial-summary-total-row td {
    background: #e4f1fd !important;
    color: #173c62;
    font-weight: 900 !important;
    border-top: 2px solid #c4dced;
}

.financial-summary-table th:nth-child(n+2),
.financial-summary-table td:nth-child(n+2) {
    text-align: right;
}

.financial-summary-table td:last-child:empty::after {
    content: "";
}


/* SALES011 Historical / Current data workflow */
.dataset-panel {
    margin-bottom: 10px;
    padding: 13px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: var(--shadow-soft);
}

.dataset-panel__heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.dataset-panel__title {
    color: #14243a;
    font-size: 13px;
    font-weight: 850;
}

.dataset-panel__sub {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.dataset-panel__status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.ready-dot,
.empty-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.ready-dot {
    background: #1ca66a;
}

.empty-dot {
    background: #b8c2cf;
}

.dataset-panel__inputs {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(510px, 1.2fr);
    gap: 10px;
    align-items: stretch;
}

.dataset-source-card {
    padding: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.dataset-source-card__top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.dataset-source-card__label {
    color: #263b58;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.dataset-source-card__hint {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.dataset-source-card__badge {
    align-self: start;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.dataset-source-card input[type="file"] {
    min-height: 34px;
    background: white;
}

.dataset-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcfe;
}

.dataset-actions button {
    min-height: 34px;
    font-size: 10px;
}

.dataset-actions .merge-button {
    background: #148557;
    border-color: #148557;
}

.dataset-actions .merge-button:hover {
    background: #0f7049;
}

#downloadHistoricalButton {
    grid-column: span 2;
}

.toolbar--analysis {
    margin-top: 0;
}

.toolbar select:disabled {
    opacity: .55;
    cursor: not-allowed;
    background: #f2f4f7;
}

@media (max-width: 1350px) {
    .dataset-panel__inputs {
        grid-template-columns: 1fr 1fr;
    }

    .dataset-actions {
        grid-column: 1 / -1;
    }
}

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

    .dataset-actions {
        grid-column: auto;
    }
}


/* SALES012 collapsible data loader */
.dataset-panel__heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collapse-button {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 9px;
    white-space: nowrap;
}

.dataset-panel--collapsed {
    padding-top: 10px;
    padding-bottom: 10px;
}

.dataset-panel--collapsed .dataset-panel__heading {
    margin-bottom: 0;
}
\n\n/* SALES013 OpportunityOS-inspired SalesOS branding */\n.brandbar {\n    min-height: 82px;\n    padding: 12px 6px;\n    margin-bottom: 16px;\n}\n\n.brandbar__logo {\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    min-width: 230px;\n    height: 58px;\n    padding: 0 30px;\n    border: 1px solid #d7e1ef;\n    border-radius: 30px;\n    background: rgba(255,255,255,.96);\n    color: #2864e8;\n    font-size: 32px;\n    line-height: 1;\n    font-weight: 900;\n    letter-spacing: -1.8px;\n    box-shadow: 0 8px 24px rgba(32, 72, 130, .08);\n}\n\n.brandbar__version {\n    margin-left: auto;\n    padding: 6px 11px;\n    border: 1px solid #cfe0f5;\n    border-radius: 999px;\n    background: #f4f8ff;\n    color: #24518a;\n    font-size: 9px;\n    font-weight: 900;\n    letter-spacing: .05em;\n}\n\n@media (max-width: 700px) {\n    .brandbar__logo {\n        min-width: 180px;\n        height: 52px;\n        padding: 0 24px;\n        font-size: 28px;\n    }\n}\n

/* SALES014: OpportunityOS-style SalesOS branding */
.brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 92px;
    padding: 14px 4px 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #dbe4ef;
}

.salesos-logo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    min-height: 74px;
    padding: 0 34px;
    border: 1px solid #d4e0ef;
    border-radius: 38px;
    background: #ffffff;
    color: #2f67e8;
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.055em;
    box-shadow: 0 6px 22px rgba(30, 64, 120, 0.07);
}

.brandbar__version {
    margin-left: auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef5ff;
    border: 1px solid #d4e2f4;
    color: #173b67;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
}

/* SALES014: compact collapsed data-loader */
.dataset-panel--collapsed {
    padding: 9px 13px;
}

.dataset-panel--collapsed .dataset-panel__heading {
    min-height: 34px;
    margin-bottom: 0;
}

.dataset-panel--collapsed .dataset-panel__sub,
.dataset-panel--collapsed .dataset-panel__status {
    display: none;
}

.dataset-panel--collapsed .dataset-panel__heading-actions {
    margin-left: auto;
}

.dataset-panel__title {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dataset-panel__chevron {
    color: #446080;
    font-size: 12px;
    font-weight: 900;
}

.dataset-panel--collapsed .collapse-button {
    min-width: 76px;
}

/* Slightly cleaner page spacing to match OpportunityOS */
.page-heading {
    margin-top: 4px;
    margin-bottom: 16px;
}

.page-heading h1 {
    font-size: 28px;
    font-weight: 900;
    color: #13233b;
}

.toolbar,
.dataset-panel,
.analysis-controls,
.report-panel,
.summary-card {
    border-color: #d9e3ef;
}

@media (max-width: 700px) {
    .salesos-logo-pill {
        min-width: 210px;
        min-height: 62px;
        padding-inline: 24px;
        font-size: 31px;
    }

    .brandbar {
        min-height: 78px;
    }
}


/* SALES015: tighter OpportunityOS-style SalesOS logo */
.salesos-logo-pill {
    min-width: 0 !important;
    width: fit-content !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 28px !important;
    border-radius: 999px !important;
    font-size: 38px !important;
    line-height: 1 !important;
    letter-spacing: -0.055em !important;
}

.brandbar {
    min-height: 72px !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

@media (max-width: 700px) {
    .salesos-logo-pill {
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 12px 22px !important;
        font-size: 31px !important;
    }
}


/* SALES016: definitive Data Loader collapse fix */
.dataset-panel--collapsed .dataset-panel__inputs {
    display: none !important;
}

.dataset-panel--collapsed {
    min-height: 0 !important;
}

.dataset-panel--collapsed .dataset-panel__heading {
    min-height: 30px !important;
}


/* SALES017 direct Historical-file update workflow */
.file-choice-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.direct-file-button {
    min-height: 34px;
    white-space: nowrap;
    font-size: 9px;
}

.update-file-button {
    background: #0d6efd;
    border-color: #0d6efd;
}

.update-file-button:hover {
    background: #0b5ed7;
}

.dataset-actions {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
}

#downloadHistoricalButton {
    grid-column: auto;
}

@media (max-width: 920px) {
    .file-choice-row {
        grid-template-columns: 1fr;
    }
}


/* SALES018: compact same-cell year comparison */
.compare-heading {
    font-weight: 850;
    line-height: 1.1;
}

.compare-heading__sub {
    margin-top: 3px;
    color: #60728a;
    font-size: 8px;
    font-weight: 700;
}

.compare-cell {
    min-width: 110px;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.compare-cell__current {
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
}

.compare-cell__previous {
    margin-top: 2px;
    color: #65748a;
    font-size: 9px;
    line-height: 1.2;
}

.compare-cell__change {
    margin-top: 3px;
    font-size: 8px;
    font-weight: 850;
    line-height: 1.1;
}

.compare-cell__change:empty {
    display: none;
}

.financial-grid .compare-cell.total-cell {
    background: #dceafa !important;
}

/* Default Financial Line Item selection remains intentionally compact:
   Product Sales, Selling Fees, FBA Fees + Net Total. */


/* SALES021: robust Product Title search */
.product-filter__option.is-filtered-out {
    display: none !important;
}

.product-filter__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.product-filter__matches {
    min-width: 82px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}
