.dashboard-page {
    background: #f3f6f8;
    color: #263238;
    font-family: "Open Sans", Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.dashboard-page *,
.dashboard-page *::before,
.dashboard-page *::after {
    box-sizing: border-box;
}

[x-cloak] {
    display: none !important;
}

.dashboard-shell {
    margin-top: 70px;
    padding-top: 0;
}

.dashboard-toolbar {
    background: #fff;
    border-bottom: 1px solid #dfe7ef;
    box-shadow: 0 4px 14px rgba(31, 45, 61, 0.06);
    margin-bottom: 18px;
    padding: 18px 0;
    position: sticky;
    top: 70px;
    transition: box-shadow 0.2s ease, padding 0.2s ease;
    z-index: 900;
}

.dashboard-toolbar.is-collapsed {
    box-shadow: 0 8px 18px rgba(31, 45, 61, 0.12);
    padding: 8px 0;
}

.dashboard-toolbar.is-collapsed .dashboard-toolbar-head {
    display: none;
}

.dashboard-toolbar.is-collapsed .dashboard-filter-panel {
    gap: 8px;
}

.dashboard-toolbar.is-collapsed .dashboard-field label {
    height: 0;
    margin: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.dashboard-toolbar.is-collapsed .dashboard-field select {
    min-height: 34px;
    padding-bottom: 6px;
    padding-top: 6px;
}

.dashboard-toolbar-head {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-toolbar-head > div {
    min-width: 0;
}

.dashboard-eyebrow {
    color: #6c7a84;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.dashboard-toolbar h2 {
    color: #263238;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

.dashboard-title-mobile {
    display: none;
}

.demo-header-back-mobile {
    display: none;
}

.dashboard-mobile-back {
    display: none;
}

.dashboard-back-inline {
    display: none;
}

.dashboard-action,
.dashboard-link-button {
    align-items: center;
    background: #0063B0;
    border: 1px solid #0063B0;
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
}

.dashboard-action:hover,
.dashboard-link-button:hover {
    background: #004f8f;
    border-color: #004f8f;
}

.dashboard-filter-panel {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.dashboard-field label {
    color: #667784;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.dashboard-field select {
    background-color: #fff;
    border: 1px solid #cbd8e3;
    border-radius: 6px;
    color: #263238;
    min-height: 38px;
    padding: 8px 10px;
    width: 100%;
}

.dashboard-field select:focus {
    border-color: #0063B0;
    box-shadow: 0 0 0 3px rgba(0, 99, 176, 0.12);
    outline: none;
}

.dashboard-notice {
    background: #eaf4fb;
    border: 1px solid #b8d8ee;
    border-radius: 6px;
    color: #23516f;
    font-weight: 600;
    margin-bottom: 14px;
    padding: 10px 14px;
}

.dashboard-empty {
    background: #fff7e8;
    border: 1px solid #f2cf93;
    border-radius: 6px;
    color: #6f4b13;
    font-weight: 700;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.dashboard-summary {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 16px 18px;
}

.dashboard-summary-text span,
.dashboard-panel-head span,
.dashboard-kpi small {
    color: #667784;
    display: block;
    font-size: 13px;
}

.dashboard-summary-text strong {
    color: #263238;
    display: block;
    font-size: 18px;
    line-height: 1.35;
    margin-top: 4px;
}

.dashboard-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dashboard-summary-meta span {
    background: #f7fafc;
    border: 1px solid #e2ebf2;
    border-radius: 999px;
    color: #394b59;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
}

.dashboard-kpi-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    margin-bottom: 14px;
}

.dashboard-kpi {
    background: #fff;
    border: 1px solid #e2ebf2;
    border-radius: 8px;
    padding: 16px;
}

.dashboard-kpi_accent {
    border-top: 3px solid #2f8f55;
}

.dashboard-kpi_warn {
    border-top: 3px solid #d9901f;
}

.dashboard-kpi-label {
    color: #394b59;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-kpi strong {
    color: #0063B0;
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
}

.dashboard-charts-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    margin-bottom: 14px;
}

.dashboard-panel {
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    padding: 18px;
}

.dashboard-panel-head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-panel-head h3 {
    color: #263238;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px;
}

.dashboard-panel-head > .glyphicon {
    color: #d9901f;
    font-size: 22px;
    margin-top: 2px;
}

.dashboard-link-button {
    background: #fff;
    color: #0063B0;
    flex: 0 0 auto;
}

.dashboard-link-button:hover {
    color: #fff;
}

.dashboard-mode-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.dashboard-mode-switcher_inline {
    margin-bottom: 0;
}

.dashboard-mode-button,
.dashboard-secondary-button {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd8e3;
    border-radius: 6px;
    color: #394b59;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    line-height: 1.2;
    min-height: 32px;
    padding: 7px 10px;
}

.dashboard-mode-button:hover,
.dashboard-secondary-button:hover {
    background: #eaf4fb;
    border-color: #8fbedb;
    color: #0063B0;
}

.dashboard-mode-button.is-active {
    background: #0063B0;
    border-color: #0063B0;
    color: #fff;
}

.dashboard-chart-card_wide {
    grid-column: span 1;
}

.dashboard-chart-box {
    height: 280px;
    position: relative;
    width: 100%;
}

.dashboard-chart-box_compact {
    height: 280px;
}

.dashboard-chart-box.is-empty canvas {
    opacity: 0.22;
}

.dashboard-chart-empty {
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    color: #667784;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    inset: 44px 20px 54px;
    justify-content: center;
    line-height: 1.35;
    padding: 16px;
    position: absolute;
    text-align: center;
}

.dashboard-resource-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-resource-list li {
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.dashboard-resource-list li:last-child {
    border-bottom: 0;
}

.dashboard-resource-list span {
    display: block;
    min-width: 0;
}

.dashboard-resource-list strong {
    color: #394b59;
    display: block;
    font-weight: 700;
}

.dashboard-resource-list small {
    color: #667784;
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 2px;
}

.dashboard-resource-list b {
    color: #667784;
    flex: 0 0 auto;
    padding-left: 12px;
    text-align: right;
    white-space: nowrap;
}

.dashboard-table-settings {
    background: #f7fafc;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr);
    margin-bottom: 14px;
    padding: 14px;
}

.dashboard-table-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dashboard-settings-block h4 {
    color: #394b59;
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 9px;
}

.dashboard-checkbox-grid {
    display: grid;
    gap: 8px 12px;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.dashboard-checkbox-grid label {
    align-items: center;
    color: #394b59;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    line-height: 1.25;
}

.dashboard-checkbox-grid input {
    margin: 0;
}

.dashboard-command-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dashboard-table-empty {
    background: #fff7e8;
    border: 1px solid #f2cf93;
    border-radius: 6px;
    color: #6f4b13;
    font-weight: 700;
    padding: 12px 14px;
}

.dashboard-table-wrap {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    width: 100%;
}

.dashboard-org-table {
    border-collapse: collapse;
    min-width: 1120px;
    width: 100%;
}

.dashboard-org-table th {
    background: #f7fafc;
    border-bottom: 1px solid #dfe7ef;
    color: #667784;
    font-size: 11px;
    font-weight: 800;
    padding: 10px 8px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-org-table td {
    border-bottom: 1px solid #edf2f7;
    color: #263238;
    font-size: 13px;
    padding: 11px 8px;
    vertical-align: top;
}

.dashboard-org-table td strong {
    display: block;
    line-height: 1.35;
}

.dashboard-org-table td small {
    color: #667784;
    display: block;
    line-height: 1.35;
    margin-top: 3px;
}

.dashboard-org-table_compact th {
    padding-bottom: 7px;
    padding-top: 7px;
}

.dashboard-org-table_compact td {
    font-size: 12px;
    padding-bottom: 7px;
    padding-top: 7px;
}

.dashboard-org-table_compact td small {
    display: none;
}

.dashboard-org-table_compact .dashboard-row-toggle {
    height: 24px;
    width: 24px;
}

.dashboard-org-toggle-col {
    width: 34px;
}

.dashboard-row-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd8e3;
    border-radius: 6px;
    color: #0063B0;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.dashboard-row-toggle:hover {
    background: #eaf4fb;
    border-color: #0063B0;
}

.dashboard-org-type,
.dashboard-data-status,
.dashboard-rate {
    border-radius: 999px;
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    white-space: nowrap;
}

.dashboard-data-status {
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
}

.dashboard-org-type {
    background: #eaf4fb;
    color: #0063B0;
}

.dashboard-data-status_ok {
    background: #e8f5ed;
    color: #2f8f55;
}

.dashboard-data-status_attention,
.dashboard-rate_warn {
    background: #fff3df;
    color: #a66300;
}

.dashboard-rate {
    background: #e8f5ed;
    color: #2f8f55;
}

.dashboard-org-group.is-expanded .dashboard-org-row td {
    background: #fbfdff;
}

.dashboard-org-detail-row td {
    background: #fbfdff;
    padding: 0 8px 14px;
}

.dashboard-org-detail {
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(230px, 1.2fr) minmax(190px, 0.9fr) minmax(240px, 1.2fr) minmax(220px, 1fr);
    padding: 14px;
}

.dashboard-org-detail h4 {
    color: #394b59;
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 9px;
}

.dashboard-org-detail p {
    color: #394b59;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.dashboard-resource-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-resource-chip {
    background: #fff;
    border: 1px solid #e2ebf2;
    border-radius: 6px;
    color: #394b59;
    display: inline-flex;
    flex-direction: column;
    font-size: 12px;
    gap: 3px;
    min-width: 96px;
    padding: 7px 9px;
}

.dashboard-detail-metrics,
.dashboard-related-list {
    display: grid;
    gap: 7px;
}

.dashboard-detail-metrics span,
.dashboard-related-list div {
    color: #394b59;
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-related-list span {
    color: #667784;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.dashboard-related-list strong {
    font-weight: 600;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .dashboard-filter-panel {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .dashboard-table-settings {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .dashboard-filter-panel,
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .dashboard-charts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-org-detail {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-table-settings {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .dashboard-page .demo-header {
        overflow: hidden;
        padding: 10px 0;
        width: 100vw;
    }

    .dashboard-page .demo-header .container {
        max-width: 100vw !important;
        width: 100vw !important;
    }

    .dashboard-page .demo-header-inner {
        gap: 8px;
        position: relative;
        width: 100%;
    }

    .dashboard-page .demo-header-logo {
        flex: 1 1 auto;
        max-width: calc(100% - 40px);
    }

    .dashboard-page .demo-header-logo img {
        height: 26px;
        margin-right: 8px;
    }

    .dashboard-page .demo-header-text {
        display: none;
    }

    .dashboard-page .demo-header-back {
        display: none;
    }

    .dashboard-page .dashboard-mobile-back {
        align-items: center;
        background: #fff;
        color: #0063B0;
        display: flex;
        font-size: 12px;
        font-weight: 700;
        gap: 5px;
        position: fixed;
        right: 15px;
        text-decoration: none;
        top: 19px;
        z-index: 1002;
    }

    .dashboard-shell {
        margin-top: 70px;
    }

    .dashboard-toolbar {
        padding: 14px 0;
        top: 46px;
    }

    .dashboard-page .container,
    .dashboard-toolbar,
    .dashboard-shell {
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }

    .dashboard-toolbar h2 {
        font-size: 20px;
        max-width: calc(100vw - 30px);
    }

    .dashboard-title-full {
        display: none;
    }

    .dashboard-title-mobile {
        display: inline;
    }

    .dashboard-back-inline {
        align-items: center;
        color: #0063B0;
        display: inline-flex;
        font-size: 13px;
        font-weight: 700;
        gap: 5px;
        margin-bottom: 10px;
        text-decoration: none;
    }

    .dashboard-toolbar-head,
    .dashboard-summary,
    .dashboard-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-filter-panel,
    .dashboard-kpi-grid,
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-toolbar.is-collapsed .dashboard-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-toolbar.is-collapsed .dashboard-field select {
        font-size: 12px;
        min-height: 32px;
        padding-left: 7px;
        padding-right: 7px;
    }

    .dashboard-chart-box,
    .dashboard-chart-box_compact {
        height: 240px;
    }

    .dashboard-chart-empty {
        inset: 38px 12px 48px;
        padding: 12px;
    }

    .dashboard-action,
    .dashboard-link-button {
        justify-content: center;
        width: 100%;
    }

    .dashboard-table-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .dashboard-mode-switcher,
    .dashboard-command-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-table-settings,
    .dashboard-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel {
        padding: 14px;
    }

    .dashboard-resource-list li {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .dashboard-summary-meta {
        justify-content: flex-start;
    }

    .dashboard-kpi strong {
        font-size: 24px;
    }

    .dashboard-org-detail {
        grid-template-columns: 1fr;
    }
}
