/* ==========================================================================
   OBLIVET — wallets, portfolio composition, and account cards
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wallet rail on the dashboard
   -------------------------------------------------------------------------- */
.wallet-board {
  margin-bottom: 14px;
}

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

.wallet-mini {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.014);
  text-align: left;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.wallet-mini:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.032);
  transform: translateY(-1px);
}

.wallet-mini-top {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.wallet-mini-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.wallet-mini--credit .wallet-mini-mark {
  border-style: dashed;
}

.wallet-mini-ident {
  min-width: 0;
}

.wallet-mini-name {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-mini-meta {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted-dim);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-mini-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wallet-mini-value-label {
  color: var(--muted-dim);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wallet-mini-bar {
  display: block;
  overflow: hidden;
  height: 2px;
  margin-top: auto;
  border-radius: 999px;
  background: #171717;
}

.wallet-mini-bar > span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(to right, #5f5f5f, #ffffff);
  transition: width 0.7s var(--ease);
}

.wallet-mini--credit .wallet-mini-bar > span {
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.85) 0 3px,
    rgba(255, 255, 255, 0.22) 3px 6px
  );
}

/* --------------------------------------------------------------------------
   Portfolio hero
   -------------------------------------------------------------------------- */
.portfolio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 55%),
    linear-gradient(180deg, #0a0a0a 0%, #070707 100%);
}

.portfolio-hero-main {
  padding: clamp(22px, 3vw, 32px);
}

.portfolio-value {
  margin-top: 12px;
  color: var(--white);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.portfolio-change-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
}

.portfolio-change {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.portfolio-allocation {
  display: flex;
  overflow: hidden;
  height: 6px;
  margin-top: 28px;
  border-radius: 999px;
  background: #141414;
}

.portfolio-allocation > span {
  display: block;
  height: 100%;
  transition: width 0.7s var(--ease);
}

.portfolio-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 14px;
}

.portfolio-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.portfolio-legend strong {
  color: var(--text-soft);
  font-weight: 500;
}

.portfolio-legend .legend-empty {
  color: var(--muted-dim);
}

.allocation-swatch {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
}

.portfolio-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 1px solid var(--line-soft);
}

.portfolio-figures > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.portfolio-figures > div:nth-child(2n) {
  border-right: 0;
}

.portfolio-figures > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.portfolio-figures dd {
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Wallet groups
   -------------------------------------------------------------------------- */
.wallet-groups {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.wallet-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.wallet-group-head h2 {
  margin-top: 6px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.wallet-group-total {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.wallet-group-total strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

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

/* --------------------------------------------------------------------------
   Wallet cards
   -------------------------------------------------------------------------- */
.wallet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 228px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.007)),
    var(--panel);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.wallet-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.wallet-card--credit {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255, 255, 255, 0.045), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005)),
    var(--panel);
}

.wallet-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.wallet-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.wallet-card--credit .wallet-mark {
  border-style: dashed;
}

.wallet-ident {
  flex: 1;
  min-width: 0;
}

.wallet-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-meta {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-tools {
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.wallet-card:hover .wallet-tools,
.wallet-card:focus-within .wallet-tools {
  opacity: 1;
}

.wallet-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted-dim);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.wallet-tool svg {
  width: 12px;
  height: 12px;
}

.wallet-tool:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.wallet-balance-block {
  margin-top: 22px;
}

.wallet-balance-label {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.wallet-balance {
  margin-top: 6px;
  color: var(--white);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wallet-balance.is-negative {
  color: var(--text-soft);
}

.wallet-share,
.wallet-credit {
  margin-top: 18px;
}

.wallet-share .progress,
.wallet-credit .progress {
  height: 4px;
}

.wallet-share-label {
  display: block;
  margin-top: 8px;
  color: var(--muted-dim);
  font-size: 9.5px;
}

.wallet-credit-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}

.wallet-credit-meta strong {
  color: var(--text-soft);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wallet-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.wallet-flow {
  flex: 1;
  min-width: 0;
  color: var(--muted-dim);
  font-size: 9.5px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.wallet-link {
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.wallet-link:hover {
  color: var(--white);
}

.wallet-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 190px;
  padding: 36px 24px;
  text-align: center;
}

.wallet-empty h3 {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.wallet-empty p {
  max-width: 320px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.wallet-empty .btn {
  margin-top: 10px;
}
