@font-face{font-family:"Bagoss Standard";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/BagossStandard-Light.woff2") format("woff2");}
@font-face{font-family:"Bagoss Standard";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/BagossStandard-Regular.woff2") format("woff2");}
@font-face{font-family:"Bagoss Standard";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/BagossStandard-Medium.woff2") format("woff2");}

:root {
  --ink: #111111;
  --muted: #64645f;
  --line: rgba(0, 0, 0, 0.12);
  --paper: #f4efe8;
  --panel: #ffffff;
  --green: #003e26;
  --lime: #c7f100;
  --blue: #1f5eff;
  --red: #b42318;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Outfit, Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 68px;
  padding: 0 40px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  height: 24px;
  display: block;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-link,
.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero-band {
  min-height: 146px;
  padding: 30px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Bagoss Standard", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 0.95;
}

.session-pill {
  min-height: 36px;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel,
.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  min-height: 96px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.metric-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  color: #3a3000;
  background: #fff8d7;
  border-color: #eadc89;
}

.panel {
  overflow: hidden;
  box-shadow: var(--shadow);
}

.toolbar {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto auto;
  gap: 10px;
  align-items: center;
}

.search-box input,
.toolbar select,
.dialog-card input,
.dialog-card select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.dialog-card select[multiple] {
  min-height: 138px;
  padding: 8px;
}

.primary-button,
.secondary-button,
.row-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.secondary-button,
.row-button {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.row-button.danger {
  color: var(--red);
}

.icon-button {
  width: 38px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.user-cell {
  min-width: 260px;
  white-space: normal;
}

.user-name {
  font-weight: 700;
}

.user-email {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.status {
  min-width: 92px;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf7ee;
  color: #145a23;
  font-size: 0.78rem;
  font-weight: 700;
}

.status.pending {
  background: #fff2d8;
  color: #805100;
}

.status.disabled {
  background: #f7e8e6;
  color: var(--red);
}

.group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 360px;
  white-space: normal;
}

.chip {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1b2e6b;
  font-size: 0.78rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.actions-col {
  text-align: right;
}

dialog {
  width: min(520px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.dialog-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.dialog-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--ink) !important;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.user-context {
  padding: 12px;
  border-radius: 8px;
  background: #f6f6f3;
  color: var(--muted);
}

.group-list {
  display: grid;
  gap: 12px;
}

.access-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.access-section-head {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f7f4;
}

.access-section-title {
  color: var(--ink);
  font-weight: 800;
}

.access-section-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.access-options {
  display: grid;
}

.access-option {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.access-option:last-child {
  border-bottom: 0;
}

.access-option span {
  display: grid;
  gap: 2px;
}

.access-option strong {
  font-size: 0.92rem;
}

.access-option small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .topbar {
    padding: 0 20px;
  }

  .layout {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .hero-band {
    min-height: 120px;
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics,
  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar .search-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .brand img {
    height: 20px;
  }

  .ghost-link {
    display: none;
  }

  .metrics,
  .toolbar {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 12px;
  }

  .actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
