
/* On desktop the whole Dashboard shrink-wraps around its widest natural
 * section. The DataTables panel is normally the widest item, so stats and
 * table stay aligned without another JavaScript width calculation. */
.dashboard-page-shell{
    width: fit-content;
    max-width: 98%;
    margin: 0 auto 45px;
    box-sizing: border-box;
    color: #dce3f0;
}

.dashboard-overview-page{
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 22px;
    box-sizing: border-box;
    color: #dce3f0;
}

.dashboard-status-card h2{
    margin: 0;
    font-weight: normal;
}
.dashboard-status-card__header p{
    margin: 5px 0 0;
    opacity: .72;
    font-size: 15px;
}

.dashboard-overview-grid{
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, .65fr);
    gap: 14px;
    align-items: stretch;
}

.dashboard-summary-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-summary-card,
.dashboard-status-card{
    border: 1px solid #363d59;
    border-radius: 5px;
    background-color: #1a1d2f;
    box-shadow: 0 10px 30px rgba(10, 12, 25, 0.22);
    box-sizing: border-box;
}
.dashboard-summary-card{
    min-height: 114px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.dashboard-summary-card > span{
    display: block;
    margin-bottom: 7px;
    opacity: .72;
    font-size: 14px;
}
.dashboard-summary-card strong{
    display: block;
    font-size: 26px;
    line-height: 1.05;
    font-weight: normal;
}
.dashboard-summary-card small{
    display: block;
    margin-top: 8px;
    opacity: .58;
    font-size: 13px;
    line-height: 1.3;
}
.dashboard-summary-card--financial strong{
    overflow-wrap: anywhere;
}

.dashboard-summary-split{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    margin-top: 1px;
}
.dashboard-summary-split > div{
    min-width: 0;
}
.dashboard-summary-split > div + div{
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid #353c58;
}
.dashboard-summary-split small{
    margin-top: 5px;
}

.dashboard-status-card{
    min-width: 0;
    padding: 16px 18px 13px;
    display: flex;
    flex-direction: column;
}
.dashboard-status-card__header{
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #353c58;
}
.dashboard-status-card h2{
    font-size: 21px;
}
.dashboard-status-chart-wrap{
    position: relative;
    flex: 1 1 auto;
    min-height: 190px;
    height: 190px;
}
#dashboard-status-chart{
    width: 100% !important;
    height: 100% !important;
}
.dashboard-status-empty{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .65;
    font-size: 15px;
}
.dashboard-status-empty[hidden]{
    display: none !important;
}

/* The table panel keeps its natural content width. The existing DataTables
 * layout code may still set the inner wrapper width; CSS simply lets this panel
 * and the common page shell follow that width. */
.dashboard-page-shell > .dashboard-table-shell{
    width: fit-content !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 0 auto !important;
    border: 1px solid #363d59;
    border-radius: 5px;
    background-color: #1a1d2f;
    box-shadow: 0 10px 30px rgba(10, 12, 25, 0.22);
    box-sizing: border-box;
    padding: 18px 14px 14px;
}
.dashboard-table-shell > .tableTextTitle{
    margin-top: 0;
}

@media (max-width: 1180px){
    .dashboard-overview-grid{
        grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr);
    }
    .dashboard-summary-card{
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 980px){
    .dashboard-page-shell{
        width: 98%;
        max-width: 98%;
    }
    .dashboard-overview-grid{
        grid-template-columns: 1fr;
    }
    .dashboard-page-shell > .dashboard-table-shell{
        width: 100% !important;
        max-width: 100% !important;
    }
    .dashboard-status-chart-wrap{
        min-height: 230px;
        height: 230px;
    }
}

@media (max-width: 700px){
    .dashboard-summary-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px){
    .dashboard-overview-page{
        padding-bottom: 18px;
    }
    .dashboard-summary-grid{
        gap: 9px;
    }
    .dashboard-summary-card{
        min-height: 102px;
        padding: 13px 14px;
    }
    .dashboard-summary-card strong{
        font-size: 24px;
    }
    .dashboard-summary-card small{
        margin-top: 6px;
    }
    .dashboard-summary-split > div + div{
        margin-left: 12px;
        padding-left: 12px;
    }
    .dashboard-status-card{
        padding: 14px;
    }
    .dashboard-page-shell > .dashboard-table-shell{
        padding-top: 14px;
        padding-bottom: 12px;
    }
}

@media (max-width: 390px){
    .dashboard-summary-grid{
        grid-template-columns: 1fr;
    }
    .dashboard-summary-card{
        min-height: 92px;
    }
}
