.account-welcome {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--ice);
  border: var(--line);
  padding: 25px;
  box-shadow: var(--shadow);
  margin: 12px 0 26px;
  min-width: 0;
}
.account-welcome > div:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-welcome h2 {
  font-size: 28px;
  margin: 7px 0;
}
.account-welcome p {
  font-size: 13px;
  line-height: 1.7;
}
.account-welcome button {
  margin-left: auto;
  flex-shrink: 0;
}
.account-eyebrow {
  font-size: 11px !important;
  letter-spacing: 1px;
  font-weight: 800;
}
#profile-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  font-size: 30px;
  font-weight: 900;
  background: #ffe56b;
  border: var(--line);
  box-shadow: 4px 4px var(--ink);
  border-radius: 12px;
  rotate: -5deg;
}
.account-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.account-tabs a {
  border: 2px solid var(--ink);
  box-shadow: 3px 3px var(--ink);
  background: white;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}
.account-tabs a:hover {
  background: #ffe56b;
}
.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 16px;
}
.account-stat {
  display: block;
  background: white;
  border: var(--line);
  padding: 16px;
  box-shadow: 4px 4px var(--ink);
  min-width: 0;
}
.account-stat strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.account-stat span {
  display: block;
  font-size: 12px;
  margin-top: 8px;
}
.account-stat:nth-child(2) {
  background: #ffe56b;
}
.account-stat:nth-child(4) {
  background: var(--lavender);
}
.account-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.account-columns h2,
.account-history h2 {
  font-size: 21px;
  margin: 0 0 12px;
}
.account-columns p {
  font-size: 13px;
  line-height: 1.8;
}
.account-aside {
  display: grid;
  align-content: start;
  gap: 24px;
}
.account-aside a {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.account-aside .btn {
  display: inline-flex;
  text-decoration: none;
  font-size: 12px;
  padding: 10px 12px;
}
.profile-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.profile-hint {
  margin-top: 16px;
  color: var(--muted);
}
.account-history {
  margin-top: 28px;
}
.account-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.account-section-heading > a {
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
}
.recent-order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  border: 2px solid var(--ink);
  padding: 16px;
  margin-top: 16px;
  background: var(--page);
  overflow-wrap: anywhere;
}
.recent-order h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.recent-order p {
  font-size: 13px;
  margin-top: 6px;
}
.recent-order > a {
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}
.account-page #summary-status {
  font-size: 13px;
  margin: 10px 0;
}
.account-page button:disabled {
  cursor: wait;
  opacity: 0.55;
}
@media (max-width: 700px) {
  .account-welcome {
    padding: 18px;
    gap: 16px;
    flex-wrap: wrap;
  }
  .account-welcome h2 {
    font-size: 23px;
  }
  .account-welcome button {
    margin-left: 0;
    width: 100%;
  }
  #profile-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 24px;
  }
  .account-welcome > div:nth-child(2) {
    flex: 1;
  }
  .account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .account-stat {
    padding: 14px;
  }
  .account-stat strong {
    font-size: 25px;
  }
  .account-columns {
    grid-template-columns: 1fr;
  }
  .profile-pair {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .account-tabs {
    gap: 10px;
  }
  .account-tabs a {
    font-size: 12px;
  }
  .recent-order {
    padding: 12px;
  }
}
.customers-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.customer-card {
  overflow-wrap: anywhere;
}
.customer-card h2 {
  font-size: 20px;
  margin: 0 0 14px;
}
.customer-card p {
  font-size: 13px;
  line-height: 1.8;
  margin: 5px 0;
}
.customer-card a {
  display: inline-block;
  font-weight: 800;
  font-size: 13px;
  margin-top: 16px;
  text-decoration: underline;
}
#customers-search {
  display: flex;
  align-items: end;
  gap: 14px;
}
#customers-search label {
  flex: 1;
  min-width: 0;
}
#customers-search button {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .customers-list {
    grid-template-columns: 1fr;
  }
  #customers-search {
    display: block;
  }
  #customers-search button {
    width: 100%;
    margin-top: 12px;
  }
}

/* Customer operations: readable cards and private staff audit. */
#library-list .order-item,
#inbox-list .order-item {
  display: grid;
  gap: 12px;
  min-width: 0;
}
#library-list .order-item > *,
#inbox-list .order-item > * {
  margin: 0;
  overflow-wrap: anywhere;
}
#library-list .btn {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}
#inbox-list [data-read="false"] {
  background: var(--ice);
  border-left-width: 6px;
}
#inbox-list button {
  justify-self: start;
}
#audit-list pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
  max-width: 100%;
}
#library-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}
#library-filter label {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}
#library-filter .custom-select {
  width: 100%;
}
#library-filter button[type="submit"] {
  min-height: 44px;
}
#dashboard-stats {
  margin: 24px 0;
}
