/* =========================================================
   DIGIFORT DASHBOARD - CLEAN VERSION
   Works with RadzenLayout + Blazor Server
========================================================= */

:root,
html[data-df-theme="dark"],
html.df-theme-dark {
    --df-bg: #06111f;
    --df-bg-2: #081827;
    --df-sidebar-bg: #07111d;
    --df-header-bg: rgba(7, 17, 29, 0.94);
    --df-card: rgba(13, 27, 45, 0.94);
    --df-card-strong: rgba(16, 34, 56, 0.98);
    --df-text: #f8fafc;
    --df-muted: #94a3b8;
    --df-muted-2: #64748b;
    --df-border: rgba(148, 163, 184, 0.16);
    --df-line: rgba(148, 163, 184, 0.12);
    --df-primary: #18d6e8;
    --df-warning: #FFA600;
    --df-danger: #FF7C43;
    --df-blue: #268cff;
    --df-blue-2: #1463db;
    --df-purple: #8b5cf6;
    --df-amber: #f59e0b;
    --df-orange: #e67b17;
    --df-red: #ef4444;
    --df-gold: #cdac83;
    --df-success: #22c55e;
    --df-unused: #475569;
    --df-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
    --df-radius: 18px;
    color-scheme: dark;
}

html[data-df-theme="light"],
html.df-theme-light {
    --df-bg: #f4f8fb;
    --df-bg-2: #eef5f8;
    --df-sidebar-bg: #ffffff;
    --df-header-bg: rgba(255, 255, 255, 0.94);
    --df-card: rgba(255, 255, 255, 0.98);
    --df-card-strong: #ffffff;
    --df-text: #20303a;
    --df-muted: #6b7c88;
    --df-muted-2: #94a3ad;
    --df-border: rgba(32, 48, 58, 0.10);
    --df-line: rgba(32, 48, 58, 0.10);
    --df-primary: #0891b2;
    --df-warning: #FFA600;
    --df-danger: #FF7C43;
    --df-blue: #1677d2;
    --df-blue-2: #0f5fb0;
    --df-purple: #7c3aed;
    --df-amber: #d97706;
    --df-orange: #e67b17;
    --df-red: #dc2626;
    --df-gold: #cdac83;
    --df-success: #16a34a;
    --df-unused: #cbd5e1;
    --df-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    --df-radius: 18px;
    color-scheme: light;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--df-bg) !important;
    color: var(--df-text) !important;
    font-family: Inter, "Segoe UI", sans-serif;
}

/*body {
    overflow: hidden;
}*/

/* =========================================================
   RADZEN LAYOUT
========================================================= */

.df-dashboard-layout.rz-layout {
    min-height: 100vh !important;
    display: grid !important;
    grid-template-columns: 270px minmax(0, 1fr) !important;
    grid-template-rows: 72px minmax(0, 1fr) 52px !important;
    background: radial-gradient(circle at 20% 0%, rgba(24, 214, 232, 0.10), transparent 34%), radial-gradient(circle at 90% 0%, rgba(38, 140, 255, 0.10), transparent 30%), var(--df-bg) !important;
    color: var(--df-text) !important;
}

.df-app-header.rz-header {
    grid-column: 1 / 3 !important;
    grid-row: 1 !important;
    height: 72px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: var(--df-header-bg) !important;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--df-border) !important;
    box-shadow: none !important;
}

.df-app-sidebar.rz-sidebar {
    grid-column: 1 !important;
    grid-row: 2 / 4 !important;
    position: sticky !important;
    top: 72px !important;
    left: 0 !important;
    width: 270px !important;
    height: calc(100vh - 72px) !important;
    background: var(--df-sidebar-bg) !important;
    border-right: 1px solid var(--df-border) !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: hidden !important;
}

.df-dashboard-layout.df-nav-collapsed.rz-layout,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) {
    grid-template-columns: 84px minmax(0, 1fr) !important;
}

.df-dashboard-layout.df-nav-collapsed .df-app-sidebar.rz-sidebar,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-app-sidebar.rz-sidebar {
    width: 84px !important;
}

.df-app-body.rz-body {
    grid-column: 2 !important;
    grid-row: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: auto !important;
}

.df-body-inner {
    width: 100%;
    min-height: calc(100vh - 124px);
    padding: 28px;
}

.df-app-footer.rz-footer {
    grid-column: 2 !important;
    grid-row: 3 !important;
    position: static !important;
    height: 52px !important;
    background: var(--df-bg) !important;
    border-top: 1px solid var(--df-border) !important;
    box-shadow: none !important;
}

/* =========================================================
   HEADER
========================================================= */

.df-header-inner {
    height: 100%;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.df-header-left,
.df-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.df-header-left > div:last-child {
    min-width: 0;
}

.df-nav-toggle-check {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.df-sidebar-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    color: var(--df-text);
    background: var(--df-card);
    border: 1px solid var(--df-border);
    transition: all 0.18s ease;
}

.df-sidebar-toggle:hover {
    color: var(--df-primary);
    background: rgba(24, 214, 232, 0.08);
}

.df-header-logo-mini {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(24, 214, 232, 0.10);
    color: var(--df-primary);
    border: 1px solid var(--df-border);
}

.df-header-title {
    font-size: 15px;
    font-weight: 850;
    color: var(--df-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.df-header-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: var(--df-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.df-header-date {
    min-width: 220px;
    flex: 0 1 220px;
}

.df-header-icon-btn,
.df-header-action-btn {
    height: 40px !important;
    border-radius: 12px !important;
    background: var(--df-card) !important;
    border: 1px solid var(--df-border) !important;
    color: var(--df-text) !important;
    box-shadow: none !important;
}

.df-notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--df-card);
    border: 1px solid var(--df-border);
    color: var(--df-text);
}

    .df-notification-btn span {
        position: absolute;
        top: -6px;
        right: -5px;
        min-width: 18px;
        height: 18px;
        display: grid;
        place-items: center;
        padding: 0 5px;
        border-radius: 999px;
        background: var(--df-red);
        color: white;
        font-size: 11px;
        font-weight: 800;
    }

/* =========================================================
   SIDEBAR / NAV
========================================================= */

.df-nav-wrapper {
    height: 100%;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.df-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 8px 12px;
}

.df-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--df-primary), var(--df-blue));
    box-shadow: 0 0 26px rgba(24, 214, 232, 0.25);
}

.df-brand-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: var(--df-text);
}

.df-brand-subtitle {
    margin-top: -2px;
    font-size: 12px;
    color: var(--df-muted);
}

.df-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.df-nav-link {
    height: 44px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 13px;
    color: var(--df-muted) !important;
    text-decoration: none !important;
    font-size: 14px;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

    .df-nav-link:hover {
        color: var(--df-text) !important;
        background: rgba(24, 214, 232, 0.08);
    }

    .df-nav-link.active {
        color: white !important;
        background: linear-gradient(135deg, rgba(24, 214, 232, 0.26), rgba(38, 140, 255, 0.24));
        border-color: rgba(24, 214, 232, 0.34);
        box-shadow: 0 0 22px rgba(24, 214, 232, 0.12);
    }

.df-nav-link .rz-icon {
    font-size: 20px;
}

.df-nav-item-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 5px;
}

.df-nav-panel-menu.rz-panel-menu {
    width: 100%;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.df-nav-panel-menu .rz-panel-menu-item {
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.df-nav-panel-menu .rz-panel-menu-item-link,
.df-nav-panel-menu .rz-navigation-item-link,
.df-nav-panel-menu a {
    min-height: 44px !important;
    padding: 0 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: 13px !important;
    color: var(--df-muted) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    transition: all 0.18s ease !important;
}

.df-nav-panel-menu .rz-panel-menu-item-link:hover,
.df-nav-panel-menu .rz-navigation-item-link:hover,
.df-nav-panel-menu a:hover {
    color: var(--df-text) !important;
    background: rgba(24, 214, 232, 0.08) !important;
}

.df-nav-panel-menu .rz-panel-menu-item-link.active,
.df-nav-panel-menu .rz-navigation-item-link.active,
.df-nav-panel-menu a.active {
    color: white !important;
    background: linear-gradient(135deg, rgba(24, 214, 232, 0.26), rgba(38, 140, 255, 0.24)) !important;
    border-color: rgba(24, 214, 232, 0.34) !important;
    box-shadow: 0 0 22px rgba(24, 214, 232, 0.12) !important;
}

.df-nav-panel-menu .rz-icon {
    font-size: 20px !important;
}

.df-nav-pure-link {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    color: var(--df-muted) !important;
    text-decoration: none !important;
    border: 1px solid transparent;
}

.df-nav-pure-link:hover {
    color: var(--df-text) !important;
    background: rgba(24, 214, 232, 0.08);
    border-color: rgba(24, 214, 232, 0.20);
}

.df-dashboard-layout.df-nav-collapsed .df-brand-text,
.df-dashboard-layout.df-nav-collapsed .df-nav-section-title,
.df-dashboard-layout.df-nav-collapsed .df-sidebar-user div:not(.df-avatar),
.df-dashboard-layout.df-nav-collapsed .df-nav-panel-menu .rz-panel-menu-item-text,
.df-dashboard-layout.df-nav-collapsed .df-nav-panel-menu .rz-navigation-item-text,
.df-dashboard-layout.df-nav-collapsed .df-nav-link span,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-brand-text,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-section-title,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-sidebar-user div:not(.df-avatar),
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-panel-menu .rz-panel-menu-item-text,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-panel-menu .rz-navigation-item-text,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-link span {
    display: none !important;
}

.df-dashboard-layout.df-nav-collapsed .df-nav-item-shell,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-item-shell {
    grid-template-columns: minmax(0, 1fr);
}

.df-dashboard-layout.df-nav-collapsed .df-nav-pure-link,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-pure-link {
    display: none;
}

.df-dashboard-layout.df-nav-collapsed .df-nav-panel-menu .rz-panel-menu-item-link,
.df-dashboard-layout.df-nav-collapsed .df-nav-panel-menu .rz-navigation-item-link,
.df-dashboard-layout.df-nav-collapsed .df-nav-panel-menu a,
.df-dashboard-layout.df-nav-collapsed .df-nav-link,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-panel-menu .rz-panel-menu-item-link,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-panel-menu .rz-navigation-item-link,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-panel-menu a,
.df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-nav-link {
    justify-content: center !important;
    padding: 0 !important;
}

.df-nav-section-title {
    margin: 18px 12px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--df-muted);
}

.df-logout-form {
    margin: 0;
}

.df-nav-button {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.df-sidebar-user {
    margin-top: auto;
    min-height: 62px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.07);
    border: 1px solid var(--df-border);
}

.df-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 850;
    background: linear-gradient(135deg, var(--df-primary), var(--df-blue));
}

.df-sidebar-user-name {
    color: var(--df-text);
    font-weight: 750;
}

.df-sidebar-user-role {
    font-size: 12px;
    color: var(--df-muted);
}

/* =========================================================
   PAGE
========================================================= */

.df-page {
    width: 100%;
    max-width: 1780px;
    margin: 0 auto;
}

.df-page-heading {
    margin-bottom: 22px;
}

.df-title {
    margin: 0;
    font-size: clamp(28px, 2vw, 38px);
    font-weight: 900;
    color: var(--df-text);
}

.df-breadcrumb {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--df-muted);
    font-size: 13px;
}

/* =========================================================
   GRID
========================================================= */

.df-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.df-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    gap: 18px;
    margin-bottom: 18px;
}

.df-grid-2-equal {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.df-grid-3 {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr 1fr;
    gap: 18px;
}

/* =========================================================
   CARD / PANEL
========================================================= */

.df-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%), var(--df-card) !important;
    border: 1px solid var(--df-border) !important;
    border-radius: var(--df-radius) !important;
    box-shadow: var(--df-shadow) !important;
    color: var(--df-text) !important;
    overflow: hidden;
}

.df-card-header {
    min-height: 56px;
    padding: 18px 20px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.df-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--df-text);
}

.df-card-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.df-card-body {
    padding: 14px 20px 20px;
}

.df-card-footer-link {
    padding: 14px 20px;
    border-top: 1px solid var(--df-line);
    color: var(--df-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

/* =========================================================
   KPI
========================================================= */

.df-kpi {
    padding: 18px;
    min-height: 148px;
}

.df-kpi-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.df-kpi-main {
    min-width: 0;
}

.df-icon-box {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(24, 214, 232, 0.10);
    color: var(--df-primary);
}

.df-icon-blue {
    background: rgba(38, 140, 255, 0.13);
    color: var(--df-blue);
}

.df-icon-purple {
    background: rgba(139, 92, 246, 0.13);
    color: var(--df-purple);
}

.df-icon-amber {
    background: rgba(245, 158, 11, 0.13);
    color: var(--df-amber);
}

.df-kpi-label {
    color: var(--df-muted);
    font-size: 13px;
}

.df-kpi-value {
    font-size: 30px;
    font-weight: 850;
    margin-top: 2px;
    color: var(--df-text);
}

.df-kpi-meta {
    margin-top: 8px;
    color: var(--df-muted);
    font-size: 13px;
}

.df-status-success {
    color: var(--df-success);
}

.df-status-muted {
    color: var(--df-muted);
}

.df-status-warning {
    color: var(--df-amber, #f59e0b);
}

.df-status-danger {
    color: var(--df-red, #ef4444);
}

.df-mini-ring {
    margin-left: auto;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 999px;
    background: radial-gradient(circle at center, var(--df-card) 0 56%, transparent 57%), conic-gradient(var(--df-blue) calc(var(--value) * 1%), rgba(148, 163, 184, 0.18) 0);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 850;
    color: var(--df-text);
}

.df-kpi-split {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    color: var(--df-muted);
    font-size: 12px;
}

/* =========================================================
   DONUT
========================================================= */

.df-donut-wrap {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 230px;
}

.df-donut {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: conic-gradient(var(--df-blue) 0 50%, var(--df-purple) 50% 100%);
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.25);
}

    .df-donut::after {
        content: "";
        width: 104px;
        height: 104px;
        border-radius: 50%;
        background: var(--df-bg-2);
        position: absolute;
    }

.df-donut-center {
    position: relative;
    z-index: 2;
    text-align: center;
}

.df-donut-number {
    font-size: 28px;
    font-weight: 850;
    color: var(--df-text);
}

.df-donut-label {
    font-size: 12px;
    color: var(--df-muted);
}

.df-legend {
    display: grid;
    gap: 14px;
    flex: 1;
}

.df-legend-row {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 12px;
    align-items: center;
    color: var(--df-text);
    font-size: 14px;
}

.df-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

    .df-dot.blue {
        background: var(--df-blue);
    }

    .df-dot.purple {
        background: var(--df-purple);
    }

    .df-dot.slate {
        background: var(--df-unused);
    }

/* =========================================================
   MODERN OBJECT USAGE BAR
========================================================= */

.df-object-chart {
    display: grid;
    gap: 26px;
    padding: 12px 4px 4px;
}

.df-object-row {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 18px;
    align-items: center;
}

.df-object-label {
    color: var(--df-text);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.df-object-bar {
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.10);
    display: flex;
    border: 1px solid var(--df-line);
}

.df-object-used {
    background: linear-gradient(90deg, var(--df-blue-2), var(--df-blue));
    min-width: 44px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 850;
    font-size: 13px;
}

.df-object-unused {
    background: linear-gradient(90deg, #334155, #52637a);
    min-width: 36px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 750;
    font-size: 13px;
}

.df-chart-axis {
    margin-left: 248px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    color: var(--df-muted);
    font-size: 12px;
    border-top: 1px solid var(--df-line);
    padding-top: 8px;
}

/* =========================================================
   TABLE
========================================================= */

.df-table-card {
    min-height: 260px;
}

.df-search {
    min-width: 240px;
}

.df-grid-table {
    width: 100%;
    border-collapse: collapse;
}

    .df-grid-table th,
    .df-grid-table td {
        padding: 14px 12px;
        border-bottom: 1px solid var(--df-line);
        text-align: left;
        font-size: 13px;
    }

    .df-grid-table th {
        color: var(--df-muted);
        font-weight: 650;
        background: rgba(148, 163, 184, 0.06);
    }

    .df-grid-table td {
        color: var(--df-text);
    }

.df-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

    .df-pill.online {
        background: rgba(35, 209, 139, 0.12);
        color: var(--df-success);
    }

    .df-pill.neutral {
        background: rgba(148, 163, 184, 0.12);
        color: var(--df-muted);
    }

/* =========================================================
   GAUGE / TIMELINE / HEALTH
========================================================= */

.df-gauge-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

.df-gauge-area {
    width: 100%;
    max-width: 380px;
    height: 230px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}
.df-gauge {
    width: 190px;
    height: 110px;
    border-radius: 190px 190px 0 0;
    background: radial-gradient(circle at 50% 100%, var(--df-card) 0 44%, transparent 45%), conic-gradient(from 270deg, var(--df-blue) 0 159deg, rgba(148, 163, 184, 0.16) 159deg 180deg, transparent 180deg 360deg);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
}

.df-gauge-value {
    font-size: 30px;
    font-weight: 850;
    color: var(--df-text);
}

.df-metric-list {
    display: grid;
    gap: 14px;
    flex: 1;
}

.df-metric-line {
    display: flex;
    justify-content: space-between;
    color: var(--df-muted);
    font-size: 14px;
    gap: 18px;
}

    .df-metric-line strong {
        color: var(--df-text);
        font-size: 17px;
    }

.df-timeline {
    display: grid;
    gap: 18px;
}

.df-timeline-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 12px;
    align-items: start;
}

.df-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    margin-top: 5px;
    box-shadow: 0 0 18px currentColor;
}

.df-timeline-title {
    font-size: 14px;
    color: var(--df-text);
}

.df-timeline-sub {
    font-size: 12px;
    color: var(--df-muted);
    margin-top: 4px;
}

.df-timeline-time {
    font-size: 12px;
    color: var(--df-muted);
    white-space: nowrap;
}

.df-health-list {
    display: grid;
    gap: 2px;
}

.df-health-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--df-line);
    font-size: 14px;
    color: var(--df-text);
}

    .df-health-row:last-child {
        border-bottom: 0;
    }

/* =========================================================
   RADZEN INPUT OVERRIDE
========================================================= */

.df-dashboard-layout .rz-dropdown,
.df-dashboard-layout .rz-textbox {
    background: var(--df-card-strong) !important;
    border: 1px solid var(--df-border) !important;
    color: var(--df-text) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

.df-dashboard-layout .rz-dropdown-label,
.df-dashboard-layout .rz-inputtext {
    color: var(--df-text) !important;
}

.df-dashboard-layout .rz-button {
    border-radius: 12px !important;
}

/* =========================================================
   FOOTER
========================================================= */

.df-footer-inner {
    min-height: 52px;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--df-muted);
    font-size: 13px;
}

.df-footer-links {
    display: flex;
    gap: 22px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

/* Keep the top application header from overflowing on tablet widths. */
@media (max-width: 1200px) {
    .df-header-inner {
        padding: 0 12px;
        gap: 10px;
    }

    .df-header-left,
    .df-header-actions {
        gap: 9px;
    }

    .df-header-date {
        min-width: 180px;
        flex-basis: 180px;
    }

    .df-header-action-btn {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

@media (max-width: 980px) {
    .df-header-logo-mini {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .df-header-subtitle {
        display: none;
    }

    .df-header-date {
        min-width: 160px;
        flex-basis: 160px;
    }

    .df-header-action-btn {
        width: 40px !important;
        min-width: 40px !important;
        padding: 0 !important;
    }

    .df-header-action-btn .rz-button-text {
        display: none !important;
    }
}

@media (max-width: 860px) {
    .df-header-date,
    .df-header-action-btn {
        display: none !important;
    }
}

@media (max-width: 1500px) {
    .df-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .df-grid-3 {
        grid-template-columns: 1fr;
    }
    .df-grid-2,
    .df-grid-2-equal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .df-dashboard-layout.rz-layout {
        grid-template-columns: 84px minmax(0, 1fr) !important;
    }

    .df-app-sidebar.rz-sidebar {
        width: 84px !important;
    }

    .df-brand-text,
    .df-nav-panel-menu .rz-panel-menu-item-text,
    .df-nav-panel-menu .rz-navigation-item-text,
    .df-nav-link span,
    .df-sidebar-user div:not(.df-avatar),
    .df-nav-section-title {
        display: none !important;
    }

    .df-nav-item-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .df-nav-pure-link {
        display: none;
    }

    .df-nav-panel-menu .rz-panel-menu-item-link,
    .df-nav-panel-menu .rz-navigation-item-link,
    .df-nav-panel-menu a {
        justify-content: center !important;
        padding: 0 !important;
    }

    .df-nav-link {
        justify-content: center;
        padding: 0;
    }


}

@media (max-width: 760px) {
    body {
        overflow: auto;
    }

    .df-dashboard-layout.rz-layout {
        display: block !important;
    }

    .df-app-header.rz-header {
        position: sticky !important;
        height: auto !important;
        min-height: 72px;
    }

    .df-header-inner {
        flex-wrap: wrap;
        padding: 12px;
    }

    .df-header-date,
    .df-header-action-btn {
        display: none !important;
    }

    .df-app-sidebar.rz-sidebar {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--df-border) !important;
    }

    .df-dashboard-layout.df-nav-collapsed .df-app-sidebar.rz-sidebar,
    .df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:not(:checked)) .df-app-sidebar.rz-sidebar {
        display: none !important;
    }

    .df-dashboard-layout.df-nav-expanded .df-app-sidebar.rz-sidebar,
    .df-dashboard-layout.rz-layout:has(.df-nav-toggle-check:checked) .df-app-sidebar.rz-sidebar {
        display: block !important;
    }

    .df-nav-wrapper {
        height: auto;
        padding: 12px;
        gap: 12px;
    }

    .df-brand {
        display: none;
    }

    .df-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .df-nav-item-shell {
        min-width: 62px;
        grid-template-columns: minmax(0, 1fr);
    }

    .df-nav-panel-menu .rz-panel-menu-item-link,
    .df-nav-panel-menu .rz-navigation-item-link,
    .df-nav-panel-menu a {
        min-width: 58px !important;
    }

    .df-sidebar-user {
        display: none;
    }

    .df-body-inner {
        padding: 16px;
    }

    .df-kpi-grid {
        grid-template-columns: 1fr;
    }

    .df-object-row {
        grid-template-columns: 1fr;
    }

    .df-chart-axis {
        margin-left: 0;
    }

    .df-donut-wrap,
    .df-gauge-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .df-app-footer.rz-footer {
        height: auto !important;
    }

    .df-footer-inner {
        padding: 12px;
        flex-direction: column;
        gap: 8px;
    }
}

html[data-df-theme="dark"] .df-dashboard-layout,
html[data-df-theme="dark"] .df-app-body,
html[data-df-theme="dark"] .df-body-inner,
html.df-theme-dark .df-dashboard-layout,
html.df-theme-dark .df-app-body,
html.df-theme-dark .df-body-inner {
    background-color: #06111f !important;
    color: #f8fafc !important;
}

html[data-df-theme="dark"] .df-card,
html.df-theme-dark .df-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%), rgba(13, 27, 45, 0.94) !important;
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-df-theme="dark"] .df-app-sidebar,
html.df-theme-dark .df-app-sidebar {
    background: #07111d !important;
}

html[data-df-theme="dark"] .df-app-header,
html.df-theme-dark .df-app-header {
    background: rgba(7, 17, 29, 0.94) !important;
}

html[data-df-theme="dark"] .df-title,
html[data-df-theme="dark"] .df-card-title,
html[data-df-theme="dark"] .df-kpi-value,
html[data-df-theme="dark"] .df-grid-table td,
html.df-theme-dark .df-title,
html.df-theme-dark .df-card-title,
html.df-theme-dark .df-kpi-value,
html.df-theme-dark .df-grid-table td {
    color: #f8fafc !important;
}
/* =========================================================
   Secure embed / chart-only views
========================================================= */

.df-pure-layout {
    min-height: 100vh;
    padding: 12px;
    background: var(--df-bg, #0f172a);
}

.df-pure-layout .df-page {
    min-height: calc(100vh - 24px);
    padding: 0 !important;
}

.df-pure-layout .df-page-heading {
    margin: 0 0 14px !important;
    padding: 4px 0 10px !important;
    min-height: auto !important;
}

.df-pure-layout .df-heading-content {
    display: block !important;
}

.df-pure-layout .df-title {
    margin: 0 !important;
}

.df-pure-layout .df-breadcrumb,
.df-pure-layout .df-breadcrumb-filter-row,
.df-pure-layout .df-server-action-stack,
.df-pure-layout .df-incident-server-action-stack,
.df-pure-layout .df-system-heading-actions,
.df-pure-layout .df-home-live-status,
.df-pure-layout .df-card-action-menu,
.df-pure-layout .df-load-progress,
.df-pure-layout .df-lpr-server-status,
.df-pure-layout .df-server-filter-inline {
    display: none !important;
}

.df-pure-layout.df-pure-chart .df-page > section:not(.df-page-heading):not(.df-embed-chart) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    margin: 0 !important;
}

.df-pure-layout.df-pure-chart .df-page > section:not(.df-page-heading):not(.df-embed-chart) > :not(.df-embed-chart):not(.df-lpr-side),
.df-pure-layout.df-pure-chart .df-lpr-side > :not(.df-embed-chart) {
    display: none !important;
}

.df-pure-layout.df-pure-chart .df-lpr-side {
    display: contents !important;
}

.df-pure-layout.df-pure-chart .df-embed-chart {
    display: none !important;
}

.df-pure-layout.df-pure-chart-dashboard-kpis .df-embed-chart-dashboard-kpis,
.df-pure-layout.df-pure-chart-server-kpis .df-embed-chart-server-kpis,
.df-pure-layout.df-pure-chart-camera-kpis .df-embed-chart-camera-kpis,
.df-pure-layout.df-pure-chart-device-kpis .df-embed-chart-device-kpis,
.df-pure-layout.df-pure-chart-events-kpis .df-embed-chart-events-kpis,
.df-pure-layout.df-pure-chart-incidents-kpis .df-embed-chart-incidents-kpis,
.df-pure-layout.df-pure-chart-analytics-kpis .df-embed-chart-analytics-kpis,
.df-pure-layout.df-pure-chart-lpr-kpis .df-embed-chart-lpr-kpis,
.df-pure-layout.df-pure-chart-users-kpis .df-embed-chart-users-kpis,
.df-pure-layout.df-pure-chart-dashboard-issues .df-embed-chart-dashboard-issues,
.df-pure-layout.df-pure-chart-dashboard-map .df-embed-chart-dashboard-map,
.df-pure-layout.df-pure-chart-dashboard-event-types .df-embed-chart-dashboard-event-types,
.df-pure-layout.df-pure-chart-dashboard-top-zones .df-embed-chart-dashboard-top-zones,
.df-pure-layout.df-pure-chart-license-type-distribution .df-embed-chart-license-type-distribution,
.df-pure-layout.df-pure-chart-object-usage .df-embed-chart-object-usage,
.df-pure-layout.df-pure-chart-server-usage .df-embed-chart-server-usage,
.df-pure-layout.df-pure-chart-license-expiration .df-embed-chart-license-expiration,
.df-pure-layout.df-pure-chart-camera-models .df-embed-chart-camera-models,
.df-pure-layout.df-pure-chart-media-profiles .df-embed-chart-media-profiles,
.df-pure-layout.df-pure-chart-camera-status .df-embed-chart-camera-status,
.df-pure-layout.df-pure-chart-camera-health .df-embed-chart-camera-health,
.df-pure-layout.df-pure-chart-camera-storage .df-embed-chart-camera-storage,
.df-pure-layout.df-pure-chart-device-status .df-embed-chart-device-status,
.df-pure-layout.df-pure-chart-device-types .df-embed-chart-device-types,
.df-pure-layout.df-pure-chart-device-manufacturers .df-embed-chart-device-manufacturers,
.df-pure-layout.df-pure-chart-device-health .df-embed-chart-device-health,
.df-pure-layout.df-pure-chart-device-uptime .df-embed-chart-device-uptime,
.df-pure-layout.df-pure-chart-events-over-time .df-embed-chart-events-over-time,
.df-pure-layout.df-pure-chart-event-types .df-embed-chart-event-types,
.df-pure-layout.df-pure-chart-event-zones .df-embed-chart-event-zones,
.df-pure-layout.df-pure-chart-event-rules .df-embed-chart-event-rules,
.df-pure-layout.df-pure-chart-event-map .df-embed-chart-event-map,
.df-pure-layout.df-pure-chart-incidents-over-time .df-embed-chart-incidents-over-time,
.df-pure-layout.df-pure-chart-incidents-by-type .df-embed-chart-incidents-by-type,
.df-pure-layout.df-pure-chart-incidents-by-zone .df-embed-chart-incidents-by-zone,
.df-pure-layout.df-pure-chart-incident-map .df-embed-chart-incident-map,
.df-pure-layout.df-pure-chart-analytics-over-time .df-embed-chart-analytics-over-time,
.df-pure-layout.df-pure-chart-analytics-event-types .df-embed-chart-analytics-event-types,
.df-pure-layout.df-pure-chart-analytics-camera-types .df-embed-chart-analytics-camera-types,
.df-pure-layout.df-pure-chart-analytics-top-cameras .df-embed-chart-analytics-top-cameras,
.df-pure-layout.df-pure-chart-analytics-configurations .df-embed-chart-analytics-configurations,
.df-pure-layout.df-pure-chart-lpr-over-time .df-embed-chart-lpr-over-time,
.df-pure-layout.df-pure-chart-lpr-hour .df-embed-chart-lpr-hour,
.df-pure-layout.df-pure-chart-lpr-country .df-embed-chart-lpr-country,
.df-pure-layout.df-pure-chart-lpr-hit-quality .df-embed-chart-lpr-hit-quality,
.df-pure-layout.df-pure-chart-lpr-prefix .df-embed-chart-lpr-prefix,
.df-pure-layout.df-pure-chart-lpr-performance .df-embed-chart-lpr-performance {
    display: block !important;
    min-height: calc(100vh - 96px);
}

.df-pure-layout.df-pure-chart-dashboard-kpis .df-embed-chart-dashboard-kpis,
.df-pure-layout.df-pure-chart-server-kpis .df-embed-chart-server-kpis,
.df-pure-layout.df-pure-chart-camera-kpis .df-embed-chart-camera-kpis,
.df-pure-layout.df-pure-chart-device-kpis .df-embed-chart-device-kpis,
.df-pure-layout.df-pure-chart-events-kpis .df-embed-chart-events-kpis,
.df-pure-layout.df-pure-chart-incidents-kpis .df-embed-chart-incidents-kpis,
.df-pure-layout.df-pure-chart-analytics-kpis .df-embed-chart-analytics-kpis,
.df-pure-layout.df-pure-chart-lpr-kpis .df-embed-chart-lpr-kpis,
.df-pure-layout.df-pure-chart-users-kpis .df-embed-chart-users-kpis {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    align-content: start !important;
    gap: 12px !important;
    margin: 0 !important;
    min-height: auto !important;
}

.df-pure-layout.df-pure-chart.df-pure-chart-dashboard-kpis .df-page > .df-embed-chart-dashboard-kpis > *,
.df-pure-layout.df-pure-chart-dashboard-kpis .df-embed-chart-dashboard-kpis > *,
.df-pure-layout.df-pure-chart-server-kpis .df-embed-chart-server-kpis > *,
.df-pure-layout.df-pure-chart-camera-kpis .df-embed-chart-camera-kpis > *,
.df-pure-layout.df-pure-chart-device-kpis .df-embed-chart-device-kpis > *,
.df-pure-layout.df-pure-chart-events-kpis .df-embed-chart-events-kpis > *,
.df-pure-layout.df-pure-chart-incidents-kpis .df-embed-chart-incidents-kpis > *,
.df-pure-layout.df-pure-chart-analytics-kpis .df-embed-chart-analytics-kpis > *,
.df-pure-layout.df-pure-chart-lpr-kpis .df-embed-chart-lpr-kpis > *,
.df-pure-layout.df-pure-chart-users-kpis .df-embed-chart-users-kpis > * {
    display: block !important;
    min-height: 132px !important;
}

.df-pure-layout.df-pure-chart .df-card,
.df-pure-layout.df-pure-chart .df-home-card,
.df-pure-layout.df-pure-chart .df-camera-card,
.df-pure-layout.df-pure-chart .df-devices-card,
.df-pure-layout.df-pure-chart .df-events-card,
.df-pure-layout.df-pure-chart .df-incident-card,
.df-pure-layout.df-pure-chart .df-analytics-card,
.df-pure-layout.df-pure-chart .df-lpr-card {
    width: 100% !important;
    min-height: calc(100vh - 96px);
    margin: 0 !important;
}

/* =========================================================
   Pure chart viewport fit
   Keeps single chart embeds and KPI embeds responsive under browser zoom.
========================================================= */

:root {
    --df-pure-fit-pad: clamp(4px, 0.7vw, 10px);
    --df-pure-fit-gap: clamp(6px, 0.85vw, 12px);
    --df-pure-fit-header-pad-y: clamp(7px, 0.95vh, 12px);
    --df-pure-fit-header-pad-x: clamp(10px, 1vw, 16px);
}

body:has(> .df-pure-layout) {
    width: 100%;
    height: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
}

.df-pure-layout {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    padding: var(--df-pure-fit-pad) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.df-pure-layout .df-page,
.df-pure-layout .df-home-page,
.df-pure-layout .df-camera-page,
.df-pure-layout .df-devices-page,
.df-pure-layout .df-events-page,
.df-pure-layout .df-incident-page,
.df-pure-layout .df-analytics-page,
.df-pure-layout .df-lpr-page,
.df-pure-layout .df-users-page {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.df-pure-layout.df-pure-chart .df-page-heading {
    display: none !important;
}

.df-pure-layout.df-pure-chart .df-page > section:not(.df-page-heading):not(.df-embed-chart) {
    display: contents !important;
    margin: 0 !important;
    gap: 0 !important;
}

.df-pure-layout.df-pure-chart .df-lpr-side {
    display: contents !important;
}

.df-pure-layout.df-pure-chart .df-page > section:not(.df-page-heading):not(.df-embed-chart) > :not(.df-embed-chart):not(.df-lpr-side),
.df-pure-layout.df-pure-chart .df-lpr-side > :not(.df-embed-chart) {
    display: none !important;
}

.df-pure-layout.df-pure-chart-dashboard-issues .df-embed-chart-dashboard-issues,
.df-pure-layout.df-pure-chart-dashboard-map .df-embed-chart-dashboard-map,
.df-pure-layout.df-pure-chart-dashboard-event-types .df-embed-chart-dashboard-event-types,
.df-pure-layout.df-pure-chart-dashboard-top-zones .df-embed-chart-dashboard-top-zones,
.df-pure-layout.df-pure-chart-license-type-distribution .df-embed-chart-license-type-distribution,
.df-pure-layout.df-pure-chart-object-usage .df-embed-chart-object-usage,
.df-pure-layout.df-pure-chart-server-usage .df-embed-chart-server-usage,
.df-pure-layout.df-pure-chart-license-expiration .df-embed-chart-license-expiration,
.df-pure-layout.df-pure-chart-camera-models .df-embed-chart-camera-models,
.df-pure-layout.df-pure-chart-media-profiles .df-embed-chart-media-profiles,
.df-pure-layout.df-pure-chart-camera-status .df-embed-chart-camera-status,
.df-pure-layout.df-pure-chart-camera-health .df-embed-chart-camera-health,
.df-pure-layout.df-pure-chart-camera-storage .df-embed-chart-camera-storage,
.df-pure-layout.df-pure-chart-device-status .df-embed-chart-device-status,
.df-pure-layout.df-pure-chart-device-types .df-embed-chart-device-types,
.df-pure-layout.df-pure-chart-device-manufacturers .df-embed-chart-device-manufacturers,
.df-pure-layout.df-pure-chart-device-health .df-embed-chart-device-health,
.df-pure-layout.df-pure-chart-device-uptime .df-embed-chart-device-uptime,
.df-pure-layout.df-pure-chart-events-over-time .df-embed-chart-events-over-time,
.df-pure-layout.df-pure-chart-event-types .df-embed-chart-event-types,
.df-pure-layout.df-pure-chart-event-zones .df-embed-chart-event-zones,
.df-pure-layout.df-pure-chart-event-rules .df-embed-chart-event-rules,
.df-pure-layout.df-pure-chart-event-map .df-embed-chart-event-map,
.df-pure-layout.df-pure-chart-incidents-over-time .df-embed-chart-incidents-over-time,
.df-pure-layout.df-pure-chart-incidents-by-type .df-embed-chart-incidents-by-type,
.df-pure-layout.df-pure-chart-incidents-by-zone .df-embed-chart-incidents-by-zone,
.df-pure-layout.df-pure-chart-incident-map .df-embed-chart-incident-map,
.df-pure-layout.df-pure-chart-analytics-over-time .df-embed-chart-analytics-over-time,
.df-pure-layout.df-pure-chart-analytics-event-types .df-embed-chart-analytics-event-types,
.df-pure-layout.df-pure-chart-analytics-camera-types .df-embed-chart-analytics-camera-types,
.df-pure-layout.df-pure-chart-analytics-top-cameras .df-embed-chart-analytics-top-cameras,
.df-pure-layout.df-pure-chart-analytics-configurations .df-embed-chart-analytics-configurations,
.df-pure-layout.df-pure-chart-lpr-over-time .df-embed-chart-lpr-over-time,
.df-pure-layout.df-pure-chart-lpr-hour .df-embed-chart-lpr-hour,
.df-pure-layout.df-pure-chart-lpr-country .df-embed-chart-lpr-country,
.df-pure-layout.df-pure-chart-lpr-hit-quality .df-embed-chart-lpr-hit-quality,
.df-pure-layout.df-pure-chart-lpr-prefix .df-embed-chart-lpr-prefix,
.df-pure-layout.df-pure-chart-lpr-performance .df-embed-chart-lpr-performance {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.df-pure-layout.df-pure-chart .df-embed-chart > .df-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-home-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-camera-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-devices-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-events-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-incident-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-analytics-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-lpr-card-header,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-users-card-header {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: var(--df-pure-fit-header-pad-y) var(--df-pure-fit-header-pad-x) calc(var(--df-pure-fit-header-pad-y) * .7) !important;
}

.df-pure-layout.df-pure-chart .df-embed-chart > .df-card-header h3,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-home-card-header h3,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-card-header .df-card-title {
    font-size: clamp(14px, 1.12vw, 18px) !important;
    line-height: 1.2 !important;
}

.df-pure-layout.df-pure-chart .df-embed-chart > .df-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-home-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-camera-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-devices-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-events-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-incident-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-analytics-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-lpr-card-body,
.df-pure-layout.df-pure-chart .df-embed-chart > .df-users-card-body {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: var(--df-pure-fit-gap) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.df-pure-layout.df-pure-chart .df-embed-chart .rz-chart,
.df-pure-layout.df-pure-chart .df-embed-chart .rz-chart svg {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.df-pure-layout.df-pure-chart-dashboard-map .df-home-card-body,
.df-pure-layout.df-pure-chart .df-live-map-shell,
.df-pure-layout.df-pure-chart .df-live-map-canvas,
.df-pure-layout.df-pure-chart .df-live-map-empty-state,
.df-pure-layout.df-pure-chart .df-home-real-map-shell,
.df-pure-layout.df-pure-chart .df-home-real-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.df-pure-layout.df-pure-chart-dashboard-issues .df-home-card-body,
.df-pure-layout.df-pure-chart-dashboard-top-zones .df-home-card-body,
.df-pure-layout.df-pure-chart-dashboard-event-types .df-home-card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--df-pure-fit-gap) !important;
}

.df-pure-layout.df-pure-chart-dashboard-issues .df-home-card-body > .rz-chart,
.df-pure-layout.df-pure-chart-dashboard-top-zones .df-home-top-bars,
.df-pure-layout.df-pure-chart-dashboard-top-zones .df-home-top-bars > .rz-chart {
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

.df-pure-layout.df-pure-chart-dashboard-event-types .df-home-donut-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(170px, .34fr) !important;
    gap: var(--df-pure-fit-gap) !important;
    min-height: 0 !important;
    height: 100% !important;
}

.df-pure-layout.df-pure-chart-dashboard-event-types .df-home-legend {
    overflow: auto !important;
    min-height: 0 !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-server-health-spider-panel .df-card-body {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: clamp(5px, 0.75vh, 10px) !important;
    overflow: hidden !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-server-tabs {
    min-height: 0 !important;
    max-height: clamp(34px, 7vh, 58px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-server-tab {
    min-width: clamp(118px, 15vw, 180px) !important;
    padding: clamp(6px, .7vh, 10px) clamp(8px, .9vw, 12px) !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-spider-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-spider-wrap .rz-chart {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-spider-note {
    margin: 0 !important;
    font-size: clamp(10px, .82vw, 12px) !important;
    line-height: 1.25 !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-server-card {
    padding: clamp(6px, .8vw, 10px) !important;
    min-height: 0 !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-server-metrics {
    grid-template-columns: repeat(auto-fit, minmax(clamp(120px, 17vw, 220px), 1fr)) !important;
    gap: clamp(5px, .75vw, 10px) !important;
}

.df-pure-layout.df-pure-chart-server-usage .df-health-server-mini-grid {
    min-height: 0 !important;
    max-height: clamp(34px, 8vh, 56px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.df-pure-layout.df-pure-chart-dashboard-kpis .df-embed-chart-dashboard-kpis,
.df-pure-layout.df-pure-chart-server-kpis .df-embed-chart-server-kpis,
.df-pure-layout.df-pure-chart-camera-kpis .df-embed-chart-camera-kpis,
.df-pure-layout.df-pure-chart-device-kpis .df-embed-chart-device-kpis,
.df-pure-layout.df-pure-chart-events-kpis .df-embed-chart-events-kpis,
.df-pure-layout.df-pure-chart-incidents-kpis .df-embed-chart-incidents-kpis,
.df-pure-layout.df-pure-chart-analytics-kpis .df-embed-chart-analytics-kpis,
.df-pure-layout.df-pure-chart-lpr-kpis .df-embed-chart-lpr-kpis,
.df-pure-layout.df-pure-chart-users-kpis .df-embed-chart-users-kpis {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: var(--df-pure-fit-gap) !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(132px, 16vw, 220px)), 1fr)) !important;
    grid-auto-rows: minmax(clamp(96px, 18vh, 156px), 1fr) !important;
    align-content: stretch !important;
    overflow: auto !important;
    box-sizing: border-box !important;
}

.df-pure-layout.df-pure-chart-dashboard-kpis .df-embed-chart-dashboard-kpis > *,
.df-pure-layout.df-pure-chart-server-kpis .df-embed-chart-server-kpis > *,
.df-pure-layout.df-pure-chart-camera-kpis .df-embed-chart-camera-kpis > *,
.df-pure-layout.df-pure-chart-device-kpis .df-embed-chart-device-kpis > *,
.df-pure-layout.df-pure-chart-events-kpis .df-embed-chart-events-kpis > *,
.df-pure-layout.df-pure-chart-incidents-kpis .df-embed-chart-incidents-kpis > *,
.df-pure-layout.df-pure-chart-analytics-kpis .df-embed-chart-analytics-kpis > *,
.df-pure-layout.df-pure-chart-lpr-kpis .df-embed-chart-lpr-kpis > *,
.df-pure-layout.df-pure-chart-users-kpis .df-embed-chart-users-kpis > * {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.df-pure-layout.df-pure-chart [class*="-kpi-card"],
.df-pure-layout.df-pure-chart .df-kpi {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: clamp(10px, 1.1vw, 18px) !important;
    overflow: hidden !important;
}

.df-pure-layout.df-pure-chart [class*="-kpi-top"],
.df-pure-layout.df-pure-chart .df-kpi-top {
    min-width: 0 !important;
    gap: clamp(8px, .9vw, 14px) !important;
}

.df-pure-layout.df-pure-chart [class*="-kpi-icon"],
.df-pure-layout.df-pure-chart .df-icon-box {
    width: clamp(34px, 3.6vw, 52px) !important;
    height: clamp(34px, 3.6vw, 52px) !important;
    flex: 0 0 clamp(34px, 3.6vw, 52px) !important;
    font-size: clamp(17px, 1.9vw, 26px) !important;
}

.df-pure-layout.df-pure-chart [class*="-kpi-title"],
.df-pure-layout.df-pure-chart .df-kpi-label {
    font-size: clamp(10px, .82vw, 13px) !important;
    line-height: 1.22 !important;
}

.df-pure-layout.df-pure-chart [class*="-kpi-value"],
.df-pure-layout.df-pure-chart .df-kpi-value {
    font-size: clamp(20px, 2.25vw, 34px) !important;
    line-height: 1.05 !important;
    overflow-wrap: anywhere !important;
}

.df-pure-layout.df-pure-chart .df-home-muted,
.df-pure-layout.df-pure-chart .df-home-warning,
.df-pure-layout.df-pure-chart .df-kpi-meta,
.df-pure-layout.df-pure-chart [class*="-muted"] {
    font-size: clamp(10px, .78vw, 13px) !important;
    line-height: 1.22 !important;
}

.df-pure-layout.df-pure-chart .df-home-spark,
.df-pure-layout.df-pure-chart [class*="-spark"] {
    height: clamp(24px, 5vh, 44px) !important;
    margin-top: clamp(5px, .9vh, 12px) !important;
    flex: 0 0 auto !important;
}

@media (max-width: 900px), (max-height: 560px) {
    .df-pure-layout {
        --df-pure-fit-gap: 6px;
        --df-pure-fit-pad: 5px;
    }

    .df-pure-layout.df-pure-chart-dashboard-event-types .df-home-donut-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .df-pure-layout.df-pure-chart .df-embed-chart > .df-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-home-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-camera-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-devices-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-events-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-incident-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-analytics-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-lpr-card-header,
    .df-pure-layout.df-pure-chart .df-embed-chart > .df-users-card-header {
        padding: 6px 9px 5px !important;
    }

    .df-pure-layout.df-pure-chart-server-usage .df-health-spider-note {
        display: none !important;
    }
}

@media (max-height: 430px) {
    .df-pure-layout.df-pure-chart-server-usage .df-health-server-tabs,
    .df-pure-layout.df-pure-chart-server-usage .df-health-server-mini-grid {
        display: none !important;
    }
}
