#tolegTab {
  padding: 16px 4px 0;
}

#tolegTab[hidden] {
  display: none;
}

#tolegTab h1 {
  margin: 0 0 20px;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
}

#tolegTab .toleg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Transaction Card ─── */
#tolegTab .toleg-card {
  min-height: 84px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px 12px 12px;
  background: var(--bg-card);
  display: grid;
  grid-template-columns: 54px 1px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  transition: border-color 150ms ease;
  position: relative;
  overflow: hidden;
}

#tolegTab .toleg-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.2), transparent);
}

/* ─── Icon ─── */
#tolegTab .toleg-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#tolegTab .toleg-icon .icon {
  width: 24px;
  height: 24px;
}

#tolegTab .toleg-icon--success {
  background: rgba(0, 230, 118, 0.1);
  border: 1.5px solid rgba(0, 230, 118, 0.2);
}

#tolegTab .toleg-icon--success .icon {
  color: var(--accent);
}

#tolegTab .toleg-icon--pending {
  background: rgba(255, 196, 0, 0.1);
  border: 1.5px solid rgba(255, 196, 0, 0.2);
}

#tolegTab .toleg-icon--pending .icon {
  color: #ffd740;
}

#tolegTab .toleg-icon--failed {
  background: rgba(255, 61, 110, 0.1);
  border: 1.5px solid rgba(255, 61, 110, 0.2);
}

#tolegTab .toleg-icon--failed .icon {
  color: var(--red);
}

/* ─── Separator ─── */
#tolegTab .toleg-separator {
  align-self: stretch;
  border-left: 1.5px solid rgba(0, 230, 118, 0.1);
}

/* ─── Details ─── */
#tolegTab .toleg-details {
  min-width: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#tolegTab .toleg-phone,
#tolegTab .toleg-name,
#tolegTab .toleg-address {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tolegTab .toleg-phone {
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
}

#tolegTab .toleg-name {
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
}

/* ─── Side (amount / status / date) ─── */
#tolegTab .toleg-side {
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

#tolegTab .toleg-amount {
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#tolegTab .toleg-status {
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#tolegTab .toleg-status.success {
  background: rgba(0, 230, 118, 0.14);
  color: var(--accent);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

#tolegTab .toleg-status.pending {
  background: rgba(255, 196, 0, 0.12);
  color: #ffd740;
  border: 1px solid rgba(255, 196, 0, 0.2);
}

#tolegTab .toleg-status.failed {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 61, 110, 0.2);
}

#tolegTab .toleg-date {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
  text-align: right;
}

/* ─── Page Transitions ─── */
.app-content > section.page-leave-right {
  animation: pageLeaveRight 240ms ease forwards;
}

.app-content > section.page-enter-left {
  animation: pageEnterLeft 240ms ease forwards;
}

@keyframes pageLeaveRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(36px); }
}

@keyframes pageEnterLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (max-width: 360px) {
  #tolegTab { padding-right: 0; padding-left: 0; }
  #tolegTab .toleg-card { grid-template-columns: 48px 1px minmax(0, 1fr) auto; padding: 10px 10px 10px 10px; }
  #tolegTab .toleg-amount { font-size: 15px; }
}

.toleg-empty {
    min-height: calc(100vh - 260px);
    display: grid;
    place-items: center;
    color: var(--ink-2);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

button.toleg-card {
    width: 100%;
    appearance: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.toleg-card--clickable {
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.toleg-card--clickable:active {
    transform: scale(0.99);
}
