.dashboard-preview,
.feature-preview,
.uptime-preview {
    --preview-text: var(--home-text);
    --preview-muted: var(--home-muted);
    --preview-line: var(--home-border);
    color: var(--preview-text);
    font-size: 12px;
    line-height: 1.35;
    min-width: 0;
}

.dashboard-frame {
    overflow: hidden;
    border: 1px solid #383843;
    border-radius: 15px;
    background: var(--home-panel-dark);
    box-shadow: 0 21px 64px #0009;
}

.dashboard-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--preview-line);
    background: var(--home-panel-hover);
    color: var(--preview-muted);
}

.dashboard-window { display: flex; gap: 4px; }
.dashboard-window i {
    height: 6px;
    width: 6px;
    background: #52525b;
    border-radius: 100%;
}

.dashboard-demo {
    padding: 3px 6px;
    border: 1px solid #41414c;
    border-radius: 4px;
    font: 10px var(--home-mono);
}

.dashboard-body { display: flex; min-width: 0; }

.dashboard-sidebar {
    display: none;
    width: 106px;
    flex: none;
    flex-direction: column;
    gap: 5px;
    padding: 18px 8px;
    border-right: 1px solid var(--preview-line);
    color: var(--preview-muted);
}

.dashboard-sidebar > * { padding: 6px 7px; }
.dashboard-sidebar strong {
    border-radius: 4px;
    background: #282445;
    color: var(--home-accent);
    font-weight: 700;
}

.dashboard-side-label {
    font: 9px var(--home-mono);
    letter-spacing: .05em;
}

.dashboard-main {
    width: 100%;
    min-width: 0;
    padding: 13px;
}

.dashboard-heading,
.preview-caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.dashboard-heading { margin-bottom: 10px; }
.dashboard-heading strong { font-size: clamp(13px, 2vw, 17px); font-weight: 750; }
.dashboard-heading > span,
.preview-caption > span {
    color: var(--preview-muted);
    font: 10px var(--home-mono);
    text-align: right;
}

.preview-caption strong { font-weight: 700; }
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.dashboard-stats > div,
.dashboard-chart,
.dashboard-event {
    border: 1px solid var(--preview-line);
    border-radius: 7px;
    background: var(--home-panel);
}

.dashboard-stats > div { padding: 7px 5px; }
.dashboard-stats > div > span {
    display: block;
    color: var(--preview-muted);
    font-size: 10px;
}

.dashboard-stats strong {
    display: flex;
    align-items: baseline;
    gap: 3px;
    color: var(--preview-text);
    font-size: 20px;
    font-weight: 750;
}

.dashboard-stats small { color: var(--home-success); font-size: 8px; }
.dashboard-stats > div:last-child small { color: var(--home-warning); }

.dashboard-chart { margin-top: 7px; padding: 9px; }
.preview-timeline { margin-top: 8px; color: var(--home-accent); }
.preview-plot {
    position: relative;
    height: 105px;
    border-bottom: 1px solid var(--preview-line);
    background: repeating-linear-gradient(to bottom, var(--preview-line) 0 1px, transparent 1px 25%);
}

.preview-plot::before,
.preview-plot::after {
    content: "";
    position: absolute;
    inset: 0;
}
.preview-plot::before {
    background: linear-gradient(to top, transparent, currentColor);
    opacity: .24;
    clip-path: var(--plot-area);
}
.preview-plot::after {
    background: currentColor;
    clip-path: var(--plot-line);
}
.preview-axis {
    display: flex;
    justify-content: space-between;
    gap: 3px;
    margin-top: 5px;
    color: var(--preview-muted);
    font: 9px var(--home-mono);
}
.dashboard-event,
.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.dashboard-event { margin-top: 7px; padding: 9px; }
.dashboard-event small,
.preview-row small,
.uptime-preview-row small {
    display: block;
    margin-top: 2px;
    color: var(--preview-muted);
    font: 10px var(--home-mono);
}

.preview-status {
    padding: 3px 6px;
    border-radius: 4px;
    background: #143127;
    color: var(--home-success);
    font-size: 10px;
    white-space: nowrap;
}
.preview-status--warning { color: var(--home-warning); background: #312614; }

.feature-preview,
.uptime-preview {
    padding: 13px;
    border-radius: 9px;
    border: 1px solid var(--preview-line);
    background: var(--home-panel-dark);
}
.feature-preview { min-height: 148px; }

.preview-row {
    padding-block: 8px;
    border-top: 1px solid var(--preview-line);
}
.preview-rows .preview-caption { margin-bottom: 8px; }

.preview-resources { display: grid; gap: 10px; margin-top: 14px; }
.preview-resource {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 35px;
    align-items: center;
    gap: 7px;
}
.preview-resource strong { font: 11px var(--home-mono); text-align: right; }
.preview-meter {
    height: 6px;
    border-radius: 10px;
    background: linear-gradient(to right, var(--home-accent) var(--meter-value), var(--home-border) var(--meter-value));
}

.preview-table { width: 100%; margin-top: 5px; font: 11px var(--home-mono); }
.preview-table th,
.preview-table td { padding: 5px 0; border-bottom: 1px solid var(--preview-line); }
.preview-table tr:last-child td { border-bottom: 0; }
.preview-table th { color: var(--preview-muted); }
.preview-table th, .preview-table td { text-align: right; }
.preview-table th:first-child, .preview-table td:first-child { text-align: left; }
.feature-preview--chart .preview-timeline { color: #7dd3fc; }
.feature-preview--chart .preview-plot { height: 76px; }

.uptime-preview-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 9px;
    padding-block: 12px;
    border-top: 1px solid var(--preview-line);
}
.uptime-preview-row:last-child { padding-bottom: 1px; }
.uptime-preview-row strong { overflow-wrap: anywhere; }
.uptime-preview .preview-caption { margin-bottom: 11px; }
.uptime-percent {
    grid-area: 1 / 2;
    color: var(--home-success);
    font: 11px var(--home-mono);
}

.uptime-history {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 2px;
}
.uptime-history span {
    height: 11px;
    border-radius: 2px;
    background: #10b981;
}
.uptime-history .uptime-interruption { background: #f59e0b; }

@media (min-width: 480px) {
    .dashboard-main { padding: 17px; }
    .dashboard-stats { gap: 7px; }
    .dashboard-stats > div { padding: 9px 10px; }
    .dashboard-stats strong { gap: 6px; }
    .dashboard-stats small { font-size: 10px; }
    .dashboard-sidebar { display: flex; }
    .dashboard-bar { padding-inline: 16px; }
    .feature-preview, .uptime-preview { padding: 15px; }
}

@media (min-width: 600px) {
    .dashboard-chart .preview-plot { height: 128px; }
    .uptime-preview-row { grid-template-columns: minmax(112px, .85fr) minmax(0, 1fr) 42px; }
    .uptime-history { grid-column: 2; }
    .uptime-percent { grid-column: 3; text-align: right; }
}

.preview-plot--cpu {
    --plot-area:polygon(0 100%,
        0% 72%,
        3.33% 68%,
        6.66% 71%,
        10% 61%,
        13.33% 68%,
        16.66% 64%,
        20% 69%,
        23.33% 57%,
        26.66% 61%,
        30% 53%,
        33.33% 59%,
        36.66% 48%,
        40% 54%,
        43.33% 38%,
        46.66% 44%,
        50% 30%,
        53.33% 36%,
        56.66% 23%,
        60% 35%,
        63.33% 45%,
        66.66% 36%,
        70% 48%,
        73.33% 43%,
        76.66% 52%,
        80% 45%,
        83.33% 54%,
        86.66% 48%,
        90% 56%,
        93.33% 49%,
        96.66% 61%,
        100% 58%,
        100% 100%);
    --plot-line:polygon(0% 72%,
        3.33% 68%,
        6.66% 71%,
        10% 61%,
        13.33% 68%,
        16.66% 64%,
        20% 69%,
        23.33% 57%,
        26.66% 61%,
        30% 53%,
        33.33% 59%,
        36.66% 48%,
        40% 54%,
        43.33% 38%,
        46.66% 44%,
        50% 30%,
        53.33% 36%,
        56.66% 23%,
        60% 35%,
        63.33% 45%,
        66.66% 36%,
        70% 48%,
        73.33% 43%,
        76.66% 52%,
        80% 45%,
        83.33% 54%,
        86.66% 48%,
        90% 56%,
        93.33% 49%,
        96.66% 61%,
        100% 58%,
        100% calc(58% + 2px),
        96.66% calc(61% + 2px),
        93.33% calc(49% + 2px),
        90% calc(56% + 2px),
        86.66% calc(48% + 2px),
        83.33% calc(54% + 2px),
        80% calc(45% + 2px),
        76.66% calc(52% + 2px),
        73.33% calc(43% + 2px),
        70% calc(48% + 2px),
        66.66% calc(36% + 2px),
        63.33% calc(45% + 2px),
        60% calc(35% + 2px),
        56.66% calc(23% + 2px),
        53.33% calc(36% + 2px),
        50% calc(30% + 2px),
        46.66% calc(44% + 2px),
        43.33% calc(38% + 2px),
        40% calc(54% + 2px),
        36.66% calc(48% + 2px),
        33.33% calc(59% + 2px),
        30% calc(53% + 2px),
        26.66% calc(61% + 2px),
        23.33% calc(57% + 2px),
        20% calc(69% + 2px),
        16.66% calc(64% + 2px),
        13.33% calc(68% + 2px),
        10% calc(61% + 2px),
        6.66% calc(71% + 2px),
        3.33% calc(68% + 2px),
        0% calc(72% + 2px));
}

.preview-plot--memory {
    --plot-area:polygon(0 100%,
        0% 67%,
        4.34% 66%,
        8.69% 66%,
        13.04% 62%,
        17.39% 62%,
        21.73% 63%,
        26.08% 58%,
        30.43% 57%,
        34.78% 59%,
        39.13% 53%,
        43.47% 54%,
        47.82% 50%,
        52.17% 49%,
        56.52% 51%,
        60.86% 48%,
        65.21% 46%,
        69.56% 47%,
        73.91% 41%,
        78.26% 42%,
        82.60% 37%,
        86.95% 37%,
        91.30% 40%,
        95.65% 35%,
        100% 36%,
        100% 100%);
    --plot-line:polygon(0% 67%,
        4.34% 66%,
        8.69% 66%,
        13.04% 62%,
        17.39% 62%,
        21.73% 63%,
        26.08% 58%,
        30.43% 57%,
        34.78% 59%,
        39.13% 53%,
        43.47% 54%,
        47.82% 50%,
        52.17% 49%,
        56.52% 51%,
        60.86% 48%,
        65.21% 46%,
        69.56% 47%,
        73.91% 41%,
        78.26% 42%,
        82.60% 37%,
        86.95% 37%,
        91.30% 40%,
        95.65% 35%,
        100% 36%,
        100% calc(36% + 2px),
        95.65% calc(35% + 2px),
        91.30% calc(40% + 2px),
        86.95% calc(37% + 2px),
        82.60% calc(37% + 2px),
        78.26% calc(42% + 2px),
        73.91% calc(41% + 2px),
        69.56% calc(47% + 2px),
        65.21% calc(46% + 2px),
        60.86% calc(48% + 2px),
        56.52% calc(51% + 2px),
        52.17% calc(49% + 2px),
        47.82% calc(50% + 2px),
        43.47% calc(54% + 2px),
        39.13% calc(53% + 2px),
        34.78% calc(59% + 2px),
        30.43% calc(57% + 2px),
        26.08% calc(58% + 2px),
        21.73% calc(63% + 2px),
        17.39% calc(62% + 2px),
        13.04% calc(62% + 2px),
        8.69% calc(66% + 2px),
        4.34% calc(66% + 2px),
        0% calc(67% + 2px));
}
