/* admin.css — the account tools.
 *
 * Deliberately plainer than the rest of the site. This screen can take over
 * somebody's account, and a screen that can do that should look like a tool
 * rather than like the cosy part of the app. The one place colour is used
 * heavily is the destructive card, so that the difference between sending a
 * recovery link and setting a password is visible before you read either. */

.adm-host { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.adm-root { padding: var(--s4) var(--s4) var(--s8); max-width: 720px; margin: 0 auto; }
.adm-dim { color: var(--text-dim); font-size: 0.86rem; line-height: 1.55; }

.adm-head { margin-bottom: var(--s4); }
.adm-head h2 { margin: 0 0 var(--s1); font-size: 1.4rem; word-break: break-word; }
.adm-head p { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.55; }

.adm-crumb { margin-bottom: var(--s2); }
.adm-back {
    border: 0; background: none; color: var(--accent); font: inherit;
    font-size: 0.92rem; cursor: pointer; padding: var(--s1) 0; min-height: 44px;
}

.adm-error, .adm-notice {
    margin: 0 0 var(--s3); padding: var(--s2) var(--s3);
    border-radius: 10px; font-size: 0.9rem; line-height: 1.5;
}
.adm-error  { background: rgba(180, 50, 50, 0.10); border: 1px solid rgba(180, 50, 50, 0.35); }
.adm-notice { background: rgba(60, 150, 100, 0.10); border: 1px solid rgba(60, 150, 100, 0.35); }

.adm-search, .adm-row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.adm-search input, .adm-row input {
    flex: 1 1 220px; min-width: 0;
    border: 1px solid var(--border); border-radius: 10px;
    padding: var(--s2) var(--s3); font: inherit; font-size: 1rem;
    background: var(--card); color: inherit; min-height: 44px;
}

.adm-btn {
    border: 1px solid var(--border); background: var(--card); color: inherit;
    font: inherit; font-size: 0.92rem; padding: var(--s2) var(--s4);
    border-radius: 10px; cursor: pointer; min-height: 44px; white-space: nowrap;
}
.adm-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.adm-ghost { background: none; }
.adm-danger-btn { background: #b03a3a; border-color: #b03a3a; color: #fff; font-weight: 600; }

.adm-or { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }

.adm-list { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s1); }
.adm-person {
    width: 100%; display: grid;
    grid-template-columns: 1fr auto; align-items: center; gap: 2px var(--s2);
    text-align: left; border: 1px solid var(--border); border-radius: 12px;
    background: var(--card); color: inherit; font: inherit;
    padding: var(--s3); cursor: pointer;
}
.adm-person-email { font-weight: 600; word-break: break-all; }
.adm-person-sub { grid-column: 1; font-size: 0.8rem; color: var(--text-dim); }
.adm-go { grid-row: 1 / span 2; color: var(--text-dim); font-size: 1.2rem; }

.adm-card {
    margin-top: var(--s4); padding: var(--s4);
    border: 1px solid var(--border); border-radius: 14px; background: var(--card);
}
.adm-card h3 { margin: 0 0 var(--s1); font-size: 1rem; }
.adm-card p { margin: 0 0 var(--s3); }

/* The one card that can hand over an account looks like it. */
.adm-card.adm-danger { border-color: rgba(176, 58, 58, 0.55); background: rgba(176, 58, 58, 0.05); }

/* A password or a link, shown exactly once. Monospace because somebody is
   going to read it out loud. */
.adm-issued {
    margin-bottom: var(--s4); padding: var(--s3);
    border: 1px dashed var(--accent); border-radius: 12px;
    background: rgba(242, 115, 77, 0.07);
}
.adm-issued-label {
    display: block; font-size: 0.7rem; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--accent); margin-bottom: var(--s2);
}
.adm-issued-row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.adm-issued-row code {
    flex: 1 1 240px; min-width: 0; overflow-x: auto; white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.95rem; padding: var(--s2); border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
}

.adm-audit { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.adm-audit li {
    display: grid; gap: 2px; padding-bottom: var(--s2);
    border-bottom: 1px solid var(--border); font-size: 0.84rem;
}
.adm-audit li:last-child { border-bottom: 0; padding-bottom: 0; }
.adm-audit-what { font-weight: 600; }
.adm-audit-who, .adm-audit-when, .adm-audit-detail { color: var(--text-dim); }
.adm-audit-who { word-break: break-all; }

/* The password field is the point of its card, so it gets a label and room to
   breathe rather than sitting in a row of equals. */
.adm-label {
    display: block; font-size: 0.8rem; font-weight: 600;
    margin-bottom: var(--s2);
}
.adm-pw-note {
    margin: var(--s2) 0 0; font-size: 0.78rem; color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

/* The generator is an offer, not the route through, so it is a quiet link
   under the thing it is an alternative to. */
.adm-tiny {
    margin-top: var(--s3); padding: var(--s1) 0;
    border: 0; background: none; color: var(--accent);
    font: inherit; font-size: 0.84rem; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
    min-height: 44px;
}
