:root {
    --cs-bg: #f4f7fb;
    --cs-surface: #ffffff;
    --cs-border: #dfe6ee;
    --cs-text: #101828;
    --cs-muted: #667085;
    --cs-primary: #1769e0;
    --cs-primary-dark: #0f4eaa;
    --cs-teal: #0f9f8f;
    --cs-amber: #b7791f;
    --cs-rose: #c2415b;
}

body {
    background:
        linear-gradient(180deg, #eef4fb 0, var(--cs-bg) 260px);
    color: var(--cs-text);
}

.app-navbar {
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-brand {
    letter-spacing: 0;
}

.navbar .nav-link {
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    padding: 8px 10px;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.page-shell {
    padding-top: 28px;
    padding-bottom: 48px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-title {
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: 0;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--cs-muted);
    margin-bottom: 0;
}

.surface-card,
.card {
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
}

.card-header {
    border-bottom-color: var(--cs-border);
}

.metric-card {
    min-height: 118px;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--metric-accent, var(--cs-primary));
}

.metric-label {
    color: var(--cs-muted);
    font-size: 0.86rem;
    font-weight: 650;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.metric-note {
    color: var(--cs-muted);
    font-size: 0.83rem;
    margin-top: 8px;
}

.btn {
    border-radius: 8px;
    font-weight: 650;
}

.btn-primary {
    background: var(--cs-primary);
    border-color: var(--cs-primary);
}

.btn-primary:hover {
    background: var(--cs-primary-dark);
    border-color: var(--cs-primary-dark);
}

.form-control,
.form-select {
    min-height: 44px;
    border-radius: 8px;
}

.workflow-strip {
    margin-bottom: 22px;
}

.workflow-step {
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 14px;
}

.workflow-index {
    align-items: center;
    background: #e8f2ff;
    border-radius: 999px;
    color: var(--cs-primary-dark);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    margin-bottom: 10px;
    width: 28px;
}

.workflow-title {
    font-weight: 750;
    margin-bottom: 2px;
}

.workflow-copy {
    color: var(--cs-muted);
    font-size: 0.88rem;
    margin-bottom: 0;
}

.dataset-card {
    height: 100%;
}

.dataset-card__name {
    font-weight: 750;
    margin-bottom: 2px;
}

.dataset-card__meta {
    color: var(--cs-muted);
    font-size: 0.86rem;
}

.dataset-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0;
}

.insight-list {
    display: grid;
    gap: 10px;
}

.insight-item {
    border-left: 4px solid var(--cs-teal);
    background: #f8fbfd;
    border-radius: 8px;
    padding: 12px 14px;
}

.recommendation-list {
    display: grid;
    gap: 10px;
}

.recommendation-item {
    align-items: center;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 100px 1fr;
    padding: 12px;
}

.chart-type-badge {
    background: #e8f2ff;
    border-radius: 999px;
    color: var(--cs-primary-dark);
    display: inline-block;
    font-weight: 800;
    padding: 6px 10px;
    text-align: center;
    text-transform: capitalize;
}

.chart-frame {
    height: 300px;
}

.dataset-hero {
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
    padding: 22px;
}

.file-management-bar {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
}

.quality-score {
    align-items: center;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 999px;
    color: #067647;
    display: inline-flex;
    font-size: 1.25rem;
    font-weight: 800;
    min-height: 44px;
    padding: 6px 16px;
}

.quality-mini {
    background: #f8fbfd;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}

.quality-mini span,
.file-fact span {
    color: var(--cs-muted);
}

.dataset-tabs {
    gap: 8px;
}

.dataset-tabs .nav-link {
    border-radius: 8px;
    color: var(--cs-muted);
    font-weight: 700;
}

.dataset-tabs .nav-link.active {
    background: var(--cs-primary);
}

.column-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.column-card {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 16px;
}

.column-card__name {
    font-size: 1.05rem;
    font-weight: 800;
}

.column-card__stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.column-card__stats div,
.file-fact {
    background: #f8fbfd;
    border-radius: 8px;
    padding: 10px 12px;
}

.column-card__stats span,
.file-fact span {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 2px;
}

.column-card details summary {
    color: var(--cs-primary);
    cursor: pointer;
    font-weight: 700;
}

.compact-list {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.compact-list li {
    background: #f8fbfd;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
}

.compact-list span {
    color: var(--cs-muted);
    font-weight: 700;
}

.numeric-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.numeric-strip span {
    background: #eef4ff;
    border-radius: 999px;
    color: #344054;
    padding: 6px 10px;
}

.preview-table {
    max-height: 520px;
}

.preview-table thead th {
    background: #f8fbfd;
    position: sticky;
    top: 0;
    z-index: 1;
}

.cleaning-option-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cleaning-option {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    min-height: 112px;
    padding: 16px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.cleaning-option:hover {
    border-color: #b2ccff;
    box-shadow: 0 10px 24px rgba(23, 105, 224, 0.08);
    transform: translateY(-1px);
}

.cleaning-option .form-check-input {
    flex: 0 0 auto;
    height: 20px;
    margin-top: 2px;
    width: 20px;
}

.cleaning-option strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.cleaning-option small {
    color: var(--cs-muted);
    display: block;
    line-height: 1.45;
}

.cleaning-option--stacked {
    cursor: default;
    display: block;
}

.sticky-summary {
    position: sticky;
    top: 96px;
}

.cleaning-step-list {
    display: grid;
    gap: 12px;
}

.cleaning-step-list div {
    display: flex;
    gap: 10px;
}

.cleaning-step-list span {
    align-items: center;
    background: #e8f2ff;
    border-radius: 999px;
    color: var(--cs-primary-dark);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.cleaning-step-list p {
    margin-bottom: 0;
}

.safe-note {
    background: #fffaeb;
    border: 1px solid #fedf89;
    border-radius: 8px;
    color: #93370d;
    padding: 12px 14px;
}

.global-back-button {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
}

.analysis-guide {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-guide div {
    background: #f8fbfd;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 14px;
}

.analysis-guide p {
    color: var(--cs-muted);
    margin: 6px 0 0;
}

.analysis-column-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-column-card {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 16px;
}

.analysis-key-stat {
    background: #eef4ff;
    border-radius: 8px;
    padding: 12px;
}

.analysis-key-stat span {
    color: var(--cs-muted);
    display: block;
    font-size: 0.82rem;
    margin-bottom: 3px;
}

.feature-check-grid ul {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.feature-check-grid li label {
    align-items: center;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
}

.feature-check-grid input {
    height: 18px;
    width: 18px;
}

.dashboard-hero {
    background:
        linear-gradient(135deg, #ffffff 0%, #f7fbff 65%, #eef6ff 100%);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
    padding: 26px;
}

.dashboard-next-card {
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
    padding: 18px;
}

.dataset-work-card {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    height: 100%;
    padding: 16px;
}

.dataset-mini-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dataset-mini-stats div,
.activity-grid div {
    background: #f8fbfd;
    border-radius: 8px;
    padding: 10px 12px;
}

.dataset-mini-stats span,
.activity-grid span {
    color: var(--cs-muted);
    display: block;
    font-size: 0.82rem;
    margin-bottom: 3px;
}

.dashboard-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.simple-tool-list {
    display: grid;
    gap: 12px;
}

.simple-tool-list div {
    border-left: 4px solid var(--cs-primary);
    background: #f8fbfd;
    border-radius: 8px;
    padding: 12px 14px;
}

.simple-tool-list p {
    color: var(--cs-muted);
    margin: 4px 0 0;
}

.dashboard-insight-link {
    background: #f8fbfd;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    color: var(--cs-text);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
}

.dashboard-insight-link:hover {
    border-color: #b2ccff;
    color: var(--cs-primary-dark);
}

.activity-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-grid strong {
    font-size: 1.4rem;
}

.empty-state {
    background: #f8fbfd;
    border: 1px dashed var(--cs-border);
    border-radius: 8px;
    padding: 28px;
    text-align: center;
}

.insight-count-card {
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    min-height: 88px;
    padding: 18px;
}

.insight-count-card span {
    font-weight: 700;
}

.insight-count-card strong {
    font-size: 2rem;
    line-height: 1;
}

.insight-count-card--critical {
    background: #b42318;
}

.insight-count-card--warning {
    background: #b54708;
}

.insight-count-card--info {
    background: #026aa2;
}

.insight-count-card--recommendation {
    background: #175cd3;
}

.insight-card-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plain-insight-card {
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 16px;
}

.plain-insight-label {
    color: var(--cs-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.plain-insight-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0;
}

.plain-insight-section {
    background: #f8fbfd;
    border-radius: 8px;
    margin-top: 10px;
    padding: 10px 12px;
}

.plain-insight-section span {
    color: var(--cs-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.plain-insight-section p {
    margin-bottom: 0;
}

.password-help {
    padding: 12px 14px;
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    line-height: 1.5;
}

.password-help ul,
.form-error ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.password-help li + li,
.form-error li + li {
    margin-top: 4px;
}

@media (max-width: 991.98px) {
    .page-header {
        flex-direction: column;
    }

    .column-grid {
        grid-template-columns: 1fr;
    }

    .cleaning-option-grid {
        grid-template-columns: 1fr;
    }

    .analysis-guide,
    .analysis-column-grid {
        grid-template-columns: 1fr;
    }

    .feature-check-grid ul {
        grid-template-columns: 1fr;
    }

    .insight-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .file-management-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .dataset-actions .btn {
        flex: 1 1 auto;
    }
}

.business-result-chart {
    height: 340px;
    min-height: 260px;
    position: relative;
}

.relationship-map {
    display: grid;
    gap: 32px 72px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    min-height: 220px;
    padding: 28px;
    position: relative;
}

.relationship-map__lines {
    height: 100%;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    position: absolute;
    width: 100%;
    z-index: 0;
}

.relationship-map__lines line {
    stroke: #64748b;
    stroke-width: 2;
}

.relationship-map__lines marker path {
    fill: #64748b;
}

.relationship-node {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    display: grid;
    gap: 5px;
    min-height: 112px;
    padding: 14px;
    position: relative;
    z-index: 1;
}

.relationship-role-form {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
    margin-top: 6px;
}
.app-navbar .app-brand-logo {
    display: block;
    flex: 0 0 30px;
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: contain;
    border-radius: 6px;
    margin-right: 8px;
    background: #ffffff;
}

.app-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
}

/* 2026 product UI refresh */
:root {
    --cs-bg: #f6f8fb;
    --cs-bg-strong: #eef3f8;
    --cs-surface: #ffffff;
    --cs-surface-soft: #f8fafc;
    --cs-border: #e4e7ec;
    --cs-border-strong: #cfd7e3;
    --cs-text: #182230;
    --cs-muted: #667085;
    --cs-primary: #155eef;
    --cs-primary-dark: #004eeb;
    --cs-primary-soft: #eff4ff;
    --cs-teal: #0e9384;
    --cs-amber: #dc6803;
    --cs-rose: #d92d20;
    --cs-indigo: #444ce7;
    --cs-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --cs-shadow-md: 0 10px 24px rgba(16, 24, 40, 0.08);
    --cs-shadow-lg: 0 18px 42px rgba(16, 24, 40, 0.10);
    --cs-sidebar-width: 236px;
    --cs-sidebar-collapsed-width: 76px;
}

html {
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at top left, rgba(21, 94, 239, 0.08), transparent 340px),
        linear-gradient(180deg, #f9fbff 0, var(--cs-bg) 420px);
    color: var(--cs-text);
    font-feature-settings: "kern";
}

main {
    min-height: calc(100vh - 68px);
}

.app-navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid var(--cs-border);
    box-shadow: var(--cs-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(14px);
}

.app-navbar .navbar-brand {
    color: var(--cs-text) !important;
    font-size: 1.05rem;
    gap: 8px;
}

.app-navbar .app-brand-logo {
    background: var(--cs-primary-soft);
    box-shadow: inset 0 0 0 1px #d1e0ff;
    margin-right: 0;
}

.app-navbar .navbar-toggler {
    border-color: var(--cs-border);
}

.app-navbar .navbar-toggler-icon {
    filter: invert(1);
    opacity: 0.7;
}

.navbar .nav-link,
.app-navbar .btn.nav-link {
    color: #475467 !important;
    font-size: 0.92rem;
    font-weight: 700;
    min-height: 38px;
    padding: 8px 11px;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.app-navbar .btn.nav-link:hover {
    background: var(--cs-primary-soft);
    color: var(--cs-primary-dark) !important;
}

.language-switcher .form-select {
    border-color: var(--cs-border);
    font-size: 0.86rem;
    min-height: 36px;
}

.page-shell,
.container.py-4 {
    padding-top: 32px !important;
    padding-bottom: 56px !important;
}

.page-title,
.dashboard-hero .page-title {
    color: var(--cs-text);
    font-size: clamp(1.75rem, 2.2vw, 2.35rem);
    line-height: 1.12;
}

.page-subtitle {
    color: var(--cs-muted) !important;
    font-size: 1rem;
    max-width: 760px;
}

.card,
.surface-card,
.dataset-hero,
.dashboard-hero,
.dashboard-next-card,
.dataset-work-card,
.file-management-bar,
.workflow-step,
.column-card,
.analysis-column-card,
.plain-insight-card {
    border-color: var(--cs-border);
    box-shadow: var(--cs-shadow-sm);
}

.card,
.surface-card,
.dataset-hero,
.dashboard-hero,
.dashboard-next-card,
.dataset-work-card {
    overflow: hidden;
}

.card:hover,
.dataset-work-card:hover,
.column-card:hover {
    box-shadow: var(--cs-shadow-md);
}

.card-header {
    background: #ffffff !important;
    padding: 16px 18px;
}

.card-body {
    padding: 18px;
}

.dataset-hero,
.dashboard-hero {
    background:
        linear-gradient(135deg, #ffffff 0%, #ffffff 62%, #f3f7ff 100%);
    padding: 28px;
}

.dataset-hero::after,
.dashboard-hero::after {
    display: none;
}

.section-title {
    color: var(--cs-text);
    font-size: 1.03rem;
    letter-spacing: 0;
}

.btn {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 750;
    justify-content: center;
    min-height: 40px;
    padding: 8px 13px;
}

.btn-sm {
    min-height: 34px;
    padding: 6px 10px;
}

.btn-primary {
    box-shadow: 0 1px 2px rgba(21, 94, 239, 0.24);
}

.btn-outline-primary {
    background: #ffffff;
}

.btn-outline-secondary {
    background: #ffffff;
    border-color: var(--cs-border-strong);
    color: #344054;
}

.btn-outline-secondary:hover {
    background: var(--cs-surface-soft);
    color: var(--cs-text);
}

.dataset-actions,
.dashboard-action-row {
    align-items: center;
}

.form-control,
.form-select {
    border-color: var(--cs-border-strong);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #84adff;
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

.form-label {
    color: #344054;
    font-size: 0.9rem;
    font-weight: 750;
}

.table {
    --bs-table-bg: transparent;
    color: var(--cs-text);
}

.table thead th {
    background: var(--cs-surface-soft);
    border-bottom: 1px solid var(--cs-border);
    color: #344054;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 12px 14px;
    text-transform: uppercase;
}

.table tbody td {
    border-color: var(--cs-border);
    padding: 13px 14px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #fbfdff;
}

.table-toolbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--cs-border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    padding: 14px 16px;
}

.table-toolbar__search {
    flex: 1 1 260px;
    max-width: 420px;
}

.table-toolbar__filters {
    align-items: center;
    display: flex;
    flex: 2 1 420px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.table-toolbar .form-control,
.table-toolbar .form-select {
    min-height: 38px;
}

.table-toolbar .form-select {
    max-width: 190px;
}

.table-toolbar__count {
    color: var(--cs-muted);
    font-size: 0.84rem;
    font-weight: 750;
    white-space: nowrap;
}

.table-no-results td {
    color: var(--cs-muted);
    padding: 28px 16px !important;
    text-align: center;
}

.relationship-node strong,
.relationship-node span {
    display: block;
}

.relationship-node span {
    color: var(--cs-muted);
    font-size: 0.86rem;
    margin-top: 4px;
}

.metric-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    min-height: 126px;
}

.metric-card::before {
    width: 5px;
}

.metric-label {
    color: #667085;
    text-transform: none;
}

.metric-value {
    color: #111827;
    letter-spacing: 0;
}

.quality-score {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.quality-mini,
.file-fact,
.column-card__stats div,
.dataset-mini-stats div,
.activity-grid div,
.analysis-key-stat,
.plain-insight-section {
    background: var(--cs-surface-soft);
    border: 1px solid var(--cs-border);
}

.column-grid,
.analysis-column-grid,
.insight-card-grid {
    gap: 16px;
}

.compact-list li {
    background: var(--cs-surface-soft);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
}

.chart-frame {
    height: 340px;
    min-height: 280px;
}

.preview-table {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
}

.badge {
    border-radius: 999px;
    font-weight: 750;
    padding: 0.42em 0.7em;
}

.alert {
    border-radius: 8px;
    border-width: 1px;
}

.empty-state {
    background:
        linear-gradient(180deg, #ffffff, #f8fbff);
    border-color: var(--cs-border-strong);
}

.business-option {
    background: #ffffff;
    border-color: var(--cs-border) !important;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.business-option:hover {
    border-color: #84adff !important;
    box-shadow: var(--cs-shadow-md);
    transform: translateY(-1px);
}

.business-option input:checked + span,
.business-option:has(input:checked) span {
    color: var(--cs-primary-dark);
}

.business-filter-row {
    background: var(--cs-surface-soft);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 12px;
}

.flow-explainer {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.flow-explainer > div {
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    box-shadow: var(--cs-shadow-sm);
    min-height: 116px;
    padding: 16px;
}

.flow-explainer strong {
    color: var(--cs-text);
    display: block;
    font-size: 0.96rem;
    margin-bottom: 6px;
}

.flow-explainer p {
    color: var(--cs-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.global-back-button {
    border-color: var(--cs-border-strong);
    color: #475467;
}

pre {
    background: #0b1220;
    border-radius: 8px;
    color: #d7e2f0;
    padding: 14px;
    white-space: pre-wrap;
}

.business-flow-panel {
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    box-shadow: var(--cs-shadow-md);
    padding: 20px;
}

.business-flow-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--cs-border);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
}

.business-flow-head h2 {
    color: #101828;
    font-size: clamp(1.25rem, 1.7vw, 1.55rem);
    font-weight: 850;
    letter-spacing: 0;
    margin-bottom: 8px;
}

.workflow-stepper__phases {
    display: grid;
    gap: 18px;
}

.workflow-phase {
    min-width: 0;
}

.workflow-phase__title {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    margin: 0 0 9px;
    text-transform: uppercase;
}

.workflow-phase__steps {
    display: flex;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.workflow-stepper__item {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

.workflow-stepper__item.has-connector::after {
    background: #d0d5dd;
    content: "";
    height: 2px;
    position: absolute;
    right: -22px;
    top: 21px;
    width: 22px;
    z-index: 0;
}

.workflow-stepper__item.is-completed.has-connector::after {
    background: #75c69b;
}

.workflow-stepper__link {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    color: #344054;
    display: flex;
    gap: 9px;
    min-height: 44px;
    padding: 7px 9px;
    position: relative;
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    z-index: 1;
}

a.workflow-stepper__link:hover,
a.workflow-stepper__link:focus-visible {
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
    color: #175cd3;
    outline: none;
}

.workflow-stepper__marker {
    align-items: center;
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    border-radius: 50%;
    color: #475467;
    display: inline-flex;
    flex: 0 0 28px;
    font-size: 0.74rem;
    font-weight: 850;
    height: 28px;
    justify-content: center;
    line-height: 1;
}

.workflow-stepper__content {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.workflow-stepper__label {
    color: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.workflow-stepper__status {
    color: #667085;
    font-size: 0.68rem;
    line-height: 1.2;
}

.workflow-stepper__item.is-completed .workflow-stepper__link {
    border-color: #a6f4c5;
    color: #067647;
}

.workflow-stepper__item.is-completed .workflow-stepper__marker {
    background: #079455;
    border-color: #079455;
    color: #ffffff;
}

.workflow-stepper__item.is-completed .workflow-stepper__status {
    color: #067647;
}

.workflow-stepper__item.is-current .workflow-stepper__link {
    background: #eff4ff;
    border-color: #528bff;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1);
    color: #1849a9;
}

.workflow-stepper__item.is-current .workflow-stepper__marker {
    background: var(--cs-primary);
    border-color: var(--cs-primary);
    color: #ffffff;
}

.workflow-stepper__item.is-current .workflow-stepper__status {
    color: #175cd3;
    font-weight: 800;
}

.workflow-stepper__item.is-locked .workflow-stepper__link {
    background: #f9fafb;
    border-color: #eaecf0;
    color: #98a2b3;
    cursor: not-allowed;
}

.workflow-stepper__item.is-locked .workflow-stepper__marker {
    background: #f2f4f7;
    border-color: #eaecf0;
    color: #667085;
    font-size: 0.68rem;
}

.workflow-value {
    align-items: center;
    border-top: 1px solid var(--cs-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 18px;
    padding-top: 14px;
}

.workflow-tools {
    align-items: center;
    border-top: 1px solid var(--cs-border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
}

.workflow-tools__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workflow-value strong {
    color: #344054;
    font-size: 0.78rem;
}

.workflow-value ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.workflow-value li {
    background: #f2f4f7;
    border-radius: 999px;
    color: #475467;
    font-size: 0.7rem;
    padding: 3px 8px;
}

@media (max-width: 767.98px) {
    .workflow-phase {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .workflow-phase__steps {
        min-width: max-content;
    }

    .workflow-stepper__item {
        flex: 0 0 155px;
    }
}

@media (max-width: 575.98px) {
    .workflow-phase {
        overflow-x: visible;
    }

    .workflow-phase__steps {
        display: grid;
        gap: 10px;
        min-width: 0;
    }

    .workflow-stepper__item {
        min-width: 0;
    }

    .workflow-stepper__item.has-connector::after {
        bottom: -10px;
        height: 10px;
        left: 22px;
        right: auto;
        top: auto;
        width: 2px;
    }

    .workflow-value {
        align-items: flex-start;
        flex-direction: column;
    }
}

.business-flow-head p {
    color: #475467;
    font-size: 1rem;
    margin-bottom: 0;
}

.business-flow-grid {
    display: grid;
    gap: 44px 46px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: relative;
}

.flow-step {
    align-items: center;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 132px;
    padding: 22px 18px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition:
        box-shadow 0.16s ease,
        transform 0.16s ease,
        filter 0.16s ease;
}

.flow-step:hover {
    color: #ffffff;
    filter: brightness(1.03);
    box-shadow: var(--cs-shadow-lg);
    transform: translateY(-2px);
}

.flow-step strong {
    font-size: 1.06rem;
    font-weight: 850;
    margin-bottom: 22px;
}

.flow-step span {
    font-size: 0.9rem;
    line-height: 1.35;
}

.flow-step-disabled {
    opacity: 0.62;
}

.flow-step-1 {
    background: #2563eb;
}

.flow-step-2 {
    background: #0ea5b7;
}

.flow-step-3 {
    background: #14b8a6;
}

.flow-step-4 {
    background: #22c55e;
}

.flow-step-5 {
    background: #f59e0b;
}

.flow-step-6 {
    background: #8b5cf6;
}

.flow-step-7 {
    background: #ec4899;
}

.flow-step-8 {
    background: #7c3aed;
}

.flow-step-9 {
    background: #0ea5e9;
}

.flow-step-10 {
    background: #2563eb;
}

.flow-step-11 {
    background: #155eef;
}

.flow-step-1::after,
.flow-step-2::after,
.flow-step-4::after,
.flow-step-5::after,
.flow-step-7::after,
.flow-step-8::after {
    border-bottom: 10px solid transparent;
    border-left: 16px solid #101828;
    border-top: 10px solid transparent;
    content: "";
    position: absolute;
    right: -31px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.flow-step-3::after,
.flow-step-6::before,
.flow-step-9::after {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 16px solid #101828;
    content: "";
    position: absolute;
    z-index: 2;
}

.flow-step-3::after {
    bottom: -31px;
    left: 50%;
    transform: translateX(-50%);
}

.flow-step-6::before {
    bottom: -31px;
    left: 50%;
    transform: translateX(-50%);
}

.flow-step-9::after {
    bottom: -31px;
    left: 50%;
    transform: translateX(-50%);
}

.flow-step-4,
.flow-step-5,
.flow-step-6 {
    grid-row: 2;
}

.flow-step-4 {
    grid-column: 3;
}

.flow-step-5 {
    grid-column: 2;
}

.flow-step-6 {
    grid-column: 1;
}

.flow-step-4::after,
.flow-step-5::after,
.flow-step-10::after {
    border-left: 0;
    border-right: 16px solid #101828;
    left: -31px;
    right: auto;
}

.flow-step-7,
.flow-step-8,
.flow-step-9 {
    grid-row: 3;
}

.flow-step-10 {
    grid-column: 3;
    grid-row: 4;
}

.flow-step-11 {
    grid-column: 2;
    grid-row: 4;
}

.business-flow-value {
    align-items: center;
    background: #fbfdff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 22px;
    padding: 16px 18px;
}

.business-flow-value strong {
    color: #101828;
    margin-right: 2px;
}

.business-flow-value span {
    color: #475467;
}

.business-flow-value span:not(:last-child)::after {
    color: #98a2b3;
    content: "|";
    margin-left: 14px;
}

.dashboard-sidebar {
    --bs-offcanvas-width: var(--cs-sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--cs-border);
    box-shadow: var(--cs-shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 12px;
    position: fixed;
    top: 0;
    transition:
        padding 0.18s ease,
        width 0.18s ease;
    width: var(--cs-sidebar-width);
    z-index: 1040;
}

.dashboard-sidebar__header {
    align-items: center;
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
}

.dashboard-sidebar__brand {
    align-items: center;
    color: var(--cs-text);
    display: inline-flex;
    font-size: 1.1rem;
    font-weight: 850;
    gap: 10px;
    text-decoration: none;
}

.dashboard-sidebar__collapse {
    align-items: center;
    background: var(--cs-surface-soft);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    color: #475467;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.dashboard-sidebar__collapse::before {
    content: "<";
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.dashboard-sidebar__collapse:hover {
    background: var(--cs-primary-soft);
    color: var(--cs-primary-dark);
}

.dashboard-sidebar__brand:hover {
    color: var(--cs-primary-dark);
}

.dashboard-sidebar__brand .app-brand-logo {
    background: var(--cs-primary-soft);
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px #d1e0ff;
    object-fit: contain;
}

.dashboard-sidebar__section {
    border-top: 1px solid var(--cs-border);
    display: grid;
    gap: 6px;
    padding: 18px 0;
}

.dashboard-sidebar__scroll {
    flex: 0 0 auto;
    padding-right: 4px;
}

.dashboard-sidebar {
    scrollbar-gutter: stable;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 8px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: #cfd7e3;
    border-radius: 999px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-sidebar__label {
    color: #98a2b3;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    padding: 0 10px;
    text-transform: uppercase;
}

.dashboard-sidebar__link,
.dashboard-sidebar__profile {
    align-items: center;
    border-radius: 8px;
    color: #475467;
    display: flex;
    font-weight: 750;
    line-height: 1.25;
    min-height: 42px;
    padding: 10px 12px;
    text-decoration: none;
}

.dashboard-sidebar__subnav {
    display: grid;
    gap: 4px;
    margin-top: 2px;
    padding-left: 14px;
}

.dashboard-sidebar__link--sub {
    color: #5d6b82;
    font-size: 0.9rem;
    min-height: 36px;
    padding: 8px 10px;
    position: relative;
}

.dashboard-sidebar__link--sub::before {
    background: #cfd7e3;
    border-radius: 999px;
    content: "";
    height: 5px;
    left: -7px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
}

.dashboard-sidebar__link:hover,
.dashboard-sidebar__profile:hover {
    background: var(--cs-primary-soft);
    color: var(--cs-primary-dark);
}

.dashboard-sidebar__footer {
    border-top: 1px solid var(--cs-border);
    display: grid;
    flex: 0 0 auto;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.dashboard-sidebar__footer .language-switcher {
    width: 100%;
}

.dashboard-sidebar__footer .language-switcher .form-select {
    width: 100%;
}

.dashboard-sidebar__profile {
    background: var(--cs-surface-soft);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.dashboard-sidebar-toggle {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    box-shadow: var(--cs-shadow-md);
    display: none;
    flex-direction: column;
    gap: 4px;
    height: 42px;
    justify-content: center;
    left: 16px;
    position: fixed;
    top: 14px;
    width: 42px;
    z-index: 1050;
}

.dashboard-sidebar-toggle span {
    background: #344054;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 18px;
}

.dashboard-layout main {
    margin-left: var(--cs-sidebar-width);
    transition: margin-left 0.18s ease;
}

.dashboard-layout main > .container:first-child {
    max-width: 1220px;
}

.dashboard-layout.sidebar-collapsed main {
    margin-left: var(--cs-sidebar-collapsed-width);
}

.sidebar-collapsed .dashboard-sidebar {
    padding-left: 10px;
    padding-right: 10px;
    width: var(--cs-sidebar-collapsed-width);
}

.sidebar-collapsed .dashboard-sidebar__header {
    justify-content: center;
}

.sidebar-collapsed .dashboard-sidebar__brand span,
.sidebar-collapsed .dashboard-sidebar__label,
.sidebar-collapsed .dashboard-sidebar__scroll,
.sidebar-collapsed .dashboard-sidebar__footer {
    display: none;
}

.sidebar-collapsed .dashboard-sidebar__brand {
    gap: 0;
}

.sidebar-collapsed .dashboard-sidebar__collapse {
    position: absolute;
    right: -17px;
    top: 18px;
}

.sidebar-collapsed .dashboard-sidebar__collapse::before {
    content: ">";
}

.sidebar-collapsed .dashboard-sidebar__section {
    padding: 14px 0;
}

.sidebar-collapsed .dashboard-sidebar__link {
    font-size: 0;
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

.sidebar-collapsed .dashboard-sidebar__link::before {
    content: attr(data-short);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1280px;
    }
}

@media (max-width: 991.98px) {
    .dashboard-sidebar {
        height: 100%;
        position: fixed;
        width: var(--bs-offcanvas-width);
    }

    .dashboard-sidebar-toggle {
        display: inline-flex;
    }

    .dashboard-layout main {
        margin-left: 0;
        padding-top: 54px;
    }

    .dashboard-layout.sidebar-collapsed main {
        margin-left: 0;
    }

    .sidebar-collapsed .dashboard-sidebar {
        padding: 18px 16px;
        width: var(--bs-offcanvas-width);
    }

    .sidebar-collapsed .dashboard-sidebar__header {
        justify-content: space-between;
    }

    .sidebar-collapsed .dashboard-sidebar__brand span,
    .sidebar-collapsed .dashboard-sidebar__label {
        display: initial;
    }

    .sidebar-collapsed .dashboard-sidebar__footer {
        display: grid;
    }

    .sidebar-collapsed .dashboard-sidebar__scroll {
        display: block;
    }

    .sidebar-collapsed .dashboard-sidebar__link {
        font-size: 0.92rem;
        justify-content: flex-start;
        padding: 10px 12px;
    }

    .sidebar-collapsed .dashboard-sidebar__link::before {
        content: none;
    }

    .chart-frame {
        height: 300px;
    }

    .dataset-hero,
    .dashboard-hero {
        padding: 22px;
    }

    .business-flow-grid {
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .flow-step,
    .flow-step-4,
    .flow-step-5,
    .flow-step-6,
    .flow-step-7,
    .flow-step-8,
    .flow-step-9,
    .flow-step-10,
    .flow-step-11 {
        grid-column: auto;
        grid-row: auto;
        min-height: 98px;
    }

    .flow-step::after,
    .flow-step::before {
        display: none;
    }

    .business-flow-panel {
        padding: 20px;
    }

    .business-flow-head {
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .page-title {
        font-size: 1.55rem;
    }

    .dataset-actions,
    .dashboard-action-row {
        width: 100%;
    }

    .dataset-actions .btn,
    .dashboard-action-row .btn,
    .dataset-actions form,
    .dashboard-action-row form {
        width: 100%;
    }

    .dataset-actions form .btn,
    .dashboard-action-row form .btn {
        width: 100%;
    }

    .card-body {
        padding: 15px;
    }
}
.dataset-context-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    align-items: center;
    padding: .75rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: var(--bs-body-bg);
    font-size: .875rem;
}

.workflow-progress {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .25rem 0 .75rem;
}

.workflow-progress__step {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
    padding: .45rem .65rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: .82rem;
}

.workflow-progress__step.is-complete { color: var(--bs-success); border-color: var(--bs-success); }
.workflow-progress__step.is-current { color: #fff; background: var(--bs-primary); border-color: var(--bs-primary); }
