.function-return-widget {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #c7d2fe;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.frw-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.frw-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.frw-label {
    display: inline-flex;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(91, 95, 168, 0.12);
    color: #4b4f9c;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
}

.frw-panel pre {
    margin: 0;
    padding: 1rem;
    border-radius: 16px;
    background: #0f172a;
    color: #e5e7eb;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.55;
}

.frw-variable-card {
    margin-top: 0.8rem;
    padding: 0.85rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: grid;
    gap: 0.3rem;
}

.frw-variable-card strong {
    color: #0f172a;
}

.frw-variable-card em {
    font-style: normal;
    font-weight: 900;
    color: #e6004f;
}

.frw-inputs {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding: 0.9rem;
    border-radius: 18px;
    background: white;
    border: 1px solid #e2e8f0;
}

.frw-inputs label {
    font-weight: 800;
    color: #334155;
}

.frw-inputs select {
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-weight: 700;
}

.frw-trace {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.frw-step-card {
    padding: 0.9rem;
    border-radius: 18px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    display: grid;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.frw-step-card strong {
    color: #334155;
}

.frw-step-card.active {
    transform: translateY(-3px);
    border-color: rgba(230, 0, 79, 0.35);
    background: #fff7ed;
    color: #7c2d12;
    box-shadow: 0 14px 28px rgba(230, 0, 79, 0.10);
}

.frw-step-card.done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.frw-output-box {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.frw-output-box span {
    display: inline-flex;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.8rem;
    font-weight: 800;
}

.frw-output-box h3 {
    margin: 0.55rem 0 0.25rem;
    color: #0f172a;
}

.frw-output-box p {
    margin: 0;
    color: #475569;
}

.frw-controls {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.frw-controls button {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    background: #0f172a;
    color: white;
    cursor: pointer;
    font-weight: 800;
    transition: all 0.2s ease;
}

.frw-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.frw-controls button:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
    box-shadow: none;
}
