/* css/views/account.css
   Customer account panel. Shares the operator-console visual language (sidebar
   + sections, dense cards) but reads as the customer's own space, not an
   instrument panel. Themed with the site tokens. */

.account { padding: 0; }
.account h2, .account h3 {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.acct-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: min(74vh, 720px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .012);
}

/* sidebar */
.acct-side { display: flex; flex-direction: column; border-right: 1px solid var(--border); background: rgba(0,0,0,.22); padding: 16px 12px; }
.acct-side-brand { padding: 6px 10px 14px; }
.acct-side-kicker { display: block; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-600, #21bca5); font-weight: 700; }
.acct-side-title { display: block; font-size: .92rem; font-weight: 700; color: var(--ink); word-break: break-all; }
.acct-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 500; text-align: left; cursor: pointer; transition: background 140ms ease, color 140ms ease; }
.acct-nav-item:hover { background: rgba(255,255,255,.04); color: var(--ink); }
.acct-nav-item.is-active { background: rgba(33,188,165,.12); color: var(--ink); }
.acct-nav-item.is-active .acct-nav-ico { color: var(--brand-600, #21bca5); }
.acct-nav-ico { display: inline-grid; place-items: center; color: var(--muted); }
.acct-nav-item:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 1px; }
.acct-side-foot { margin-top: auto; padding: 12px 6px 4px; border-top: 1px solid var(--border); }
.acct-signout { width: 100%; }

/* main */
.acct-main { padding: 22px 24px 26px; min-width: 0; }

/* billing manager */
.acct-card-warn { border-color: rgba(255, 212, 137, .45); }
.acct-tag.is-bad {
  color: #ff5d6c;
  border-color: rgba(255, 93, 108, .45);
  background: rgba(255, 93, 108, .08);
}
.acct-inline-link {
  color: var(--brand-600, #21bca5); text-decoration: none; font-weight: 700;
  border-bottom: 1px solid rgba(33, 188, 165, .35);
  transition: color 160ms ease, border-color 160ms ease;
}
.acct-inline-link:hover { color: #fff; border-color: var(--brand-purp, #a200ff); }
.acct-inline-link:focus-visible { outline: 2px solid var(--brand-600, #21bca5); outline-offset: 2px; }
#acctPmElement { margin: 12px 0; }
#acctPricing { margin: 6px 0 12px; }

/* usage meters (customer Billing card; recipes shared with internal views) */
.use-row { margin: 12px 0 0; }
.use-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.use-name { font-weight: 700; font-size: .88rem; color: var(--ink, #dcdbf0e1); }
.use-val {
  font: 600 .76rem/1 ui-monospace, "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums; color: var(--muted, #c6d0f0a6);
}
.use-track {
  height: 8px; border-radius: var(--radius-pill); overflow: hidden;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
}
.use-fill {
  height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand-600, #21bca5), #38ffb3);
  transition: width 400ms ease;
}
.use-fill.is-warn { background: linear-gradient(90deg, #ffb347, #ffd489); }
.use-fill.is-hot { background: linear-gradient(90deg, #ff5d6c, #ff8a94); }
/* Same trap as .adm-sec-head: the global `header { position: fixed }` rule is
   for the site nav; these section headers must stay in flow. */
.acct-sec-head {
  position: static; background: none; border: 0; z-index: auto;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  margin-bottom: 18px;
}
.account .acct-sec-title { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }

.acct-card { border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.015); padding: 18px 20px 20px; max-width: 44rem; }
.account .acct-card-h { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.acct-card-note { margin: 0 0 16px; color: var(--muted); font-size: .86rem; line-height: 1.5; }

/* email list */
.acct-alias-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.acct-loading { color: var(--muted); font-size: .86rem; }
.acct-alias { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: rgba(0,0,0,.18); }
.acct-alias-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acct-alias-email { color: var(--ink); font-size: .9rem; font-weight: 500; word-break: break-all; }
.acct-alias-actions { display: flex; gap: 6px; }

.acct-tag { display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .14rem .5rem; border-radius: 4px; }
.acct-tag.is-primary { color: var(--brand-600, #21bca5); background: rgba(33,188,165,.12); border: 1px solid rgba(33,188,165,.3); }
.acct-tag.is-verified { color: #7fd8ff; background: rgba(31,224,255,.1); border: 1px solid rgba(31,224,255,.28); }
.acct-tag.is-pending { color: #ffcf6a; background: rgba(255,180,40,.12); border: 1px solid rgba(255,180,40,.3); }

.acct-add-row { display: flex; gap: 8px; }
.acct-input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: rgba(0,0,0,.28); color: var(--ink); font: inherit; font-size: .9rem; color-scheme: dark; transition: border-color 160ms ease, box-shadow 160ms ease; }
.acct-input::placeholder { color: var(--muted); opacity: .75; }
.acct-input:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); box-shadow: 0 0 0 1px rgba(162,0,255,.22), 0 0 16px rgba(162,0,255,.14); }
.acct-input:focus-visible { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 1px rgba(162,0,255,.45), 0 0 14px rgba(162,0,255,.3); }
.acct-label { display: block; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 12px 0 4px; }

.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand-600); }

.acct-error { margin: 12px 0 0; padding: 8px 10px; border-radius: 7px; border: 1px solid rgba(239,95,107,.35); background: rgba(239,95,107,.1); color: #ff9aa2; font-size: .84rem; }

/* subscription */
.acct-plan { margin-bottom: 16px; }
.acct-plan-tier { text-transform: capitalize; font-size: 1.2rem; font-weight: 700; color: var(--ink); margin-right: 10px; }
.acct-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* coming soon */
.acct-soon { border: 1px dashed var(--border); border-radius: 12px; padding: 44px 24px; text-align: center; color: var(--muted); }
.acct-soon-badge { display: inline-block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--brand-600, #21bca5); border: 1px solid rgba(33,188,165,.3); border-radius: var(--radius-pill); padding: .2rem .7rem; margin-bottom: 12px; }
.acct-soon p { margin: 0; font-size: .9rem; max-width: 42ch; margin-inline: auto; line-height: 1.5; }

/* step-up modal */
.acct-modal-host[hidden] { display: none; }
.acct-modal-host { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 16px; }
.acct-modal-mask { position: absolute; inset: 0; background: rgba(4,7,14,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.acct-modal { position: relative; width: min(420px, 94vw); background: var(--menu, #0b1120); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px 18px; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.account .acct-modal-h { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.acct-modal-h { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.acct-modal-note { margin: 0 0 8px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.acct-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* responsive */
@media (max-width: 46rem) {
  .acct-shell { grid-template-columns: minmax(0, 1fr); }
  .acct-side { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px; gap: 4px; overflow-x: auto; }
  .acct-side-brand, .acct-side-foot { display: none; }
  .acct-nav { flex-direction: row; }
  .acct-nav-item span:not(.acct-nav-ico) { display: none; }
}

/* ---- My Products ---- */
.acct-product-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.acct-product {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid var(--border, rgba(255, 255, 255, .10));
}
.acct-product-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acct-product-name { font-weight: 800; color: var(--ink, #dcdbf0e1); }
.acct-product-code {
  font-family: ui-monospace, Menlo, monospace; font-size: .82rem; letter-spacing: .08em;
  color: var(--brand-600, #21bca5);
}
.acct-product-meta { font-size: .78rem; }
.acct-product-side { display: flex; align-items: center; gap: 10px; flex: none; }
.acct-empty { color: var(--muted, #c6d0f0a6); padding: 8px 2px; }
/* In-copy link idiom (same as .muted a in page-shell.css): visibly a link,
   not tinted body text. */
.acct-empty a {
  color: var(--brand-600, #21bca5);
  border-bottom: 1px solid rgba(33, 188, 165, .35);
  padding-bottom: 1px;
  transition: color 160ms ease, border-color 160ms ease;
}
.acct-empty a:hover { color: #fff; border-color: var(--brand-600, #21bca5); }
.acct-empty a:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

@media (max-width: 560px) {
  .acct-product { flex-direction: column; align-items: flex-start; gap: 10px; }
  .acct-product-side { width: 100%; justify-content: space-between; }
}
