/* Global page dashboard styles. Scoped to .cd-* classes. */
:root {
    --cd-primary: #b00050;
    --cd-pink: #e99ab9;
    --cd-pale: #faedf2;
    --cd-text: #101b38;
    --cd-muted: #71839e;
    --cd-bg: #f3f4f7;
    --cd-border: #e5e7ed;
    --cd-track: #eff0f4;
    --cd-line: #00CC00;
    --cd-line-bg: #8bcd8b;
}

* {
    box-sizing: border-box
}

.cd-page {
    width: 100%;
    min-height: 100%;
    padding: 16px;
    background: var(--cd-bg);
    color: var(--cd-text);
    font-family: inherit
}

.cd-dashboard {
    width: 100%;
    max-width: 1800px;
    margin: auto
}

.cd-dashboard button,
.cd-dashboard select {
    font: inherit
}

.cd-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px
}

.cd-eyebrow {
    display: block;
    color: var(--cd-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: 5px
}

.cd-heading h1 {
    margin: 0;
    font-size: 23px;
    font-weight: 800
}

#cd-period-caption {
    margin: 5px 0 0;
    color: var(--cd-muted);
    font-size: 13px
}

.cd-period-control {
    display: grid;
    gap: 5px;
    color: var(--cd-muted);
    font-size: 11px;
    font-weight: 700
}

.cd-period-control select {
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid var(--cd-border);
    border-radius: 8px;
    background: white;
    color: var(--cd-text)
}

.cd-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 13px
}

.cd-tab-calendar,
.cd-tab {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 13px 14px;
    text-align: left;
    border: 1px solid var(--cd-border);
    border-radius: 8px;
    background: white;
    color: var(--cd-text);
    cursor: pointer
}

.cd-tab-calendar,
.cd-tab {
    border-width: 0px;
    border-radius: 5px;
    color: #a13d63;
    background: #e9c4d2;
    border-top: solid 1px #e9c4d2;
    border-left: solid 1px #e9c4d2;
    border-bottom: solid 1px #e9c4d2;
    border-right: solid 1px #e9c4d2;
    cursor: pointer;
    font-family: Roboto;
}

.cd-tab-calendar>b,
.cd-tab>b {
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--cd-pale);
    color: var(--cd-primary);
    font-size: 22px
}

.cd-tab-calendar strong,
.cd-tab-calendar small,
.cd-tab strong,
.cd-tab small {
    display: block
}

.cd-tab-calendar strong,
.cd-tab strong {
    font-size: 14px
}

.cd-tab-calendar small,
.cd-tab small {
    margin-top: 3px;
    color: var(--cd-muted);
    font-size: 11px
}

/* .cd-tab.is-active {
    background: linear-gradient(115deg, #b00050, #7e174f);
    border-color: var(--cd-primary);
    color: white;
    box-shadow: 0 5px 13px #b0005028
} */
.cd-tab.is-active {

    border-width: 0px;
    border-radius: 5px;
    color: #740039;
    background: #efefef;
    box-shadow: inset 3px 3px 5px #bbbbbb,
        inset -5px -5px 8px #ffffff;
    border-top: solid 1px #e9c4d2;
    border-left: solid 1px #e9c4d2;
    border-bottom: solid 1px #e9c4d2;
    border-right: solid 1px #e9c4d2;
    font-weight: 900;
    cursor: pointer;
    font-family: Roboto;
}

.cd-tab.is-active>b {
    background: #dedede;
}

.cd-tab.is-active small {
    color: #740039d0;
    font-weight: normal;
}

.cd-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 13px
}

.cd-kpi {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 13px 11px;
    text-align: left;
    border: 1px solid #e4e6ec;
    border-radius: 8px;
    background: white;
    color: var(--cd-text);
    box-shadow: 0 3px 10px #1e28460c;
    cursor: pointer
}

.cd-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px #1e284618
}

.cd-kpi>i {
    flex: 0 0 41px;
    width: 41px;
    height: 41px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--cd-pale);
    color: var(--cd-primary);
    font-size: 21px;
    font-style: normal
}

.cd-kpi>span {
    display: block;
    min-width: 0
}

.cd-kpi small,
.cd-kpi em {
    display: block;
    color: var(--cd-muted);
    font-size: 10px;
    font-style: normal
}

.cd-kpi small {
    font-weight: 700
}

.cd-kpi strong {
    display: block;
    margin: 3px 0;
    color: var(--cd-primary);
    font-size: 25px;
    line-height: 1.1;
    font-weight: 850
}

.cd-kpi em {
    line-height: 1.3
}

.cd-main-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 13px
}

.cd-card {
    height: 100%;
    min-width: 0;
    padding: 15px;
    border: 1px solid #e3e5ec;
    border-radius: 8px;
    background: white;
    box-shadow: 0 3px 11px #1e28460d
}

.cd-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px
}

.cd-card-head>i {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--cd-pale);
    color: var(--cd-primary);
    font-size: 21px;
    font-style: normal
}

.cd-card-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800
}

.cd-card-head p {
    margin: 4px 0 0;
    color: var(--cd-muted);
    font-size: 11px;
    line-height: 1.35
}

.cd-donut-layout {
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px
}

.cd-donut {
    flex: 0 0 155px;
    width: 155px;
    height: 155px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--donut)
}

.cd-donut>div {
    width: 66%;
    height: 66%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white
}

.cd-donut b {
    font-size: 24px
}

.cd-donut small {
    margin-top: 2px;
    color: var(--cd-muted);
    font-size: 10px
}

.cd-donut-legend {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 3px
}

.cd-donut-row {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    padding: 5px 3px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    text-align: left;
    cursor: pointer
}

.cd-donut-row:hover {
    background: var(--cd-pale)
}

.cd-donut-row>i,
.cd-legend>span>i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--dot)
}

.cd-donut-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cd-muted);
    font-size: 10px
}

.cd-donut-row b {
    font-size: 11px
}

.cd-donut-row small {
    color: var(--cd-muted);
    font-size: 10px
}

#cd-trend svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible
}

.cd-grid {
    stroke: #e9eaf0;
    stroke-width: 1
}

.cd-axis {
    fill: var(--cd-muted);
    font-size: 10px
}

.cd-area {
    fill: #00b0171a
}

.cd-line {
    fill: none;
    stroke: var(--cd-line-bg);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round
}

.cd-trend-point {
    cursor: pointer
}

.cd-trend-point circle {
    fill: white;
    stroke: var(--cd-line);
    stroke-width: 3
}

.cd-point-label {
    fill: var(--cd-text);
    font-size: 11px;
    font-weight: 800
}

.cd-breakdowns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px
}

.cd-breakdowns>div {
    min-width: 0
}

.cd-row-list {
    display: grid;
    gap: 14px
}

.cd-row {
    display: grid;
    grid-template-columns: minmax(82px, 1fr) minmax(85px, 1.8fr) 30px;
    gap: 8px;
    align-items: center;
    padding: 3px;
    border-radius: 7px;
    cursor: pointer
}

.cd-row:hover {
    background: #fcf4f7
}

.cd-row>span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text);
    font-weight: normal;
}

.cd-row>b {
    text-align: right;
    font-size: 11px
}

.cd-bar {
    display: flex;
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--cd-track)
}

.cd-segment {
    flex: 0 0 var(--w);
    min-width: 0;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--seg);
    color: white;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer
}

.cd-segment:hover {
    filter: brightness(.92)
}

.cd-segment:first-child {
    border-radius: 8px 0 0 8px
}

.cd-segment:last-child {
    border-radius: 0 8px 8px 0
}

.cd-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 13px;
    padding: 14px;
    border: 1px solid var(--cd-border);
    border-radius: 8px;
    background: white;
    margin-bottom: 13px;
}

.cd-legend>span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--cd-muted);
    font-size: 11px
}

.cd-empty,
.cd-no-data {
    padding: 22px;
    text-align: center;
    color: var(--cd-muted)
}

.cd-dashboard [hidden] {
    display: none !important
}

.cd-dashboard :focus-visible {
    outline: 2px solid var(--cd-primary);
    outline-offset: 3px
}

@media(max-width:1100px) {
    .cd-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .cd-main-grid,
    .cd-breakdowns {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:650px) {
    .cd-page {
        padding: 10px
    }

    .cd-header {
        align-items: stretch;
        flex-direction: column;
        gap: 10px
    }

    .cd-heading h1 {
        font-size: 20px
    }

    .cd-period-control select {
        width: 100%;
        min-width: 0
    }

    .cd-tabs {
        gap: 5px
    }

    .cd-tab {
        justify-content: center;
        padding: 10px 4px;
        text-align: center
    }

    .cd-tab>b {
        display: none
    }

    .cd-tab strong {
        font-size: 11px
    }

    .cd-tab small {
        display: none
    }

    .cd-tab-calendar {
        justify-content: center;
        padding: 10px 4px;
        text-align: center
    }

    .cd-tab-calendar>b {
        display: none
    }

    .cd-tab-calendar strong {
        font-size: 11px
    }

    .cd-tab-calendar small {
        display: none
    }

    .cd-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px
    }

    .cd-kpi {
        gap: 7px;
        padding: 10px 7px
    }

    .cd-kpi>i {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 17px
    }

    .cd-kpi small {
        font-size: 9px
    }

    .cd-kpi strong {
        font-size: 21px
    }

    .cd-kpi em {
        font-size: 9px
    }

    .cd-main-grid,
    .cd-breakdowns {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px
    }

    .cd-card {
        padding: 10px;
        border-radius: 8px
    }

    .cd-card-head h2 {
        font-size: 14px
    }

    .cd-donut-layout {
        min-height: 175px;
        gap: 12px
    }

    .cd-donut {
        flex-basis: 125px;
        width: 125px;
        height: 125px
    }

    .cd-donut b {
        font-size: 20px
    }

    .cd-donut-row {
        grid-template-columns: 8px minmax(0, 1fr) auto
    }

    .cd-donut-row small {
        display: none
    }

    .cd-row-list {
        gap: 12px
    }

    .cd-row {
        grid-template-columns: minmax(80px, 1fr) minmax(75px, 1.5fr) 26px;
        gap: 6px
    }

    .cd-row>span,
    .cd-row>b {
        font-size: 10px
    }

    .cd-bar {
        height: 10px
    }

    .cd-segment {
        font-size: 8px
    }

    .cd-legend {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .cd-legend>span {
        font-size: 10px
    }
}

@media(max-width:360px) {
    .cd-tab strong {
        font-size: 10px
    }

    .cd-kpi {
        gap: 5px;
        padding: 9px 5px
    }

    .cd-kpi>i {
        flex-basis: 27px;
        width: 27px;
        height: 27px
    }

    .cd-kpi strong {
        font-size: 19px
    }

    .cd-donut-layout {
        flex-direction: column
    }

    .cd-donut-legend {
        width: 100%
    }

    .cd-row {
        grid-template-columns: minmax(70px, 1fr) minmax(60px, 1.3fr) 23px
    }
}

/*Drilldown*/
.cd-drilldown-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none;
    background: white;
    overflow: auto;
}

.cd-drilldown-dialog::backdrop {
    background: transparent;
}

.cd-financial-card {
    min-width: 0;
}

.cd-financial-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 4px 0 12px;
    padding: 9px 10px;
    background: #f8f8fa;
    border-radius: 6px;
}

.cd-financial-summary>div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cd-financial-summary>div span {
    color: #858698;
    font-size: 10px;
}

.cd-financial-summary>div strong {
    color: #252638;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.cd-financial-currency {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
}

.cd-financial-currency label {
    color: #858698;
    font-size: 10px;
}

.cd-financial-currency select {
    max-width: 100px;
    padding: 4px 7px;
    border: 1px solid #e5e5eb;
    border-radius: 5px;
    background: #fff;
    color: #252638;
    font-size: 11px;
    outline: none;
}

.cd-financial-statuses {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.cd-financial-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    min-width: 0;
}

.cd-financial-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.cd-financial-status {
    color: #26334b;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-financial-values {
    color: #26334b;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

.cd-financial-track {
    position: relative;
    width: 100%;
    height: 9px;
    border-radius: 10px;
    background: #e9e9ec;
    overflow: hidden;
}

.cd-financial-range-min,
.cd-financial-range-extra {
    position: absolute;
    top: 0;
    height: 100%;
}

.cd-financial-range-extra {
    opacity: 0.4;
}

.cd-financial-row:hover .cd-financial-track {
    outline: 1px solid #b00050;
    outline-offset: 2px;
}

.cd-financial-row:focus-visible {
    outline: 2px solid #b00050;
    outline-offset: 3px;
    border-radius: 3px;
}

.cd-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 25, 40, 0.45);
}

.cd-financial-modal {
    display: flex;
    flex-direction: column;
    width: min(600px, 100%);
    max-height: 85vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.cd-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid #eeeef2;
}

.cd-modal-head h3 {
    margin: 0;
    color: #252638;
    font-size: 16px;
}

.cd-modal-head p {
    margin: 5px 0 0;
    color: #858698;
    font-size: 11px;
}

.cd-modal-close {
    border: 0;
    background: transparent;
    color: #777;
    font-size: 25px;
    cursor: pointer;
}

.cd-financial-modal-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 18px;
    padding: 12px;
    background: #f8f8fa;
    border-radius: 7px;
}

.cd-financial-modal-summary>div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.cd-financial-modal-summary span {
    color: #858698;
    font-size: 11px;
}

.cd-financial-modal-summary strong {
    color: #252638;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.cd-financial-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px 0px;
    color: #858698;
    font-size: 11px;
}
.cd-financial-modal-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 18px 12px;
    color: #858698;
    font-size: 11px;
}

.cd-financial-modal-toolbar select {
    padding: 5px 8px;
    border: 1px solid #e5e5eb;
    border-radius: 5px;
    background: white;
}

.cd-financial-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 18px 20px;
    overflow-y: auto;
}

.cd-financial-modal-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
}

.cd-financial-modal-row:hover .cd-financial-track {
    outline: 1px solid #b00050;
    outline-offset: 2px;
}