:root {
  color-scheme: light;
  --ink: #10251f;
  --muted: #5e6e68;
  --green: #0b665f;
  --green-dark: #084c47;
  --mint: #e5f4ef;
  --line: #d7e1dd;
  --paper: #fffefa;
  --canvas: #eef4f1;
  --danger: #a92e28;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 12% 0%, #d8eee7 0, transparent 32rem), var(--canvas);
}
a { color: inherit; }
button, input { font: inherit; }

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  padding: max(1rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 1rem max(1.25rem, env(safe-area-inset-left));
  background: rgba(255, 254, 250, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 850; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .72rem; color: white; background: var(--green); font-family: Georgia, serif; }
.home-link { font-weight: 750; color: var(--green); }

.account-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 30rem);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
  width: min(70rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) 0;
}
.account-intro h1 { max-width: 12ch; margin: .35rem 0 1.15rem; font-family: Georgia, serif; font-size: clamp(2.5rem, 6vw, 5rem); line-height: .98; letter-spacing: -.045em; }
.account-intro > p { max-width: 45rem; color: var(--muted); font-size: 1.08rem; line-height: 1.75; }
.eyebrow { margin: 0; color: var(--green); font-size: .76rem; font-weight: 900; letter-spacing: .16em; }

.account-card { padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 1.3rem; background: var(--paper); box-shadow: 0 1.25rem 3.2rem rgba(23, 58, 47, .12); }
.status { margin-bottom: 1.25rem; padding: .7rem .8rem; border-radius: .7rem; font-size: .9rem; font-weight: 750; }
.status-loading { color: #4a5a55; background: #edf1ef; }
.status-online { color: #07584e; background: #daf2e9; }
.status-offline { color: #75511b; background: #fff0cd; }
.status-disabled { color: #45504c; background: #edf1ef; }
.status-error { color: var(--danger); background: #fde8e6; }
.tab-list { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-bottom: 1.25rem; padding: .28rem; border-radius: .8rem; background: #edf2ef; }
.tab-button { padding: .7rem; border: 0; border-radius: .62rem; color: #52615c; background: transparent; font-weight: 800; cursor: pointer; }
.tab-button.active { color: var(--green); background: var(--paper); box-shadow: 0 .15rem .45rem rgba(20, 54, 43, .09); }
.account-form { display: grid; gap: 1rem; }
.account-form label:not(.check-row) { display: grid; gap: .42rem; font-size: .9rem; font-weight: 800; }
.account-form input[type="text"], .account-form input[type="email"], .account-form input[type="password"] { width: 100%; min-height: 3rem; padding: .7rem .8rem; border: 1px solid #bfcac6; border-radius: .68rem; color: var(--ink); background: white; }
.account-form input:focus { outline: 3px solid rgba(11, 102, 95, .17); border-color: var(--green); }
.account-form small, .check-row small { display: block; margin-top: .15rem; color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.4; }
.form-link { justify-self: start; margin-top: -.45rem; padding: 0; border: 0; color: var(--green); background: transparent; font-size: .86rem; font-weight: 800; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.form-link:hover { color: var(--green-dark); }
.check-row { display: flex; gap: .7rem; align-items: flex-start; color: #344741; font-size: .9rem; }
.check-row input { width: 1.1rem; height: 1.1rem; margin-top: .18rem; accent-color: var(--green); }
.primary-button, .secondary-button, .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .7rem 1rem; border-radius: .72rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid var(--green); color: white; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { border: 1px solid #a9c9c0; color: var(--green); background: #f3faf7; }
.text-button { border: 0; color: #6c3532; background: transparent; }
button:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 1.4rem; margin: .9rem 0 0; color: var(--danger); font-size: .88rem; font-weight: 700; }
.account-card h2 { margin: .35rem 0 .15rem; font-family: Georgia, serif; font-size: 2rem; }
.muted { margin: 0; color: var(--muted); }
.user-id-value { margin: .55rem 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1rem; user-select: all; }
#account-user-id-card .secondary-button { margin-top: .85rem; }
#copy-user-id-status { display: block; min-height: 1.35em; margin-top: .55rem; font-size: .875rem; font-weight: 750; }
.account-facts { display: grid; gap: .35rem; margin: 1.5rem 0; }
.account-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-bottom: 1px solid var(--line); }
.account-facts dt { color: var(--muted); }
.account-facts dd { margin: 0; font-weight: 800; text-align: right; }
.button-stack { display: grid; gap: .6rem; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .account-shell { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0 4rem; }
  .account-intro h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .account-header { min-height: 4rem; }
  .home-link { font-size: .88rem; }
}
