/* EcoCash agent line (public/js/ecocash.js, GAKA 1.93.0) */
/* One column that may shrink to the screen: a wide table scrolls inside its own box instead of widening the page */
.eco { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.eco > * { min-width: 0; }
.eco .table-wrap { overflow-x: auto; }
.eco-head { align-items: flex-end; }
.eco-head p { margin: .2rem 0 0; }
.eco-nav { display: flex; align-items: center; gap: .35rem; }
.eco-nav .date-box { width: 10rem; }

/* The two balances, big */
.eco-hero { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: .9rem; }
.eco-bal { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.2rem; border-radius: 16px; overflow: hidden; color: #fff; }
.eco-bal small { font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; opacity: .85; }
.eco-bal strong { font-size: 2rem; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.eco-sub { font-size: .78rem; opacity: .85; }
.eco-bal.wallet { background: linear-gradient(135deg, #1f4fc4 0%, #2b6be0 55%, #3a86f0 100%); box-shadow: 0 10px 24px rgba(31, 79, 196, .25); }
.eco-bal.cash { background: linear-gradient(135deg, #136b43 0%, #1f8a57 55%, #2fa86c 100%); box-shadow: 0 10px 24px rgba(19, 107, 67, .25); }
.eco-bal.both { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.eco-bal.both small { color: var(--muted); opacity: 1; }
.eco-bal.both .eco-sub { color: var(--muted); opacity: 1; }
.eco-ic { position: absolute; right: 1rem; top: 1rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: rgba(255, 255, 255, .18); }
.eco-ic svg { width: 1.2rem; height: 1.2rem; }

/* Setting up, and what waits for confirmation */
.eco-setup { border: 1px dashed var(--accent); }
.eco-setup h2 { margin-top: 0; }
.eco-pending { display: grid; gap: .5rem; }
.eco-wait { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: 12px; border: 1px solid rgba(201, 145, 0, .35); background: linear-gradient(135deg, #fff6d6, #fff1c2); color: #5c4200; }
.eco-wait > div:nth-child(2) { flex: 1; }
.eco-wait-btns { display: flex; gap: .4rem; }
.eco-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: #e0a100; box-shadow: 0 0 0 4px rgba(224, 161, 0, .2); }

/* The agent's buttons */
.eco-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.eco-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .8rem .85rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.eco-tile:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.eco-tile b { font-size: .9rem; }
.eco-tile small { font-size: .72rem; color: var(--muted); }
.eco-tile-ic { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; margin-bottom: .15rem; }
.eco-tile-ic svg { width: 1.05rem; height: 1.05rem; }
.eco-tile.in .eco-tile-ic, .eco-kind.in { background: #d8f3e4; color: #17633e; }
.eco-tile.out .eco-tile-ic, .eco-kind.out { background: #dfe9ff; color: #2846a0; }
.eco-tile.top .eco-tile-ic, .eco-kind.top { background: #e6dcff; color: #5530a8; }
.eco-tile.com .eco-tile-ic, .eco-kind.com { background: #fff1c2; color: #7a5600; }
.eco-tile.hand .eco-tile-ic, .eco-kind.hand { background: var(--surface-2); color: var(--text); }
.eco-kind.open { background: var(--accent-soft); color: var(--text); }

/* Entries and closes */
.eco-card h2 { margin: 0; }
.eco-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.eco-sums { display: flex; flex-wrap: wrap; gap: .4rem; }
.eco-sums span { display: flex; flex-direction: column; padding: .3rem .7rem; border-radius: 10px; background: var(--surface-2); }
.eco-sums small { font-size: .68rem; color: var(--muted); }
.eco-sums b { font-size: .88rem; font-variant-numeric: tabular-nums; }
.eco-table { width: 100%; }
.eco-table td { vertical-align: top; }
.eco-kind { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.eco-void td { opacity: .55; }
.eco-void td:nth-child(5) { text-decoration: line-through; }
.eco-state { display: inline-block; margin-top: .15rem; padding: .05rem .45rem; border-radius: 999px; font-size: .68rem; font-weight: 600; }
.eco-state.ok { background: #d8f3e4; color: #17633e; }
.eco-state.wait { background: #fff1c2; color: #7a5600; }
.eco-state.void { background: #fde2df; color: #9b2218; }
.eco-bricks { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.eco-bricks h3 { margin: 0 0 .5rem; font-size: .9rem; }
.eco-brick { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .7rem; padding: .35rem 0; }
.eco-close-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.eco-close-cell { display: grid; gap: .25rem; padding: .8rem .9rem; border-radius: 12px; background: var(--surface-2); }
.eco-close-cell > small { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.eco-diff { justify-self: start; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 650; }
.eco-diff.ok { background: #d8f3e4; color: #17633e; }
.eco-diff.short { background: #fde2df; color: #9b2218; }
.eco-diff.over { background: #dfe9ff; color: #2846a0; }
.eco-close-btns { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }
.eco-click { cursor: pointer; }
.eco-click:hover td { background: var(--surface-2); }

@media (prefers-color-scheme: dark) {
  .eco-wait { border-color: rgba(255, 216, 102, .22); background: linear-gradient(135deg, rgba(255, 216, 102, .14), rgba(255, 216, 102, .07)); color: #ffe9a3; }
  .eco-dot { background: #ffd866; box-shadow: 0 0 0 4px rgba(255, 216, 102, .18); }
  .eco-tile.in .eco-tile-ic, .eco-kind.in, .eco-state.ok, .eco-diff.ok { background: #143d29; color: #7fe0ae; }
  .eco-tile.out .eco-tile-ic, .eco-kind.out, .eco-diff.over { background: #1c2b52; color: #9db6ff; }
  .eco-tile.top .eco-tile-ic, .eco-kind.top { background: #2f2153; color: #c3adff; }
  .eco-tile.com .eco-tile-ic, .eco-kind.com, .eco-state.wait { background: #4a3a0c; color: #ffd866; }
  .eco-state.void, .eco-diff.short { background: #4a1a15; color: #ff9d92; }
}
@media (max-width: 1100px) { .eco-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .eco-hero { grid-template-columns: 1fr 1fr; }
  .eco-bal.both { grid-column: 1 / -1; }
  .eco-bal strong { font-size: 1.55rem; }
  .eco-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eco-close-grid { grid-template-columns: 1fr; }
  .eco-wait { flex-wrap: wrap; }
}
@media (max-width: 420px) { .eco-hero { grid-template-columns: 1fr; } }

/* Brick payments to confirm (GAKA 1.133.0) */
.eco-confirm { display: grid; gap: .6rem; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.eco-confirm-head { display: flex; align-items: center; gap: .6rem; }
.eco-confirm-head h2 { margin: 0; font-size: 1.05rem; }
.eco-count { display: grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; }
.eco-confirm p { margin: 0; }
