/* ==========================================================
   AURUM private v2 — Phase 4.4
   Table workflow and productivity polish
   ========================================================== */

/* Новая строка после создания */
.aurum-table-card .account-row.is-new-account td {
  color: var(--aurum-text) !important;
  background:
    linear-gradient(
      90deg,
      rgba(215, 177, 91, .18),
      rgba(215, 177, 91, .055)
    ) !important;
  border-bottom-color: rgba(215, 177, 91, .3) !important;

  animation: aurum-new-account-row 2.8s ease both;
}

.aurum-table-card .account-row.is-new-account td:first-child {
  box-shadow:
    inset 3px 0 0 var(--aurum-gold-bright),
    -7px 0 22px rgba(215, 177, 91, .08);
}

@keyframes aurum-new-account-row {
  0% {
    filter: brightness(1.22);
  }

  55% {
    filter: brightness(1.08);
  }

  100% {
    filter: brightness(1);
  }
}

/* Клиентский live-search */
.aurum-table-card .account-row.is-live-search-hidden {
  display: none;
}

.aurum-live-search-empty {
  height: 150px;
  padding: 24px;

  display: none;
  place-items: center;

  color: var(--aurum-muted);
  background:
    radial-gradient(
      circle at center,
      rgba(215, 177, 91, .04),
      transparent 62%
    );

  font-size: 12px;
  text-align: center;
}

.aurum-live-search-empty.is-visible {
  display: grid;
}

/* Полезные цветовые маркеры */
.aurum-table-card .editable-cell.is-empty-value {
  color: color-mix(
    in srgb,
    var(--aurum-muted) 72%,
    transparent
  ) !important;
}

.aurum-table-card .editable-cell.is-negative-value {
  color: #ff9299 !important;
  background: rgba(239, 111, 118, .055) !important;
}

.aurum-table-card .editable-cell.is-positive-money {
  color: #8ce3ae !important;
}

.aurum-table-card .editable-cell.is-coupon-value {
  color: var(--aurum-gold-bright) !important;
  background: rgba(215, 177, 91, .045) !important;
}

/* Навигация клавиатурой */
.aurum-table-card .editable-cell.is-keyboard-target {
  position: relative;
  z-index: 4;

  color: var(--aurum-text) !important;
  background: rgba(215, 177, 91, .065) !important;
  box-shadow:
    inset 0 0 0 1px rgba(240, 204, 114, .36),
    0 0 0 3px rgba(215, 177, 91, .055) !important;
}

.aurum-table-card .editable-cell:focus-visible {
  outline: none !important;
}

/* Search becomes instant; submit button remains as fallback */
.aurum-table-search.is-live-search-ready
.aurum-table-search__submit {
  opacity: .72;
}

@media (prefers-reduced-motion: reduce) {
  .aurum-table-card .account-row.is-new-account td {
    animation: none;
  }
}



/* ==========================================================
   Перемещение строк без отдельной кнопки
   ========================================================== */

.aurum-table-card .accounts-table col.col-drag,
.aurum-table-card .drag-heading,
.aurum-table-card .drag-cell,
.aurum-table-card .drag-handle {
  display: none !important;
}

.aurum-table-card .account-row {
  touch-action: pan-x pan-y;
}

.aurum-table-card .account-row:not(.dragging) {
  cursor: grab;
}

.aurum-table-card
.account-row
.editable-cell[contenteditable="true"] {
  cursor: text;
}

body.aurum-row-reordering,
body.aurum-row-reordering * {
  cursor: grabbing !important;
  user-select: none !important;
}

.aurum-table-card .account-row.dragging {
  position: relative;
  z-index: 8;

  opacity: .72 !important;
  filter: brightness(1.12);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, .24),
    inset 3px 0 0 var(--aurum-gold);
}

.aurum-table-card .account-row.dragging td {
  color: var(--aurum-text) !important;
  background:
    linear-gradient(
      90deg,
      rgba(215, 177, 91, .13),
      rgba(215, 177, 91, .045)
    ) !important;
  border-bottom-color:
    rgba(215, 177, 91, .24) !important;
}

body.delete-mode .aurum-table-card .account-row {
  cursor: default;
}
