/*
 * An explicit display rule beats the [hidden] attribute, and several rules
 * below set display: block. Without this, setting .hidden = true on a field
 * has no visible effect -- which is exactly what happened to the Name field
 * on the sign-in tab.
 */
[hidden] { display: none !important; }

.auth-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: var(--space-10);
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 28px 26px 26px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}
.auth-brand { font-weight: 700; letter-spacing: 4px; font-size: 19px; }
.auth-tagline { color: var(--muted); font-size: var(--text-md); margin: 3px 0 var(--space-10); }

.auth-tabs { display: flex; gap: var(--space-2); margin-bottom: 18px; }
.auth-tab {
  flex: 1; padding: 7px var(--space-4); font: inherit; font-size: var(--text-md); cursor: pointer;
  background: none; border: none; border-bottom: 2px solid var(--line);
  color: var(--muted);
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.auth-field { display: block; margin-bottom: var(--space-7); }
.auth-field span { display: block; font-size: var(--text-sm); color: var(--muted); margin-bottom: var(--space-2); }
.auth-field input {
  width: 100%; font: inherit; padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff;
}
.auth-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth-hint { display: block; color: var(--muted); font-size: var(--text-xs); margin-top: var(--space-2); }

.auth-error {
  font-size: var(--text-md); padding: 9px 11px; border-radius: var(--radius-md); margin-bottom: var(--space-7);
  border-left: 3px solid #c62828; background: #fdeeee;
}
.auth-submit { width: 100%; padding: 9px; font-weight: 600; }

.userbar { display: flex; align-items: center; gap: var(--space-5); font-size: var(--text-md); }
.userbar .who { color: var(--muted); }
.userbar .signout {
  font: inherit; font-size: var(--text-md); background: none; border: none;
  color: var(--accent); cursor: pointer; padding: var(--space-1) var(--space-2);
}
.userbar .signout:hover { text-decoration: underline; }

/* Approval invitation landing page. */
.approve-details { margin: var(--space-7) 0; display: grid; grid-template-columns: auto 1fr; gap: var(--space-3) var(--space-7); }
.approve-details dt { font-size: var(--text-sm); color: var(--muted); }
.approve-details dd { margin: 0; font-size: var(--text-base); }

/* The stay-signed-in box.
   .auth-field stretches its input to 100% and makes its span a block, which is
   right for a text field and turns a checkbox into a lone box with its words
   stranded beside it. Both are undone here rather than by loosening the rule
   the text fields depend on. */
.auth-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}
.auth-check input {
  width: auto;
  flex: 0 0 auto;
  margin-top: var(--space-1);
}
.auth-check span {
  display: inline;
  margin-bottom: 0;
  font-size: var(--text-sm);
  line-height: 1.45;
}
