:root {
  --account-blue: #0370ff;
  --account-deep: #014fbc;
  --account-ink: #182c46;
  --account-muted: #718198;
  --account-line: #dfe9f4;
  --account-soft: #f5faff;
}

.owner-utility-link {
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--account-line);
  border-radius: 11px;
  color: #607087;
  background: rgba(255, 255, 255, .82);
  cursor: pointer;
}

.owner-utility-link:hover,
.owner-utility-link:focus-visible,
.owner-utility-link.active {
  border-color: #a9d5ff;
  color: var(--account-deep);
  background: #edf7ff;
  outline: none;
}

.view-wallet .owner-primary-nav button.active,
.view-user-center .owner-primary-nav button.active {
  color: #68778c;
  border-color: #edf2f7;
  background: rgba(255, 255, 255, .7);
  box-shadow: none;
}

.view-wallet .owner-primary-nav button.active::after,
.view-user-center .owner-primary-nav button.active::after {
  display: none;
}

.account-loading,
.account-error {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 280px;
  padding: 44px;
  border: 1px solid var(--account-line);
  border-radius: 18px;
  color: var(--account-muted);
  background: #fff;
  text-align: center;
}

.account-loading i {
  width: 34px;
  height: 34px;
  border: 2px solid #dceeff;
  border-top-color: var(--account-blue);
  border-radius: 50%;
  animation: account-spin .8s linear infinite;
}

.account-loading strong,
.account-error strong {
  color: var(--account-ink);
  font-size: 18px;
}

.account-error button,
.digital-employee-purpose button {
  padding: 10px 15px;
  border: 1px solid #a7d1ff;
  border-radius: 10px;
  color: #fff;
  background: var(--account-blue);
  cursor: pointer;
}

.wallet-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  min-height: 220px;
  padding: 38px 42px;
  overflow: hidden;
  border: 1px solid #b8dcff;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(9, 195, 255, .45), transparent 17rem),
    linear-gradient(135deg, #014fbc 0%, #0370ff 64%, #09aeea 100%);
  box-shadow: 0 22px 56px rgba(1, 79, 188, .18);
}

.wallet-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -130px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255, 255, 255, .05), 0 0 0 84px rgba(255, 255, 255, .035);
}

.wallet-hero > div,
.wallet-hero > button {
  position: relative;
  z-index: 1;
}

.wallet-hero > div {
  display: grid;
  gap: 7px;
}

.wallet-hero > div > span,
.wallet-hero > div > small {
  color: rgba(255, 255, 255, .78);
}

.wallet-hero > div > strong {
  font-size: clamp(48px, 7vw, 78px);
  line-height: 1;
  letter-spacing: -.07em;
}

.wallet-hero > button {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 220px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 14px;
  color: #12345a;
  background: rgba(255, 255, 255, .95);
  cursor: pointer;
}

.wallet-hero > button > i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--account-blue);
  font-style: normal;
  font-size: 22px;
}

.wallet-hero > button span {
  display: grid;
  gap: 3px;
  text-align: left;
}

.wallet-hero > button small {
  color: var(--account-muted);
}

.wallet-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.wallet-metrics article {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--account-line);
  border-radius: 15px;
  background: #fff;
}

.wallet-metrics span {
  color: var(--account-muted);
  font-size: 12px;
}

.wallet-metrics strong {
  color: var(--account-ink);
  font-size: 24px;
}

.account-panel {
  padding: 24px;
  border: 1px solid var(--account-line);
  border-radius: 18px;
  background: #fff;
}

.account-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.account-panel h2 {
  margin: 5px 0;
  color: var(--account-ink);
}

.account-panel p {
  margin: 0;
  color: var(--account-muted);
}

.wallet-list,
.account-events {
  display: grid;
}

.wallet-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  border-top: 1px solid #edf2f7;
}

.wallet-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff9862;
}

.wallet-row i.credit {
  background: #02cda6;
}

.wallet-row div {
  display: grid;
  gap: 3px;
}

.wallet-row strong {
  color: var(--account-ink);
}

.wallet-row small,
.wallet-row em {
  color: var(--account-muted);
  font-size: 11px;
  font-style: normal;
}

.wallet-row > span {
  color: #d85c44;
  font-weight: 800;
}

.wallet-row > span.positive {
  color: #079e83;
}

.account-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 28px;
  border: 1px solid #cce5ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #f0f8ff);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #58beff, #0370ff);
  box-shadow: 0 13px 30px rgba(3, 112, 255, .2);
  font-size: 24px;
  font-weight: 800;
}

.account-profile > div:nth-child(2) {
  display: grid;
  gap: 3px;
}

.account-profile span,
.account-profile p {
  margin: 0;
  color: var(--account-muted);
  font-size: 12px;
}

.account-profile h2 {
  margin: 0;
  color: var(--account-ink);
  font-size: 24px;
}

.account-profile > button {
  padding: 10px 14px;
  border: 1px solid var(--account-line);
  border-radius: 10px;
  color: #596c83;
  background: #fff;
  cursor: pointer;
}

.account-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 16px;
  margin-top: 16px;
}

.account-security dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.account-security dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid #edf2f7;
}

.account-security dt {
  color: var(--account-muted);
}

.account-security dd {
  margin: 0;
  color: var(--account-ink);
  font-weight: 700;
}

.account-security dd i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #02cda6;
}

.account-event {
  display: grid;
  grid-template-columns: 8px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #edf2f7;
}

.account-event > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #02cda6;
}

.account-event > i.warn {
  background: #f6aa48;
}

.account-event div {
  display: grid;
  gap: 3px;
}

.account-event strong {
  color: var(--account-ink);
}

.account-event small {
  color: var(--account-muted);
}

.tenant-members-panel {
  margin-top: 16px;
  border: 1px solid var(--account-line) !important;
  color: var(--account-ink) !important;
  background: #fff !important;
}

.tenant-members-panel .member-card {
  border-color: #e2ebf5 !important;
  color: var(--account-ink) !important;
  background: #f9fcff !important;
}

.tenant-members-panel .member-card small,
.tenant-members-panel .member-invites small {
  color: var(--account-muted) !important;
}

.tenant-members-panel input,
.tenant-members-panel select {
  border: 1px solid var(--account-line) !important;
  color: var(--account-ink) !important;
  background: #fff !important;
}

.tenant-members-panel button {
  border-radius: 10px !important;
}

.password-editor {
  margin-top: 22px;
  border-top: 1px solid #e7edf5;
  padding-top: 16px;
}

.password-editor summary {
  cursor: pointer;
  color: #1786ee;
  font-weight: 700;
  list-style: none;
}

.password-editor summary::-webkit-details-marker {
  display: none;
}

.password-editor summary::after {
  content: "＋";
  float: right;
  font-size: 18px;
  font-weight: 400;
}

.password-editor[open] summary::after {
  content: "－";
}

.password-editor form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.password-editor label {
  display: grid;
  gap: 7px;
  color: #637083;
  font-size: 13px;
}

.password-editor input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px 14px;
  color: #172338;
  outline: none;
}

.password-editor input:focus {
  border-color: #48a8ff;
  box-shadow: 0 0 0 4px rgba(72, 168, 255, .12);
}

.password-editor button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  background: #172338;
  color: #fff;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
}

.password-editor button:disabled {
  opacity: .55;
  cursor: wait;
}

.password-editor small {
  min-height: 18px;
  color: #e14b5a;
}

.digital-employee-purpose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 22px 24px;
  border: 1px solid #cce4ff;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #eef8ff);
}

.digital-employee-purpose h2 {
  margin: 5px 0;
  color: var(--account-ink);
}

.digital-employee-purpose p {
  margin: 0;
  color: var(--account-muted);
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .owner-command-context {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .wallet-hero,
  .digital-employee-purpose {
    align-items: stretch;
    flex-direction: column;
  }

  .wallet-metrics,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .wallet-row {
    grid-template-columns: 9px minmax(0, 1fr) auto;
  }

  .wallet-row em {
    grid-column: 2 / -1;
  }
}

@media (max-width: 640px) {
  .owner-current-client,
  .approved-pagebar-presence {
    display: none;
  }

  .owner-utility-link {
    padding: 0 10px;
  }

  .wallet-hero {
    padding: 28px 24px;
  }

  .account-profile {
    grid-template-columns: auto 1fr;
  }

  .account-profile > button {
    grid-column: 1 / -1;
  }
}
