.itfv3-prompts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #ffffff;
}

.itfv3-prompts__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.itfv3-prompts__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #1d2327;
}

.itfv3-prompts__new {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #2271b1;
    border-radius: 8px;
    background: #2271b1;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

.itfv3-prompts__new:hover {
    background: #135e96;
    border-color: #135e96;
}

.itfv3-prompts__toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 8px;
}

.itfv3-prompts__search,
.itfv3-prompts__sort,
.itfv3-prompts__input,
.itfv3-prompts__textarea,
.itfv3-prompts__select {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #ffffff;
    color: #1d2327;
    font-size: 13px;
    line-height: 1.4;
}

.itfv3-prompts__search,
.itfv3-prompts__sort,
.itfv3-prompts__input,
.itfv3-prompts__select {
    min-height: 36px;
}

.itfv3-prompts__textarea {
    resize: vertical;
    min-height: 100px;
}

.itfv3-prompts__search:focus,
.itfv3-prompts__sort:focus,
.itfv3-prompts__input:focus,
.itfv3-prompts__textarea:focus,
.itfv3-prompts__select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.itfv3-prompts__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #f6f7f7;
}

.itfv3-prompts__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
}

.itfv3-prompts__category-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 56px;
    gap: 8px;
    align-items: end;
}

.itfv3-prompts__field--add {
    justify-content: flex-end;
}

.itfv3-prompts__add-category {
    min-height: 36px;
    padding: 0;
    border: 1px solid #2271b1;
    border-radius: 8px;
    background: #2271b1;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

.itfv3-prompts__add-category:hover {
    background: #135e96;
    border-color: #135e96;
}

.itfv3-prompts__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.itfv3-prompts__save,
.itfv3-prompts__cancel,
.itfv3-prompts__item-button,
.itfv3-prompts__item-menu-toggle {
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #ffffff;
    color: #1d2327;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.2;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

.itfv3-prompts__save:hover,
.itfv3-prompts__cancel:hover,
.itfv3-prompts__item-button:hover,
.itfv3-prompts__item-menu-toggle:hover {
    background: #eef4fb;
    border-color: #2271b1;
}

.itfv3-prompts__save {
    border-color: #2271b1;
    background: #2271b1;
    color: #ffffff;
    font-weight: 600;
}

.itfv3-prompts__save:hover {
    background: #135e96;
    border-color: #135e96;
}

.itfv3-prompts__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow: auto;
}

.itfv3-prompts__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.itfv3-prompts__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #f6f7f7;
}

.itfv3-prompts__item-category {
    font-size: 11px;
    line-height: 1.2;
    color: #2271b1;
    font-weight: 700;
}

.itfv3-prompts__item-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: #1d2327;
    word-break: break-word;
}

.itfv3-prompts__item-excerpt {
    font-size: 12px;
    line-height: 1.35;
    color: #50575e;
    word-break: break-word;
}

.itfv3-prompts__item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.itfv3-prompts__item-button.is-primary {
    border-color: #2271b1;
    color: #2271b1;
    font-weight: 600;
}

.itfv3-prompts__item-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.itfv3-prompts__item-menu-toggle {
    min-width: 32px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
}

.itfv3-prompts__item-menu[hidden] {
    display: none !important;
}

.itfv3-prompts__item-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 132px;
    padding: 8px;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.itfv3-prompts__item-menu .itfv3-prompts__item-button {
    justify-content: flex-start;
    width: 100%;
}

.itfv3-prompts__item-button.is-danger:hover {
    background: #fff1f1;
    border-color: #d63638;
    color: #d63638;
}

@media (max-width: 960px) {
    .itfv3-prompts__toolbar {
        grid-template-columns: 1fr;
    }

    .itfv3-prompts__category-grid {
        grid-template-columns: 1fr;
    }
}

/* ITFV3_PROMPTS_DARK_HARMONY_START */
.itfv3-shell .itfv3-prompts {
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.96) 0%, rgba(15, 23, 42, 0.96) 100%);
    border-color: var(--itfv3-border, #23324a);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.04);
}

.itfv3-shell .itfv3-prompts__form,
.itfv3-shell .itfv3-prompts__list,
.itfv3-shell .itfv3-prompts__item,
.itfv3-shell .itfv3-prompts__item-menu {
    background: rgba(15, 23, 42, 0.92);
    border-color: var(--itfv3-border, #23324a);
    color: var(--itfv3-text, #e5e7eb);
}

.itfv3-shell .itfv3-prompts__field,
.itfv3-shell .itfv3-prompts__item-title {
    color: var(--itfv3-text, #e5e7eb);
}

.itfv3-shell .itfv3-prompts__item-excerpt {
    color: var(--itfv3-text-soft, #94a3b8);
}

.itfv3-shell .itfv3-prompts__item-category {
    color: var(--itfv3-accent, #38bdf8);
}

.itfv3-shell .itfv3-prompts__item-button,
.itfv3-shell .itfv3-prompts__item-menu-toggle {
    background: rgba(22, 32, 51, 0.88);
    border-color: var(--itfv3-border, #23324a);
    color: var(--itfv3-text, #e5e7eb);
}

.itfv3-shell .itfv3-prompts__item-button:hover,
.itfv3-shell .itfv3-prompts__item-menu-toggle:hover {
    background: #1d2940;
    border-color: var(--itfv3-accent, #38bdf8);
    color: #f8fafc;
}

.itfv3-shell .itfv3-prompts__item-button.is-primary {
    border-color: var(--itfv3-accent, #38bdf8);
    color: var(--itfv3-accent, #38bdf8);
}

.itfv3-shell .itfv3-prompts__item-button.is-danger:hover {
    background: rgba(127, 29, 29, 0.22);
    border-color: #ef4444;
    color: #fecaca;
}
/* ITFV3_PROMPTS_DARK_HARMONY_END */
