/* ── SummerNote под токены темы (как .editor в превью): рамка/тулбар/поле/дропдаун шаблонов ── */
.note-editor.note-frame {
    border: 1.5px solid var(--line-2);
    border-radius: var(--r-sm);
    box-shadow: none;
    background: var(--paper);
    font-family: var(--font-ui);
    overflow: hidden;
    margin-bottom: 0;
}
.note-editor.note-frame:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}
.note-editor .note-toolbar {
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    padding: 5px 6px;
}
.note-editor .note-btn-group .note-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-2);
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 13px;
    transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
    margin-left: 2px;
}
.note-editor .note-btn-group .note-btn:hover,
.note-editor .note-btn-group .note-btn.active {
    background: var(--surface-3);
    color: var(--ink);
}
.note-editor .note-editable {
    background: var(--paper);
    color: var(--ink);
    font-size: 13.5px;
    line-height: 1.55;
    padding: 12px 14px;
    min-height: 140px;
}
.note-editor .note-editable p { margin: 0 0 8px; }
.note-editor .note-editable table { border-collapse: collapse; width: 100%; margin: 2px 0 8px; }
.note-editor .note-editable td,
.note-editor .note-editable th { border: 1px solid var(--line-2); padding: 5px 8px; text-align: left; }
.note-editor .note-editable th { background: var(--surface-2); font-weight: 600; }
.note-editor .note-placeholder { color: var(--ink-3); padding: 12px 14px; }
.note-editor .note-statusbar { background: var(--surface-2); border-top: 1px solid var(--line); }
.note-editor .note-statusbar .note-resizebar .note-icon-bar { border-top-color: var(--line-2); }

/* выпадашка шаблонов (генерится плагином insertTemplate в summer-note.jsx) */
.template-dropdown {
    background: var(--surface) !important;
    border: 1.5px solid var(--line-2) !important;
    border-radius: var(--r-sm) !important;
    box-shadow: var(--shadow-md) !important;
    font-family: var(--font-ui);
    color: var(--ink);
}
.template-dropdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.template-dropdown__title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
}
.template-dropdown__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.template-dropdown__link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.template-dropdown__link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}
.template-dropdown__search {
    width: 100%;
    height: 34px;
    margin: 0 0 8px;
    padding: 7px 10px;
    font: inherit;
    font-size: 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1.5px solid var(--line-2);
    border-radius: var(--r-sm);
    outline: none;
}
.template-dropdown__search:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}
.template-dropdown__list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.template-dropdown .template-item {
    display: block;
    width: 100%;
    cursor: pointer;
    padding: 7px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    text-align: left;
    transition: background var(--motion-fast) var(--ease);
}
.template-dropdown .template-item:hover {
    background: var(--primary-tint);
    color: var(--primary-ink);
}
.template-dropdown__empty {
    padding: 10px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--ink-3);
    font-size: 12.5px;
}

.vetka-inv__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vetka-inv__table th {
    text-align: left;
    font-weight: 600;
    color: var(--ink-3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 7px 8px;
    border-bottom: 1.5px solid var(--line-2);
}
.vetka-inv__table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vetka-inv__table td.num { text-align: right; font-family: var(--font-mono); }
.vetka-inv__table td.act { text-align: center; width: 40px; }
.vetka-inv__del {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--ink-3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.vetka-inv__del:hover { background: var(--danger-tint); color: var(--danger); }
.vetka-inv__empty { padding: 16px 8px; text-align: center; color: var(--ink-3); font-size: 12.5px; }
.vetka-inv__total { display: flex; justify-content: flex-end; gap: 14px; align-items: baseline; margin-top: 12px; padding-top: 10px; border-top: 1.5px solid var(--line-2); }
.vetka-inv__total-k { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.vetka-inv__total-v { font-family: var(--font-mono); font-size: 17px; font-weight: 600; color: var(--primary-ink); }

@media (max-width: 900px) {
    .vetka-exam-layout { grid-template-columns: 1fr; }
    .vetka-exam-aside { position: static; }
    .vetka-exam-form .vf__grid { grid-template-columns: 1fr; }
    .vetka-card__b .vf__grid { grid-template-columns: 1fr; }
    .vetka-inv__add { grid-template-columns: 1fr; }
}

