:root {
  --ink: #111;
  --muted: #6b6b6b;
  --line: #e7e5e2;
  --soft: #f3f3f3;
  --card: #fff;
  --danger: #b42318;
  --ok: #1f7a3a;
  --radius: 28px;
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #ece9e4; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
  background:
    radial-gradient(circle at 78% 30%, #cfcfcf 0, #e4e3e1 22%, transparent 48%),
    linear-gradient(180deg, #f6f3ee 0%, #ece9e4 60%, #7d7975 100%);
  background-attachment: fixed;
}

.card {
  width: min(1100px, 100%);
  min-height: 560px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 36px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 18px; color: inherit; text-decoration: none; }
.brand img { mix-blend-mode: multiply; }
.brand span { display: grid; line-height: 1.25; }
.brand strong { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.01em; }
.brand small { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.nav { margin-left: auto; display: flex; gap: 28px; align-items: center; }
.nav a, .nav button {
  font: inherit; font-size: 0.85rem; color: var(--muted); text-decoration: none;
  background: none; border: 0; padding: 6px 0; cursor: pointer;
}
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

.card-body { flex: 1; padding: 40px 36px; display: flex; flex-direction: column; }
.center { margin: auto; text-align: center; max-width: 440px; width: 100%; }

h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 500; margin: 0 0 12px; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 16px; }
.lede { color: var(--muted); margin: 0 0 28px; }
.eyebrow { font-size: 0.9rem; color: #444; margin: 0 0 16px; }

.badge {
  width: 128px; height: 128px; margin: 0 auto 32px;
  border-radius: 50%; background: var(--soft); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 2.4rem; color: #888;
}

form.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; text-align: left; min-width: 0; }
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; font-size: 0.85rem; font-weight: 500; }
input, select {
  width: 100%; min-width: 0;
  font: inherit; font-size: 0.95rem; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: #fafafa;
}
input:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; background: #fff; }
.hint { font-size: 0.78rem; color: var(--muted); font-weight: 400; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 600; font-size: 0.9rem; color: #fff;
  background: #000; border: 0; border-radius: 999px; padding: 15px 26px; cursor: pointer;
  text-decoration: none;
}
.button:hover { background: #222; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.alert { border-radius: 14px; padding: 12px 16px; font-size: 0.88rem; margin-bottom: 16px; text-align: left; }
.alert.error { background: #fdecea; color: var(--danger); }
.alert.ok { background: #e8f5ec; color: var(--ok); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 36px; }
.grid > * { min-width: 0; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } .card-header { flex-wrap: wrap; } .nav { margin-left: 0; } }

.panel { border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.employee { border-top: 1px solid var(--line); padding: 16px 0; display: grid; gap: 8px; }
.employee:first-of-type { border-top: 0; padding-top: 0; }
.employee-head { display: flex; align-items: center; gap: 12px; }
.employee-head img { border-radius: 50%; }
.employee-head div { display: grid; }
.employee-head small { color: var(--muted); font-size: 0.78rem; }
.pill { margin-left: auto; font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--soft); text-transform: uppercase; letter-spacing: 0.04em; }
.pill.active { background: #e8f5ec; color: var(--ok); }
.pill.pending { background: #fff4e0; color: #8a5300; }
.locations { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.locations li { font-size: 0.8rem; background: var(--soft); border-radius: 999px; padding: 5px 12px; }
.locations li span { color: var(--muted); }
.muted { color: var(--muted); font-size: 0.85rem; }
h2.spaced { margin-top: 28px; }
.role-form { display: flex; gap: 8px; align-items: center; }
.role-form select { flex: 1; min-width: 0; padding: 8px 12px; font-size: 0.82rem; }
.button.small { padding: 8px 16px; font-size: 0.8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input[type="file"] { padding: 10px 12px; }
/* The custom email field only applies to manager roles. */
.manager-only { display: none; }
form:has(#role option[data-manager]:checked) .manager-only { display: grid; }
.email-field { display: flex; align-items: center; gap: 8px; }
.email-field input { flex: 1; min-width: 0; }
.email-field span { color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.grid h1 { margin-bottom: 24px; }
.pill { white-space: nowrap; }
