/* agfamily management UI. Deliberately plain: this is a small utility page
   used a few times a year, not a product surface. */

:root {
  --bg: #fbfbf9;
  --fg: #1c1c1a;
  --muted: #6b6b66;
  --line: #ddddd6;
  --accent: #2f5d50;
  --danger: #8c2f2f;
  --ok: #2f5d50;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161815;
    --fg: #eceae4;
    --muted: #9a9a92;
    --line: #33352f;
    --accent: #7fb3a1;
    --danger: #d98b8b;
    --ok: #7fb3a1;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: 60rem;
  margin-inline: auto;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0 0.75rem;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.35rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 0.9rem; margin: 1.5rem 0 0.4rem; text-transform: uppercase;
     letter-spacing: 0.06em; color: var(--muted); }

section { border-top: 1px solid var(--line); padding-top: 0.5rem; }
section:first-of-type { border-top: none; }

.muted { color: var(--muted); font-size: 0.9rem; max-width: 46rem; }

label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.15rem; }
label.check { display: flex; align-items: center; gap: 0.4rem; }

input, select {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  min-width: 12rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin: 0.75rem 0;
}

button {
  font: inherit;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
}

button.secondary { background: transparent; color: var(--accent); }
button.danger { background: var(--danger); border-color: var(--danger); }
button.link {
  background: none; border: none; color: var(--accent);
  text-decoration: underline; padding: 0 0 0 0.5rem; cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }

table { border-collapse: collapse; width: 100%; margin-top: 0.5rem; }
th, td { text-align: left; padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid var(--line); }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
tr.revoked td { color: var(--muted); text-decoration: line-through; }

ul { padding-left: 1.1rem; }
li { margin: 0.2rem 0; }

a { color: var(--accent); }

.error { color: var(--danger); }
.ok { color: var(--ok); }

.secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  padding: 0.6rem 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 4px;
  overflow-wrap: anywhere;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin: 0;
  max-width: 90vw;
}
#toast.error { background: var(--danger); color: #fff; }
