/**
 * Go CSS · wallet
 * 
 * Purpose:
 *   Status bar, setup cards, invoice-style activity list, Xero connect, and export step.
 *   Neutral charcoal — no shared brown/gold wallet theme. Wallet must not
 *   load Counter CSS.
 * 
 * Dashboard:
 *   Go · App Store / data-view · wallet
 * 
 * This file:
 *   business/dashboard/wallet-app/wallet-app.css
 *
 * Depends on:
 *   - business/dashboard/shell/shell.html
 *   - scripts/assemble-dashboards.js
 *
 * Used by:
 *   - scripts/assemble-dashboards.js → business/dashboard/styles.css
 */

#wallet-view {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Same idea as Counter .pos-workspace: one column width for every step,
   so the status bar does not shrink to the card form or grow with Sales. */
.wallet-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  align-content: start;
  gap: 1rem;
  width: 100%;
  max-width: min(100%, 56rem);
  margin-inline: auto;
  box-sizing: border-box;
}

body.business-account.portal-app .main .wallet-workspace,
#wallet-view > .wallet-workspace {
  width: 100%;
  max-width: min(100%, 56rem);
}

#wallet-view #wallet-activity-hero,
#wallet-view [data-wallet-panel] {
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#wallet-view [data-wallet-panel].hidden,
#wallet-view [data-wallet-panel][hidden] {
  display: none !important;
}

.wallet-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.7rem 0.9rem 0.8rem;
  border: 1px solid rgba(16, 16, 18, 0.12);
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
}

.wallet-status-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}

.wallet-status-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.wallet-status-note {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 650;
  color: #111827;
}

.wallet-status-track {
  position: relative;
  height: 0.3rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 16, 18, 0.08);
}

.wallet-status-fill {
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: #101012;
  transition: width 0.35s ease;
}

.wallet-status-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.wallet-status-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  margin: 0;
  padding: 0.38rem 0.25rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  background: transparent;
  color: #6b7280;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.wallet-status-btn:hover,
.wallet-status-btn:focus {
  outline: none;
  background: rgba(16, 16, 18, 0.04);
}

.wallet-status-num {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(16, 16, 18, 0.16);
  font-size: 0.75rem;
  font-weight: 700;
  color: inherit;
}

.wallet-status-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 650;
  text-align: center;
}

.wallet-status-btn.is-current {
  color: #111827;
  border-color: rgba(16, 16, 18, 0.14);
  background: #fff;
}

.wallet-status-btn.is-current .wallet-status-num {
  border-color: #101012;
  background: #101012;
  color: #fff;
}

.wallet-status-btn.is-done:not(.is-current) {
  color: #111827;
}

.wallet-status-btn.is-done:not(.is-current) .wallet-status-num {
  border-color: rgba(4, 120, 87, 0.45);
  background: rgba(4, 120, 87, 0.12);
  color: #047857;
}

.wallet-setup-card {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border, rgba(16, 16, 18, 0.1));
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow, 0 10px 22px rgba(16, 16, 18, 0.04));
}

.wallet-setup-copy h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.wallet-setup-copy p {
  margin: 0;
  max-width: 36rem;
  line-height: 1.45;
}

.wallet-activity-list {
  display: grid;
  gap: 0.65rem;
  overflow: visible;
  padding: 0;
}

.wallet-list-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(16, 16, 18, 0.1);
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.wallet-list-card:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 16, 18, 0.18);
  box-shadow: 0 10px 22px rgba(16, 16, 18, 0.05);
}

.wallet-list-card.is-selected {
  border-color: #121212;
  box-shadow: 0 0 0 1px #121212;
}

.wallet-list-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0.78rem;
  background: #f4f4f5;
  box-shadow: 0 1px 2px rgba(16, 16, 18, 0.12);
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 750;
  color: #101012;
}

.wallet-list-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.wallet-list-copy strong {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.wallet-list-copy p,
.wallet-list-card .muted-line {
  margin: 0;
  color: #667085;
  font-size: 0.82rem;
  line-height: 1.35;
}

.wallet-list-pill {
  display: inline-flex;
  width: fit-content;
  justify-self: end;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f4f4f5;
  color: #101012;
}

.wallet-list-pill.is-good {
  background: rgba(4, 120, 87, 0.12);
  color: #047857;
}

.wallet-list-pill.is-warn {
  background: rgba(181, 71, 8, 0.12);
  color: #b54708;
}

.wallet-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.wallet-page-nav[hidden] {
  display: none !important;
}

.wallet-page-arrow {
  appearance: none;
  width: 2.25rem;
  height: 2.15rem;
  border: 1px solid rgba(16, 16, 18, 0.12);
  border-radius: 0.65rem;
  background: #fff;
  color: #101012;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.wallet-page-arrow:hover:not(:disabled) {
  background: #f4f4f5;
}

.wallet-page-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wallet-page-label {
  margin: 0;
  flex: 1 1 auto;
  text-align: center;
  font-size: 0.82rem;
  color: #667085;
}

@media (max-width: 640px) {
  .wallet-status-btn {
    padding-inline: 0.35rem;
  }
}

/* Neutral charcoal — override the shared brown/gold wallet theme. */
#wallet-view .wallet-account-card {
  background: #101012;
  color: #fff;
  box-shadow: 0 16px 36px rgba(16, 16, 18, 0.12);
}

#wallet-view .wallet-account-card::before {
  display: none;
}

#wallet-view .wallet-account-kicker,
#wallet-view .wallet-account-label {
  color: rgba(255, 255, 255, 0.62);
}

#wallet-view .wallet-account-chip {
  background: #3f3f46;
  box-shadow: none;
}

#wallet-view .wallet-account-footer {
  color: rgba(255, 255, 255, 0.62);
}

#wallet-view .wallet-stat,
#wallet-view .wallet-action-btn,
#wallet-view .wallet-panel {
  border-color: rgba(16, 16, 18, 0.12);
  box-shadow: none;
}

#wallet-view .wallet-stat span,
#wallet-view .wallet-panel-meta,
#wallet-view .wallet-tx-date,
#wallet-view .wallet-tx-status,
#wallet-view .wallet-tx-empty,
#wallet-view .wallet-bank-toggle span,
#wallet-view .wallet-bank-chevron,
#wallet-view .wallet-bank-intro,
#wallet-view .wallet-form-grid label,
#wallet-view .wallet-type-field > span,
#wallet-view .wallet-form-hint {
  color: #6b7280;
}

#wallet-view .wallet-stat strong,
#wallet-view .wallet-action-btn,
#wallet-view .wallet-tx-reference,
#wallet-view .wallet-form-grid input,
#wallet-view .wallet-form-grid select {
  color: #111827;
}

#wallet-view .wallet-action-btn:hover {
  border-color: rgba(16, 16, 18, 0.22);
}

#wallet-view .wallet-action-icon {
  background: #f4f4f5;
  color: #101012;
}

#wallet-view .wallet-tx-row:hover,
#wallet-view .wallet-tx-row.is-open {
  background: #f4f4f5;
}

#wallet-view .wallet-tx-status {
  background: #f4f4f5;
}

#wallet-view .wallet-form-grid input,
#wallet-view .wallet-form-grid select {
  border-color: rgba(16, 16, 18, 0.12);
}

#wallet-view .wallet-form-grid input:focus,
#wallet-view .wallet-form-grid select:focus {
  outline: 2px solid rgba(16, 16, 18, 0.22);
}

#wallet-view .wallet-form-grid select {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border-style: solid;
  border-width: 1px;
  background: #fff;
}

#wallet-view #wallet-export-panel {
  display: grid;
  gap: 1.15rem;
}

#wallet-view .wallet-xero-card {
  gap: 1.15rem;
}

#wallet-view .wallet-xero-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

#wallet-view .wallet-xero-logo {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: block;
}

#wallet-view .wallet-xero-section {
  display: grid;
  gap: 0.7rem;
}

#wallet-view .wallet-xero-section-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

#wallet-view .wallet-xero-facts {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

#wallet-view .wallet-xero-facts > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.6rem 0.9rem;
  align-items: baseline;
}

#wallet-view .wallet-xero-facts dt {
  margin: 0;
  font-size: 0.82rem;
  color: #6b7280;
}

#wallet-view .wallet-xero-facts dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  overflow-wrap: anywhere;
}

#wallet-view .wallet-xero-actions {
  display: grid;
  gap: 0.45rem;
}

#wallet-view .wallet-xero-fields .wallet-form-actions,
#wallet-view .wallet-export-fields .wallet-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#wallet-view .wallet-export-excel {
  padding-top: 0.95rem;
  border-top: 1px solid rgba(16, 16, 18, 0.08);
}

#wallet-view .wallet-export-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.7rem 0.8rem;
}

#wallet-view .wallet-export-fields .wallet-form-status,
#wallet-view .wallet-export-fields .wallet-form-actions {
  grid-column: 1 / -1;
}

#wallet-view .wallet-xero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#wallet-view .wallet-xero-mark {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  display: block;
  color: inherit;
}

#wallet-view .wallet-xero-mark path {
  fill: currentColor;
}

#wallet-view .wallet-type-pill {
  border-color: rgba(16, 16, 18, 0.12);
  background: #fff;
  color: #6b7280;
}

#wallet-view .wallet-type-pill.is-active {
  background: #101012;
  border-color: #101012;
  color: #fff;
}

#wallet-view .wallet-shell .account-type-tabs,
#wallet-view .wallet-panel .account-type-tabs,
#wallet-view .wallet-form .account-type-tabs {
  background: #f4f4f5;
  border-color: rgba(16, 16, 18, 0.12);
}

#wallet-view .account-type-btn {
  color: #6b7280;
}

#wallet-view .account-type-btn.active {
  color: #111827;
  border-color: rgba(16, 16, 18, 0.12);
  box-shadow: 0 1px 3px rgba(16, 16, 18, 0.06);
}
