html, body {
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    height: 100%;
    width: 100%;
    margin: 0;
    background: #f3f5f7;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #f7edd6;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    background:
        linear-gradient(165deg, rgba(8, 16, 24, 0.62) 0%, rgba(8, 16, 24, 0.78) 100%),
        url("/img/bg.jpg") center / cover no-repeat;
}

.auth-center {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-panel {
    width: min(640px, 100%);
    margin: 0;
    background: #fffcf6;
    border: 1px solid rgba(228, 221, 208, 0.9);
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(8, 16, 24, 0.28);
    padding: 2rem 2rem 1.5rem;
}

.auth-panel h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    color: #1a2a37;
}

.auth-panel-lead {
    margin: 0 0 1.5rem;
    color: #5a6870;
    line-height: 1.5;
}

.engine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    margin: 0.35rem 0 1.25rem;
}

.engine-card {
    appearance: none;
    cursor: pointer;
    text-align: left;
    border: 1px solid #e4ddd0;
    background: #fffaf2;
    border-radius: 12px;
    padding: 0.85rem 0.8rem 0.75rem;
    color: #1a2a37;
    transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.engine-card:hover:not(:disabled) {
    border-color: #0f6e6a;
    transform: translateY(-1px);
}

.engine-card:disabled {
    opacity: 0.55;
    cursor: default;
    transform: none;
}


.engine-card.selected {
    border-color: #0f6e6a;
    background: #e7f3f1;
    box-shadow: inset 0 0 0 1px #0f6e6a;
}

.engine-card-name {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
}

.engine-card-meta {
    display: block;
    margin-top: 0.2rem;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.72rem;
    color: #5a6870;
}

.conn-preview {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.78rem;
    color: #3e4f5a;
    background: #f3eee4;
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    margin: 0.25rem 0 1rem;
    word-break: break-all;
}

.setup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid #e4ddd0;
}

.step-pills {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.4rem;
}

.step-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #5a6870;
}

.step-pill b {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    background: #e4ddd0;
    color: #1a2a37;
}

.step-pill.active {
    color: #1a2a37;
    font-weight: 600;
}

.step-pill.active b {
    background: #0f6e6a;
    color: #fffcf6;
}

.step-pill.done b {
    background: #c45c26;
    color: #fffcf6;
}

.login-panel {
    width: min(420px, 100%);
    padding: 2.15rem 2rem 1.75rem;
}

.login-panel h2 {
    margin-bottom: 1.05rem;
}

.auth-brand-mini {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.05rem;
}

.auth-brand-mini strong {
    font-size: 1.12rem;
    letter-spacing: -0.03em;
    color: #1a2a37;
}

.auth-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: #12202e;
    background: #d8c4a3;
    flex-shrink: 0;
}

.auth-tagline {
    margin: 0 0 1.35rem;
    color: #5a6870;
    line-height: 1.5;
    font-size: 0.92rem;
}

.login-native label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: #1a2a37;
}

.login-native input:not([type="checkbox"]) {
    display: block;
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid #d9d2c5;
    border-radius: 10px;
    background: #fffaf2;
    padding: 0 0.9rem;
    font: inherit;
    color: #1a2a37;
    margin-bottom: 1rem;
    appearance: none;
}

.login-native input:focus {
    outline: 2px solid #0f6e6a;
    outline-offset: 1px;
}

.login-native .remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.1rem;
    color: #3e4f5a;
}

.login-native button[type="submit"] {
    appearance: none;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: #0f6e6a;
    color: #f7f4ee;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.login-native button[type="submit"]:hover {
    background: #0c5c59;
}

.login-native .validation-message {
    display: block;
    margin: -0.7rem 0 0.85rem;
    color: #9c2f2f;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .auth-shell {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 12vh;
    }

    .auth-panel {
        padding: 1.5rem 1.2rem 1.25rem;
    }
}

.metadata-layout {
    display: grid;
    grid-template-columns: minmax(280px, 38%) 1fr;
    gap: 1rem;
    align-items: start;
}

.metadata-tree {
    max-height: calc(100vh - 220px);
    overflow: auto;
}

@media (max-width: 900px) {
    .metadata-layout {
        grid-template-columns: 1fr;
    }
}

.join-example {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0 0 0.85rem;
}

.join-example-card {
    min-width: 148px;
    background: #fffaf2;
    border: 1px solid #e4ddd0;
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.82rem;
}

.join-example-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    font-weight: 600;
    background: #12202e;
    color: #e8eef2;
}

.join-example-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-top: 1px solid #efebe3;
    color: #3e4f5a;
}

.join-example-row.key {
    background: #e7f3f1;
    color: #0c5c59;
    font-weight: 600;
}

.join-example-title span,
.join-example-row.key span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    background: #0f6e6a;
    color: #fffcf6;
}

.join-example-title span {
    background: #c45c26;
}

.join-example-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #0f6e6a;
}

.join-example-arrow {
    font-size: 1.4rem;
    line-height: 1;
}

.join-example-caption {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5a6870;
}

.join-sql textarea,
.join-sql input {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.82rem;
}

.rel-pick-list {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #e4ddd0;
    border-radius: 10px;
    background: #fffcf6;
}

.rel-pick-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #efebe3;
    background: transparent;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font: inherit;
    color: #3e4f5a;
}

.rel-pick-item:last-child {
    border-bottom: 0;
}

.rel-pick-item:hover {
    background: #f3eee6;
}

.rel-pick-item.is-active {
    background: #e7f3f1;
    color: #0c5c59;
    font-weight: 600;
}

.rel-pick-item.is-linked {
    color: #0f6e6a;
}

.rel-pick-meta {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: #5a6870;
}

.builder-list {
    max-height: 420px;
    overflow: auto;
}

.builder-preview {
    max-height: 420px;
    overflow: auto;
}

.builder-preview table {
    font-size: 0.82rem;
    font-family: "IBM Plex Mono", Consolas, monospace;
}

.sql-editor textarea {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .engine-grid {
        grid-template-columns: 1fr 1fr;
    }

    .setup-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .ds-dates-presets {
        margin-left: 0;
    }

    .app-page {
        padding: 1rem 0.85rem 2rem;
    }

    .page-title {
        font-size: 1.25rem;
    }
}

.dash-canvas {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 280px;
}

.ds-export-root {
    min-width: 0;
}

.ds-export-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.85rem;
    margin: 0 0 0.85rem;
    padding: 0.15rem 0 0.35rem;
}

.ds-export-banner strong {
    font-size: 1.15rem;
    color: #12202e;
}

.ds-export-banner span {
    font-size: 0.82rem;
    color: #64748b;
}

.dash-widget {
    position: absolute;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    padding-right: 16px;
    padding-bottom: 16px;
}

.dash-widget > .dash-widget-head,
.dash-widget-body {
    background: #fff;
    border: 1px solid #e8edf1;
}

.dash-widget-body {
    height: calc(100% - 40px);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 0;
    border-radius: 0 0 14px 14px;
}

.dash-widget.is-compact .dash-widget-body {
    height: 100%;
    border-radius: 14px;
    border-top: 3px solid var(--accent, #3b82f6);
}

.dash-widget.is-table .dash-widget-body {
    overflow: auto;
}

.dash-widget-body > * {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
}

.dash-widget-body .viz-chart {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.dash-widget-body .viz-chart canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.dash-widget-body .viz-chart.is-echart {
    min-height: 0;
}

.dash-widget-body .viz-chart.is-echart canvas {
    cursor: pointer;
}

.dash-widget-head {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    border-radius: 14px 14px 0 0;
    cursor: default;
    min-height: 36px;
}

.dash-widget-drag {
    font-weight: 600;
    font-size: 0.8rem;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.dash-canvas .dash-widget-drag {
    cursor: default;
}

.dash-canvas.is-editing .dash-widget-drag {
    cursor: grab;
}

.dash-widget.is-dragging .dash-widget-drag {
    cursor: grabbing;
}

.dash-widget-resize {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 14px;
    height: 14px;
    border-right: 2px solid #0f6e6a;
    border-bottom: 2px solid #0f6e6a;
    cursor: nwse-resize;
}

.dash-kpi,
.dash-info {
    padding: 0.85rem 1rem;
}

.dash-kpi .mud-typography-h3 {
    color: #0f6e6a;
    font-weight: 600;
}

.dash-table {
    overflow: auto;
    height: 100%;
    max-height: 100%;
    width: 100%;
    padding: 0.35rem 0.65rem 0.55rem;
    box-sizing: border-box;
}

.dash-table table {
    font-size: 0.8rem;
}

.ws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.ws-card {
    background: #fffcf6;
    border: 1px solid #e4ddd0;
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-card:hover {
    border-color: #0f6e6a;
    box-shadow: 0 10px 24px rgba(18, 32, 46, 0.08);
}

.ws-card.is-active {
    border-color: #0f6e6a;
    background: #e7f3f1;
}

.ws-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.ws-card p {
    margin: 0;
    color: #5a6870;
    font-size: 0.85rem;
}

.purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.purpose-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.4rem;
    min-height: 118px;
    width: 100%;
    margin: 0;
    padding: 0.95rem 1rem 0.9rem;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    background: #fff;
    border: 1px solid #e8edf1;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.purpose-card:hover {
    border-color: #0f6e6a;
    box-shadow: 0 10px 24px rgba(18, 32, 46, 0.08);
}

.purpose-card.is-selected {
    border-color: #0f6e6a;
    background: #e7f3f1;
    box-shadow: 0 0 0 1px #0f6e6a;
}

.purpose-card-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.3;
    color: #1a2a37;
}

.purpose-card-desc {
    display: block;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
}

.app-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 1.25rem 1.5rem 2.5rem;
}

.app-page > .mud-grid {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.mud-layout {
    width: 100%;
    max-width: 100%;
}

.mud-main-content.app-main {
    box-sizing: border-box;
    min-width: 0;
    width: auto;
    max-width: none;
}

.mud-drawer.app-rail,
.mud-drawer.app-rail .mud-drawer-content {
    background: #0b141c;
    color: #d5dee5;
}

.mud-drawer.app-rail .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rail-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.15rem 0.95rem 0.95rem;
}

.rail-brand strong {
    color: #f4f7f8;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    font-weight: 650;
}

.rail-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rail-brand-text em {
    color: #9aa8b0;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 0.12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rail-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-weight: 600;
    font-size: 0.78rem;
    color: #12202e;
    background: #d8c4a3;
    flex-shrink: 0;
}

img.rail-mark.rail-logo {
    object-fit: contain;
    background: #f4f7f8;
    padding: 4px;
}

.rail-menu {
    flex: 1 1 auto;
    padding-top: 0.55rem;
}

.app-rail .mud-nav-link {
    margin: 0 0.55rem 0.15rem;
    border-radius: 8px;
    color: #c5d0d6 !important;
}

.app-rail .mud-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.app-rail .mud-nav-link.active {
    background: rgba(15, 110, 106, 0.24);
    color: #fff !important;
}

.rail-session {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0.7rem 0.95rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rail-block,
.rail-conn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.7rem 0.6rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    text-align: left;
}

.rail-label {
    display: block;
    margin-bottom: 0.18rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7d8d96;
}

.rail-org {
    display: block;
    color: #f4f7f8;
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.3;
    word-break: break-word;
}

.rail-conn {
    appearance: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    background: #1a242e;
}

.rail-conn strong {
    display: block;
    color: #f4f7f8;
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.3;
}

.rail-conn.is-on {
    background: #0f6e6a;
}

.rail-conn.is-on .rail-label {
    color: rgba(255, 255, 255, 0.72);
}

.rail-conn:hover {
    filter: brightness(1.08);
}

.rail-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.45rem 0.2rem;
    min-width: 0;
}

.rail-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: #d8c4a3;
    color: #12202e;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.rail-user strong {
    display: block;
    color: #f4f7f8;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-user em {
    display: block;
    font-style: normal;
    font-size: 0.72rem;
    color: #9eb0b8;
    line-height: 1.3;
}

.rail-user span:last-child {
    min-width: 0;
}

.rail-logout {
    display: block;
    margin-top: 0.1rem;
    padding: 0.52rem 0.7rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #c5d0d6;
    text-align: center;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.rail-logout:hover {
    background: rgba(196, 92, 38, 0.22);
    color: #fff;
}

.app-topbar.mud-appbar {
    min-height: 52px;
    height: auto;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    box-shadow: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    margin-left: 0.15rem;
}

.topbar-logo,
.topbar-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}

.topbar-logo {
    object-fit: contain;
    background: #f4f7f8;
    padding: 2px;
}

.topbar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.topbar-brand-text strong {
    color: #f4f7f8;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-brand-text em {
    color: #9aa8b0;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1.15rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.page-head-main {
    min-width: 0;
    flex: 1 1 220px;
}

.page-head .mud-button-root,
.page-head .mud-input-control {
    flex-shrink: 0;
}

.page-back {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #5a6870;
    text-decoration: none;
}

.page-back:hover {
    color: #0f6e6a;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.page-toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin: 0 0 1.1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8ea;
}

.page-toolbar .page-actions {
    margin-left: auto;
}

.ds-tab {
    appearance: none;
    height: 34px;
    padding: 0 0.95rem;
    border-radius: 999px;
    border: 1px solid #d4ddd9;
    background: #fff;
    color: #2a3c48;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
}

.ds-tab:hover {
    border-color: #0f6e6a;
    color: #0f6e6a;
}

.ds-tab.is-on {
    background: #0f6e6a;
    border-color: #0f6e6a;
    color: #fff;
}

.page-toolbar.is-inset {
    margin-top: 0;
    margin-bottom: 0.85rem;
}

.form-actions {
    margin-top: 1.25rem;
}

.ds-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem 0.75rem;
    margin: 0 0 1.1rem;
}

.ds-date {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
}

.ds-date span {
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a6870;
}

.ds-date input[type="date"] {
    box-sizing: border-box;
    height: 42px;
    min-width: 168px;
    margin: 0;
    padding: 0 0.7rem;
    border: 1px solid #dde6e4;
    border-radius: 12px;
    background: #fff;
    color: #1a2a37;
    font: inherit;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
    color-scheme: light;
}

.ds-date input[type="date"]:focus {
    outline: none;
    border-color: #0f6e6a;
    box-shadow: 0 0 0 3px rgba(15, 110, 106, 0.12);
}

.ds-date input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.55;
}

.ds-date input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.ds-dates-presets {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-bottom: 2px;
    margin-left: auto;
}

.ds-dates-chip {
    appearance: none;
    border: 1px solid #dde6e4;
    background: #fff;
    color: #3e4f5a;
    border-radius: 999px;
    height: 42px;
    padding: 0 0.9rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
}

.ds-dates-chip:hover {
    border-color: #0f6e6a;
    color: #0f6e6a;
}

.ds-dates-chip.is-on {
    border-color: #0f6e6a;
    background: #0f6e6a;
    color: #f7f4ee;
}

.ds-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: -0.35rem 0 1rem;
}

.ds-filter-label {
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a6870;
    margin-right: 0.15rem;
}

.ds-filter-bar .ds-dates-chip span {
    margin-left: 0.35rem;
    font-weight: 700;
}

.ds-params input {
    min-width: 9rem;
    border: 1px solid #d7dee3;
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
    font: inherit;
    color: #1e293b;
    background: #fff;
}

.ds-params input:focus {
    outline: 2px solid #0f6e6a55;
    border-color: #0f6e6a;
}

.dash-fetch-meta {
    margin: -0.35rem 0 0.85rem;
    font-size: 0.72rem;
    color: #64748b;
}

.dash-info .ds-dates {
    margin: 0;
}

.chart-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.25rem;
}

.chart-style-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.28rem;
    margin: 0;
    padding: 0.65rem 0.7rem 0.7rem;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    background: #fff;
    border: 1px solid #e8edf1;
    border-radius: 12px;
}

.chart-style-card:hover {
    border-color: #0f6e6a;
}

.chart-style-card.is-selected {
    border-color: #0f6e6a;
    background: #e7f3f1;
    box-shadow: 0 0 0 1px #0f6e6a;
}

.chart-style-card strong {
    font-size: 0.82rem;
    font-weight: 650;
    color: #1a2a37;
}

.chart-style-card > span:last-child {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.3;
}

.chart-style-preview {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 36px;
    margin-bottom: 0.15rem;
}

.chart-style-preview i {
    display: block;
    flex: 1;
    background: #0f6e6a;
    border-radius: 2px 2px 0 0;
}

.chart-style-preview i:nth-child(1) { height: 46%; }
.chart-style-preview i:nth-child(2) { height: 78%; }
.chart-style-preview i:nth-child(3) { height: 60%; }
.chart-style-preview i:nth-child(4) { height: 92%; }

.chart-style-preview.is-round i { border-radius: 6px 6px 0 0; }
.chart-style-preview.is-thin { gap: 8px; }
.chart-style-preview.is-thin i { max-width: 8px; margin: 0 auto; }
.chart-style-preview.is-multi i:nth-child(1) { background: #0f6e6a; }
.chart-style-preview.is-multi i:nth-child(2) { background: #c45c26; }
.chart-style-preview.is-multi i:nth-child(3) { background: #3b82f6; }
.chart-style-preview.is-multi i:nth-child(4) { background: #f59e0b; }
.chart-style-preview.is-grad i {
    background: linear-gradient(180deg, #1d9a93, #0f6e6a 70%);
}
.chart-style-preview.is-tracks {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
}
.chart-style-preview.is-tracks i {
    flex: none;
    height: 5px;
    width: 100%;
    border-radius: 999px;
    background: #dbe7e6;
    position: relative;
}
.chart-style-preview.is-tracks i::after {
    content: "";
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0f6e6a;
}
.chart-style-preview.is-tracks i:nth-child(1)::after { width: 80%; }
.chart-style-preview.is-tracks i:nth-child(2)::after { width: 55%; }
.chart-style-preview.is-tracks i:nth-child(3)::after { width: 70%; }
.chart-style-preview.is-tracks i:nth-child(4) { display: none; }
.chart-style-preview.is-stack i { height: 100%; border-radius: 0; }
.chart-style-preview.is-stack i:nth-child(1) { height: 40%; background: #0f6e6a; }
.chart-style-preview.is-stack i:nth-child(2) { height: 28%; background: #1d9a93; }
.chart-style-preview.is-stack i:nth-child(3) { height: 20%; background: #c45c26; }
.chart-style-preview.is-stack i:nth-child(4) { height: 12%; background: #f59e0b; }
.chart-style-preview.is-line,
.chart-style-preview.is-smooth,
.chart-style-preview.is-markers,
.chart-style-preview.is-area {
    align-items: center;
}
.chart-style-preview.is-line i,
.chart-style-preview.is-smooth i,
.chart-style-preview.is-markers i,
.chart-style-preview.is-area i {
    height: 3px;
    border-radius: 999px;
    flex: 1;
}
.chart-style-preview.is-line i:nth-child(1) { transform: translateY(8px); }
.chart-style-preview.is-line i:nth-child(2) { transform: translateY(-4px); }
.chart-style-preview.is-line i:nth-child(3) { transform: translateY(2px); }
.chart-style-preview.is-line i:nth-child(4) { transform: translateY(-8px); }
.chart-style-preview.is-pie,
.chart-style-preview.is-labels,
.chart-style-preview.is-minimal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 36px;
    gap: 3px;
}
.chart-style-preview.is-pie i,
.chart-style-preview.is-labels i,
.chart-style-preview.is-minimal i {
    height: 100%;
    border-radius: 4px;
}
.chart-style-preview.is-pie i:nth-child(1),
.chart-style-preview.is-labels i:nth-child(1),
.chart-style-preview.is-minimal i:nth-child(1) { background: #0f6e6a; }
.chart-style-preview.is-pie i:nth-child(2),
.chart-style-preview.is-labels i:nth-child(2),
.chart-style-preview.is-minimal i:nth-child(2) { background: #c45c26; }
.chart-style-preview.is-pie i:nth-child(3),
.chart-style-preview.is-labels i:nth-child(3),
.chart-style-preview.is-minimal i:nth-child(3) { background: #3b82f6; }
.chart-style-preview.is-pie i:nth-child(4),
.chart-style-preview.is-labels i:nth-child(4),
.chart-style-preview.is-minimal i:nth-child(4) { background: #f59e0b; }

.chart-style-preview.is-combo { align-items: flex-end; }
.chart-style-preview.is-combo i:nth-child(1) { height: 50%; }
.chart-style-preview.is-combo i:nth-child(2) { height: 78%; background: #c45c26; }
.chart-style-preview.is-combo i:nth-child(3) { height: 42%; }
.chart-style-preview.is-combo i:nth-child(4) { height: 88%; background: #c45c26; }

.chart-style-preview.is-scatter,
.chart-style-preview.is-hist { align-items: flex-end; }
.chart-style-preview.is-scatter i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    align-self: center;
}
.chart-style-preview.is-scatter i:nth-child(1) { transform: translate(2px, 6px); }
.chart-style-preview.is-scatter i:nth-child(2) { transform: translate(-4px, -8px); }
.chart-style-preview.is-scatter i:nth-child(3) { transform: translate(6px, 2px); }
.chart-style-preview.is-scatter i:nth-child(4) { transform: translate(-2px, -10px); }
.chart-style-preview.is-hist i { border-radius: 0; margin: 0; }
.chart-style-preview.is-hist { gap: 1px; }

.chart-style-preview.is-funnel { align-items: center; flex-direction: column; gap: 3px; }
.chart-style-preview.is-funnel i { height: 6px; width: 100%; border-radius: 2px; }
.chart-style-preview.is-funnel i:nth-child(1) { width: 100%; }
.chart-style-preview.is-funnel i:nth-child(2) { width: 78%; }
.chart-style-preview.is-funnel i:nth-child(3) { width: 56%; }
.chart-style-preview.is-funnel i:nth-child(4) { width: 34%; }

.chart-style-preview.is-heat {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2px;
    align-items: stretch;
}
.chart-style-preview.is-heat i { height: 100%; border-radius: 2px; flex: none; }
.chart-style-preview.is-heat i:nth-child(1) { background: #d7ecea; }
.chart-style-preview.is-heat i:nth-child(2) { background: #0f6e6a; }
.chart-style-preview.is-heat i:nth-child(3) { background: #7eb8b5; }
.chart-style-preview.is-heat i:nth-child(4) { background: #c45c26; }

.chart-style-preview.is-radar { align-items: center; justify-content: center; }
.chart-style-preview.is-radar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
}
.chart-style-preview.is-radar i:nth-child(1) { transform: translate(0, -10px); }
.chart-style-preview.is-radar i:nth-child(2) { transform: translate(10px, 6px); }
.chart-style-preview.is-radar i:nth-child(3) { transform: translate(-10px, 6px); }
.chart-style-preview.is-radar i:nth-child(4) { display: none; }

.chart-style-preview.is-waterfall i:nth-child(1) { height: 30%; }
.chart-style-preview.is-waterfall i:nth-child(2) { height: 55%; }
.chart-style-preview.is-waterfall i:nth-child(3) { height: 40%; background: #c45c26; }
.chart-style-preview.is-waterfall i:nth-child(4) { height: 80%; }

.chart-style-preview.is-tree { gap: 3px; align-items: stretch; }
.chart-style-preview.is-tree i { border-radius: 2px; }
.chart-style-preview.is-tree i:nth-child(1) { height: 100%; flex: 2; }
.chart-style-preview.is-tree i:nth-child(2) { height: 70%; flex: 1; }
.chart-style-preview.is-tree i:nth-child(3) { height: 50%; flex: 1; }
.chart-style-preview.is-tree i:nth-child(4) { height: 85%; flex: 1.4; background: #c45c26; }

.chart-style-preview.is-sankey { align-items: center; gap: 2px; }
.chart-style-preview.is-sankey i { height: 8px; border-radius: 99px; }
.chart-style-preview.is-sankey i:nth-child(2),
.chart-style-preview.is-sankey i:nth-child(4) { background: #c45c26; opacity: 0.55; height: 4px; }

.chart-style-preview.is-gauge { align-items: flex-end; justify-content: center; }
.chart-style-preview.is-gauge i:nth-child(1),
.chart-style-preview.is-gauge i:nth-child(4) { display: none; }
.chart-style-preview.is-gauge i:nth-child(2),
.chart-style-preview.is-gauge i:nth-child(3) {
    height: 18px;
    width: 18px;
    border-radius: 18px 18px 0 0;
    align-self: flex-end;
}
.chart-style-preview.is-kpi i { height: 70%; width: 10px; }
.chart-style-preview.is-delta i:nth-child(4) { background: #10b981; }
.chart-style-preview.is-spark i { height: 4px; align-self: center; }
.chart-style-preview.is-spark i:nth-child(1) { transform: translateY(4px); }
.chart-style-preview.is-spark i:nth-child(2) { transform: translateY(-4px); }
.chart-style-preview.is-sema { gap: 4px; align-items: center; }
.chart-style-preview.is-sema i { width: 8px; height: 8px; border-radius: 50%; }
.chart-style-preview.is-sema i:nth-child(1) { background: #ef4444; }
.chart-style-preview.is-sema i:nth-child(2) { background: #f59e0b; }
.chart-style-preview.is-sema i:nth-child(3) { background: #10b981; }
.chart-style-preview.is-sema i:nth-child(4) { display: none; }
.chart-style-preview.is-goal { align-items: center; }
.chart-style-preview.is-goal i { height: 6px; border-radius: 99px; }
.chart-style-preview.is-rank,
.chart-style-preview.is-table,
.chart-style-preview.is-matrix { flex-direction: column; gap: 3px; }
.chart-style-preview.is-rank i,
.chart-style-preview.is-table i,
.chart-style-preview.is-matrix i { height: 5px; width: 100%; border-radius: 2px; }

.page-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0f6e6a;
    font-weight: 600;
}

.page-title {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
    color: #1a2a37;
    font-weight: 600;
}

.page-title.dash-board-title {
    font-size: 1.25rem;
}

.page-lead {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.9rem;
}

.soft-card {
    background: #fff;
    border: 1px solid #e8edf1;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.conn-card,
.list-card {
    padding: 1rem 1.05rem 0.9rem;
    display: flex;
    flex-direction: column;
    min-height: 168px;
}

.conn-card.is-active {
    border-color: #0f6e6a;
    box-shadow: 0 0 0 1px #0f6e6a;
}

.conn-card-top,
.list-card .pill {
    margin-bottom: 0.65rem;
}

.conn-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.conn-card h2,
.list-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.conn-card p,
.list-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    flex: 1;
}

.conn-card-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-top: 0.85rem;
}

.dash-entry {
    text-decoration: none;
    color: inherit;
}

.pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: #eef4f3;
    color: #0f6e6a;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-dot {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.status-ok { color: #15803d; }
.status-error { color: #b91c1c; }

.form-card {
    padding: 1.25rem 1.3rem 1.15rem;
    max-width: none;
}

.form-label {
    margin: 1.1rem 0 0.55rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.form-hint {
    margin: -0.25rem 0 0.7rem;
    color: #64748b;
    font-size: 0.85rem;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.logo-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid #e8edf1;
    border-radius: 10px;
    background: #f8fafb;
    padding: 4px;
}

.logo-preview.is-empty {
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.empty-panel {
    background: #fff;
    border: 1px solid #e8edf1;
    border-radius: 14px;
    padding: 1.6rem;
    max-width: 480px;
}

.empty-panel h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.empty-panel p {
    margin: 0 0 1rem;
    color: #64748b;
}

.empty-panel .page-actions {
    justify-content: flex-start;
}

.viz-kpi {
    --accent: #3b82f6;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
}

.viz-kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 16%, white);
    color: var(--accent);
    flex-shrink: 0;
}

.viz-kpi-value {
    font-size: 1.45rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #0f172a;
}

.viz-kpi-label {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.viz-kpi-delta {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

.viz-kpi-delta.is-up { color: #15803d; }
.viz-kpi-delta.is-down { color: #b91c1c; }

.viz-rank {
    list-style: none;
    margin: 0;
    padding: 0.55rem 1rem 0.75rem 0.9rem;
    overflow: auto;
    height: 100%;
    box-sizing: border-box;
}

.viz-rank li {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.48rem 0.15rem;
    border-bottom: 1px solid #f1f5f9;
}

.viz-rank li.is-live {
    cursor: pointer;
}

.viz-rank li.is-live:hover {
    background: #f8fafc;
}

.viz-kpi.is-live,
.dash-info.is-live {
    cursor: pointer;
}

.dash-table tr.is-live {
    cursor: pointer;
}

.viz-bar-row {
    appearance: none;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    color: inherit;
}

.viz-bar-row.is-live {
    cursor: pointer;
}

.viz-bar-row:disabled {
    cursor: default;
}

.viz-rank em {
    font-style: normal;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.viz-rank strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viz-rank small {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
}

.viz-rank b {
    font-size: 0.8rem;
    color: #334155;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-weight: 650;
    margin-left: 0.15rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.viz-bars {
    padding: 0.65rem 0.85rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: 100%;
    overflow: hidden;
}

.viz-bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: #475569;
    margin-bottom: 0.25rem;
    min-width: 0;
}

.viz-bar-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.viz-bar-track {
    height: 6px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

.viz-bar-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.viz-pair {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8rem;
    padding: 0.2rem 0;
    color: #64748b;
}

.viz-pair strong { color: #1e293b; }
.viz-note { margin: 0 0 0.5rem; color: #64748b; font-size: 0.82rem; }

.series-color-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.45rem;
    min-width: 0;
}

.series-color-row input[type="color"] {
    width: 36px;
    height: 28px;
    padding: 0;
    border: 1px solid #dde6e4;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.viz-kpi.is-grande .viz-kpi-value {
    font-size: 1.7rem;
}

.viz-kpi.is-spark {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42%;
    align-items: center;
    gap: 0.6rem;
}

.viz-spark {
    width: 100%;
    height: 32px;
    overflow: visible;
}

.viz-kpi.is-goal,
.viz-kpi.is-semaforo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2rem;
}

.viz-kpi-hint {
    margin-top: 0.15rem;
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}

.viz-goal-track {
    width: 100%;
    height: 7px;
    border-radius: 99px;
    background: #eef2f7;
    overflow: hidden;
    margin-top: 0.35rem;
}

.viz-goal-track i {
    display: block;
    height: 100%;
    background: var(--accent, #0f6e6a);
    border-radius: inherit;
}

.viz-semaforo {
    display: flex;
    gap: 0.28rem;
    margin-bottom: 0.2rem;
}

.viz-semaforo i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.22;
}

.viz-semaforo i.is-bad { background: #ef4444; }
.viz-semaforo i.is-warn { background: #f59e0b; }
.viz-semaforo i.is-ok { background: #16a34a; }
.viz-kpi.is-bad .viz-semaforo i.is-bad,
.viz-kpi.is-warn .viz-semaforo i.is-warn,
.viz-kpi.is-ok .viz-semaforo i.is-ok { opacity: 1; }

.viz-gauge {
    --accent: #0f6e6a;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.7rem 0.55rem;
    box-sizing: border-box;
}

.viz-gauge-dial {
    position: relative;
    width: min(100%, 180px);
}

.viz-gauge-dial svg {
    display: block;
    width: 100%;
    height: auto;
}

.viz-gauge-readout {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    text-align: center;
}

.viz-gauge-readout strong {
    display: block;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.1;
}

.viz-gauge-readout span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent, #0f6e6a);
}

.viz-gauge-meta {
    margin-top: 0.15rem;
    text-align: center;
}

.viz-funnel {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 0.6rem;
    box-sizing: border-box;
    overflow: auto;
}

.viz-funnel-step {
    appearance: none;
    border: 0;
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font: inherit;
    min-width: 28%;
    max-width: 100%;
}

.viz-funnel-step.is-live { cursor: pointer; }
.viz-funnel-step:disabled { cursor: default; }
.viz-funnel-step span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
}
.viz-funnel-step strong { font-size: 0.75rem; }

.viz-matrix {
    height: 100%;
    overflow: auto;
    padding: 0.15rem 0;
}

.viz-matrix table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.viz-matrix th,
.viz-matrix td {
    padding: 0.4rem 0.55rem;
    text-align: right;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

.viz-matrix thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #64748b;
    font-weight: 650;
    text-align: right;
}

.viz-matrix tbody th {
    text-align: left;
    color: #334155;
    font-weight: 600;
    position: sticky;
    left: 0;
    background: #fff;
}

.viz-matrix tr.is-live { cursor: pointer; }
.viz-matrix tr.is-live:hover td,
.viz-matrix tr.is-live:hover th { background: #f8fafc; }

.viz-gauge.is-live { cursor: pointer; }

.dash-widget.is-map .dash-widget-body,
.dash-widget.is-gantt .dash-widget-body {
    overflow: hidden;
}

.dash-widget-body .viz-chart.is-map {
    display: flex;
    flex-direction: column;
    position: relative;
}

.viz-map-host,
.viz-map-host.leaflet-container {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #e8eef2;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.viz-map-host.is-empty {
    display: none;
}

.viz-map-note {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 28px;
    z-index: 1000;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e8edf1;
    color: #475569;
    font-size: 0.72rem;
    line-height: 1.35;
    pointer-events: none;
}

.viz-gantt {
    height: 100%;
    overflow: auto;
    padding: 0.45rem 0.65rem 0.6rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.viz-gantt-axis {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    padding-bottom: 0.2rem;
}

.viz-gantt-axis-pad {
    flex: 0 0 28%;
    max-width: 9.5rem;
}

.viz-gantt-axis-track {
    flex: 1 1 auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #64748b;
    min-width: 0;
}

.viz-gantt-row {
    appearance: none;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: minmax(4.5rem, 28%) 1fr auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.12rem 0;
    font: inherit;
    text-align: left;
    color: inherit;
}

.viz-gantt-row.is-live { cursor: pointer; }
.viz-gantt-row:disabled { cursor: default; }
.viz-gantt-row.is-live:hover .viz-gantt-track { background: #eef2f6; }

.viz-gantt-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viz-gantt-track {
    position: relative;
    height: 16px;
    border-radius: 999px;
    background: #f1f5f9;
    min-width: 0;
}

.viz-gantt-track i {
    position: absolute;
    top: 2px;
    bottom: 2px;
    border-radius: 999px;
    min-width: 8px;
}

.viz-gantt-row small {
    font-size: 0.65rem;
    color: #64748b;
    white-space: nowrap;
}

.chart-style-preview.is-map,
.chart-style-preview.is-choro {
    align-items: stretch;
    justify-content: center;
}

.chart-style-preview.is-map i,
.chart-style-preview.is-choro i {
    border-radius: 50%;
    flex: 0 0 auto;
    width: 8px;
    height: 8px !important;
    margin: auto 2px;
}

.chart-style-preview.is-choro i:nth-child(1) { background: #dbeae8; }
.chart-style-preview.is-choro i:nth-child(2) { background: #7fb6b2; }
.chart-style-preview.is-choro i:nth-child(3) { background: #0f6e6a; }
.chart-style-preview.is-choro i:nth-child(4) { background: #0a4f4c; }

.chart-style-preview.is-gantt {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.chart-style-preview.is-gantt i {
    height: 6px !important;
    border-radius: 999px;
    width: 70%;
}

.chart-style-preview.is-gantt i:nth-child(1) { width: 55%; margin-left: 10%; }
.chart-style-preview.is-gantt i:nth-child(2) { width: 40%; margin-left: 30%; }
.chart-style-preview.is-gantt i:nth-child(3) { width: 48%; margin-left: 18%; }
.chart-style-preview.is-gantt i:nth-child(4) { display: none; }

.share-brand {
    font-weight: 650;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.share-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    background: #f4f7f8;
}

.share-badge {
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5a6870;
}

.dash-identity-toggle {
    margin: -0.35rem 0 0.75rem;
}

.dash-identity {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.15rem;
    padding-top: 0.7rem;
    border-top: 1px solid #e8edf1;
    color: #7b8790;
}

.dash-identity img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.dash-identity strong {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5a6870;
    letter-spacing: 0.01em;
}

.dash-identity em {
    display: block;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 450;
    color: #94a3b8;
    margin-top: 0.08rem;
}

.viz-kpi.is-alert {
    outline: 2px solid #b91c1c;
    outline-offset: -2px;
}

.log-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.log-toolbar .mud-input-control {
    min-width: 200px;
    flex: 1 1 200px;
    max-width: 280px;
}

.log-row {
    display: grid;
    grid-template-columns: 9.6rem minmax(0, 1fr) auto 4.2rem;
    gap: 0.55rem 1rem;
    align-items: start;
    padding: 0.75rem 1rem;
}

.log-row time {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: #5a6870;
    padding-top: 0.18rem;
}

.log-row h2 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.log-row p {
    margin: 0.18rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.log-ms {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: #5a6870;
    text-align: right;
    padding-top: 0.2rem;
}

.log-footnote {
    margin: 0.85rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

@media (max-width: 720px) {
    .log-row {
        grid-template-columns: 1fr auto 4.2rem;
    }

    .log-row time {
        grid-column: 1 / -1;
        padding-top: 0;
    }
}





