@font-face {
  font-family: Poppins;
  src: url('/assets/brand/poppins-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('/assets/brand/poppins-semibold.ttf') format('truetype');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --green: #c2d500;
  --ink: #262626;
  --canvas: #faf5e6;
  --surface: #fff;
  --muted: #5b5b52;
  --line: #d5d6ca;
  --danger: #922d2d;
  --focus: #176485;
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
button,
input,
select,
textarea {
  min-height: 44px;
}
a {
  color: var(--ink);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 1rem;
  background: white;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.25;
}
h2 {
  font-size: 1.15rem;
}
p {
  line-height: 1.65;
}
.shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  min-width: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.brand {
  display: grid;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.brand img {
  display: block;
  max-width: 100%;
  height: auto;
}
.brand span {
  border-left: 4px solid var(--green);
  padding-left: 0.75rem;
}
nav {
  display: grid;
  gap: 0.45rem;
}
.nav-button {
  background: none;
  border: 0;
  border-radius: 8px;
  text-align: left;
  padding: 0.8rem;
  color: var(--ink);
}
.nav-button:hover {
  background: var(--canvas);
}
.nav-button[aria-current='page'] {
  background: var(--green);
  font-weight: 600;
}
.sidebar-footer {
  display: grid;
  gap: 0.7rem;
  margin-top: auto;
}
.session-email {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
.role-label {
  font-size: 0.75rem;
  color: var(--muted);
}
.workspace {
  min-width: 0;
}
main {
  padding: 2.5rem clamp(1rem, 4vw, 4rem);
  min-width: 0;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.page-header p {
  margin-top: 0.7rem;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.environment {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid var(--ink);
  border-radius: 30px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--canvas);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  min-width: 0;
}
.stack {
  display: grid;
  gap: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.filters {
  align-items: flex-end;
}
.filters label {
  flex: 1 1 12rem;
}
.filters button {
  flex: 0 0 auto;
}
.primary,
.secondary,
.danger {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--ink);
  font-weight: 600;
}
.primary {
  background: var(--green);
  color: var(--ink);
}
.primary:hover {
  background: #d4e431;
}
.secondary {
  background: white;
  color: var(--ink);
}
.secondary:hover {
  background: var(--canvas);
}
.danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.link {
  background: none;
  border: 0;
  text-decoration: underline;
  text-align: left;
  color: var(--ink);
  padding: 0.4rem;
  overflow-wrap: anywhere;
}
.small {
  font-size: 0.8rem;
}
.muted {
  color: var(--muted);
}
label {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #76776c;
  background: white;
  color: var(--ink);
  border-radius: 7px;
  padding: 0.7rem;
  max-width: 100%;
}
textarea {
  resize: vertical;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}
.check input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: #657000;
}
.check span {
  padding-top: 0.1rem;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 38rem;
}
th,
td {
  padding: 1rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
td p {
  overflow-wrap: anywhere;
}
td .stack {
  min-width: 10rem;
}
td:first-child {
  font-weight: 600;
}
.status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #9a9b8b;
  border-radius: 30px;
  padding: 0.25rem 0.6rem;
  background: #f4f4ef;
  line-height: 1.6;
}
.state-active,
.state-applied,
.state-completed,
.state-ready {
  background: #edf3b8;
  border-color: #819000;
}
.state-revoked,
.state-failed,
.state-blocked {
  color: #792222;
  background: #fff1ef;
  border-color: #b76868;
}
.state-expired,
.state-needs_review,
.state-review_required,
.state-pending_identity {
  background: #fff5d8;
  border-color: #9f7a22;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.summary-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  padding: 1rem;
}
.summary-card strong {
  font-size: 2rem;
}
.summary-card p {
  font-size: 0.85rem;
}
.error {
  border-left: 4px solid var(--danger);
  padding: 1rem;
  color: #792222;
  background: #fff4f0;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}
.notice {
  border-left: 4px solid #829000;
  background: #f2f4d0;
  padding: 1rem;
  margin-bottom: 1rem;
}
.module-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0;
  min-width: 0;
}
.module-card legend {
  font-weight: 600;
  padding: 0 0.4rem;
}
.preview-person {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.recipient {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.selection-count {
  font-size: 0.85rem;
}
.technical {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
details {
  max-width: 100%;
  margin-top: 1rem;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 0.7rem 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  width: min(38rem, calc(100% - 2rem));
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #26262699;
}
.entry {
  max-width: 38rem;
  margin: 10vh auto;
  background: white;
  border: 1px solid var(--line);
  border-top: 8px solid var(--green);
  border-radius: 16px;
  padding: 2.5rem;
}
.entry .brand img {
  width: 190px;
}
.entry .environment {
  justify-self: start;
}
#global-error:empty {
  display: none;
}
.pagination {
  margin-top: 1rem;
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  aside {
    padding: 1rem;
    gap: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside .brand {
    display: flex;
    align-items: center;
  }
  aside .brand img {
    width: 110px;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  .nav-button {
    flex-shrink: 0;
  }
  .sidebar-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .role-label {
    display: none;
  }
  .sidebar-footer button {
    grid-column: 2;
    grid-row: 1;
  }
  main {
    padding: 1.5rem 1rem;
  }
  .entry {
    margin: 2rem 1rem;
  }
  .page-header {
    flex-wrap: wrap;
  }
  .summary-grid {
    gap: 0.5rem;
  }
  .summary-card {
    padding: 0.7rem;
  }
}
@media (max-width: 600px) {
  table {
    min-width: 0;
  }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  tbody,
  tr,
  td {
    display: block;
  }
  tr {
    border-bottom: 2px solid var(--line);
    padding: 0.5rem 0;
  }
  td {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.5rem;
    border: 0;
    padding: 0.45rem 0.2rem;
  }
  td:before {
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
  }
  td .stack {
    min-width: 0;
  }
  .card {
    padding: 1rem;
  }
  .toolbar > button {
    flex-grow: 1;
  }
  .summary-card strong {
    font-size: 1.5rem;
  }
  .summary-card p {
    font-size: 0.75rem;
  }
  .entry {
    padding: 1.5rem;
  }
  .recipient {
    align-items: flex-start;
  }
  .page-header .environment {
    order: -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
