/* The account modal, shared by every page that has a nav.

   Uses the site's own tokens (--cream, --choc, --mint …) which every page
   already declares, so it inherits the diner look without shipping a second
   palette. */

.acct-modal {
  position: fixed; inset: 0; z-index: 200; padding: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16, 29, 53, .8); backdrop-filter: blur(7px);
  animation: acctFade .16s ease-out;
}
.acct-modal[hidden] { display: none !important; }
@keyframes acctFade { from { opacity: 0; } }

.acct-sheet {
  background: var(--paper, #F8E5BC); color: var(--choc, #2B130D);
  border: 4px solid var(--choc, #2B130D); border-radius: 28px;
  box-shadow: 9px 9px 0 var(--choc, #2B130D);
  width: 100%; max-width: 430px; max-height: 88dvh; overflow-y: auto;
  padding: 24px;
  animation: acctRise .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes acctRise { from { transform: translateY(16px) scale(.97); opacity: 0; } }

.acct-top { display: flex; align-items: flex-start; gap: 12px; }
.acct-badge {
  width: 46px; height: 46px; flex: none; border-radius: 14px;
  background: var(--mint, #78C3B5); border: 3px solid var(--choc, #2B130D);
  display: grid; place-items: center; font-size: 1.25rem;
}
.acct-id { flex: 1; min-width: 0; }
.acct-id h2 {
  font-family: var(--headline, sans-serif); font-weight: 400;
  font-size: 1.2rem; margin: 0; line-height: 1.2; overflow-wrap: anywhere;
}
.acct-id p { margin: 3px 0 0; font-size: .82rem; color: rgba(43, 19, 13, .65); }
.acct-x {
  background: none; border: 0; cursor: pointer; font-size: 1.3rem; line-height: 1;
  padding: 4px 6px; color: rgba(43, 19, 13, .5); flex: none;
}
.acct-x:hover { color: var(--cherry, #E9362B); }

.acct-stats { display: flex; gap: 10px; margin-top: 18px; }
.acct-stat {
  flex: 1; text-align: center; padding: 10px 6px;
  background: var(--cream, #FFF3D6); border: 3px solid var(--choc, #2B130D);
  border-radius: 14px; box-shadow: 3px 3px 0 var(--choc, #2B130D);
}
.acct-stat b {
  display: block; font-family: var(--headline, sans-serif); font-weight: 400;
  font-size: 1.35rem; color: var(--teal, #216A69); line-height: 1.15;
}
.acct-stat span {
  font-size: .66rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(43, 19, 13, .6);
}

.acct-rows { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 9px; }
.acct-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; background: var(--cream, #FFF3D6);
  border: 3px solid var(--choc, #2B130D); border-radius: 15px;
  box-shadow: 3px 3px 0 var(--choc, #2B130D);
}
.acct-row.on { background: rgba(120, 195, 181, .32); }
.acct-row svg { width: 24px; height: 24px; flex: none; }
.acct-row-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
.acct-row-label { font-family: var(--display, sans-serif); font-weight: 700; font-size: .9rem; }
.acct-row-status { font-size: .82rem; overflow-wrap: anywhere; }
.acct-row-status.on { color: var(--teal, #216A69); font-weight: 700; }
.acct-row-status.off { color: rgba(43, 19, 13, .55); }
.acct-row-status.err { color: var(--cherry, #E9362B); font-weight: 700; }

.acct-btn {
  font: inherit; font-family: var(--display, sans-serif); font-weight: 600; font-size: .84rem;
  cursor: pointer; padding: 8px 14px; line-height: 1;
  border: 2.5px solid var(--choc, #2B130D); border-radius: 999px;
  background: var(--butter, #F5B82E); color: var(--choc, #2B130D);
  box-shadow: 3px 3px 0 var(--choc, #2B130D);
  transition: transform .08s, box-shadow .08s;
}
.acct-btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--choc, #2B130D); }
.acct-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--choc, #2B130D); }
.acct-btn:disabled { opacity: .55; cursor: default; }
.acct-btn.dark { background: var(--choc, #2B130D); color: var(--cream, #FFF3D6); }
.acct-btn.quiet { background: var(--cream, #FFF3D6); }
.acct-btn.wide { width: 100%; justify-content: center; text-align: center; }

.acct-foot { margin-top: 18px; display: grid; gap: 9px; }
.acct-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-decoration: none; color: inherit; font-family: var(--display, sans-serif);
  font-weight: 600; font-size: .88rem; padding: 11px 15px;
  border: 3px solid var(--choc, #2B130D); border-radius: 15px;
  background: var(--cream, #FFF3D6); box-shadow: 3px 3px 0 var(--choc, #2B130D);
}
.acct-link:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--choc, #2B130D); }
.acct-note { font-size: .78rem; color: rgba(43, 19, 13, .62); text-align: center; margin: 12px 0 0; }
.acct-note.err { color: var(--cherry, #E9362B); font-weight: 700; }

/* wallet picker, reused from the regulars page */
.acct-pick { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.acct-pick button {
  display: flex; align-items: center; gap: 11px; width: 100%; cursor: pointer;
  font: inherit; font-family: var(--display, sans-serif); font-weight: 600; text-align: left;
  padding: 10px 13px; background: var(--cream, #FFF3D6); color: var(--choc, #2B130D);
  border: 3px solid var(--choc, #2B130D); border-radius: 14px;
  box-shadow: 3px 3px 0 var(--choc, #2B130D);
}
.acct-pick button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--choc, #2B130D); }
.acct-pick img, .acct-pick .ph {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  border: 2px solid var(--choc, #2B130D); background: var(--mint, #78C3B5);
  display: grid; place-items: center; font-size: .76rem;
}

@media (prefers-reduced-motion: reduce) {
  .acct-modal, .acct-sheet { animation: none; }
  .acct-btn:hover, .acct-link:hover, .acct-pick button:hover { transform: none; }
}
@media (max-width: 420px) {
  .acct-sheet { padding: 20px; border-radius: 22px; }
  .acct-row { grid-template-columns: auto minmax(0, 1fr); }
  .acct-row .acct-btn { grid-column: 1 / -1; }
}
