.tgctx {
    position: absolute; top: 8px; right: 8px; z-index: 50;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.tgctx__btn {
    width: 34px; height: 34px; border: 0; border-radius: 8px;
    background: rgba(0,0,0,.05); cursor: pointer; display: grid; place-items: center;
}
.tgctx__btn svg circle {
    fill: #7d7f81;
}
.tgctx__btn:hover { background: rgba(0,0,0,.08); }
.tgctx__menu {
    position: absolute; top: 40px; right: 0; min-width: 240px; display: none;
    background: #fff; border: 1px solid rgba(0,0,0,.12); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.12);
    color: var(--text-color);
    background: var(--box-bg);
    padding: 6px;
}
.tgctx__menu.open { display: block; }
.tgctx__item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left;
}
.tgctx__item:hover { background: rgba(178, 178, 178, 0.6); }
.tgctx__item--danger { color: #c62828; }

/* === MODAL === */
.tgmodal__backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.38); display: none; z-index: 100;
}
.tgmodal__backdrop.open { display: block; }
.tgmodal {
    position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 100;
}
.tgmodal__card {
    pointer-events: auto; width: min(560px, 92vw); background: #fff; border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,.18); border: 1px solid rgba(0,0,0,.08);
    color: var(--text-color);
    background: var(--box-bg);
}
.tgmodal__head { padding: 16px 18px; border-bottom: 1px solid rgba(0,0,0,.08); font-weight: 600; }
.tgmodal__body { padding: 16px 18px; }
.tgmodal__grid { display: grid; gap: 8px; }
.tgmodal__foot { padding: 14px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid rgba(0,0,0,.08); }
.tgbtn { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(0,0,0,.12); cursor: pointer; }
.tgbtn--primary { background: #0b57d0; color: #fff; border-color: #0b57d0; }
.tginput { width: 100%; min-height: 80px; padding: 10px; border-radius: 10px; border: 1px solid rgba(0,0,0,.18); resize: vertical; }
.tgcheck {
    display: flex; align-items: center; gap: 8px;
    font-weight: normal;
}
.tgcheck input[type="checkbox"] {
    margin-top: 0;
}