.da-imbalance-spreads-page {
    padding: 24px;
}

.da-spreads-shell {
    max-width: 1600px;
    margin: 0 auto;
}

.da-spreads-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.da-spreads-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
    color: #f5f7fb;
}

.da-spreads-header p {
    margin: 0;
    color: #aeb8c8;
}

.da-grid-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.da-view-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.da-view-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.da-custom-date-controls {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: -4px 0 14px;
}

.da-custom-date-controls[hidden] {
    display: none;
}

.da-custom-date-controls label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #aeb8c8;
    font-size: 12px;
    font-weight: 600;
}

.da-custom-date-controls input {
    border: 1px solid #34445f;
    border-radius: 6px;
    background: #101725;
    color: #e8edf5;
    padding: 8px 10px;
    font: inherit;
}

.da-grid-button,
.da-view-button,
.da-horizon-button,
.da-apply-button {
    min-width: 58px;
    border: 1px solid #34445f;
    border-radius: 6px;
    background: #182236;
    color: #d7deea;
    font-weight: 600;
    padding: 9px 13px;
    cursor: pointer;
}

.da-grid-button:hover,
.da-grid-button.active,
.da-view-button:hover,
.da-view-button.active,
.da-horizon-button:hover,
.da-horizon-button.active,
.da-apply-button:hover {
    border-color: #65a7ff;
    background: #22446f;
    color: #ffffff;
}

.da-spreads-status {
    min-height: 20px;
    margin-bottom: 10px;
    color: #aeb8c8;
    font-size: 14px;
}

.da-spreads-status.error {
    color: #ff9c9c;
}

.da-spreads-table-wrap {
    max-height: calc(100vh - 230px);
    overflow: auto;
    border: 1px solid #2c3950;
    border-radius: 8px;
    background: #101725;
}

.da-spreads-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: separate;
    border-spacing: 0;
    color: #e8edf5;
    font-size: 13px;
}

.da-spreads-table th,
.da-spreads-table td {
    padding: 8px 10px;
    border-right: 1px solid #27344a;
    border-bottom: 1px solid #27344a;
    text-align: right;
    white-space: nowrap;
}

.da-spreads-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #1b2639;
    color: #ffffff;
    font-weight: 700;
}

.da-spreads-table th:first-child,
.da-spreads-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    background: #141d2d;
}

.da-spreads-table th:first-child {
    z-index: 3;
    background: #1b2639;
}

.da-spreads-table tr:hover td {
    background: #1b2a42;
}

.da-spreads-table tr:hover td:first-child {
    background: #1b2a42;
}

.da-spreads-table .quarter-cell {
    font-weight: 700;
    color: #f5f7fb;
}

.da-spreads-table .positive {
    color: #ff8e8e;
}

.da-spreads-table .negative {
    color: #70d49a;
}

.da-spreads-table .neutral {
    color: #d7deea;
}

.dk-new-view-toolbar {
    align-items: stretch;
    margin-bottom: 14px;
}

.dk-variable-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dk-variable-selector label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    border: 1px solid #34445f;
    border-radius: 6px;
    background: #182236;
    color: #d7deea;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 10px;
    white-space: nowrap;
}

.dk-variable-selector input {
    accent-color: #65a7ff;
}

.dk-new-view-table-wrap {
    max-height: calc(100vh - 255px);
}

.dk-new-view-table {
    min-width: 1500px;
}

.dk-new-view-table th,
.dk-new-view-table td {
    padding: 7px 9px;
}

.dk-new-view-table .ptu-column,
.dk-new-view-table .quarter-cell {
    min-width: 54px;
    width: 54px;
}

@media (max-width: 900px) {
    .da-imbalance-spreads-page {
        padding: 16px;
    }

    .da-spreads-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .da-spreads-table-wrap {
        max-height: calc(100vh - 280px);
    }

    .dk-variable-selector {
        justify-content: flex-start;
    }
}
