/* My Account and Admin (account.html, admin.html). Builds on app.css. */

.page-main {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#adminContent {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#adminContent.hidden {
  display: none;
}

.page-card h2 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.page-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.page-ok {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-text);
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.page-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* 16px stops iOS zooming in on focus. */
.page-input {
  flex: 1 1 180px;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 1rem;
  background: var(--bg-card);
  color: var(--text-main);
}

.page-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.page-btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
}

.page-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.page-steps > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-steps.hidden {
  display: none;
}

.totp-qr {
  align-self: center;
  width: 200px;
  max-width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.totp-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.totp-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.totp-codes div {
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-app);
}

.totp-input {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.15em;
  text-align: center;
}

.page-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* A user's buttons wrap under their name, and the reset form under that. */
.admin-user-stack {
  flex-wrap: wrap;
  row-gap: 10px;
}

.admin-user-stack .admin-user-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.reset-form {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.reset-form.hidden {
  display: none;
}

.reset-form [data-error] {
  flex-basis: 100%;
}
