/* Schnellerfassung (6.7): the typing row sits at the foot of the table and stays in view while
   the table scrolls; its suggestion list opens upwards over the rows. */
#editor-content > .quick-entry {
  position: sticky;
  bottom: 0;
  left: 0;
  z-index: 6;
  background: var(--scs-warn-soft);
  border-top: 2px solid var(--scs-focus);
  padding: 8px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quick-entry.is-fresh {
  animation: quick-entry-fresh 0.6s ease;
}
@keyframes quick-entry-fresh {
  from {
    background: var(--scs-ok-soft);
  }
}
.quick-entry-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-entry-number {
  min-width: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--scs-ink-3);
  font-variant-numeric: tabular-nums;
}
.quick-entry-field {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
  max-width: 380px;
}
.quick-entry-field input {
  width: 100%;
  height: 34px;
  font-size: 13px;
  border: 1px solid var(--scs-focus);
  background: var(--scs-surface);
}
.quick-entry-field.is-resolved input {
  border-color: var(--scs-ok-line);
  background: var(--scs-ok-soft);
}
.quick-entry-arrow {
  color: var(--scs-ink-3);
  font-size: 15px;
}
.quick-entry-connect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--scs-ink-2);
  white-space: nowrap;
}
.quick-entry-done {
  margin-left: auto;
  font-size: 11px;
  padding: 6px 10px;
}
/* 6.8.3: the foot of the row carries the receipt of the last entry (left) and the keys (right).
   Nothing floats over the table any more: the rows just added stay readable. */
.quick-entry-foot {
  display: flex;
  align-items: center;
  gap: 4px 16px;
  flex-wrap: wrap;
  min-height: 22px;
  padding-left: 32px;
}
.quick-entry-keys {
  font-size: 10px;
  color: var(--scs-ink-3);
  margin-left: auto;
}
.quick-entry-foot > .quick-entry-keys:only-child {
  margin-left: 0;
}
.quick-entry-receipt {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--scs-ink-2);
}
.quick-entry-receipt-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: var(--scs-ok);
  background: var(--scs-ok-soft);
  box-shadow: inset 0 0 0 1px var(--scs-ok-line);
}
.quick-entry-receipt[data-tone='here'] .quick-entry-receipt-mark,
.quick-entry-receipt[data-tone='info'] .quick-entry-receipt-mark,
.quick-entry-receipt[data-tone='undo'] .quick-entry-receipt-mark {
  color: var(--scs-ink-2);
  background: var(--scs-surface);
  box-shadow: inset 0 0 0 1px var(--scs-line-strong);
}
.quick-entry-receipt-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:root .quick-entry-undo {
  flex: none;
  min-height: 0;
  height: auto;
  padding: 1px 3px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--scs-accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
html:root .quick-entry-undo:hover {
  color: var(--scs-ink);
}
.quick-entry-receipt .quick-entry-key {
  flex: none;
  color: var(--scs-ink-3);
}
.quick-entry.is-fresh .quick-entry-receipt-mark {
  animation: quick-entry-mark 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes quick-entry-mark {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
.quick-entry-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.quick-entry-pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  width: max(100%, 340px);
  max-width: min(440px, 80vw);
  max-height: 320px;
  overflow: auto;
  background: var(--scs-surface);
  border: 1px solid var(--scs-line-strong);
  border-radius: 9px;
  box-shadow: 0 -10px 34px rgba(16, 32, 44, 0.18);
  padding: 6px 0;
  z-index: 8;
}
.quick-entry-field[data-quick-field='to'] .quick-entry-pop {
  left: auto;
  right: 0;
}
.quick-entry-pop h4 {
  margin: 6px 12px 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--scs-ink-3);
}
.quick-entry-pop p {
  margin: 6px 12px;
  font-size: 12px;
  color: var(--scs-ink-3);
  line-height: 1.5;
}
.quick-entry-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12.5px;
}
.quick-entry-option:hover {
  background: var(--scs-row-hover);
}
.quick-entry-option.is-active {
  background: var(--scs-accent-soft);
}
.quick-entry-option.is-instance {
  padding-left: 30px;
}
.quick-entry-option.is-here .quick-entry-text b {
  font-weight: 500;
}
.quick-entry-glyph {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--scs-surface-3);
  color: var(--scs-ink-3);
  font-size: 12px;
}
.quick-entry-glyph img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.quick-entry-option.is-create .quick-entry-glyph {
  background: var(--scs-ok-soft);
  color: var(--scs-ok);
  font-weight: 700;
}
.quick-entry-text {
  flex: 1;
  min-width: 0;
}
.quick-entry-text b {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-entry-text small {
  display: block;
  font-size: 11px;
  color: var(--scs-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-entry-key {
  font-size: 10px;
}
.quick-entry-warn {
  margin: 4px 8px;
  padding: 7px 9px;
  border: 1px solid var(--scs-warn-line);
  background: var(--scs-warn-soft);
  color: var(--scs-warn);
  border-radius: 7px;
  font-size: 11.5px;
  line-height: 1.45;
}
tr.quick-entry-flash td {
  animation: quick-entry-flash 1.4s ease;
}
@keyframes quick-entry-flash {
  0%,
  40% {
    background: var(--scs-accent-soft);
    box-shadow: inset 0 0 0 1px var(--scs-focus);
  }
}
@media (prefers-reduced-motion: reduce) {
  .quick-entry.is-fresh,
  .quick-entry.is-fresh .quick-entry-receipt-mark,
  tr.quick-entry-flash td {
    animation: none;
  }
}
