/* dashboard-design:start */
:root {
  --muted: #68736c;
  --dashboard-line: #e2e8e1;
  --dashboard-ink: #263c30;
  --dashboard-accent: #355d47;
  color: var(--dashboard-ink);
  background: #f5f7f3;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}

.site-shell { max-width: 1320px; padding-inline: 32px; }
.site-header { height: 56px; border-color: var(--dashboard-line); }
.brand { gap: 9px; font-size: 16px; font-weight: 650; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--dashboard-accent); }
.brand small { margin-top: 2px; font-size: 11px; letter-spacing: .4px; }
.private-label { font-size: 11px; }
.settings-button, .refresh-button { min-height: 36px; background: #fff; border-color: #dce4da; border-radius: 8px; }
.intro { padding: 10px 0 8px; }
.intro h1 { font-size: 20px; letter-spacing: -.5px; }
.refresh-button { gap: 7px; font-size: 12px; }

.overview {
  padding: 7px 0;
  margin-bottom: 12px;
  border-color: #e0e7db;
  border-radius: 12px;
  background: #eef3ea;
}
.overview-item { gap: 8px; padding-inline: 16px; }
.overview-item + .overview-item { border-color: #dce5d6; }
.overview-icon { width: 24px; height: 24px; display: grid; place-items: center; color: #668362; }
.overview-item > div { display: flex; align-items: baseline; gap: 10px; }
.overview-item p { font-size: 12px; }
.overview-item strong { font-size: 16px; line-height: 1.5; letter-spacing: -.5px; font-weight: 600; }
.overview-item strong span { font-size: 13px; letter-spacing: 0; }
.overview-item .issue-text { font-size: 14px; color: #956327; letter-spacing: 0; }

.accounts { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; align-items: stretch; }
.accounts:has(.account-details[open]) { grid-auto-rows: auto; }
.account-card {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 0;
  min-height: 128px;
  border-color: var(--dashboard-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 4px #203b2903;
}
.card-header { display: flex; flex-wrap: nowrap; align-items: center; gap: 7px; min-height: 28px; margin-bottom: 6px; }
.account-avatar { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; }
.card-header h2 { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: -.25px; overflow-wrap: anywhere; }
.card-header .status-pill { margin-left: 0; flex-shrink: 0; }
.status-pill { gap: 4px; border-radius: 5px; padding: 3px 6px; font-size: 11px; line-height: 1.55; font-weight: 500; }
.success { background: #edf4eb; color: #52734a; }
.pending { background: #f1f3ef; color: #737d6b; }
.warning { background: #fbf1e2; color: #986324; }
.account-card.has-warning { border-color: #e7d4b5; }
.card-metrics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.card-balances { flex: 1 1 auto; min-width: 0; min-height: 34px; }
.dual-balances { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.balance { gap: 4px 7px; letter-spacing: -.9px; }
.balance strong { font-size: 26px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.balance span { font-size: 11px; }
.coin-balance strong { font-size: 24px; }
.dual-balances .balance strong { font-size: 24px; }
.card-reward { display: flex; flex: 0 1 auto; flex-direction: column; align-items: flex-end; gap: 0; margin: 0 0 0 auto; }
.card-reward > span { font-size: 11px; }
.card-reward > strong { font-size: 12px; font-weight: 600; text-align: right; }
/* The badge stays visible; expand details to read the full error. */
.warning-note { display: none; margin-top: 8px; padding-left: 8px; border-left: 2px solid #ead4b1; color: #986324; font-size: 12px; line-height: 1.65; }
.account-card:has(.account-details[open]) > .warning-note { display: block; }
.account-details { margin-top: auto; padding-top: 4px; }
.account-details summary { min-height: 30px; border-top: 1px solid #edf0eb; border-radius: 0; font-size: 11px; }
.details-trigger { gap: 5px; color: #536e59; }
.details-trigger svg { width: 12px; height: 12px; }
.card-details-body { border-top: 0; padding: 6px 0 12px; }
.balance-caption, .card-note, .card-detail-updated { line-height: 1.7; }
.external-link { margin-top: 6px; padding-left: 0; }

.history { margin-top: 16px; border-color: var(--dashboard-line); border-radius: 12px; box-shadow: 0 2px 4px #203b2903; }
.history-heading { min-height: 50px; padding: 6px 16px; }
.history-heading h2 { font-size: 15px; font-weight: 600; gap: 9px; }
.history-heading h2 span { font-size: 11px; padding: 2px 7px; background: #f0f3ec; border-radius: 5px; }
.filter select { max-width: 260px; min-height: 38px; font-size: 12px; border-color: #e0e6dc; border-radius: 8px; }
th { padding: 8px 16px; background: #f8faf6; font-size: 11px; }
td { padding: 9px 16px; border-color: #edf1ea; }
.record-date { font-size: 12px; }
.record-date svg { width: 13px; height: 13px; }
.mini-avatar { width: 23px; height: 23px; font-size: 11px; border-radius: 6px; }
.record-status { font-size: 11px; }
.history-footer { padding: 12px 20px; font-size: 11px; background: #fcfdfb; }
.schedule-note { margin: 18px 0 24px; font-size: 11px; }
.site-footer { border-color: var(--dashboard-line); font-size: 11px; }

.account-dialog { border-radius: 16px; background: #fff; border-color: var(--dashboard-line); box-shadow: 0 24px 80px #203b2920; }
.account-dialog > header { background: #fff; border-color: var(--dashboard-line); }
.account-dialog h2 { font-size: 20px; }
.workbuddy-account-list > li { border-color: var(--dashboard-line); border-radius: 10px; background: #fcfdfb; }
.workbuddy-account-heading { align-items: flex-start; }
.workbuddy-account-heading .status-pill { flex-shrink: 0; }
.auth-card { background: #fff; border-color: var(--dashboard-line); box-shadow: 0 8px 32px #203b2906; }

@media (hover: hover) and (pointer: fine) {
  .settings-button:hover, .refresh-button:hover { background: #f0f5eb; border-color: #cad8c5; }
  .account-details summary:hover { background: transparent; color: #355d47; }
  .account-details summary:hover .details-trigger { color: #355d47; text-decoration: underline; text-underline-offset: 3px; }
  tbody tr:hover { background: #fafcf8; }
}

@media (max-width: 960px) {
  .site-shell { padding-inline: 20px; }
  .accounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-item { padding-inline: 16px; gap: 6px; }
  .overview-item > div { gap: 8px; }
}

@media (max-width: 760px) {
  .site-shell { padding-inline: 12px; }
  .site-header { height: 52px; }
  .brand { font-size: 14px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand small { font-size: 10px; }
  .settings-button { min-height: 36px; font-size: 11px; padding-inline: 10px; }
  .intro { padding: 8px 0 6px; }
  .intro h1 { font-size: 18px; }
  .refresh-button { width: auto; height: 36px; min-height: 36px; padding-inline: 10px; font-size: 11px; }
  .overview { padding: 6px 0; margin-bottom: 10px; border-radius: 9px; }
  .overview-item { padding-inline: 10px; }
  .overview-icon { display: none; }
  .overview-item > div { display: block; }
  .overview-item p { margin-bottom: 1px; font-size: 10px; }
  .overview-item strong { font-size: 15px; }
  .overview-item strong span { font-size: 11px; }
  .overview-item .issue-text { font-size: 13px; }
  .accounts { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 0; border: 1px solid var(--dashboard-line); border-radius: 10px; overflow: hidden; background: #fff; }
  .account-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, max-content) 44px; align-items: center; column-gap: 8px; min-height: 60px; padding: 6px 10px; border: 0; border-bottom: 1px solid #edf0eb; border-radius: 0; box-shadow: none; }
  .account-card:last-child { border-bottom: 0; }
  .account-card.has-warning { box-shadow: inset 2px 0 #d8b477; background: #fffefa; }
  .card-header { grid-column: 1; grid-row: 1; display: grid; gap: 2px; min-height: 0; margin: 0; }
  .account-avatar { display: none; }
  .card-header h2 { font-size: 12px; line-height: 1.35; letter-spacing: -.2px; }
  .card-header .status-pill { justify-self: start; padding: 0; gap: 3px; background: transparent; font-size: 10px; }
  .card-header .status-pill svg { width: 11px; height: 11px; }
  .card-metrics { grid-column: 2; grid-row: 1; display: grid; justify-items: end; gap: 2px; min-width: 0; }
  .card-balances { min-height: 0; }
  .balance { gap: 3px 4px; letter-spacing: -.5px; }
  .balance strong, .coin-balance strong { font-size: 20px; }
  .balance span { font-size: 10px; }
  .dual-balances { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dual-balances .balance strong { font-size: 17px; }
  .card-reward, .dual-balances + .card-reward { flex-direction: row; align-items: baseline; gap: 4px; margin: 0; }
  .card-reward > span { font-size: 10px; }
  .card-reward > strong { font-size: 11px; }
  .account-details { grid-column: 3; grid-row: 1; min-width: 0; margin: 0; padding: 0; }
  .account-details summary { width: 44px; min-height: 44px; border: 0; justify-content: flex-end; font-size: 11px; }
  .account-details summary > span:first-child { display: none; }
  .details-trigger { gap: 2px; }
  .account-details[open] { grid-column: 1 / -1; grid-row: 3; }
  .account-details[open] summary { width: 100%; justify-content: space-between; border-top: 1px solid #edf0eb; margin-top: 6px; }
  .account-details[open] summary > span:first-child { display: inline; }
  .warning-note { grid-column: 1 / -1; grid-row: 2; margin-top: 8px; font-size: 12px; }
  .history { margin-top: 12px; }
  .history-heading { padding: 6px 12px; gap: 10px; }
  .history-heading h2 { font-size: 14px; }
  .filter { min-width: 0; }
  .filter select { max-width: min(48vw, 240px); min-height: 44px; font-size: 11px; }
  .mobile-records li { padding: 12px 14px; }
  .record-provider { white-space: normal; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
  .mobile-record-main > strong { font-size: 13px; }
  .mobile-record-meta { margin-top: 6px; font-size: 11px; }
  .history-footer { padding: 12px 14px; font-size: 11px; }
  .schedule-note { font-size: 11px; }
}

@media (max-width: 360px) {
  .site-shell { padding-inline: 12px; }
  .account-card { padding-inline: 8px; column-gap: 6px; }
  .overview-item { padding-inline: 10px; }
  .overview-item .issue-text { font-size: 14px; }
  .history-heading h2 { gap: 5px; }
}

@media (pointer: coarse) {
  /* Keep native selects legible without triggering iOS focus zoom. */
  .filter select { font-size: 16px; }
}

button, .account-details summary {
  -webkit-user-select: none;
  user-select: none;
}

.account-dialog { overscroll-behavior: contain; }

@media (prefers-reduced-motion: reduce) {
  .details-trigger svg { transition: none; }
}
/* dashboard-design:end */
