.tf-lesson-flow-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--tf-blue), var(--tf-blue-2));
    color: #fff;
    border-radius: 24px;
    padding: 18px 20px;
    margin-bottom: 20px;
    overflow-x: auto;
    box-shadow: 0 16px 34px rgba(7,30,61,0.12);
}

.tf-flow-step {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    white-space: nowrap;
    font-weight: 850;
}

.tf-flow-step.active {
    background: rgba(255,122,0,0.20);
    color: #fff;
}

.tf-flow-step i {
    color: var(--tf-orange-2);
}

.tf-lessons-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tf-lesson-card {
    border: 1px solid var(--tf-border);
    background: #FBFDFF;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    box-shadow: 0 12px 26px rgba(7,30,61,0.04);
    transition: 0.18s ease;
}

.tf-lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(7,30,61,0.08);
}

.tf-lesson-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tf-lesson-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(255,122,0,0.12);
    color: var(--tf-orange);
    display: grid;
    place-items: center;
    font-size: 23px;
}

.tf-lesson-card h4 {
    color: var(--tf-blue);
    font-weight: 950;
    font-size: 18px;
    margin: 0 0 12px;
    line-height: 1.25;
}

.tf-lesson-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--tf-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.tf-lesson-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tf-lesson-meta i {
    color: var(--tf-orange);
    width: 16px;
}

.tf-lesson-card p {
    color: var(--tf-muted);
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 14px;
}

.tf-lesson-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    margin-bottom: 16px;
}

.tf-lesson-tags span {
    background: rgba(7,30,61,0.06);
    color: var(--tf-blue);
    padding: 7px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
}

.tf-lesson-tags i {
    color: var(--tf-orange);
    margin-right: 4px;
}

.tf-lesson-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--tf-border);
}

.tf-table-btn.approve:hover {
    background: rgba(16,185,129,0.12);
    color: #059669;
}

.tf-form-section-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255,122,0,0.10);
    color: var(--tf-orange);
    font-weight: 950;
    margin-bottom: 14px;
}

.tf-inline-create-form {
    border: 1px solid var(--tf-border);
    border-radius: 22px;
    padding: 18px;
    background: #FBFDFF;
}

.tf-detail-header {
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(7,30,61,0.08), rgba(255,122,0,0.08));
    padding: 22px;
    margin-bottom: 16px;
}

.tf-detail-header h3 {
    color: var(--tf-blue);
    font-weight: 950;
    margin: 12px 0 4px;
}

.tf-detail-header p {
    color: var(--tf-muted);
    margin: 0;
}

.tf-detail-section {
    border: 1px solid var(--tf-border);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 14px;
    background: #fff;
}

.tf-detail-section h4,
.tf-detail-related h4 {
    color: var(--tf-blue);
    font-weight: 950;
    font-size: 16px;
    margin-bottom: 10px;
}

.tf-detail-section h4 i,
.tf-detail-related h4 i {
    color: var(--tf-orange);
    margin-right: 7px;
}

.tf-detail-section p {
    white-space: pre-wrap;
    color: var(--tf-text);
    margin: 0;
    line-height: 1.65;
}

.tf-detail-related {
    border-radius: 22px;
    background: #F8FAFC;
    padding: 18px;
    margin-top: 16px;
}

.tf-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tf-related-item {
    border: 1px solid var(--tf-border);
    border-radius: 18px;
    background: #fff;
    padding: 15px;
}

.tf-related-item.with-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.tf-related-item strong {
    color: var(--tf-blue);
    font-weight: 950;
}

.tf-related-item p {
    color: var(--tf-text);
    margin: 5px 0;
    white-space: pre-wrap;
}

.tf-related-item small {
    color: var(--tf-muted);
    white-space: pre-wrap;
    display: block;
}

@media (max-width: 1250px) {
    .tf-lessons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .tf-related-item.with-actions {
        flex-direction: column;
    }
}
