/* AURELION_OFFICE_TOPUPS_HISTORY_PRO_V420_START */
/* Frontend-only polish for /office.html -> Пополнения -> История пополнений */

/* Keep the topups tab from stretching cards into huge empty blocks */
body.aurelion-office-shell-v124 .office-main-pane.active .office-topup-grid,
body.aurelion-office-shell-v124 .office-main-pane .office-topup-grid,
body.aurelion-office-shell-v124 .office-topup-grid {
  align-items: start !important;
  min-height: 0 !important;
  height: auto !important;
}

/* The left and right panels should look like real software cards, not empty placeholders */
body.aurelion-office-shell-v124 .topup-panel,
body.aurelion-office-shell-v124 .topup-history-panel,
body.aurelion-office-shell-v124 .office-topup-panel,
body.aurelion-office-shell-v124 .office-topup-history-panel {
  min-height: 0 !important;
  height: auto !important;
  border-radius: 24px !important;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow:
    0 20px 54px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.85) !important;
}

/* Top-up form: more compact and aligned */
body.aurelion-office-shell-v124 .topup-row,
body.aurelion-office-shell-v124 .office-form-row {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
}

body.aurelion-office-shell-v124 #officeTopupAmount,
body.aurelion-office-shell-v124 #topupAmount {
  height: 46px !important;
  border-radius: 15px !important;
  background: #ffffff !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
}

body.aurelion-office-shell-v124 #topupBtn,
body.aurelion-office-shell-v124 .office-form-row .office-btn.green {
  height: 46px !important;
  min-width: 126px !important;
  border-radius: 15px !important;
  box-shadow: 0 14px 30px rgba(22,163,74,.18) !important;
}

/* History panel header */
body.aurelion-office-shell-v124 .topup-history-head,
body.aurelion-office-shell-v124 .office-topup-history-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 14px !important;
}

body.aurelion-office-shell-v124 .topup-history-head h3,
body.aurelion-office-shell-v124 .office-topup-history-head h3,
body.aurelion-office-shell-v124 .topup-history-panel h3,
body.aurelion-office-shell-v124 .office-topup-history-panel h3 {
  margin: 0 !important;
  letter-spacing: -0.03em !important;
}

/* Compact scrollable payment list */
body.aurelion-office-shell-v124 .topup-history-list,
body.aurelion-office-shell-v124 .office-topup-history-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  max-height: 430px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px 5px 2px 0 !important;
  scrollbar-gutter: stable !important;
}

/* Main row: compact professional payment row */
body.aurelion-office-shell-v124 .office-row.office-topup-row,
body.aurelion-office-shell-v124 .office-topup-row {
  min-height: 0 !important;
  height: auto !important;
  padding: 13px 14px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  border: 1px solid rgba(15,23,42,.075) !important;
  box-shadow:
    0 10px 24px rgba(15,23,42,.045),
    inset 0 1px 0 rgba(255,255,255,.92) !important;
}

/* Pending rows get a subtle blue accent */
body.aurelion-office-shell-v124 .office-row.office-topup-row.waiting,
body.aurelion-office-shell-v124 .office-topup-row.waiting {
  background:
    linear-gradient(90deg, rgba(37,99,235,.055), transparent 42%),
    #ffffff !important;
  border-color: rgba(37,99,235,.12) !important;
}

/* Paid rows get a subtle green accent */
body.aurelion-office-shell-v124 .office-row.office-topup-row.paid,
body.aurelion-office-shell-v124 .office-topup-row.paid {
  background:
    linear-gradient(90deg, rgba(16,185,129,.06), transparent 42%),
    #ffffff !important;
  border-color: rgba(16,185,129,.14) !important;
}

/* Left side: amount + status/timer */
body.aurelion-office-shell-v124 .office-topup-row > div:first-child {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 116px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 14px !important;
  row-gap: 4px !important;
  align-items: center !important;
}

body.aurelion-office-shell-v124 .office-topup-row > div:first-child > b {
  grid-row: 1 / span 2 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  letter-spacing: -0.025em !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

body.aurelion-office-shell-v124 .office-topup-row small,
body.aurelion-office-shell-v124 .office-payment-countdown,
body.aurelion-office-shell-v124 .office-payment-done {
  margin: 0 !important;
  min-height: 0 !important;
  line-height: 1.25 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

/* Status/timer badges */
body.aurelion-office-shell-v124 .office-payment-countdown {
  width: fit-content !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 9px !important;
  border-radius: 999px !important;
  color: #1d4ed8 !important;
  background: rgba(37,99,235,.10) !important;
  border: 1px solid rgba(37,99,235,.16) !important;
}

body.aurelion-office-shell-v124 .office-payment-countdown.expired {
  color: #b45309 !important;
  background: rgba(245,158,11,.13) !important;
  border-color: rgba(245,158,11,.22) !important;
}

body.aurelion-office-shell-v124 .office-payment-done {
  width: fit-content !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 5px 9px !important;
  border-radius: 999px !important;
  color: #047857 !important;
  background: rgba(16,185,129,.12) !important;
  border: 1px solid rgba(16,185,129,.18) !important;
}

/* Right side: date + action button */
body.aurelion-office-shell-v124 .office-topup-row > div:last-child {
  min-width: 132px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 7px !important;
  text-align: right !important;
}

body.aurelion-office-shell-v124 .office-topup-row > div:last-child small,
body.aurelion-office-shell-v124 .office-topup-row > div:last-child time,
body.aurelion-office-shell-v124 .office-topup-row > div:last-child span:first-child {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
}

body.aurelion-office-shell-v124 .office-topup-row a {
  height: 32px !important;
  padding: 0 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  background: #071224 !important;
  color: #ffffff !important;
  border: 1px solid rgba(15,23,42,.16) !important;
  text-decoration: none !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.14) !important;
}

body.aurelion-office-shell-v124 .office-topup-row a:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 30px rgba(15,23,42,.18) !important;
}

/* Empty state should not create a giant blank panel */
body.aurelion-office-shell-v124 .topup-history-empty,
body.aurelion-office-shell-v124 .office-topup-history-empty {
  min-height: 120px !important;
  padding: 24px !important;
  border-radius: 18px !important;
  background: rgba(248,250,252,.92) !important;
  border: 1px dashed rgba(100,116,139,.18) !important;
}

/* Mobile/tablet */
@media (max-width: 980px) {
  body.aurelion-office-shell-v124 .office-main-pane.active .office-topup-grid,
  body.aurelion-office-shell-v124 .office-main-pane .office-topup-grid,
  body.aurelion-office-shell-v124 .office-topup-grid {
    grid-template-columns: 1fr !important;
  }

  body.aurelion-office-shell-v124 .office-topup-row {
    grid-template-columns: 1fr !important;
  }

  body.aurelion-office-shell-v124 .office-topup-row > div:last-child {
    min-width: 0 !important;
    align-items: flex-start !important;
    text-align: left !important;
  }
}

@media (max-width: 640px) {
  body.aurelion-office-shell-v124 .office-topup-row > div:first-child {
    grid-template-columns: 1fr !important;
  }

  body.aurelion-office-shell-v124 .office-topup-row > div:first-child > b {
    grid-row: auto !important;
  }

  body.aurelion-office-shell-v124 .topup-row,
  body.aurelion-office-shell-v124 .office-form-row {
    grid-template-columns: 1fr !important;
  }

  body.aurelion-office-shell-v124 #topupBtn,
  body.aurelion-office-shell-v124 .office-form-row .office-btn.green {
    width: 100% !important;
  }
}
/* AURELION_OFFICE_TOPUPS_HISTORY_PRO_V420_END */
