.flow-template-catalogue {
    --ftc-accent: var(--ast-global-color-1, #432cf3);
    --ftc-accent-soft: #f4f0ff;
    --ftc-green: var(--ast-global-color-2, #2ad590);
    --ftc-border: #e4e7ec;
    --ftc-muted: #667085;
    --ftc-text: #0c1523;
    --ftc-card-shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 8px 24px rgba(16, 24, 40, 0.04);
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px 72px;
    font-size: 15px;
    color: var(--ftc-text);
}

.flow-template-catalogue-outcomes {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
    margin: 28px 0 20px;
}

.flow-template-outcome-tab {
    appearance: none;
    border: 1px solid var(--ftc-border);
    background: #fff;
    border-radius: 12px;
    padding: 16px 10px;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ftc-text);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.flow-template-outcome-tab i {
    font-size: 1.1rem;
    color: #98a2b3;
}

.flow-template-outcome-tab.is-active {
    border-color: var(--ftc-green);
    box-shadow: inset 0 0 0 1px var(--ftc-green);
    color: var(--ftc-text);
    background: #f6fffb;
}

.flow-template-outcome-tab.is-active i {
    color: var(--ftc-green);
}

.flow-template-outcome-tab:hover:not(.is-active) {
    border-color: #c7d0dd;
}

.flow-template-chips-heading {
    margin: 0 0 6px;
}

.flow-template-chips-title {
    margin: 0 !important;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ftc-muted);
    line-height: 1.2;
}

.flow-template-chips-note {
    margin: 2px 0 0 !important;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 400;
    font-style: italic;
    color: #98a2b3;
    line-height: 1.2;
}

.flow-template-catalogue-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 0;
}

.flow-template-data-chip {
    appearance: none;
    border: 1px solid var(--ftc-border);
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.flow-template-data-chip i {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
}

.flow-template-data-chip-customers i { background: #f4ebff; color: #7f56d9; }
.flow-template-data-chip-products i { background: #ecfdf3; color: #039855; }
.flow-template-data-chip-transactions i { background: #eff8ff; color: #1570ef; }
.flow-template-data-chip-reports i { background: #fdf2fa; color: #c11574; }
.flow-template-data-chip-stock i { background: #fff6ed; color: #ec6b13; }
.flow-template-data-chip-staff i { background: #f0f9ff; color: #0e7490; }
.flow-template-data-chip-suppliers i { background: #eef4ff; color: #444ce7; }
.flow-template-data-chip-locations i { background: #f0fdfa; color: #0d9488; }

.flow-template-data-chip.is-active {
    border-color: var(--ftc-accent);
    background: var(--ftc-accent-soft);
    color: var(--ftc-accent);
}

.flow-template-data-chip-show-all {
    background: transparent;
    border: none;
    color: var(--ftc-accent);
    text-decoration: underline;
    padding-left: 2px;
    font-size: 0.82rem;
}

.flow-template-data-chip-show-all i {
    display: none;
}

.flow-template-catalogue-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.flow-template-search {
    position: relative;
    display: block;
}

.flow-template-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 0.9rem;
}

.flow-template-search input,
.flow-template-filter-select {
    width: 100%;
    border: 1px solid var(--ftc-border);
    border-radius: 10px;
    background: #fff;
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.78rem;
    color: var(--ftc-text);
}

.flow-template-search input {
    padding-left: 38px;
}

.flow-template-search input::placeholder {
    color: #98a2b3;
}

.flow-template-catalogue-active {
    margin-bottom: 20px;
}

.flow-template-active-filters {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    background: var(--ftc-accent-soft);
    border: 1px solid #e9d7fe;
    padding: 10px 12px;
    border-radius: 10px;
}

.flow-template-active-filters.is-visible {
    display: flex;
}

.flow-template-active-label,
.flow-template-result-count {
    color: var(--ftc-muted);
    margin: 0;
    font-size: 0.84rem;
}

.flow-template-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.flow-template-active-chip {
    appearance: none;
    border: none;
    background: var(--ftc-accent-soft);
    color: var(--ftc-accent);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
}

.flow-template-clear-filters {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--ftc-accent);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.82rem;
    margin-left: 4px;
}

.flow-template-results-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.flow-template-sort-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ftc-muted);
    font-size: 0.84rem;
}

.flow-template-sort-label .flow-template-filter-select {
    min-height: 36px;
    width: auto;
    min-width: 120px;
}

.flow-template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 28px;
    align-items: stretch;
}

.flow-template-card {
    background: #fff;
    border: 1px solid var(--ftc-border);
    border-radius: 14px;
    box-shadow: var(--ftc-card-shadow);
    padding: 32px;
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    height: 100%;
    min-height: 300px;
}

.flow-template-card.is-filter-hidden,
.flow-template-card.is-load-more-hidden {
    display: none;
}

.flow-template-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 0;
}

.flow-template-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.flow-template-badge-platform {
    background: #eff8ff;
    color: #175cd3;
}

.flow-template-badge-outcome {
    background: #ecfdf3;
    color: #027a48;
}

.flow-template-badge-outcome.is-alert {
    background: #fff6ed;
    color: #c4320a;
}

.flow-template-badge-outcome.is-update {
    background: #eef4ff;
    color: #3538cd;
}

.flow-template-badge-outcome.is-delete {
    background: #fef3f2;
    color: #b42318;
}

.flow-template-badge-outcome.is-integration {
    background: #f4ebff;
    color: #6941c6;
}

.flow-template-badge-outcome.is-build {
    background: #f2f4f7;
    color: #475467;
}

.flow-template-badge-data {
    background: #f4ebff;
    color: #6941c6;
}

.flow-template-card-title {
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.35;
    margin: 0;
    color: var(--ftc-text);
}

.flow-template-card-description {
    color: var(--ftc-muted);
    font-size: 0.76rem;
    line-height: 1.5;
    margin: 0;
}

.flow-template-card-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #475467;
}

.flow-template-card-meta-item {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 8px;
    align-items: start;
}

.flow-template-card-meta-item i {
    color: #98a2b3;
    margin-top: 2px;
    font-size: 0.7rem;
    width: 14px;
    text-align: center;
}

.flow-template-card-meta-item strong {
    font-weight: 600;
    color: #344054;
}

.flow-template-card-link {
    color: #175cd3;
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1;
    text-decoration: none !important;
    margin-top: auto;
    padding: 7px 50px;
    text-align: center;
    display: inline-block;
    align-self: center;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.flow-template-card-link:hover,
.flow-template-card-link:focus,
.flow-template-card-link:active {
    text-decoration: none !important;
    color: #1448a8;
    background: rgba(23, 92, 211, 0.06);
}

.flow-template-load-more-wrap {
    text-align: center;
    margin: 0 0 40px;
}

.flow-template-load-more {
    appearance: none;
    border: 2px solid var(--ftc-accent);
    background: var(--ftc-accent-soft);
    border-radius: 999px;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ftc-accent);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.flow-template-load-more:hover {
    background: var(--ftc-accent);
    color: #fff;
}

.flow-template-load-more i {
    margin-left: 4px;
    font-size: 0.75rem;
}

.flow-template-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    background: #f8f9fc;
    border-radius: 14px;
    padding: 24px 20px;
}

.flow-template-benefit i {
    color: #175cd3;
    font-size: 1rem;
    margin-bottom: 8px;
}

.flow-template-benefit h4 {
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ftc-text);
}

.flow-template-benefit p {
    margin: 0;
    color: var(--ftc-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .flow-template-catalogue-outcomes {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .flow-template-catalogue-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .flow-template-catalogue-toolbar .flow-template-search {
        grid-column: 1 / -1;
    }

    .flow-template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .flow-template-catalogue {
        padding: 0 16px 56px;
    }

    .flow-template-catalogue-outcomes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flow-template-catalogue-toolbar,
    .flow-template-benefits {
        grid-template-columns: 1fr;
    }

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

    .flow-template-results-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
