:root {
    --bg: #f4f4ef;
    --surface: #fafaf6;
    --surface-soft: #f7f7f1;
    --surface-hover: #f0f2ec;

    --border: #dfe3db;
    --border-soft: #e7e9e3;

    --text: #242824;
    --text-soft: #62675f;
    --text-muted: #8a9086;

    --primary: #24372f;
    --primary-hover: #18271f;

    --accent-soft: #e3e9e0;

    --success-bg: #e4eee3;
    --success-text: #45604a;

    --warning-bg: #f2ead7;
    --warning-text: #7c642e;

    --error-bg: #f2dfdc;
    --error-text: #854d46;

    --neutral-bg: #e9ebe6;
    --neutral-text: #61665e;

    --sidebar-width: 220px;

    --radius-sm: 6px;
    --radius-md: 9px;
    --radius-lg: 12px;
}


* {
    box-sizing: border-box;
}


html {
    font-size: 16px;
}


body {
    margin: 0;
    font-family:
        Inter,
        Arial,
        sans-serif;
    background: var(--bg);
    color: var(--text);
}


a {
    color: inherit;
}


.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface-soft);
    border-right: 1px solid var(--border);
    padding: 22px 16px;
}


.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
    padding: 0 8px;
}


.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}


.brand-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}


.nav-section {
    margin-bottom: 25px;
}


.nav-label {
    padding: 0 10px;
    margin-bottom: 7px;
    font-size: 10px;
    color: #9a9e96;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


.nav-item {
    display: block;
    padding: 10px 11px;
    margin-bottom: 3px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13px;
}


.nav-item:hover {
    background: #eceee8;
    color: var(--text);
}


.nav-item.active {
    background: var(--accent-soft);
    color: var(--primary);
    font-weight: 600;
}


.content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}


.topbar {
    height: 62px;
    background: rgba(250, 250, 246, 0.94);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
}


.breadcrumb {
    font-size: 12px;
    color: #777c74;
}


.database-name {
    font-weight: 600;
    color: #30352f;
}


.top-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #777c74;
}


.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #718b76;
}


.page {
    padding: 34px;
}


.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}


.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
}


h1 {
    margin: 0;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 30px;
    font-weight: 500;
    color: var(--text);
}


h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
}


.subtitle {
    margin-top: 8px;
    color: #7b8078;
    font-size: 13px;
}


.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}


.button-primary {
    background: var(--primary);
    color: white;
}


.button-primary:hover {
    background: var(--primary-hover);
}


.button-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: #3d443d;
}


.button-secondary:hover {
    background: var(--surface-hover);
}


.grid {
    display: grid;
    grid-template-columns: repeat(
        4,
        minmax(0, 1fr)
    );
    gap: 12px;
    margin-bottom: 22px;
}


.metric {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 17px 18px;
}


.metric-label {
    font-size: 10px;
    letter-spacing: 0.07em;
    color: #8c9188;
    text-transform: uppercase;
    margin-bottom: 8px;
}


.metric-value {
    font-size: 24px;
    font-weight: 600;
    color: #272d28;
}


.metric-detail {
    margin-top: 5px;
    font-size: 11px;
    color: #92978f;
}


.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    overflow: hidden;
}


.panel-header {
    min-height: 54px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.panel-title {
    font-size: 13px;
    font-weight: 650;
    color: #303630;
}


.panel-subtitle {
    margin-top: 3px;
    font-size: 11px;
    color: #8c9188;
}


table {
    width: 100%;
    border-collapse: collapse;
}


th {
    padding: 10px 13px;
    text-align: left;
    background: #f4f5f0;
    border-bottom: 1px solid var(--border);
    color: #83887f;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}


td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 11px;
    vertical-align: top;
}


tbody tr:hover {
    background: #f7f8f3;
}


tbody tr:last-child td {
    border-bottom: none;
}


.tag {
    display: inline-block;
    padding: 5px 8px;
    background: var(--neutral-bg);
    color: #50564e;
    border-radius: 20px;
    margin: 2px 3px 2px 0;
    font-size: 10px;
}


.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    padding: 0 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}


.badge-success {
    background: var(--success-bg);
    color: var(--success-text);
}


.badge-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}


.badge-error {
    background: var(--error-bg);
    color: var(--error-text);
}


.badge-neutral {
    background: var(--neutral-bg);
    color: var(--neutral-text);
}


.empty-state {
    padding: 18px;
    color: #858a82;
    font-size: 12px;
}


.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
}


.drop-zone {
    display: flex;
    width: 100%;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    border: 1px dashed #bfc5bc;
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    background: #f8f8f3;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}


.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: #eef1ea;
}


.drop-title {
    font-size: 15px;
    font-weight: 600;
}


.drop-text {
    margin-top: 7px;
    font-size: 12px;
    color: #858a82;
}


.filename {
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}


.loading {
    display: none;
    margin-top: 24px;
}


.loading-text {
    margin-bottom: 9px;
    font-size: 12px;
    color: #656b63;
}


.progress {
    height: 6px;
    background: #e1e4de;
    border-radius: 10px;
    overflow: hidden;
}


.progress-bar {
    height: 100%;
    width: 35%;
    background: var(--primary);
    animation: loading 1.2s infinite ease-in-out;
}


@keyframes loading {

    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }

}


.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
}


.form-actions {
    margin-top: 22px;
}


.catalog {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(340px, 1fr)
    );
    gap: 16px;
}


.database-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: 0.15s ease;
}


.database-card:hover {
    background: #f8f9f4;
    border-color: #cfd5cc;
    transform: translateY(-1px);
}


.database-type {
    color: #858a82;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}


.database-card-name {
    margin-top: 8px;
    margin-bottom: 20px;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 19px;
    line-height: 1.35;
}


.card-stats {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    gap: 8px;
}


.card-stat {
    background: #f5f6f1;
    border-radius: var(--radius-sm);
    padding: 10px;
}


.card-stat-label {
    font-size: 9px;
    color: #8c9188;
    text-transform: uppercase;
}


.card-stat-value {
    margin-top: 5px;
    font-size: 13px;
    font-weight: 600;
}

.optimization-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 244, 238, 0.82);
    backdrop-filter: blur(2px);
}

.optimization-loading-overlay[hidden] {
    display: none;
}

.optimization-loading-card {
    width: min(420px, calc(100vw - 40px));
    padding: 28px;
    border: 1px solid #dde2da;
    border-radius: 10px;
    background: #fafaf6;
    text-align: center;
    box-shadow: 0 12px 35px rgba(37, 50, 42, 0.12);
}

.optimization-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 16px;
    border: 3px solid #dfe5dc;
    border-top-color: #607567;
    border-radius: 50%;
    animation: optimization-spin 0.8s linear infinite;
}

.optimization-loading-title {
    font-size: 14px;
    font-weight: 700;
    color: #34463c;
}

.optimization-loading-text {
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.5;
    color: #727b74;
}

.nav-item-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.nav-parent-chevron {
    margin-left: 10px;
    font-size: 14px;
    line-height: 1;
    color: #849087;
}


.nav-tree {
    position: relative;
    margin:
        2px
        0
        7px
        16px;
    padding:
        3px
        0
        3px
        14px;
    border-left: 1px solid #d6ddd5;
}


.nav-tree-item {
    position: relative;
    display: block;
    margin: 2px 0;
    padding:
        7px
        9px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 10px;
    line-height: 1.35;
    color: #707a72;
    transition:
        background 0.12s ease,
        color 0.12s ease;
}


.nav-tree-item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -15px;
    width: 10px;
    border-top: 1px solid #d6ddd5;
}


.nav-tree-item:hover {
    background: #f1f3ed;
    color: #405047;
}


.nav-tree-item.active {
    background: #e9efe7;
    color: #31483e;
    font-weight: 700;
}


.nav-tree-item.active::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -16px;
    width: 3px;
    height: 18px;
    border-radius: 3px;
    background: #6c8374;
    transform: translateY(-50%);
}

@keyframes optimization-spin {
    to {
        transform: rotate(360deg);
    }
}


@media (
    max-width: 1000px
) {

    .grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


@media (
    max-width: 720px
) {

    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 20px;
    }

}

/* -------------------------------------------------- */
/* Sourcing Insights                                  */
/* -------------------------------------------------- */

.insights-category-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(290px, 1fr)
        );
    gap: 22px;
}


.insights-category-card {
    min-height: 220px;
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            #fafaf6,
            #eef1e9
        );

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    text-decoration: none;
    color: inherit;

    transition:
        border-color 0.15s ease,
        transform 0.15s ease;
}


.insights-category-card:hover {
    border-color: #cbd3c8;
    transform: translateY(-1px);
}


.insights-category-name {
    margin-top: 7px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 29px;
    color: var(--primary);
}


.insights-card-stats {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 20px;

    padding-top: 18px;

    border-top:
        1px solid var(--border);
}


.insights-card-number {
    font-size: 20px;
    font-weight: 700;
}


.insights-card-link {
    margin-top: 20px;

    font-size: 12px;
    font-weight: 600;

    color: #385647;
}


.insight-featured-panel {
    border-color: #d5ddd2;
}


.insight-featured-content {
    padding: 26px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


.insight-featured-title {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 21px;

    color: var(--primary);
}


.insight-featured-text {
    max-width: 660px;

    margin-top: 8px;

    font-size: 12px;
    line-height: 1.6;

    color: var(--text-soft);
}


.insight-parameter-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(230px, 1fr)
        );

    gap: 12px;

    padding: 18px;
}


.insight-parameter-card {
    padding: 18px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--surface-soft);

    text-decoration: none;
    color: inherit;
}


.insight-parameter-card:hover {
    background: var(--surface-hover);
}


.insight-parameter-name {
    font-size: 14px;
    font-weight: 700;

    color: var(--primary);
}


.insight-parameter-type {
    margin-top: 5px;

    font-size: 10px;

    color: var(--text-muted);
}


.insight-config-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 18px;

    padding: 20px;
}


.insight-field label {
    display: block;

    margin-bottom: 7px;

    font-size: 10px;
    font-weight: 650;

    text-transform: uppercase;
    letter-spacing: 0.06em;

    color: #747c74;
}


.insight-field select {
    width: 100%;
    min-height: 43px;

    padding: 0 10px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: var(--surface);
}


.insight-benchmark-section {
    padding: 0 20px 20px;
}


.insight-section-title {
    font-size: 12px;
    font-weight: 700;

    color: #34423a;
}


.insight-section-help {
    max-width: 760px;

    margin-top: 5px;

    font-size: 11px;
    line-height: 1.5;

    color: var(--text-muted);
}


.insight-checkbox-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(190px, 1fr)
        );

    gap: 10px;

    margin-top: 14px;
}


.insight-checkbox {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: var(--surface-soft);

    cursor: pointer;
}


.insight-checkbox strong {
    display: block;

    font-size: 11px;
}


.insight-checkbox small {
    display: block;

    margin-top: 3px;

    font-size: 9px;

    color: var(--text-muted);
}


.insight-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 16px 20px;

    border-top: 1px solid var(--border-soft);
}


.insight-manual-model {
    display: flex;
    align-items: center;

    gap: 7px;

    font-size: 11px;

    color: var(--text-soft);
}


.insight-model-panel {
    border-color: #c7d2c4;
}


.insight-model-message {
    padding: 26px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;
}


.insight-model-list {
    display: grid;

    gap: 10px;

    padding: 18px;
}


.insight-model-choice {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 15px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--surface);

    text-align: left;

    cursor: pointer;
}


.insight-model-choice:hover {
    background: var(--surface-hover);
}


.insight-model-inputs {
    margin-top: 5px;

    font-size: 10px;

    color: var(--text-muted);
}


.insight-model-score {
    flex-shrink: 0;

    font-size: 12px;
    font-weight: 700;

    color: var(--primary);
}


.insight-model-summary {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 1px;

    background: var(--border-soft);
}


.insight-model-summary > div {
    padding: 18px;

    background: var(--surface);
}


.insight-summary-value {
    font-size: 14px;
    font-weight: 650;

    color: #303830;
}


.insight-results-table td {
    vertical-align: middle;
}


.insight-result-row {
    cursor: pointer;
}


.insight-performance-value {
    font-weight: 750;
}


.insight-performance-value.favorable {
    color: #42614a;
}


.insight-performance-value.unfavorable {
    color: #8a4e45;
}


.insight-cell-detail {
    margin-top: 3px;

    font-size: 9px;

    color: var(--text-muted);
}


.insight-detail-row {
    display: none;

    background: #f7f8f3;
}


.insight-detail-row.open {
    display: table-row;
}


.insight-detail-row:hover {
    background: #f7f8f3;
}


.insight-detail-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 1px;

    border: 1px solid var(--border-soft);
    border-radius: 7px;

    overflow: hidden;

    background: var(--border-soft);
}


.insight-detail-section {
    padding: 17px;

    background: var(--surface);
}


.insight-detail-title {
    margin-bottom: 12px;

    font-size: 10px;
    font-weight: 750;

    text-transform: uppercase;
    letter-spacing: 0.06em;

    color: #6c756e;
}


.insight-detail-metric {
    display: flex;
    justify-content: space-between;

    gap: 12px;

    padding: 6px 0;

    border-bottom:
        1px solid var(--border-soft);

    font-size: 10px;
}


.insight-detail-metric:last-child {
    border-bottom: none;
}


.insight-detail-metric span {
    color: var(--text-muted);
}


.insight-conclusion {
    font-size: 11px;
    line-height: 1.55;

    color: #455047;
}


.insight-interpretation-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 5px;

    margin-top: 14px;
}


.insight-error {
    padding: 16px 18px;

    color: var(--error-text);
}


@media (
    max-width: 1100px
) {

    .insight-detail-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .insight-model-summary {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


@media (
    max-width: 720px
) {

    .insight-config-grid,
    .insight-detail-grid,
    .insight-model-summary {
        grid-template-columns: 1fr;
    }


    .insight-featured-content,
    .insight-model-message,
    .insight-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

}

/* -------------------------------------------------- */
/* Persistent Insight Catalogue V2                    */
/* -------------------------------------------------- */

.insight-catalog-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(280px, 1fr)
        );
    gap: 22px;
    align-items: start;
}


.insight-category-tile {
    overflow: hidden;

    border: 1px solid #dfe3db;
    border-radius: 10px;

    background: #fafaf6;

    text-decoration: none;
    color: inherit;
}


.insight-category-image {
    height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #eef1e9,
            #e3e8df
        );

    font-size: 11px;
    color: #89918a;
}


.insight-category-footer {
    padding: 18px;
}


.insight-category-title {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 24px;
    color: #24372f;
}


.insight-analysis-count {
    margin-top: 7px;

    font-size: 11px;
    color: #747d76;
}


.insight-analysis-list,
.insight-target-list {
    display: grid;
    gap: 12px;
}


.insight-analysis-card,
.insight-target-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 20px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--surface);

    text-decoration: none;
    color: inherit;
}


.insight-analysis-card:hover,
.insight-target-card:hover {
    background: var(--surface-hover);
}


.insight-analysis-title,
.insight-target-title {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 20px;

    color: var(--primary);
}


.insight-analysis-targets,
.insight-target-meta {
    margin-top: 6px;

    font-size: 10px;
    color: var(--text-muted);
}


.insight-analysis-card-right {
    flex-shrink: 0;

    display: flex;
    align-items: center;

    gap: 18px;

    text-align: right;

    font-size: 10px;

    color: var(--text-muted);
}


.insight-update-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 0 14px;

    border: 1px solid #e2b9b1;
    border-radius: 6px;

    background: #f7dfda;

    color: #8b4037;

    font-size: 11px;
    font-weight: 800;

    text-decoration: none;
}


.insight-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 0 14px;

    border: 1px solid #d8ded5;
    border-radius: 6px;

    background: #eef1e9;

    color: #53695c;

    font-size: 11px;
    font-weight: 650;

    text-decoration: none;
}


.insight-header-actions {
    display: flex;
    align-items: center;

    gap: 8px;
}


.insight-common-settings {
    display: grid;

    grid-template-columns:
        minmax(130px, 0.6fr)
        minmax(250px, 1.4fr)
        minmax(250px, 1.4fr);

    gap: 24px;

    padding: 20px;
}


.insight-add-target-form {
    padding: 20px;

    display: grid;

    grid-template-columns:
        minmax(220px, 1fr)
        minmax(180px, 0.7fr)
        auto;

    gap: 12px;
}


.insight-add-target-form select {
    min-height: 40px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: var(--surface);

    padding: 0 10px;
}


.insight-filter-grid {
    padding: 18px;

    display: grid;

    gap: 8px;
}


.insight-filter-row {
    min-height: 44px;

    display: grid;

    grid-template-columns:
        minmax(160px, 0.7fr)
        90px
        minmax(180px, 1fr);

    gap: 10px;

    align-items: center;
}


.insight-filter-row select,
.insight-filter-row input,
.insight-field input {
    min-height: 38px;

    box-sizing: border-box;

    padding: 0 9px;

    border: 1px solid var(--border);
    border-radius: 6px;

    background: var(--surface);
}


.insight-update-notice {
    margin-bottom: 16px;

    padding: 14px 16px;

    border: 1px solid #e2b9b1;
    border-radius: 7px;

    background: #fbebe7;

    color: #75443d;

    font-size: 11px;
    line-height: 1.55;
}


@media (
    max-width: 850px
) {

    .insight-common-settings,
    .insight-add-target-form {
        grid-template-columns: 1fr;
    }


    .insight-filter-row {
        grid-template-columns: 1fr;
    }


    .insight-analysis-card {
        align-items: flex-start;
        flex-direction: column;
    }


    .insight-analysis-card-right {
        width: 100%;

        justify-content: space-between;

        text-align: left;
    }

}

.brand-mark {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.brand-icon {
    width: 28px;
    height: 28px;
}

/* Normal decision-tree structure */
.tree-branch {
    fill: none;
    stroke: #9ca3af;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Path selected / reinforced by the model */
.tree-path {
    fill: none;
    stroke: #006B3C;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tree-node {
    fill: white;
    stroke: #9ca3af;
    stroke-width: 1.7;
}

.tree-node-active {
    fill: #006B3C;
    stroke: #006B3C;
}

/* =====================================================
   BRAND / APPLICATION HEADER
   ===================================================== */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding:
        18px
        14px
        20px
        14px;
}


/* Remove previous icon background completely */
.brand-mark {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;
    margin: 0;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    overflow: visible;
}


.brand-icon {
    display: block;

    width: 42px;
    height: 42px;

    overflow: visible;
}


/* Normal tree structure */
.tree-branch {
    fill: none;

    stroke: #aab3ad;
    stroke-width: 1.7;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Active decision / prediction path */
.tree-path {
    fill: none;

    stroke: #006b3c;
    stroke-width: 2.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Normal nodes */
.tree-node {
    fill: #ffffff;

    stroke: #9da8a1;
    stroke-width: 1.7;
}


/* Nodes belonging to the prediction path */
.tree-node-active {
    fill: #006b3c;

    stroke: #006b3c;
    stroke-width: 1.7;
}


/* Brand text */
.brand-name {
    display: flex;
    flex-direction: column;

    min-width: 0;

    line-height: 1.15;
}


.brand-name-main {
    font-size: 14px;
    font-weight: 750;

    letter-spacing: 0.06em;

    color: #263c31;
}


.brand-name-sub {
    margin-top: 3px;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.12em;

    color: #718078;
}

.save-toast {
    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 1000;

    padding:
        10px
        14px;

    border:
        1px solid #cdd9cd;

    border-radius: 7px;

    background: #e4eee3;

    color: #45604a;

    font-size: 12px;
    font-weight: 700;

    box-shadow:
        0
        6px
        18px
        rgba(36, 55, 47, 0.10);

    opacity: 1;

    transform:
        translateY(0);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


.save-toast.hide {
    opacity: 0;

    transform:
        translateY(6px);

    pointer-events: none;
}

/* -------------------------------------------------- */
/* Shared sidebar tree navigation                     */
/* -------------------------------------------------- */

.setup-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.setup-chevron {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1;
    color: #718078;
}


.setup-tree {
    position: relative;

    margin:
        4px
        0
        7px
        22px;

    padding:
        3px
        0
        3px
        13px;
}


.setup-tree::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 1px;

    background: #d8ddd6;
}


.setup-tree-item {
    position: relative;

    box-sizing: border-box;

    display: flex;
    align-items: center;

    gap: 8px;

    width: 100%;

    margin: 2px 0;

    padding:
        7px
        9px;

    border-radius: 5px;

    text-decoration: none !important;

    font-size: 11px;
    line-height: 1.3;

    color: #68756d;

    transition:
        background 0.12s ease,
        color 0.12s ease;
}


.setup-tree-item:hover {
    background: #f0f2ed;

    color: #344b40;
}


.setup-tree-marker {
    width: 5px;
    height: 5px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #c4ccc5;
}


.setup-tree-item.active {
    background: #edf1e9;

    color: #2e483a;

    font-weight: 700;
}


.setup-tree-item.active
.setup-tree-marker {
    background: #587262;
}


.setup-tree-item.active::before {
    content: "";

    position: absolute;

    top: 50%;
    left: -14px;

    width: 3px;
    height: 20px;

    border-radius: 3px;

    background: #6f8878;

    transform: translateY(-50%);
}

/* -------------------------------------------------- */
/* Category contextual sidebar                        */
/* -------------------------------------------------- */

.category-sidebar-context {
    margin:
        0
        8px
        25px;
}


.category-sidebar-context
.context-back-link {
    display: block;

    margin-bottom: 25px;

    padding: 0;

    background: transparent;

    text-decoration: none;

    font-size: 12px;
    font-weight: 500;

    color: #55645c;
}


.category-sidebar-context
.context-back-link:hover {
    background: transparent;

    color: #24372f;
}


.category-context-label {
    margin-bottom: 6px;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: #919990;
}


.category-context-name {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 24px;

    line-height: 1.15;

    color: #24372f;
}


.category-management-section {
    margin-top: 0;
}


.category-parent {
    font-weight: 700;
}