/* Agroshop Wallet app */

.agdash-wallet-card{
  border-color: #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ag-btn-wallet{
  background: #0ea5e9;
  color: #ffffff;
  border: 0;
}

.ag-btn-wallet:hover{
  background: #0284c7;
}

.wallet-modal{
  position: fixed;
  inset: 0;
  z-index: 99980;
  display: none;
}

.wallet-modal.is-open{
  display: block;
}

.wallet-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .62);
}

.wallet-modal__panel{
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  margin: 12px auto;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}

.wallet-modal__close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ag-wallet-modal{
  display: grid;
  gap: 16px;
}

.ag-wallet-hero{
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
}

.ag-wallet-badge{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
}

.ag-wallet-hero h3{
  margin: 10px 0 8px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.ag-wallet-hero p{
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.ag-wallet-connect-box,
.ag-wallet-assets{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.ag-wallet-status{
  margin: 12px 0 0;
  color: #64748b;
  font-size: 14px;
}

.ag-wallet-status.is-connected{
  color: #15803d;
  font-weight: 800;
}

.ag-wallet-assets__head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ag-wallet-assets__head span{
  color: #64748b;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ag-wallet-asset-list{
  display: grid;
  gap: 8px;
}

.ag-wallet-asset{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ag-wallet-asset span{
  color: #475569;
  font-weight: 800;
}

.ag-wallet-asset b{
  color: #0f172a;
  font-size: 18px;
}

.ag-wallet-actions{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ag-wallet-action{
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.ag-wallet-action.is-disabled,
.ag-wallet-action:disabled{
  color: #94a3b8;
  cursor: not-allowed;
}

@media (max-width: 720px){
  .wallet-modal__panel{
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    margin: 8px auto;
    padding: 14px;
    border-radius: 18px;
  }

  .ag-wallet-actions{
    grid-template-columns: 1fr;
  }

  .ag-wallet-hero h3{
    font-size: 20px;
  }

  .ag-wallet-connect-box,
  .ag-wallet-assets,
  .ag-wallet-hero{
    padding: 14px;
  }
}


.ag-wallet-card-head{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ag-wallet-verified{
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #0ea5e9;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, .28);
}

.ag-wallet-verified[hidden]{
  display: none;
}

.ag-wallet-card-status{
  display: block;
  margin: -4px 0 12px;
  color: #0369a1;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.agdash-wallet-card.is-connected{
  border-color: #bae6fd;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}



.ag-wallet-other-assets{
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.ag-wallet-other-assets[hidden]{
  display: none;
}

.ag-wallet-other-assets > b{
  color: #0f172a;
  font-size: 14px;
}

.ag-wallet-asset--small{
  min-height: 40px;
}

.ag-wallet-asset--small b{
  font-size: 15px;
}

/* 2026-06-08 Wallet premium Telegram-like UI */
.ag-wallet-balance-hero{
  min-height: 132px;
  background:
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, .20), transparent 32%),
    linear-gradient(135deg, #f0f9ff 0%, #ffffff 62%, #eff6ff 100%);
}

.ag-wallet-balance-label{
  margin: 16px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.ag-wallet-balance-hero h3{
  margin: 4px 0 8px;
  font-size: 36px;
  letter-spacing: -0.04em;
}

.ag-wallet-quick-actions{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ag-wallet-quick-action{
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.ag-wallet-quick-action span{
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  font-size: 19px;
  line-height: 1;
}

.ag-wallet-quick-action b{
  font-size: 13px;
}

.ag-wallet-quick-action.is-disabled{
  color: #94a3b8;
  cursor: not-allowed;
}

.ag-wallet-quick-action.is-disabled span{
  background: #e2e8f0;
  color: #94a3b8;
}

.ag-wallet-asset{
  min-height: 58px;
}

.ag-wallet-asset small{
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.ag-wallet-history{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.ag-wallet-history__head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ag-wallet-history__head b{
  color: #0f172a;
}

.ag-wallet-history__head span{
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ag-wallet-history p{
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 720px){
  .ag-wallet-balance-hero{
    min-height: 120px;
  }

  .ag-wallet-balance-hero h3{
    font-size: 32px;
  }

  .ag-wallet-quick-actions{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ag-wallet-quick-action{
    min-height: 68px;
  }
}

/* 2026-06-08 fix wallet quick action buttons after UI polish */
.ag-wallet-quick-actions{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ag-wallet-quick-action{
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.15;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
  appearance: none;
  -webkit-appearance: none;
}

.ag-wallet-quick-action span{
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  font-size: 19px;
  line-height: 1;
}

.ag-wallet-quick-action b{
  display: block;
  color: inherit;
  font-size: 13px;
  line-height: 1.15;
}

.ag-wallet-quick-action.is-disabled,
.ag-wallet-quick-action:disabled{
  color: #94a3b8;
  cursor: not-allowed;
  background: #f8fafc;
}

.ag-wallet-quick-action.is-disabled span,
.ag-wallet-quick-action:disabled span{
  background: #e2e8f0;
  color: #94a3b8;
}

@media (max-width: 720px){
  .ag-wallet-quick-actions{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ag-wallet-quick-action{
    min-height: 68px;
  }
}

/* 2026-06-08 send TON panel */
.ag-wallet-send-panel{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ag-wallet-send-panel[hidden]{
  display: none;
}

.ag-wallet-send-panel__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ag-wallet-send-panel__head b{
  color: #0f172a;
  font-size: 16px;
}

.ag-wallet-send-panel__head button{
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 18px;
  cursor: pointer;
}

.ag-wallet-send-panel label{
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.ag-wallet-send-panel label span{
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.ag-wallet-send-panel input{
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 0 12px;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}

.ag-wallet-send-panel input:focus{
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .14);
}

.ag-wallet-send-submit{
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.ag-wallet-send-submit:disabled{
  opacity: .65;
  cursor: wait;
}

.ag-wallet-send-note{
  margin: 10px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.ag-wallet-send-note.is-error{
  color: #dc2626;
  font-weight: 800;
}

/* 2026-06-08 swap panel */
.ag-wallet-swap-panel{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ag-wallet-swap-panel[hidden]{
  display: none;
}

.ag-wallet-swap-directions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.ag-wallet-swap-directions button{
  min-height: 42px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.ag-wallet-swap-directions button.is-active{
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #0369a1;
}

.ag-wallet-swap-text{
  margin: 0 0 12px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.ag-wallet-swap-links{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ag-wallet-swap-link{
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

button.ag-wallet-swap-link{
  font-family: inherit;
}

@media (max-width: 720px){
  .ag-wallet-swap-links{
    grid-template-columns: 1fr;
  }
}

/* 2026-06-08 buy TON panel */
.ag-wallet-buy-panel{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ag-wallet-buy-panel[hidden]{
  display: none;
}

.ag-wallet-buy-address{
  display: grid;
  gap: 8px;
  padding: 12px;
  margin: 12px 0;
  border-radius: 16px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
}

.ag-wallet-buy-address span{
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ag-wallet-buy-address b{
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ag-wallet-buy-address button{
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
  cursor: pointer;
}

.ag-wallet-buy-links{
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.ag-wallet-buy-link{
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
}

.ag-wallet-buy-link b{
  font-size: 14px;
}

.ag-wallet-buy-link span{
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

/* 2026-06-08 SPB buy placeholder */
.ag-wallet-buy-spb{
  display: grid;
  gap: 7px;
  padding: 14px;
  margin: 12px 0;
  border-radius: 16px;
  border: 1px solid #bae6fd;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}

.ag-wallet-buy-spb span{
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.ag-wallet-buy-spb b{
  color: #0f172a;
  font-size: 16px;
}

.ag-wallet-buy-spb p{
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}


.ag-wallet-send-asset-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.ag-wallet-send-asset-switch button {
  border: 1px solid #dbe7f3;
  border-radius: 14px;
  background: #f8fbff;
  color: #52637a;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 12px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.ag-wallet-send-asset-switch button:hover {
  border-color: #9bc8ff;
  color: #0f5fb8;
}

.ag-wallet-send-asset-switch button.is-active {
  background: #e8f4ff;
  border-color: #2d9bf0;
  color: #0b73d9;
  box-shadow: 0 8px 18px rgba(45, 155, 240, .16);
}

@media (max-width: 520px) {
  .ag-wallet-send-asset-switch {
    gap: 6px;
  }

  .ag-wallet-send-asset-switch button {
    border-radius: 12px;
    padding: 9px 10px;
  }
}


/* 2026-06-16 Agroshop Web3 Wallet self-custody polish */
.agdash-wallet-card{
  border-color: #bbf7d0;
  background:
    radial-gradient(circle at 92% 12%, rgba(34, 197, 94, .16), transparent 34%),
    linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.agdash-wallet-card .ag-wallet-card-head b{
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ag-btn-wallet{
  background: linear-gradient(135deg, #16a34a, #059669);
  box-shadow: 0 12px 26px rgba(22, 163, 74, .18);
}

.ag-btn-wallet:hover{
  background: linear-gradient(135deg, #15803d, #047857);
}

.ag-wallet-balance-hero{
  position: relative;
  overflow: hidden;
  border-color: #bbf7d0;
  background:
    radial-gradient(circle at 88% 18%, rgba(34, 197, 94, .24), transparent 30%),
    radial-gradient(circle at 12% 8%, rgba(14, 165, 233, .18), transparent 34%),
    linear-gradient(135deg, #f0fdf4 0%, #ffffff 54%, #eff6ff 100%);
}

.ag-wallet-badge{
  background: #dcfce7;
  color: #15803d;
}

.ag-wallet-selfcustody-note{
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.ag-wallet-selfcustody-note b{
  color: #14532d;
  font-size: 15px;
}

.ag-wallet-selfcustody-note p{
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.ag-wallet-quick-action:hover{
  transform: translateY(-1px);
  border-color: #bae6fd;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}

.ag-wallet-history{
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fff9 100%);
}


/* 2026-06-16 Wallet external buy flow */
.ag-wallet-send-submit--muted{
  margin-top: 8px;
  background: #e0f2fe;
  color: #0369a1;
}

.ag-wallet-send-submit--muted:hover{
  background: #bae6fd;
  color: #075985;
}


/* 2026-06-16 Wallet modal close button visibility */
.wallet-modal__close{
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
}

.wallet-modal__close:hover{
  background: #e2e8f0;
}


/* 2026-06-16 Wallet on-chain history */
.ag-wallet-history-list{
  display: grid;
  gap: 8px;
}

.ag-wallet-history-item{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.ag-wallet-history-item b{
  color: #0f172a;
  font-size: 13px;
}

.ag-wallet-history-item span,
.ag-wallet-history-item small{
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.ag-wallet-history-item__amount{
  display: grid;
  gap: 4px;
  min-width: 112px;
  text-align: right;
}

.ag-wallet-history-item__amount b{
  font-size: 13px;
}

.ag-wallet-history-item__amount a{
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.ag-wallet-history-item.is-received .ag-wallet-history-item__amount b{
  color: #15803d;
}

.ag-wallet-history-item.is-sent .ag-wallet-history-item__amount b{
  color: #dc2626;
}

@media (max-width: 520px){
  .ag-wallet-history-item{
    display: grid;
  }

  .ag-wallet-history-item__amount{
    min-width: 0;
    text-align: left;
  }
}


/* 2026-06-16 Omniston quote layer */
.ag-wallet-swap-field{
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.ag-wallet-swap-field span{
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ag-wallet-swap-field input{
  width: 100%;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  padding: 12px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  outline: none;
}

.ag-wallet-swap-quote{
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: #f0fdf4;
}

.ag-wallet-swap-quote span{
  color: #15803d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ag-wallet-swap-quote b{
  color: #0f172a;
  font-size: 14px;
}

.ag-wallet-swap-quote p{
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}


.ag-wallet-swap-confirm{
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
}

.ag-wallet-swap-confirm:disabled{
  opacity: .65;
  cursor: wait;
}


/* === Agroshop Wallet V2 preview page === */
.ag-wallet-page {
  width: min(1180px, calc(100% - 28px));
  margin: 28px auto 54px;
  color: #102017;
}

.ag-wallet-v2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: stretch;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #effdf4 0%, #ffffff 54%, #e8f7ef 100%);
  border: 1px solid rgba(25, 135, 84, 0.14);
  box-shadow: 0 18px 44px rgba(16, 32, 23, 0.08);
}

.ag-wallet-v2-kicker,
.ag-wallet-v2-section-head span {
  display: inline-flex;
  color: #198754;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 12px;
}

.ag-wallet-v2-hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
}

.ag-wallet-v2-hero p {
  max-width: 720px;
  margin: 0;
  color: #486052;
  font-size: 17px;
  line-height: 1.46;
}

.ag-wallet-v2-status-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: 24px;
  background: #102017;
  color: #ffffff;
}

.ag-wallet-v2-status-card span,
.ag-wallet-v2-status-card small {
  color: rgba(255, 255, 255, 0.68);
}

.ag-wallet-v2-status-card b {
  font-size: 28px;
}

.ag-wallet-v2-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.ag-wallet-v2-action-card,
.ag-wallet-v2-swap-card,
.ag-wallet-v2-note {
  border: 1px solid rgba(16, 32, 23, 0.1);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(16, 32, 23, 0.07);
}

.ag-wallet-v2-action-card {
  padding: 18px;
}

.ag-wallet-v2-action-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: #e9f8ef;
  color: #198754;
  font-size: 22px;
  font-weight: 900;
}

.ag-wallet-v2-action-card h2 {
  margin: 14px 0 8px;
  font-size: 21px;
}

.ag-wallet-v2-action-card p {
  min-height: 64px;
  margin: 0 0 14px;
  color: #5c6f63;
  font-size: 14px;
  line-height: 1.38;
}

.ag-wallet-v2-action-card button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  background: #198754;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.ag-wallet-v2-swap-card {
  margin-top: 18px;
  padding: 20px;
}

.ag-wallet-v2-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.ag-wallet-v2-section-head h2 {
  margin: 5px 0 0;
  font-size: 28px;
}

.ag-wallet-v2-section-head p {
  max-width: 360px;
  margin: 0;
  color: #607265;
  text-align: right;
}

.ag-wallet-v2-section-head p.is-error {
  color: #b42318;
}

.ag-wallet-v2-omniston {
  width: min(560px, 100%);
  min-height: 520px;
  margin: 0 auto;
  border-radius: 24px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.28);
  overflow: hidden;
}

.ag-wallet-v2-note {
  margin-top: 18px;
  padding: 18px 20px;
  color: #4b5f51;
}

.ag-wallet-v2-note b {
  color: #102017;
}

.ag-wallet-v2-note p {
  margin: 6px 0 0;
}

@media (max-width: 860px) {
  .ag-wallet-page {
    width: min(100% - 18px, 680px);
    margin-top: 14px;
  }

  .ag-wallet-v2-hero {
    grid-template-columns: 1fr;
    padding: 20px;
    border-radius: 22px;
  }

  .ag-wallet-v2-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ag-wallet-v2-section-head {
    display: block;
  }

  .ag-wallet-v2-section-head p {
    margin-top: 8px;
    text-align: left;
  }

  .ag-wallet-v2-omniston {
    min-height: 560px;
  }
}

@media (max-width: 560px) {
  .ag-wallet-v2-grid {
    grid-template-columns: 1fr;
  }

  .ag-wallet-v2-hero h1 {
    font-size: 36px;
  }

  .ag-wallet-v2-action-card p {
    min-height: 0;
  }

  .ag-wallet-v2-swap-card {
    padding: 14px;
    border-radius: 20px;
  }
}


/* === Agroshop Wallet V2 live controls === */
.ag-wallet-v2-live-card,
.ag-wallet-v2-history-card,
.ag-wallet-v2-panel {
  margin-top: 18px;
  border: 1px solid rgba(16, 32, 23, 0.1);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(16, 32, 23, 0.07);
}

.ag-wallet-v2-live-card {
  padding: 20px;
}

.ag-wallet-v2-live-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.ag-wallet-v2-live-head span {
  color: #198754;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ag-wallet-v2-live-head h2 {
  margin: 5px 0 6px;
  font-size: 26px;
}

.ag-wallet-v2-live-head p {
  margin: 0;
  color: #607265;
}

.ag-wallet-v2-live-head p.is-connected {
  color: #198754;
  font-weight: 700;
}

.ag-wallet-v2-balance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ag-wallet-v2-balance-grid div {
  padding: 14px;
  border-radius: 18px;
  background: #f4fbf7;
  border: 1px solid rgba(25, 135, 84, 0.12);
}

.ag-wallet-v2-balance-grid span {
  display: block;
  margin-bottom: 7px;
  color: #66806e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ag-wallet-v2-balance-grid b {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #102017;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ag-wallet-v2-balance-grid em {
  font-style: normal;
}

.ag-wallet-v2-panels {
  margin-top: 18px;
}

.ag-wallet-v2-panel {
  padding: 18px;
}

.ag-wallet-v2-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ag-wallet-v2-panel-head b {
  font-size: 22px;
}

.ag-wallet-v2-panel-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: #e9f8ef;
  color: #198754;
  font-size: 22px;
  cursor: pointer;
}

.ag-wallet-v2-address-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #f4fbf7;
}

.ag-wallet-v2-address-box span {
  color: #66806e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ag-wallet-v2-address-box b {
  overflow-wrap: anywhere;
}

.ag-wallet-v2-address-box button,
.ag-wallet-v2-primary,
.ag-wallet-v2-refresh {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  background: #198754;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.ag-wallet-v2-send-grid {
  display: grid;
  grid-template-columns: 160px 180px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.ag-wallet-v2-send-grid label {
  display: grid;
  gap: 6px;
}

.ag-wallet-v2-send-grid span {
  color: #66806e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ag-wallet-v2-send-grid input,
.ag-wallet-v2-send-grid select {
  min-height: 44px;
  border: 1px solid rgba(16, 32, 23, 0.14);
  border-radius: 14px;
  padding: 0 12px;
  font: inherit;
}

.ag-wallet-v2-send-address {
  grid-column: auto;
}

.ag-wallet-v2-primary {
  margin-top: 14px;
}

.ag-wallet-v2-message {
  margin: 10px 0 0;
  color: #607265;
}

.ag-wallet-v2-message.is-error {
  color: #b42318;
}

.ag-wallet-v2-history-card {
  padding: 20px;
}

.ag-wallet-v2-history-list {
  display: grid;
  gap: 10px;
}

.ag-wallet-v2-history-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  background: #f7faf8;
  border: 1px solid rgba(16, 32, 23, 0.08);
}

.ag-wallet-v2-history-item div {
  display: grid;
  gap: 3px;
}

.ag-wallet-v2-history-item span,
.ag-wallet-v2-history-item small {
  color: #6b7d71;
}

.ag-wallet-v2-history-item a {
  color: #198754;
  font-weight: 800;
  text-decoration: none;
}

.ag-wallet-v2-history-item.is-received {
  border-color: rgba(25, 135, 84, 0.22);
}

@media (max-width: 860px) {
  .ag-wallet-v2-live-head {
    display: grid;
  }

  .ag-wallet-v2-balance-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ag-wallet-v2-send-grid {
    grid-template-columns: 1fr;
  }

  .ag-wallet-v2-history-item {
    display: grid;
  }
}

@media (max-width: 560px) {
  .ag-wallet-v2-balance-grid {
    grid-template-columns: 1fr;
  }
}


/* === Wallet V2 single TON Connect button fix === */
#wallet-v2-ton-connect-button > * + * {
  display: none;
}
