/* Match the supplied operations reference without changing the editor or data. */
.operations-screen {
  --operations-panel-color: #1c1c1e;
  --operations-secondary-text: #97999e;
  --operations-blue: #438bfa;
  --operations-income: #0fb63e;
}

.operations-screen .operations-panel,
.operations-screen .operations-header {
  background-color: var(--operations-panel-color);
}

.operations-screen .operations-back-panel {
  background-color: #232325;
}

.operations-screen .operations-panel {
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.operations-screen .operations-close {
  /* The restored bundle originally supplies this color as an inline style. */
  color: var(--operations-blue) !important;
}

.operations-screen .operations-header [role="status"][aria-label="История синхронизирована"] {
  /* Keep the header space and accessible live status; show all non-idle states. */
  opacity: 0;
}

.operations-screen .transaction-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.operations-screen .transaction-amount {
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}

.operations-screen .transaction-amount--income,
.operations-screen .transaction-amount.text-\[\#00ad30\] {
  color: var(--operations-income);
}

.operations-screen .transaction-category,
.operations-screen .transaction-account {
  color: var(--operations-secondary-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}

.operations-screen .operations-filters .filter-chip-active {
  background-color: var(--operations-blue);
}

.operations-screen .operations-filters .filter-chip-inactive {
  background-color: #343434;
}

.operations-screen .operations-add-filter {
  /* Preserve the existing button and behavior, replacing its inline blue tint. */
  background-color: #343434 !important;
}

.operations-screen .summary-card {
  background-color: #2c2c2e;
}

@media (max-width: 767px) {
  .operations-screen .operations-header {
    padding: 16px 18px 5.5px;
  }

  .operations-screen .operations-header > div {
    position: relative;
  }

  .operations-screen .operations-header h1 {
    position: absolute;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
    font-size: 15px;
    line-height: 22.5px;
    pointer-events: none;
  }

  .operations-screen .operations-gutter {
    padding-left: 14.5px;
    padding-right: 14.5px;
  }

  .operations-screen .operations-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  .operations-screen .operations-search input,
  .operations-screen input.operations-search {
    height: 33px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 21px;
  }

  .operations-screen .operations-filters {
    gap: 9px;
    min-height: 27px;
    margin-top: 17px;
    margin-bottom: 18px;
  }

  .operations-screen .operations-filters .filter-chip {
    height: 27px;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 12px;
    line-height: 18px;
    font-weight: 500;
  }

  .operations-screen .operations-add-filter {
    width: 27px;
    height: 27px;
    flex-shrink: 0;
  }

  .operations-screen .operations-summary {
    gap: 18px;
  }

  .operations-screen .summary-card {
    min-width: 0;
    height: 112px;
    padding: 18px;
    border-radius: 25px;
    justify-content: space-between;
    gap: 0;
  }

  .operations-screen .summary-card > :first-child {
    gap: 0;
  }

  .operations-screen .summary-amount {
    font-size: 18px;
    line-height: 22px;
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  .operations-screen .summary-label {
    font-size: 16px;
    line-height: 22px;
    font-weight: 400;
  }

  .operations-screen .summary-track {
    height: 12px;
    flex-shrink: 0;
  }

  .operations-screen .operations-history {
    margin-top: 27px;
  }

  .operations-screen .history-heading {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 27px;
    font-weight: 700;
  }

  .operations-screen .transaction-item {
    min-height: 72.5px;
    padding-top: 0;
    padding-bottom: 0;
    gap: 14.5px;
  }

  .operations-screen .transaction-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .operations-screen .transaction-copy {
    min-width: 0;
  }

  .operations-screen .transaction-values {
    flex-shrink: 0;
    text-align: right;
  }
}

@media (max-width: 359px) {
  .operations-screen .summary-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .operations-screen .summary-amount {
    font-size: 16px;
  }

  .operations-screen .summary-label {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .operations-screen .transaction-item {
    animation: none !important;
    opacity: 1;
  }
}

/* Keep the first group's established offset; separate subsequent day groups. */
.operations-screen .history-section + .history-section {
  margin-top: 16px;
}

/* Size installed screens from the containing viewport; keep scrolling inside. */
@media (display-mode: standalone) {
  html,
  body,
  #root {
    height: 100%;
    min-height: 0;
    background-color: #1c1c1e;
  }

  #root > .h-screen,
  #root > .h-\[100dvh\] {
    height: 100%;
    min-height: 0;
  }

  .operations-screen .operations-panel {
    min-height: 0;
  }

  .operations-screen .operations-scroll {
    flex: 1 1 0%;
    height: auto;
    min-height: 0;
  }

  #root > .operations-screen .operations-content.px-4.pb-8 {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}
