/* A-eye account pages (signin.html, my-data.html). Same tokens as agent.css and
   ios/AEye/App/Views/Style.swift: black stage, SF type, white on dark, helper blue focus. */

:root {
  color-scheme: dark;
  --helper: #8EB6FF;
  --warn: #FF8A3D;
  --end-call: #E6383D;
  --calm: #3DDC97;
  --sheet-bg: #0C1016;
  --surface: rgba(255, 255, 255, 0.07);
  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, 0.7);
  --text-3: rgba(255, 255, 255, 0.55);
  --glass-tint: rgba(0, 0, 0, 0.32);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-blur: blur(20px) saturate(1.6);
  --r-card: 22px;
  --r-button: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-footnote: 13px;
  --fs-subhead: 15px;
  --fs-body: 17px;
  --fs-title3: 20px;
  --gutter: 16px;
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% 30%, #1a1f27 0%, #07090c 70%, #000 100%) fixed;
  padding: max(8px, env(safe-area-inset-top)) var(--gutter) calc(24px + env(safe-area-inset-bottom));
}

p { margin: 0; }
a { color: var(--helper); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--helper);
  outline-offset: 2px;
  border-radius: 6px;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Top bar: back button on the left, wordmark centred (ring-top in agent.css) ---------- */

.top {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  flex: 0 0 auto;
}

.wordmark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-subhead);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
}

.back {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}

.back:hover { text-decoration: none; background: rgba(255, 255, 255, 0.12); }

/* ---------- Card: one dark sheet in the middle of the stage ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 0;
}

.card {
  padding: 28px 24px 24px;
  border-radius: var(--r-card);
  background: var(--sheet-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--glass-edge);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--fs-footnote);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow svg { flex: 0 0 auto; width: 16px; height: 16px; stroke-width: 2; }

h1 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4.6vw, 40px);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  margin-top: 12px;
  max-width: 44ch;
  font-size: var(--fs-body);
  color: var(--text-2);
  text-wrap: pretty;
}

/* ---------- Actions: full-width stacked buttons ---------- */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--r-button);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 150ms ease, transform 150ms ease, opacity 150ms ease;
}

button:hover { background: rgba(255, 255, 255, 0.12); }
button:active { transform: scale(0.985); }
button:disabled { opacity: 0.45; cursor: default; transform: none; }
button:disabled:hover { background: var(--surface); }

button.primary {
  background: var(--helper);
  color: #000;
  box-shadow: none;
}

button.primary:hover { background: #a3c4ff; }
button.primary:disabled:hover { background: var(--helper); }

button.danger {
  background: color-mix(in srgb, var(--end-call) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--end-call) 55%, transparent);
  color: #ffb3b5;
}

button.danger:hover { background: color-mix(in srgb, var(--end-call) 28%, transparent); }

/* Google's rendered button: centre it and give it the same slot height. */
#google-button { display: flex; justify-content: center; min-height: 0; }
#google-button:empty { display: none; }

.note {
  margin-top: 14px;
  font-size: var(--fs-footnote);
  line-height: 1.5;
  color: var(--text-3);
}

/* Status line: mono, like ring-hint; turns into a pill once it has text. */
.status {
  margin-top: 16px;
  min-height: 1.5em;
  font-family: var(--mono);
  font-size: var(--fs-footnote);
  line-height: 1.5;
  color: var(--text-2);
}

.status:not(:empty) {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}

/* ---------- Footer links: iOS grouped rows (agent.css .group .row) ---------- */

.group {
  margin-top: 20px;
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.group .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  font-size: var(--fs-body);
  color: var(--text);
  text-decoration: none;
}

.group .row:hover { background: rgba(255, 255, 255, 0.06); }
.group .row + .row { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.group .row .leak { display: block; margin-top: 2px; font-size: var(--fs-footnote); color: var(--text-3); }
.group .row > span[aria-hidden] { color: var(--text-3); font-size: var(--fs-title3); line-height: 1; }

.privacy {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  font-size: var(--fs-subhead);
  line-height: 1.35;
  font-weight: 600;
  color: var(--calm);
}

.privacy svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; stroke-width: 2; }

/* ---------- My data: stored JSON ---------- */

details { margin-top: 20px; }

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
summary::after { content: "›"; color: var(--text-3); font-size: var(--fs-title3); transition: transform 150ms ease; }
details[open] summary { border-radius: 12px 12px 0 0; }
details[open] summary::after { transform: rotate(90deg); }

pre {
  margin: 0;
  max-height: 50dvh;
  overflow: auto;
  padding: 16px;
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

pre:empty { display: none; }

@media (max-width: 420px) {
  .card { padding: 22px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  button, summary::after { transition: none; }
  button:active { transform: none; }
}
