.pf {
    --pf-accent: #13d4e2;
    --pf-folder: #15191c;
    --pf-card: #1c2124;
    --pf-border: #2b3236;
    --pf-text: #e6eef0;
    --pf-muted: #7a8a90;
    --pf-warn: #e6a23c;
    --pf-error: #e5534b;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 16px 32px;
    box-sizing: border-box;
    color: var(--pf-text);
    font-family: 'Roboto Mono', monospace;
}

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

/* The toolbar: two buttons, the message of the last action */

.pf-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.pf-input,
.pf-select,
.pf-button {
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--pf-border);
    background: var(--pf-card);
    color: var(--pf-text);
    font: inherit;
    font-size: 13px;
}

.pf-input {
    width: 100%;
    padding: 0 10px;
}

.pf-input:focus,
.pf-select:focus {
    outline: none;
    border-color: var(--pf-accent);
}

.pf-select {
    width: 100%;
    padding: 0 6px;
}

.pf-button {
    padding: 0 14px;
    cursor: pointer;
}

.pf-button:hover {
    border-color: var(--pf-accent);
}

.pf-primary {
    background: #0e5f66;
    border-color: #0e5f66;
}

.pf-message {
    font-size: 12px;
    color: var(--pf-muted);
    transition: opacity 0.4s;
}

.pf-note {
    font-size: 11px;
    color: var(--pf-muted);
    margin-top: 8px;
}

.pf-empty {
    color: var(--pf-muted);
    padding: 32px 0;
    text-align: center;
    display: none;
}

/* The dialog of adding a channel */

.pf-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
}

.pf-backdrop[hidden] {
    display: none;
}

.pf-dialog {
    width: 100%;
    max-width: 460px;
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: 12px;
    padding: 18px 18px 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-dialog .pf-input,
.pf-dialog .pf-select {
    background: #13171a;
}

.pf-dialog-title {
    font-size: 17px;
    margin-bottom: 6px;
}

.pf-label {
    font-size: 12px;
    color: var(--pf-muted);
    margin-top: 6px;
}

.pf-dialog-error {
    min-height: 18px;
    font-size: 12px;
    color: var(--pf-error);
}

.pf-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Folders: a panel with a header like a tab */

.pf-folder {
    margin-bottom: 16px;
    background: var(--pf-folder);
    border: 1px solid var(--pf-border);
    border-radius: 10px;
}

.pf-folder-head {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 6px 0 4px;
    border-bottom: 1px solid var(--pf-border);
    background: rgba(255, 255, 255, 0.025);
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.pf-folder-head:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pf-folder.pf-collapsed .pf-folder-head {
    border-bottom: none;
    border-radius: 10px;
}

/* The handle: six dots in a box, lit when the header is under the mouse */
.pf-grip {
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 30px;
    border-radius: 5px;
    color: #4f5d63;
    transition: color 0.12s, background 0.12s;
}

.pf-folder-head:hover .pf-grip {
    color: var(--pf-accent);
    background: rgba(19, 212, 226, 0.1);
}

.pf-grip svg,
.pf-folder-icon svg {
    display: block;
}

.pf-folder-icon {
    color: rgba(19, 212, 226, 0.55);
    display: flex;
    align-items: center;
    transition: color 0.12s;
}

.pf-folder-head:hover .pf-folder-icon {
    color: var(--pf-accent);
}

/* Rename, delete: large enough to hit */
.pf-head-button {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-head-button svg {
    display: block;
}

.pf-danger:hover {
    color: var(--pf-error);
}

.pf-toggle,
.pf-icon {
    background: none;
    border: none;
    color: var(--pf-muted);
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    padding: 0;
    flex: none;
}

.pf-toggle:hover,
.pf-icon:hover {
    color: var(--pf-text);
    background: var(--pf-card);
}

.pf-toggle {
    font-size: 12px;
}

.pf-folder-name {
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-rename {
    font: inherit;
    font-size: 15px;
    background: var(--pf-card);
    color: var(--pf-text);
    border: 1px solid var(--pf-accent);
    border-radius: 4px;
    padding: 2px 6px;
    width: 240px;
    max-width: 50vw;
    cursor: text;
}

.pf-count {
    color: var(--pf-muted);
    font-size: 11px;
    border: 1px solid var(--pf-border);
    border-radius: 9px;
    padding: 0 6px;
    line-height: 16px;
    flex: none;
}

.pf-spacer {
    flex: 1;
}

.pf-folder.pf-collapsed .pf-grid {
    display: none;
}

.pf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    min-height: 60px;
    padding: 12px;
}

.pf-drop-hint {
    grid-column: 1 / -1;
    border: 1px dashed var(--pf-border);
    border-radius: 10px;
    color: var(--pf-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

/* Cards */

.pf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 172px;
    padding: 10px 12px 8px;
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    transition: border-color 0.12s;
}

.pf-card:hover {
    border-color: rgba(19, 212, 226, 0.5);
}

.pf-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
}

.pf-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-remove {
    opacity: 0;
    width: 24px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
    transition: opacity 0.12s;
}

.pf-card:hover .pf-remove {
    opacity: 1;
}

@media (hover: none) {
    .pf-remove {
        opacity: 0.7;
    }

    .pf-grip {
        color: var(--pf-muted);
    }
}

.pf-sub {
    font-size: 11px;
    color: var(--pf-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
}

.pf-value {
    font-size: 22px;
    color: var(--pf-accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.pf-age {
    font-size: 11px;
    color: var(--pf-muted);
    white-space: nowrap;
    margin-left: auto;
}

.pf-age.pf-stale {
    color: var(--pf-warn);
}

.pf-age.pf-failed {
    color: var(--pf-error);
}

.pf-chart {
    display: block;
    width: 100%;
    flex: 1;
    min-height: 0;
    margin-top: 4px;
}

.pf-chart[hidden] {
    display: none;
}

/* The map of coordinates instead of the chart */
.pf-map {
    border-radius: 6px;
}

/* Dragging */

.pf-dragging {
    opacity: 0.35;
}

.pf-ghost {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transform: rotate(1.5deg);
}

body.pf-drag-active,
body.pf-drag-active * {
    cursor: grabbing !important;
}

/* The data not to be trusted or none (/_quality) */
.pf-bad {
    color: #e5534b !important;
}

/* The value against the thresholds (/_warn, /_alarm) */
.pf-warn {
    color: #e6a23c !important;
}

.pf-alarm {
    color: #e5534b !important;
}

/* The tabs of the sections: under them a line; the export and the import at the right */

.pf-tabs {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--pf-border);
    margin: 4px 0 16px;
}

.pf-tab-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
}

.pf-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 11px;
    color: var(--pf-muted);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.12s, border-color 0.12s;
}

.pf-tab:hover {
    color: var(--pf-text);
}

.pf-tab.pf-tab-on {
    color: var(--pf-text);
    border-bottom-color: var(--pf-accent);
}

.pf-tab-count {
    font-size: 11px;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 9px;
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    color: var(--pf-muted);
    text-align: center;
}

.pf-tab-count:empty {
    display: none;
}

.pf-tab-on .pf-tab-count {
    color: var(--pf-accent);
}

.pf-tabs > .pf-message {
    align-self: center;
}

.pf-tab-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
    padding-bottom: 8px;
}

.pf-small {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.pf-panel[hidden] {
    display: none;
}

.pf-kept {
    margin-top: 24px;
}

/* Dashboards, chart sets: the list of tiles; one of them - its bar and the note of what it will be */

.pf-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.pf-col-tile {
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    padding: 10px 8px 12px 14px;
    cursor: pointer;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.12s;
}

.pf-col-tile:hover,
.pf-col-tile:focus-visible {
    border-color: var(--pf-accent);
    outline: none;
}

.pf-col-tile-head {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pf-col-tile-name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-col-tile-sub {
    font-size: 11px;
    color: var(--pf-muted);
}

.pf-col-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin-bottom: 14px;
}

.pf-col-back {
    color: var(--pf-muted);
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.pf-col-back:hover {
    color: var(--pf-accent);
}

.pf-col-title {
    font-size: 18px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-col-empty,
.pf-col-soon {
    border: 1px dashed var(--pf-border);
    border-radius: 12px;
    padding: 28px 24px;
    color: var(--pf-muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 760px;
}

.pf-col-empty-title {
    color: var(--pf-text);
    font-size: 15px;
    margin-bottom: 4px;
}

.pf-col-soon-badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pf-accent);
    border: 1px solid var(--pf-accent);
    border-radius: 10px;
    padding: 1px 9px;
}

.pf-col-soon ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

@media (max-width: 600px) {
    .pf-tab {
        padding: 10px 10px 11px;
    }

    .pf-tab-actions {
        margin-left: 0;
    }
}

/* A dashboard: its bar, its grid of widgets. The widgets are placed by the script (absolute). */

.db-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 40px;
    margin-bottom: 12px;
}

.db-ranges {
    display: flex;
    border: 1px solid var(--pf-border);
    border-radius: 6px;
    overflow: hidden;
}

.db-range {
    height: 28px;
    padding: 0 10px;
    border: 0;
    background: var(--pf-card);
    color: var(--pf-muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.db-range:hover {
    color: var(--pf-text);
}

.db-range.db-range-on {
    background: #0e5f66;
    color: var(--pf-text);
}

.db-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.db-editing {
    border-color: var(--pf-accent);
    color: var(--pf-accent);
}

.db-grid {
    position: relative;
    min-height: 40px;
}

.db-empty {
    border: 1px dashed var(--pf-border);
    border-radius: 12px;
    padding: 28px 24px;
    color: var(--pf-muted);
    font-size: 13px;
    max-width: 760px;
}

.db-empty[hidden] {
    display: none;
}

.db-w {
    position: absolute;
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    overflow: hidden;
    transition: left 0.15s, top 0.15s, width 0.15s, height 0.15s, border-color 0.12s;
}

.db:not(.db-edit) .db-w:not(.db-w-text) {
    cursor: pointer;
}

.db:not(.db-edit) .db-w:not(.db-w-text):hover {
    border-color: #3a4549;
}

.db-w-head {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px 0 12px;
    font-size: 12px;
}

.db-w-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--pf-text);
}

.db-w-value {
    color: var(--pf-accent);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

.db-w-value.pf-bad,
.db-w-value.pf-alarm {
    color: var(--pf-error);
}

.db-w-value.pf-warn {
    color: var(--pf-warn);
}

.db-w-age {
    font-size: 10px;
    color: var(--pf-muted);
    white-space: nowrap;
}

.db-w-age.pf-stale {
    color: var(--pf-warn);
}

.db-w-age.pf-failed {
    color: var(--pf-error);
}

.db-w-tools {
    display: none;
}

.db-w-body {
    position: absolute;
    left: 0;
    right: 0;
    top: 30px;
    bottom: 0;
}

.db-chart,
.db-map,
.db-view {
    position: absolute;
    inset: 0 6px 6px;
    width: calc(100% - 12px);
    height: calc(100% - 6px);
}

.db-map {
    border-radius: 6px;
}

/* A text: a title of a part of the dashboard */
.db-w-text {
    background: transparent;
    border-color: transparent;
}

.db-w-text .db-w-body {
    top: 0;
}

.db-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: var(--pf-text);
    font-weight: 300;
    white-space: pre-wrap;
    overflow: hidden;
}

.db-w-text .db-w-head {
    z-index: 1;
    justify-content: flex-end;
}

/* The edit mode: the headers are handles, the corners resize, the tools are shown */
.db-edit .db-w {
    border-style: dashed;
    border-color: #3a4549;
}

.db-edit .db-w-head {
    cursor: grab;
    background: rgba(255, 255, 255, 0.03);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.db-edit .db-w-tools {
    display: flex;
}

.db-edit .db-w-body {
    pointer-events: none;
}

.db-w-resize {
    display: none;
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    touch-action: none;
    background: linear-gradient(135deg, transparent 50%, var(--pf-accent) 50%, var(--pf-accent) 58%, transparent 58%, transparent 70%, var(--pf-accent) 70%, var(--pf-accent) 78%, transparent 78%);
    opacity: 0.7;
}

.db-edit .db-w-resize {
    display: block;
}

.db-w.db-dragging {
    transition: none;
    z-index: 10;
    border-color: var(--pf-accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    opacity: 0.92;
}

.db-placeholder {
    position: absolute;
    border: 1px dashed var(--pf-accent);
    border-radius: 10px;
    background: rgba(19, 212, 226, 0.06);
    transition: left 0.1s, top 0.1s, width 0.1s, height 0.1s;
}

/* The dialogs of the widgets */
.db-dialog {
    max-width: 560px;
}

.db-textarea {
    height: 90px;
    padding: 8px 10px;
    resize: vertical;
}

.db-dialog-item {
    font-size: 11px;
    color: var(--pf-muted);
    word-break: break-all;
}

.db-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 96px;
    overflow: auto;
}

.db-chip {
    height: 26px;
    padding: 0 9px;
    border-radius: 13px;
    border: 1px solid var(--pf-border);
    background: #13171a;
    color: var(--pf-muted);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.db-chip:hover {
    border-color: var(--pf-accent);
    color: var(--pf-text);
}

.db-items {
    max-height: 260px;
    overflow: auto;
    margin-top: 6px;
    font-size: 12px;
    color: var(--pf-muted);
}

.db-item {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto auto;
    grid-template-areas: "cb name value kind" "cb path value kind";
    column-gap: 10px;
    align-items: center;
    padding: 6px 4px;
    border-bottom: 1px solid var(--pf-border);
    cursor: pointer;
}

.db-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.db-item input {
    grid-area: cb;
    accent-color: var(--pf-accent);
}

.db-item-name {
    grid-area: name;
    color: var(--pf-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.db-item-path {
    grid-area: path;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.db-item-path:empty {
    display: none;
}

.db-item-value {
    grid-area: value;
    color: var(--pf-accent);
    white-space: nowrap;
}

.db-item-kind {
    grid-area: kind;
    font-size: 10px;
    border: 1px solid var(--pf-border);
    border-radius: 8px;
    padding: 0 6px;
}

.pf-danger-button:hover {
    border-color: var(--pf-error);
    color: var(--pf-error);
}

/* Full screen of the browser: the dashboard alone */
.db.db-full {
    background: #0d1113;
    padding: 12px 16px;
    overflow: auto;
}

/* The kiosk mode: the page without the header, the footer, the tabs of the site */
body.pf-kiosk .sh,
body.pf-kiosk .sf,
body.pf-kiosk h1,
body.pf-kiosk .pf-tabs,
body.pf-kiosk .pf-kept {
    display: none !important;
}

body.pf-kiosk .pf {
    max-width: none;
    padding-top: 12px;
}

.db-badge {
    font-size: 11px;
    color: var(--pf-accent);
    border: 1px solid var(--pf-accent);
    border-radius: 10px;
    padding: 1px 8px;
}

.db-dialog-note {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--pf-muted);
}

/* A widget of an item not well: its border */
.db-w.db-w-warn {
    border-color: rgba(230, 162, 60, 0.75);
}

.db-w.db-w-alarm {
    border-color: rgba(229, 83, 75, 0.85);
    box-shadow: 0 0 0 1px rgba(229, 83, 75, 0.35);
}

/* A chart of several items: the legend over the chart */
.db-multi {
    position: absolute;
    inset: 0 8px 4px 6px;
    display: flex;
    flex-direction: column;
}

.mc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    font-size: 11px;
    padding: 0 0 4px 4px;
    max-height: 40%;
    overflow: hidden;
}

.mc-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
}

.mc-item i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex: none;
}

.mc-name {
    color: var(--pf-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.mc-item b {
    font-weight: 500;
    color: var(--pf-text);
}

.mc-item b.mc-error {
    color: var(--pf-error);
}

.mc-canvas {
    flex: 1;
    min-height: 0;
    width: 100%;
}

/* The list of the alarms */
.db-alarms {
    position: absolute;
    inset: 0 6px 6px;
    overflow: auto;
    font-size: 12px;
}

.db-alarm {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 6px 6px;
    border-radius: 6px;
    cursor: pointer;
}

.db-alarm:hover {
    background: rgba(255, 255, 255, 0.04);
}

.db-alarm i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.db-alarm-warn i {
    background: var(--pf-warn);
}

.db-alarm-alarm i {
    background: var(--pf-error);
    box-shadow: 0 0 6px var(--pf-error);
}

.db-alarm-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.db-alarm-text {
    white-space: nowrap;
    justify-self: end;
}

.db-alarm-warn .db-alarm-text {
    color: var(--pf-warn);
}

.db-alarm-alarm .db-alarm-text {
    color: var(--pf-error);
}

.db-alarms-ok {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--pf-muted);
    font-size: 11px;
}

.db-alarms-ok b {
    color: #3ccf7a;
    font-size: 15px;
    font-weight: 500;
}

/* The settings: the limits and the thresholds of a widget */
.db-over {
    margin-top: 8px;
    border: 1px solid var(--pf-border);
    border-radius: 8px;
    padding: 6px 10px 10px;
}

.db-over summary {
    cursor: pointer;
    font-size: 12px;
    color: var(--pf-muted);
}

.db-over-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px 10px;
}

.db-over-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--pf-muted);
}

.db-over-field .pf-input {
    height: 30px;
}

.db-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--pf-muted);
    cursor: pointer;
}

.db-check input {
    accent-color: var(--pf-accent);
}

/* The analyzer: the chart (the areas, the time axis) on the height of the window, the statistics
   under it */
.an-plot {
    position: relative;
    height: max(420px, calc(100vh - 300px));
    background: #12181b;
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.an-canvas {
    position: absolute;
    inset: 6px 6px 0;
    width: calc(100% - 12px);
    height: calc(100% - 6px);
    outline: none;
    touch-action: none;
}

.an-legends {
    position: absolute;
    inset: 6px 6px 0;
    pointer-events: none;
}

.an-legend {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    font-size: 11px;
    pointer-events: none;
}

.an-leg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 6px 1px 4px;
    border-radius: 5px;
    background: rgba(18, 24, 27, 0.82);
    pointer-events: auto;
    white-space: nowrap;
}

.an-leg i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    cursor: pointer;
    flex: none;
}

.an-leg-off i {
    opacity: 0.25;
}

.an-leg-off .an-leg-name,
.an-leg-off b {
    opacity: 0.45;
}

.an-leg-name {
    color: var(--pf-muted);
    cursor: pointer;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.an-leg-name:hover {
    color: var(--pf-accent);
}

.an-leg b {
    font-weight: 500;
    color: var(--pf-text);
}

.an-leg-empty {
    color: var(--pf-muted);
    padding: 2px 4px;
}

.an-area-tools {
    position: absolute;
    display: flex;
    gap: 4px;
    pointer-events: auto;
}

.an-tool {
    width: 24px;
    height: 22px;
    border-radius: 5px;
    border: 1px solid var(--pf-border);
    background: rgba(18, 24, 27, 0.85);
    color: var(--pf-muted);
    font: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.an-tool:hover {
    color: var(--pf-accent);
    border-color: var(--pf-accent);
}

.an-status {
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 10px;
    color: var(--pf-muted);
    pointer-events: none;
}

.an-stats {
    margin-top: 12px;
    font-size: 12px;
    overflow-x: auto;
}

.an-stats-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: baseline;
    margin-bottom: 8px;
    color: var(--pf-muted);
}

.an-stats-head b {
    color: var(--pf-text);
    font-weight: 500;
}

.an-stats-hint {
    font-size: 11px;
    opacity: 0.8;
}

.an-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 760px;
}

.an-table th,
.an-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--pf-border);
    text-align: right;
    white-space: nowrap;
}

.an-table th {
    color: var(--pf-muted);
    font-weight: 400;
    font-size: 11px;
}

.an-table th:first-child,
.an-table td:first-child {
    text-align: left;
}

.an-stats-name {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.an-stats-name i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex: none;
}

.cs-color {
    padding: 2px 4px;
    height: 34px;
}

.cs-moves {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}
