:root {
  --ink-950: #0b1220;
  --ink-900: #111a2e;
  --ink-800: #1d2942;
  --ink-700: #34415c;
  --ink-600: #526079;
  --ink-500: #718096;
  --ink-400: #94a0b3;
  --ink-300: #c3cad6;
  --ink-200: #dde2e9;
  --ink-100: #edf0f4;
  --ink-50: #f7f8fa;
  --white: #fff;
  --brand-700: #3157cc;
  --brand-600: #4267dc;
  --brand-500: #5579ee;
  --brand-100: #e8edff;
  --brand-50: #f2f5ff;
  --teal-600: #0c8f7f;
  --teal-500: #13a796;
  --teal-100: #d8f5ef;
  --violet-100: #eee9ff;
  --violet-600: #7454cc;
  --amber-100: #fff1cf;
  --amber-700: #9a6500;
  --red-50: #fff5f5;
  --red-100: #fee2e2;
  --red-600: #dc3f4d;
  --red-700: #b82838;
  --green-100: #dff7e9;
  --green-700: #18734a;
  --sidebar-width: 264px;
  --shadow-sm: 0 1px 2px rgb(11 18 32 / 5%), 0 1px 4px rgb(11 18 32 / 4%);
  --shadow-md: 0 10px 30px rgb(11 18 32 / 8%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: 160ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--ink-900);
  background: var(--ink-50);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: .925rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
  fill: currentcolor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: .45rem;
  color: var(--ink-950);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1.12;
}

h2 {
  margin-bottom: .3rem;
  color: var(--ink-950);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -.018em;
}

h3 {
  margin-bottom: .3rem;
  color: var(--ink-950);
  font-size: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--ink-500);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 25px 18px 18px;
  color: #dce4f7;
  background:
    radial-gradient(circle at 15% 5%, rgb(74 105 222 / 18%), transparent 30%),
    linear-gradient(175deg, #111b31 0%, #0b1220 72%);
  border-right: 1px solid rgb(255 255 255 / 5%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--white);
}

.brand__mark {
  position: relative;
  display: inline-flex;
  width: 31px;
  height: 31px;
  align-items: end;
  justify-content: center;
  gap: 2px;
  padding: 7px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--brand-500), #6b8cff);
  border-radius: 9px;
  box-shadow: 0 5px 14px rgb(65 100 220 / 27%);
}

.brand__mark::after {
  position: absolute;
  top: -12px;
  right: -10px;
  width: 25px;
  height: 25px;
  content: "";
  background: rgb(255 255 255 / 18%);
  border-radius: 50%;
}

.brand__mark > span {
  z-index: 1;
  width: 4px;
  background: white;
  border-radius: 2px;
}

.brand__mark > span:nth-child(1) { height: 8px; opacity: .75; }
.brand__mark > span:nth-child(2) { height: 16px; }
.brand__mark > span:nth-child(3) { height: 12px; opacity: .88; }

.brand__mark--small {
  width: 27px;
  height: 27px;
  padding: 6px;
  border-radius: 8px;
}

.brand__name {
  font-size: 1.25rem;
  font-weight: 730;
  letter-spacing: -.025em;
}

.organization-card {
  display: flex;
  margin: 27px 2px 22px;
  padding: 14px;
  flex-direction: column;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: var(--radius-md);
}

.organization-card__label {
  margin-bottom: 4px;
  color: #8997b5;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.organization-card strong {
  overflow: hidden;
  color: #f5f7fd;
  font-size: .92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-card__plan {
  margin-top: 2px;
  color: #929fbb;
  font-size: .73rem;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #9facbf;
  font-size: .86rem;
  font-weight: 580;
  border-radius: 9px;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.nav-link svg {
  width: 19px;
  height: 19px;
  opacity: .9;
}

.nav-link:hover {
  color: #f2f5fc;
  background: rgb(255 255 255 / 5%);
}

.nav-link.is-active {
  color: white;
  background: linear-gradient(90deg, rgb(76 108 225 / 27%), rgb(76 108 225 / 12%));
}

.nav-link.is-active::before {
  position: absolute;
  left: -18px;
  width: 3px;
  height: 22px;
  content: "";
  background: #7894ff;
  border-radius: 0 3px 3px 0;
}

.sidebar__footer {
  margin-top: auto;
  padding: 16px 3px 0;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.sidebar__user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #dce5ff;
  background: #293856;
  border: 1px solid #3a4a69;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 700;
}

.sidebar__identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar__identity strong,
.sidebar__identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__identity strong {
  color: #f1f4fb;
  font-size: .8rem;
}

.sidebar__identity small {
  color: #8794ac;
  font-size: .68rem;
}

.logout-button {
  margin: 10px 0 0 44px;
  padding: 0;
  color: #8190aa;
  background: none;
  border: 0;
  font-size: .72rem;
  cursor: pointer;
}

.logout-button:hover {
  color: #dae1ef;
}

.main-column {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 clamp(20px, 4vw, 52px);
  background: rgb(247 248 250 / 88%);
  border-bottom: 1px solid rgb(221 226 233 / 70%);
  backdrop-filter: blur(14px);
}

.topbar__brand,
.mobile-menu {
  display: none;
}

.content {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 36px clamp(20px, 4vw, 52px) 70px;
}

.page-header {
  display: flex;
  min-height: 80px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-header--compact {
  min-height: 0;
  align-items: center;
}

.page-header--center {
  display: block;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.page-header p {
  margin-bottom: 0;
  color: var(--ink-600);
}

.page-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.center-actions {
  justify-content: center;
  margin-top: 24px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--brand-600);
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.eyebrow--light { color: #9bb0ff; }
.eyebrow--danger { color: var(--red-600); }
.eyebrow--success { color: var(--green-700); }

.back-link {
  display: block;
  width: fit-content;
  margin-bottom: 13px;
  color: var(--ink-500);
  font-size: .8rem;
  font-weight: 600;
}

.back-link:hover {
  color: var(--brand-600);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), border var(--transition), box-shadow var(--transition), transform var(--transition);
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:focus-visible,
.form-control:focus,
.search-field:focus-within,
.select-field:focus-within,
.copy-field:focus-within {
  outline: 3px solid rgb(83 119 237 / 18%);
  outline-offset: 1px;
}

.button--primary {
  color: white;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 5px 13px rgb(49 87 204 / 20%);
}

.button--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4b71e7, #294ec0);
  box-shadow: 0 7px 17px rgb(49 87 204 / 25%);
}

.button--secondary {
  color: var(--ink-800);
  background: white;
  border-color: var(--ink-200);
  box-shadow: var(--shadow-sm);
}

.button--secondary:hover {
  border-color: var(--ink-300);
}

.button--danger,
.button--danger-ghost {
  color: var(--red-700);
  background: white;
  border-color: #f2bfc4;
}

.button--danger {
  color: white;
  background: var(--red-600);
  border-color: var(--red-600);
}

.button--danger:hover {
  background: var(--red-700);
}

.button--danger-ghost:hover {
  background: var(--red-50);
}

.button--small {
  min-height: 36px;
  padding: 7px 13px;
  font-size: .78rem;
}

.button--large {
  min-height: 49px;
}

.button--wide {
  width: 100%;
}

.button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.text-link {
  color: var(--brand-600);
  font-size: .8rem;
  font-weight: 680;
}

.text-link:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.panel {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.panel__header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink-100);
}

.panel__header h2,
.panel__header p {
  margin-bottom: 0;
}

.panel__header p {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: .78rem;
}

.metric-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  position: relative;
  display: grid;
  min-height: 154px;
  padding: 21px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  position: absolute;
  right: -26px;
  bottom: -36px;
  width: 100px;
  height: 100px;
  content: "";
  background: radial-gradient(circle, rgb(84 119 236 / 6%), transparent 66%);
}

.metric-card__icon {
  display: grid;
  width: 37px;
  height: 37px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 10px;
}

.metric-card__icon svg {
  width: 18px;
  height: 18px;
}

.metric-card__icon--blue { color: var(--brand-600); background: var(--brand-100); }
.metric-card__icon--violet { color: var(--violet-600); background: var(--violet-100); }
.metric-card__icon--green { color: var(--teal-600); background: var(--teal-100); }
.metric-card__icon--amber { color: var(--amber-700); background: var(--amber-100); }

.metric-card__label {
  color: var(--ink-600);
  font-size: .75rem;
  font-weight: 630;
}

.metric-card > strong {
  margin: 2px 0 0;
  color: var(--ink-950);
  font-size: 1.65rem;
  font-weight: 740;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.metric-card > small {
  color: var(--ink-400);
  font-size: .69rem;
}

.dashboard-grid,
.detail-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr);
  gap: 16px;
}

.compact-list {
  padding: 4px 8px 9px;
}

.compact-list__row {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 9px;
  transition: background var(--transition);
}

.compact-list__row:hover {
  background: var(--ink-50);
}

.compact-list__main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.compact-list__main strong,
.compact-list__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list__main strong {
  color: var(--ink-800);
  font-size: .84rem;
}

.compact-list__main small {
  color: var(--ink-500);
  font-size: .71rem;
}

.device-avatar,
.contact-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 10px;
  font-size: .76rem;
  font-weight: 750;
}

.device-avatar {
  color: var(--teal-600);
  background: var(--teal-100);
  border-radius: 11px;
}

.status {
  display: inline-flex;
  width: fit-content;
  min-height: 23px;
  align-items: center;
  padding: 3px 8px;
  color: var(--ink-600);
  background: var(--ink-100);
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.status--active,
.status--applied,
.status--success {
  color: var(--green-700);
  background: var(--green-100);
}

.status--wipe_required,
.status--warning,
.status--issued {
  color: var(--amber-700);
  background: var(--amber-100);
}

.status--revoked,
.status--failed,
.status--danger,
.status--suspended {
  color: var(--red-700);
  background: var(--red-100);
}

.status--neutral {
  color: var(--ink-600);
  background: var(--ink-100);
}

.usage-panel {
  padding-bottom: 23px;
}

.plan-chip {
  padding: 5px 9px;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
}

.usage-ring {
  display: grid;
  width: 136px;
  height: 136px;
  margin: 27px auto 19px;
  place-items: center;
  background: conic-gradient(var(--brand-500) var(--usage), var(--ink-100) 0);
  border-radius: 50%;
}

.usage-ring::before {
  position: absolute;
  width: 108px;
  height: 108px;
  content: "";
  background: white;
  border-radius: 50%;
}

.usage-ring > div {
  z-index: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.usage-ring strong {
  color: var(--ink-950);
  font-size: 1.35rem;
  letter-spacing: -.04em;
}

.usage-ring span {
  color: var(--ink-500);
  font-size: .68rem;
}

.usage-copy {
  padding: 0 22px;
  text-align: center;
}

.usage-copy strong {
  font-size: .83rem;
}

.usage-copy p {
  margin: 4px 0 13px;
  color: var(--ink-500);
  font-size: .72rem;
}

.progress {
  height: 6px;
  margin: 0 22px;
  overflow: hidden;
  background: var(--ink-100);
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-500), #7592fa);
  border-radius: inherit;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap--preview {
  max-height: 600px;
}

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

th,
td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--ink-100);
}

th {
  color: var(--ink-500);
  background: #fafbfc;
  font-size: .67rem;
  font-weight: 720;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--ink-700);
  font-size: .78rem;
}

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

tbody tr:hover td {
  background: #fcfcfd;
}

.row--error td { background: var(--red-50); }
.row--warning td { background: #fffbef; }

.contact-cell {
  display: flex;
  min-width: 180px;
  align-items: center;
  gap: 11px;
}

.contact-cell > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.contact-cell strong {
  color: var(--ink-900);
  font-size: .8rem;
}

.contact-cell small,
.cell-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: .69rem;
}

.error-text {
  color: var(--red-700);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-flex;
  padding: 3px 7px;
  color: var(--ink-700);
  background: var(--ink-100);
  border-radius: 5px;
  font-size: .64rem;
  font-weight: 630;
}

.actions-cell {
  width: 1%;
  text-align: right;
}

.icon-button {
  color: var(--brand-600);
  font-size: .72rem;
  font-weight: 680;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px;
  border-bottom: 1px solid var(--ink-100);
}

.search-field,
.select-field {
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
}

.search-field {
  width: min(420px, 100%);
  padding: 0 11px;
}

.search-field svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--ink-400);
}

.search-field input,
.select-field select {
  width: 100%;
  height: 37px;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: .78rem;
}

.select-field {
  min-width: 170px;
}

.select-field select {
  padding: 0 30px 0 10px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 15px 18px;
  color: var(--ink-500);
  border-top: 1px solid var(--ink-100);
  font-size: .75rem;
}

.pagination a {
  color: var(--brand-600);
  font-weight: 680;
}

.empty-state {
  display: flex;
  min-height: 330px;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
  flex-direction: column;
  text-align: center;
}

.empty-state--compact {
  min-height: 160px;
  padding: 28px 20px;
}

.empty-state__icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--brand-600);
  background: var(--brand-100);
  border-radius: 14px;
  font-size: 1.35rem;
  font-weight: 350;
}

.empty-state p {
  max-width: 430px;
  margin-bottom: 17px;
  color: var(--ink-500);
  font-size: .82rem;
}

.form-layout {
  display: grid;
  gap: 15px;
}

.form-panel {
  padding: 25px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 23px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading p {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: .76rem;
}

.section-heading__number {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 9px;
  font-size: .69rem;
  font-weight: 750;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-800);
  font-size: .76rem;
  font-weight: 660;
}

.optional {
  color: var(--ink-400);
  font-size: .68rem;
  font-weight: 500;
}

.form-control,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink-900);
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  outline: 0;
  transition: border var(--transition), box-shadow var(--transition);
}

.field textarea {
  min-height: 95px;
  resize: vertical;
}

.form-control:hover,
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-300);
}

.form-control:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgb(83 119 237 / 12%);
}

.help-text {
  margin: 6px 0 0;
  color: var(--ink-500);
  font-size: .71rem;
}

.errorlist {
  margin: 6px 0 0;
  padding: 0;
  color: var(--red-700);
  font-size: .72rem;
  list-style: none;
}

.form-errors {
  margin-bottom: 18px;
  padding: 11px 13px;
  color: var(--red-700);
  background: var(--red-50);
  border: 1px solid var(--red-100);
  border-radius: 8px;
}

.form-errors .errorlist {
  margin: 0;
}

.choice-list > div,
.choice-list > ul {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
}

.choice-list > div > div,
.choice-list li {
  min-width: 0;
}

.choice-list label {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 9px 11px;
  color: var(--ink-700);
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 580;
  cursor: pointer;
  transition: border var(--transition), background var(--transition);
}

.choice-list label:hover {
  background: var(--brand-50);
  border-color: #bcc8f5;
}

.choice-list label:has(input:checked) {
  color: var(--brand-700);
  background: var(--brand-50);
  border-color: #9eb0f2;
}

.choice-list input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brand-600);
}

.choice-list--scroll {
  max-height: 490px;
  padding-right: 5px;
  overflow-y: auto;
}

.choice-list--scroll > div,
.choice-list--scroll > ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-list [hidden] {
  display: none !important;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--ink-100);
}

.form-actions--sticky {
  position: sticky;
  z-index: 10;
  bottom: 15px;
  width: fit-content;
  margin: 18px 0 0 auto;
  padding: 9px;
  background: rgb(255 255 255 / 92%);
  border: 1px solid var(--ink-200);
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.form-actions--sticky .form-actions,
.form-actions--sticky form {
  margin: 0;
  padding: 0;
  border: 0;
}

.narrow-form {
  max-width: 720px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.group-card {
  display: flex;
  min-height: 220px;
  padding: 19px;
  flex-direction: column;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border var(--transition);
}

.group-card:hover {
  border-color: #cbd4ec;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.group-card__main {
  display: flex;
  min-width: 0;
  gap: 12px;
}

.group-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 11px;
  font-size: .72rem;
  font-weight: 750;
}

.group-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.group-card__copy strong {
  color: var(--ink-950);
  font-size: .91rem;
}

.group-card__copy small {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-500);
  font-size: .72rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.group-card__metrics {
  display: grid;
  margin: 24px 0 17px;
  padding: 15px;
  background: var(--ink-50);
  border-radius: 9px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.group-card__metrics span {
  display: flex;
  color: var(--ink-500);
  flex-direction: column;
  font-size: .68rem;
}

.group-card__metrics strong {
  color: var(--ink-900);
  font-size: 1.08rem;
}

.group-card footer {
  margin-top: auto;
}

.detail-stats {
  display: grid;
  width: fit-content;
  margin: -9px 0 22px;
  padding: 10px 2px;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.detail-stats--four {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.detail-stats > span {
  display: flex;
  padding: 3px 22px;
  flex-direction: column;
  border-right: 1px solid var(--ink-200);
}

.detail-stats > span:first-child {
  padding-left: 0;
}

.detail-stats > span:last-child {
  border-right: 0;
}

.detail-stats strong {
  color: var(--ink-950);
  font-size: 1.1rem;
}

.detail-stats small {
  color: var(--ink-500);
  font-size: .7rem;
}

.side-panel {
  align-self: start;
  overflow: hidden;
}

.mini-search input {
  width: 130px;
  min-height: 34px;
  padding: 7px 9px;
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: 7px;
  outline: 0;
  font-size: .73rem;
}

.definition-list {
  margin: 0;
  padding: 7px 21px 16px;
}

.definition-list > div {
  display: grid;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-100);
  gap: 2px;
}

.definition-list > div:last-child {
  border-bottom: 0;
}

.definition-list dt {
  color: var(--ink-500);
  font-size: .69rem;
}

.definition-list dd {
  margin: 0;
  color: var(--ink-800);
  font-size: .77rem;
  font-weight: 600;
}

.title-with-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-with-status h1 {
  margin-bottom: 0;
}

.dialog-page {
  display: grid;
  min-height: calc(100vh - 190px);
  place-items: center;
}

.danger-dialog {
  width: min(100%, 570px);
  padding: 36px;
  text-align: center;
}

.danger-dialog__icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  place-items: center;
  color: var(--red-700);
  background: var(--red-100);
  border-radius: 15px;
  font-size: 1.35rem;
  font-weight: 750;
}

.danger-dialog h1 {
  font-size: 1.6rem;
}

.danger-dialog > p {
  max-width: 470px;
  margin: 0 auto 20px;
  color: var(--ink-600);
}

.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 23px;
}

.text-left {
  text-align: left;
}

.callout {
  display: flex;
  margin: 18px 0;
  padding: 12px 14px;
  color: var(--ink-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 8px;
  flex-direction: column;
  font-size: .74rem;
  text-align: left;
}

.callout--warning {
  color: #76520c;
  background: #fffbef;
  border-color: var(--amber-100);
}

.timeline {
  padding: 7px 17px 14px;
}

.timeline__item {
  position: relative;
  display: grid;
  min-height: 72px;
  padding: 12px 0 12px 18px;
  border-bottom: 1px solid var(--ink-100);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.timeline__item:last-child {
  border-bottom: 0;
}

.timeline__dot {
  position: absolute;
  top: 19px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--brand-500);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--brand-100);
}

.timeline__item > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.timeline__item strong {
  color: var(--ink-800);
  font-size: .77rem;
}

.timeline__item small {
  margin: 2px 0 6px;
  color: var(--ink-500);
  font-size: .66rem;
}

.enrollment-card {
  display: grid;
  width: min(100%, 920px);
  margin: 0 auto;
  overflow: hidden;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  grid-template-columns: 42% 58%;
}

.qr-panel {
  display: flex;
  min-height: 500px;
  align-items: center;
  justify-content: center;
  padding: 42px;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 36%, rgb(94 128 241 / 20%), transparent 38%),
    linear-gradient(155deg, #111c35, #0b1220);
}

.qr-frame {
  padding: 14px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgb(0 0 0 / 25%);
}

.qr-frame img {
  display: block;
  width: min(220px, 100%);
  height: auto;
}

.scan-hint {
  margin-top: 18px;
  color: #aab6cd;
  font-size: .73rem;
}

.enrollment-card__content {
  padding: 44px;
}

.enrollment-card__content h2 {
  margin-bottom: 22px;
  font-size: 1.55rem;
}

.step-list {
  display: grid;
  margin: 0 0 25px;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.step-list li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.step-list li > span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 8px;
  font-size: .68rem;
  font-weight: 750;
}

.step-list p {
  margin: 0;
  color: var(--ink-700);
  font-size: .78rem;
}

.copy-field {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
}

.copy-field input {
  min-width: 0;
  flex: 1;
  padding: 9px 10px;
  background: var(--ink-50);
  border: 0;
  outline: 0;
  font-family: ui-monospace, monospace;
  font-size: .67rem;
}

.copy-field button {
  padding: 8px 12px;
  color: var(--brand-700);
  background: white;
  border: 0;
  border-left: 1px solid var(--ink-200);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}

.upload-zone {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  padding: 24px;
  background: var(--brand-50);
  border: 1px dashed #aebcf0;
  border-radius: 11px;
  flex-direction: column;
  text-align: center;
}

.upload-zone__icon {
  display: grid;
  width: 43px;
  height: 43px;
  margin-bottom: 12px;
  place-items: center;
  color: var(--brand-600);
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font-size: 1.3rem;
}

.upload-zone label {
  margin-bottom: 10px;
  color: var(--ink-800);
  font-weight: 700;
}

.upload-zone input {
  max-width: 100%;
  color: var(--ink-600);
  font-size: .72rem;
}

.upload-zone p {
  margin: 9px 0 0;
  color: var(--ink-500);
  font-size: .68rem;
}

.schema-list {
  display: flex;
  padding: 20px;
  flex-wrap: wrap;
  gap: 7px;
}

.schema-list span {
  padding: 5px 8px;
  color: var(--ink-700);
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: .69rem;
}

.side-panel > .callout,
.side-panel > .help-text {
  margin-right: 20px;
  margin-left: 20px;
}

.messages {
  display: grid;
  margin-bottom: 18px;
  gap: 8px;
}

.alert {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 13px;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 9px;
  font-size: .77rem;
  font-weight: 600;
}

.alert--success {
  color: var(--green-700);
  background: #f0fbf5;
  border-color: var(--green-100);
}

.alert--warning {
  color: var(--amber-700);
  background: #fffaf0;
  border-color: var(--amber-100);
}

.alert--error {
  color: var(--red-700);
  background: var(--red-50);
  border-color: var(--red-100);
}

.alert button {
  padding: 0 3px;
  color: inherit;
  background: none;
  border: 0;
  font-size: 1.1rem;
  cursor: pointer;
}

.auth-page {
  background: white;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(390px, .9fr) minmax(480px, 1.1fr);
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 42px clamp(38px, 6vw, 84px);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 70% 25%, rgb(97 128 244 / 30%), transparent 30%),
    radial-gradient(circle at 12% 78%, rgb(22 167 150 / 14%), transparent 28%),
    linear-gradient(145deg, #111d39 0%, #0b1220 70%);
  flex-direction: column;
}

.auth-visual::before,
.auth-visual::after {
  position: absolute;
  content: "";
  border: 1px solid rgb(255 255 255 / 6%);
  border-radius: 50%;
}

.auth-visual::before {
  right: -180px;
  bottom: -180px;
  width: 500px;
  height: 500px;
}

.auth-visual::after {
  right: -70px;
  bottom: -70px;
  width: 280px;
  height: 280px;
}

.auth-visual__content {
  z-index: 1;
  max-width: 560px;
  margin: auto 0;
}

.auth-visual__content h1 {
  margin-bottom: 22px;
  color: white;
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  font-weight: 680;
  letter-spacing: -.055em;
  line-height: .99;
}

.auth-visual__content > p {
  max-width: 510px;
  color: #aab6cc;
  font-size: clamp(.95rem, 1.3vw, 1.1rem);
  line-height: 1.65;
}

.auth-proof {
  display: flex;
  max-width: 480px;
  align-items: center;
  gap: 12px;
  margin-top: 33px;
  padding: 14px 16px;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 12px;
}

.auth-proof__icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: #74decf;
  background: rgb(18 167 149 / 16%);
  border-radius: 9px;
  font-weight: 800;
}

.auth-proof > span:last-child {
  display: flex;
  flex-direction: column;
}

.auth-proof strong {
  font-size: .79rem;
}

.auth-proof small {
  color: #8f9bb1;
  font-size: .68rem;
}

.auth-visual__foot {
  z-index: 1;
  margin: 0;
  color: #73809a;
  font-size: .7rem;
}

.auth-form-panel {
  display: grid;
  min-height: 100vh;
  padding: 40px;
  place-items: center;
  background:
    radial-gradient(circle at 90% 8%, rgb(84 119 237 / 6%), transparent 25%),
    white;
}

.auth-form-wrap {
  width: min(100%, 410px);
}

.auth-form-wrap h2 {
  margin-bottom: 6px;
  font-size: 1.9rem;
  letter-spacing: -.04em;
}

.auth-form-wrap > .muted {
  margin-bottom: 31px;
  font-size: .83rem;
}

.auth-form {
  display: grid;
  gap: 19px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 75px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 11px;
  padding: 3px;
  color: var(--brand-600);
  background: white;
  border: 0;
  font-size: .68rem;
  font-weight: 680;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-help {
  margin: 25px 0 0;
  color: var(--ink-400);
  font-size: .7rem;
  text-align: center;
}

.auth-mobile-brand {
  display: none;
}

.mobile-overlay {
  display: none;
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-list > div,
  .choice-list > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-stats--four {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: min(290px, 86vw);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .sidebar {
    box-shadow: 12px 0 35px rgb(0 0 0 / 25%);
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgb(11 18 32 / 42%);
    opacity: 0;
    transition: opacity 200ms ease, visibility 200ms ease;
  }

  body.nav-open .mobile-overlay {
    visibility: visible;
    opacity: 1;
  }

  .main-column {
    margin-left: 0;
  }

  .topbar {
    height: 58px;
    justify-content: space-between;
    padding: 0 20px;
    background: rgb(255 255 255 / 92%);
  }

  .topbar__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 720;
  }

  .mobile-menu {
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: white;
    border: 1px solid var(--ink-200);
    border-radius: 8px;
    flex-direction: column;
  }

  .mobile-menu > span:not(.sr-only) {
    width: 15px;
    height: 1.5px;
    background: var(--ink-700);
    border-radius: 3px;
  }

  .content {
    padding-top: 27px;
  }

  .dashboard-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .usage-panel {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .usage-panel .panel__header {
    grid-column: 1 / -1;
  }

  .usage-ring {
    margin: 25px;
  }

  .usage-copy {
    align-self: center;
    padding: 22px 24px 10px 0;
    text-align: left;
  }

  .usage-panel .progress {
    align-self: start;
    margin: -28px 24px 0 0;
    grid-column: 2;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-form-panel {
    padding: 28px;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 58px;
    color: var(--ink-950);
    font-size: 1.15rem;
    font-weight: 730;
  }
}

@media (max-width: 650px) {
  .content {
    padding: 22px 14px 55px;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar__action {
    display: none;
  }

  .page-header {
    display: block;
    margin-bottom: 21px;
  }

  .page-header .page-actions,
  .page-header > .button {
    width: 100%;
    margin-top: 17px;
  }

  .page-actions .button {
    flex: 1;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric-card {
    min-height: 140px;
    padding: 16px;
  }

  .metric-card > strong {
    font-size: 1.4rem;
  }

  .panel {
    border-radius: 10px;
  }

  .panel__header {
    min-height: 68px;
    padding: 15px;
  }

  .filter-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-field {
    width: 100%;
  }

  .select-field {
    min-width: 0;
    flex: 1;
  }

  th,
  td {
    padding: 12px 14px;
  }

  .table-wrap table {
    min-width: 760px;
  }

  .form-panel {
    padding: 18px;
  }

  .form-grid--2 {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .choice-list > div,
  .choice-list > ul,
  .choice-list--scroll > div,
  .choice-list--scroll > ul {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: stretch;
  }

  .form-actions .button {
    flex: 1;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .detail-stats,
  .detail-stats--four {
    width: 100%;
    margin-top: 0;
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-stats > span,
  .detail-stats > span:first-child {
    padding: 8px 13px;
    border-bottom: 1px solid var(--ink-200);
  }

  .detail-stats > span:nth-child(even) {
    border-right: 0;
  }

  .title-with-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .dialog-page {
    display: block;
    min-height: 0;
  }

  .danger-dialog {
    padding: 26px 19px;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .enrollment-card {
    grid-template-columns: 1fr;
  }

  .qr-panel {
    min-height: 330px;
    padding: 32px;
  }

  .qr-frame img {
    width: 180px;
  }

  .enrollment-card__content {
    padding: 28px 21px;
  }

  .form-actions--sticky {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }

  .auth-form-panel {
    align-items: start;
    padding: 24px 20px;
  }

  .auth-form-wrap {
    margin-top: 0;
  }
}

@media (max-width: 390px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .page-actions {
    flex-direction: column;
  }

  .usage-panel {
    display: block;
  }

  .usage-copy {
    padding: 0 22px;
    text-align: center;
  }

  .usage-panel .progress {
    margin: 13px 22px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Portal implementation used by base_app.html and base_public.html. */
.app-body {
  min-height: 100vh;
}

.app-shell {
  width: min(100% - var(--sidebar-width), 1440px);
  margin-left: var(--sidebar-width);
  padding: 34px clamp(22px, 4vw, 58px) 72px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand-link > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand-link strong {
  color: white;
  font-size: 1.05rem;
  letter-spacing: .055em;
}

.brand-link small {
  overflow: hidden;
  color: #8f9cb6;
  font-size: .66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--brand-500), #7791f8);
  border-radius: 11px;
  box-shadow: 0 8px 20px rgb(64 94 214 / 28%);
  font-weight: 800;
}

.brand-mark-large {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 14px;
  font-size: 1.25rem;
}

.sidebar-close {
  display: none;
}

.organization-name,
.organization-switcher {
  display: flex;
  margin: 0 1px 22px;
  padding: 13px;
  flex-direction: column;
  color: #e9edfa;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 10px;
}

.organization-name span,
.organization-switcher label {
  margin-bottom: 4px;
  color: #8997b5;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.organization-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-switcher select {
  width: 100%;
  padding: 7px 8px;
  color: white;
  background: #18243e;
  border: 1px solid #35415b;
  border-radius: 7px;
}

.nav-section {
  margin: 18px 12px 4px;
  color: #687792;
  font-size: .61rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  color: #9facbf;
  border-radius: 9px;
  font-size: .83rem;
  font-weight: 600;
  transition: color var(--transition), background var(--transition);
}

.nav-item:hover {
  color: #f2f5fc;
  background: rgb(255 255 255 / 5%);
}

.nav-item.is-active {
  color: white;
  background: linear-gradient(90deg, rgb(76 108 225 / 28%), rgb(76 108 225 / 10%));
}

.nav-item.is-active::before {
  position: absolute;
  left: -18px;
  width: 3px;
  height: 21px;
  content: "";
  background: #7894ff;
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  display: grid;
  width: 20px;
  place-items: center;
  font-size: 1rem;
}

.sidebar-footer {
  display: grid;
  margin-top: auto;
  padding-top: 15px;
  gap: 14px;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.plan-summary {
  display: flex;
  padding: 11px;
  flex-direction: column;
  background: rgb(255 255 255 / 4%);
  border-radius: 9px;
}

.plan-summary span,
.plan-summary small {
  color: #8896b0;
  font-size: .65rem;
}

.plan-summary strong {
  margin: 2px 0;
  color: #f2f5fc;
  font-size: .8rem;
}

.account-summary {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
}

.account-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  color: #f1f4fb;
  font-size: .74rem;
}

.account-copy small {
  color: #8190aa;
  font-size: .62rem;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button:hover {
  background: rgb(113 128 150 / 12%);
}

.icon-danger {
  color: var(--red-700);
  font-size: 1.15rem;
}

.mobile-header {
  display: none;
}

.page-header {
  align-items: center;
}

.page-subtitle {
  margin: 0;
  color: var(--ink-600);
}

.main-content {
  display: grid;
  gap: 20px;
}

.content-card {
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.content-card:not(.list-card) {
  padding: 24px;
}

.button-primary {
  color: white;
  background: var(--brand-600);
  border-color: var(--brand-600);
  box-shadow: 0 4px 12px rgb(66 103 220 / 16%);
}

.button-primary:hover:not(:disabled) {
  background: var(--brand-700);
  border-color: var(--brand-700);
}

.button-secondary {
  color: var(--ink-700);
  background: white;
  border-color: var(--ink-200);
}

.button-secondary:hover:not(:disabled) {
  color: var(--brand-700);
  border-color: #bdc9ee;
}

.button-ghost {
  color: var(--ink-600);
  background: transparent;
}

.button-danger,
.button-danger-outline {
  color: var(--red-700);
  border-color: #f1b8bd;
}

.button-danger {
  color: white;
  background: var(--red-600);
  border-color: var(--red-600);
}

.button-small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: .75rem;
}

.button-block {
  width: 100%;
}

.is-disabled,
.button:disabled {
  opacity: .5;
  pointer-events: none;
}

.list-toolbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-100);
}

.filter-form {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-form > .form-control {
  width: auto;
  min-width: 145px;
}

.search-field .form-control {
  height: 36px;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.search-field-wide {
  width: min(530px, 100%);
}

.quota-copy {
  margin: 0;
  color: var(--ink-500);
  font-size: .74rem;
  white-space: nowrap;
}

.data-table .table-primary,
.data-table .table-secondary,
.contact-line {
  display: block;
}

.table-primary {
  color: var(--ink-900);
}

.table-secondary {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: .69rem;
}

.contact-email {
  overflow-wrap: anywhere;
}

.person-cell,
.device-cell {
  display: flex;
  min-width: 180px;
  align-items: center;
  gap: 10px;
}

.person-cell > span:last-child,
.device-cell > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.avatar-contact {
  color: var(--brand-700);
  background: var(--brand-100);
  border-color: #d2dbfb;
}

.device-glyph,
.group-glyph,
.metric-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 10px;
  font-weight: 750;
}

.chip-list,
.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip,
.example-chips span {
  display: inline-flex;
  padding: 4px 8px;
  color: var(--ink-700);
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  font-size: .67rem;
  font-weight: 650;
}

.chip-more {
  color: var(--ink-500);
}

.chip-list-large .chip {
  padding: 6px 10px;
  font-size: .75rem;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 720;
  white-space: nowrap;
}

.status-success {
  color: var(--green-700);
  background: var(--green-100);
}

.status-info {
  color: var(--brand-700);
  background: var(--brand-100);
}

.status-warning {
  color: var(--amber-700);
  background: var(--amber-100);
}

.status-danger {
  color: var(--red-700);
  background: var(--red-100);
}

.status-purple {
  color: var(--violet-600);
  background: var(--violet-100);
}

.status-muted {
  color: var(--ink-600);
  background: var(--ink-100);
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--brand-600);
  background: var(--brand-100);
  border-radius: 14px;
  font-size: 1.2rem;
}

.form-card {
  display: grid;
  gap: 21px;
}

.form-field {
  min-width: 0;
}

.form-field > label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-800);
  font-size: .76rem;
  font-weight: 660;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea {
  width: 100%;
}

.field-help,
.field-error {
  margin: 6px 0 0;
  font-size: .71rem;
}

.field-help {
  color: var(--ink-500);
}

.field-error {
  color: var(--red-700);
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-span-2 {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-card {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  color: var(--ink-700);
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  cursor: pointer;
}

.choice-card:hover {
  border-color: #b5c3ef;
}

.choice-card input {
  accent-color: var(--brand-600);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-600);
  font-size: .74rem;
}

.inline-empty {
  display: flex;
  padding: 12px;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-500);
  background: var(--ink-50);
  border-radius: 8px;
  font-size: .75rem;
}

.inline-empty a,
.section-heading-inline a {
  color: var(--brand-700);
  font-weight: 680;
}

.form-actions {
  flex-wrap: wrap;
}

.form-actions form {
  margin: 0;
}

.sticky-actions {
  position: sticky;
  z-index: 15;
  bottom: 12px;
  width: fit-content;
  margin: 4px 0 0 auto;
  padding: 9px;
  background: rgb(255 255 255 / 92%);
  border: 1px solid var(--ink-200);
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.narrow-form,
.narrow-form-wide {
  width: min(100%, 760px);
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  display: flex;
  min-height: 170px;
  padding: 20px;
  flex-direction: column;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.metric-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-600);
  font-size: .75rem;
  font-weight: 650;
}

.metric-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.metric-icon-violet { color: var(--violet-600); background: var(--violet-100); }
.metric-icon-green { color: var(--green-700); background: var(--green-100); }
.metric-icon-orange { color: var(--amber-700); background: var(--amber-100); }

.metric-value {
  margin: 15px 0 8px;
  color: var(--ink-950);
  font-size: 1.75rem;
}

.metric-value small {
  color: var(--ink-400);
  font-size: .85rem;
}

.metric-caption {
  min-height: 22px;
  margin: 0 0 8px;
  color: var(--ink-500);
  font-size: .72rem;
}

.metric-card .progress {
  margin: 0 0 12px;
}

.metric-card > a {
  margin-top: auto;
  color: var(--brand-700);
  font-size: .72rem;
  font-weight: 680;
}

.progress-green span {
  background: linear-gradient(90deg, var(--teal-500), #44c5a9);
}

.metric-card-warning {
  border-color: #efd8a1;
}

.dashboard-alert,
.global-banner {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 15px;
  color: var(--ink-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 10px;
  font-size: .78rem;
}

.global-banner p {
  margin: 2px 0 0;
}

.banner-warning {
  color: #76520c;
  background: #fffbef;
  border-color: var(--amber-100);
}

.banner-info {
  color: var(--brand-700);
  background: var(--brand-50);
  border-color: var(--brand-100);
}

.banner-danger {
  color: var(--red-700);
  background: var(--red-50);
  border-color: var(--red-100);
}

.banner-success {
  color: var(--green-700);
  background: #f0fbf5;
  border-color: var(--green-100);
}

.banner-neutral {
  color: var(--ink-700);
  background: var(--ink-100);
  border-color: var(--ink-200);
}

.onboarding-card {
  padding: 24px;
}

.setup-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 7px;
  list-style: none;
}

.setup-list li {
  display: grid;
  min-height: 62px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--ink-100);
  border-radius: 9px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
}

.setup-list p {
  margin: 2px 0 0;
  color: var(--ink-500);
  font-size: .72rem;
}

.setup-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 9px;
  font-weight: 750;
}

.setup-list .is-complete .setup-marker {
  color: var(--green-700);
  background: var(--green-100);
}

.metric-icon-blue {
  color: var(--brand-700);
  background: var(--brand-100);
}

.section-heading-inline {
  justify-content: space-between;
}

.compact-list {
  display: grid;
}

.compact-list-scroll {
  max-height: 540px;
  overflow-y: auto;
}

.compact-empty {
  padding: 22px;
  color: var(--ink-500);
  text-align: center;
}

.compact-row {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
}

.compact-row:last-child {
  border-bottom: 0;
}

.compact-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.compact-main small {
  color: var(--ink-500);
}

.small-empty,
.privacy-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  color: var(--ink-600);
  background: var(--ink-50);
  border-radius: 9px;
}

.small-empty p,
.privacy-note p {
  margin: 2px 0 0;
}

.timeline {
  padding: 0;
}

.timeline-row {
  position: relative;
  min-height: 58px;
  padding: 10px 0 10px 18px;
  border-bottom: 1px solid var(--ink-100);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 17px;
  left: 1px;
  width: 7px;
  height: 7px;
  background: var(--brand-500);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--brand-100);
}

.timeline-row p {
  margin: 2px 0 0;
  color: var(--ink-500);
  font-size: .68rem;
}

.group-grid {
  display: grid;
  padding: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.group-card {
  display: grid;
  min-width: 0;
  padding: 17px;
  gap: 15px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
}

.group-card-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.group-card-main > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.group-card-main small {
  overflow: hidden;
  color: var(--ink-500);
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-stats,
.group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.group-stats {
  color: var(--ink-500);
  font-size: .7rem;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: grid;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 15px;
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--ink-500);
  font-size: .72rem;
}

.detail-list dd {
  margin: 0;
  color: var(--ink-800);
  font-size: .76rem;
  font-weight: 620;
  text-align: right;
}

.device-hero {
  display: grid;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
}

.device-hero-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 16px;
  font-size: 1.5rem;
}

.device-hero-main h2 {
  margin-bottom: 7px;
}

.device-hero-count {
  display: flex;
  min-width: 120px;
  align-items: flex-end;
  flex-direction: column;
}

.device-hero-count strong {
  color: var(--ink-950);
  font-size: 1.65rem;
}

.device-hero-count span {
  color: var(--ink-500);
  font-size: .69rem;
}

.invitation-layout {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(340px, 1.2fr);
  gap: 18px;
}

.qr-card {
  text-align: center;
}

.qr-card .qr-frame {
  width: fit-content;
  margin: 20px auto;
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-md);
}

.success-symbol,
.danger-symbol {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 800;
}

.danger-symbol {
  color: var(--red-700);
  background: var(--red-100);
}

.invitation-summary {
  display: grid;
  align-content: start;
  gap: 18px;
}

.copy-feedback {
  min-height: 20px;
  margin: 7px 0 0;
  color: var(--green-700);
  font-size: .71rem;
}

.audit-list {
  display: grid;
}

.audit-row {
  display: grid;
  min-height: 70px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ink-100);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-main {
  min-width: 0;
}

.audit-main p {
  margin: 2px 0 0;
  color: var(--ink-500);
  font-size: .7rem;
}

.message-stack {
  display: grid;
  margin-bottom: 18px;
  gap: 8px;
}

.message {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 10px 13px;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 9px;
  font-size: .77rem;
  font-weight: 600;
}

.message-success {
  color: var(--green-700);
  background: #f0fbf5;
  border-color: var(--green-100);
}

.message-error {
  color: var(--red-700);
  background: var(--red-50);
  border-color: var(--red-100);
}

.message-close {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.summary-strip,
.impact-list {
  color: var(--ink-600);
  font-size: .76rem;
}

.impact-list {
  display: grid;
  margin: 20px 0;
  padding-left: 20px;
  gap: 8px;
}

.danger-card,
.confirm-card {
  width: min(100%, 650px);
  margin: 0 auto;
  text-align: center;
}

.danger-zone {
  color: var(--red-700);
  background: var(--red-50);
  border-color: var(--red-100);
}

.search-choice-field {
  margin-bottom: 12px;
}

.choice-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--ink-100);
}

.choice-row:last-child {
  border-bottom: 0;
}

.choice-row input {
  accent-color: var(--brand-600);
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.upload-zone-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  place-items: center;
  color: var(--brand-700);
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font-size: .7rem;
  font-weight: 800;
}

.table-wrap-preview {
  max-height: 62vh;
}

.row-error td {
  background: var(--red-50);
}

.row-warning td {
  background: #fffbef;
}

.public-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgb(74 105 222 / 16%), transparent 36%),
    linear-gradient(145deg, #0d1629, #111e37);
}

.public-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.auth-card {
  width: min(100%, 440px);
  padding: 34px;
  background: white;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 25%);
}

.auth-card-wide {
  width: min(100%, 680px);
}

.auth-brand,
.auth-heading {
  text-align: center;
}

.auth-brand {
  margin-bottom: 22px;
}

.auth-heading p {
  color: var(--ink-500);
}

.stack-form {
  display: grid;
  gap: 16px;
}

.auth-note {
  margin: 20px 0 0;
  color: var(--ink-500);
  font-size: .7rem;
  text-align: center;
}

.totp-setup-grid {
  display: grid;
  align-items: center;
  margin: 24px 0;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
}

.totp-qr {
  padding: 13px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

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

.security-steps {
  display: grid;
  margin: 0;
  padding-left: 20px;
  gap: 10px;
  color: var(--ink-700);
  font-size: .76rem;
}

.manual-secret {
  margin-top: 18px;
  color: var(--ink-600);
  font-size: .72rem;
}

.manual-secret summary {
  color: var(--brand-700);
  cursor: pointer;
  font-weight: 680;
}

.manual-secret p {
  margin: 10px 0 5px;
}

.manual-secret code {
  display: block;
  padding: 9px;
  overflow-wrap: anywhere;
  color: var(--ink-800);
  background: var(--ink-50);
  border-radius: 7px;
  font-size: .7rem;
  letter-spacing: .08em;
}

.recovery-code-grid {
  display: grid;
  margin: 22px 0 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.recovery-code-grid code {
  padding: 10px;
  color: var(--ink-900);
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-align: center;
}

.security-copy {
  color: var(--ink-600);
  font-size: .8rem;
  line-height: 1.65;
}

.empty-public {
  text-align: center;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  color: white;
  background: var(--brand-700);
  border-radius: 7px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .metric-grid,
  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: 100%;
    margin-left: 0;
    padding: 84px 20px 60px;
  }

  .mobile-header {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: rgb(255 255 255 / 94%);
    border-bottom: 1px solid var(--ink-200);
    backdrop-filter: blur(12px);
  }

  .mobile-brand {
    color: var(--ink-950);
    font-weight: 780;
    letter-spacing: .06em;
  }

  .avatar-small {
    width: 31px;
    height: 31px;
  }

  .sidebar-close {
    display: grid;
  }

  .detail-grid,
  .dashboard-grid,
  .invitation-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .page-header {
    display: block;
  }

  .page-actions {
    margin-top: 17px;
  }

  .page-actions .button {
    flex: 1 1 auto;
  }

  .metric-grid,
  .group-grid,
  .form-grid-2,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .group-grid {
    padding: 12px;
  }

  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-form > .form-control,
  .search-field,
  .search-field-wide {
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ink-200);
  }

  .data-table td {
    display: grid;
    padding: 6px 0;
    border: 0;
    grid-template-columns: minmax(100px, 35%) minmax(0, 1fr);
    gap: 10px;
  }

  .data-table td::before {
    color: var(--ink-500);
    content: attr(data-label);
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .data-table .table-actions {
    display: flex;
    justify-content: flex-end;
  }

  .data-table .table-actions::before {
    display: none;
  }

  .form-span-2 {
    grid-column: auto;
  }

  .sticky-actions {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }

  .device-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .device-hero-count {
    align-items: flex-start;
    grid-column: 2;
  }

  .detail-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .detail-list dd {
    text-align: left;
  }

  .audit-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audit-row > :last-child {
    grid-column: 2;
  }
}

.progress-native {
  width: 100%;
  height: 6px;
  margin: 0 0 12px;
  overflow: hidden;
  appearance: none;
  background: var(--ink-100);
  border: 0;
  border-radius: 999px;
}

.progress-native::-webkit-progress-bar {
  background: var(--ink-100);
  border-radius: 999px;
}

.progress-native::-webkit-progress-value {
  background: linear-gradient(90deg, var(--brand-500), #7592fa);
  border-radius: 999px;
}

.progress-native::-moz-progress-bar {
  background: linear-gradient(90deg, var(--brand-500), #7592fa);
  border-radius: 999px;
}

.progress-native.progress-green::-webkit-progress-value {
  background: linear-gradient(90deg, var(--teal-500), #44c5a9);
}

.progress-native.progress-green::-moz-progress-bar {
  background: linear-gradient(90deg, var(--teal-500), #44c5a9);
}

.landing-body {
  color: var(--ink-900);
  background:
    radial-gradient(circle at 88% 5%, rgb(86 119 234 / 14%), transparent 28%),
    #f8f9fc;
}

.landing-shell {
  display: block;
  min-height: 100vh;
  padding: 0;
}

.landing {
  min-height: 100vh;
  overflow: hidden;
}

.landing-header {
  display: flex;
  width: min(100% - 40px, 1180px);
  height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-950);
  font-weight: 800;
  letter-spacing: .055em;
}

.landing-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  letter-spacing: 0;
}

.landing-header nav,
.landing-footer nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.landing-header nav > a:not(.button),
.landing-footer nav a {
  color: var(--ink-600);
  font-size: .77rem;
  font-weight: 620;
}

.landing-header nav > a:hover,
.landing-footer nav a:hover {
  color: var(--brand-700);
}

.landing-hero {
  display: grid;
  width: min(100% - 40px, 1180px);
  min-height: 620px;
  align-items: center;
  margin: 0 auto;
  padding: 58px 0 88px;
  grid-template-columns: minmax(0, .95fr) minmax(480px, 1.05fr);
  gap: 70px;
}

.landing-pill {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 21px;
  padding: 7px 11px;
  color: var(--brand-700);
  background: var(--brand-100);
  border: 1px solid #d7dffc;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 720;
}

.landing-hero h1 {
  max-width: 650px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 5.7vw, 4.8rem);
  letter-spacing: -.055em;
  line-height: .98;
}

.landing-lead {
  max-width: 590px;
  margin-bottom: 28px;
  color: var(--ink-600);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.65;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-proof {
  display: flex;
  margin: 27px 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--ink-600);
  font-size: .7rem;
  list-style: none;
}

.landing-proof li::before {
  margin-right: 6px;
  color: var(--teal-600);
  content: "✓";
  font-weight: 800;
}

.landing-visual {
  position: relative;
  min-height: 430px;
}

.landing-window {
  position: absolute;
  top: 20px;
  right: 28px;
  left: 0;
  overflow: hidden;
  background: white;
  border: 1px solid #d8dfea;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgb(22 35 61 / 17%);
  transform: rotate(-1.4deg);
}

.landing-window-bar {
  display: flex;
  height: 46px;
  align-items: center;
  padding: 0 16px;
  gap: 6px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--ink-100);
}

.landing-window-bar > span {
  width: 8px;
  height: 8px;
  background: var(--ink-300);
  border-radius: 50%;
}

.landing-window-bar strong {
  margin-left: auto;
  color: var(--ink-600);
  font-size: .68rem;
}

.landing-window-body {
  display: grid;
  min-height: 315px;
  grid-template-columns: 72px minmax(0, 1fr);
}

.landing-mini-sidebar {
  display: flex;
  align-items: center;
  padding: 24px 18px;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(175deg, #111b31, #0b1220);
}

.landing-mini-sidebar span {
  width: 30px;
  height: 8px;
  background: #303d58;
  border-radius: 3px;
}

.landing-mini-sidebar span:first-child {
  height: 30px;
  margin-bottom: 8px;
  background: var(--brand-500);
  border-radius: 9px;
}

.landing-mini-sidebar span.is-active {
  background: #6785ef;
}

.landing-directory {
  padding: 28px 25px;
}

.landing-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  color: var(--ink-500);
  font-size: .69rem;
}

.landing-directory-head span {
  color: var(--ink-950);
  font-size: 1.18rem;
  font-weight: 750;
}

.landing-contact {
  display: grid;
  min-height: 68px;
  align-items: center;
  border-bottom: 1px solid var(--ink-100);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
}

.landing-contact i {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 11px;
  font-size: .67rem;
  font-style: normal;
  font-weight: 760;
}

.landing-contact > span {
  display: flex;
  flex-direction: column;
}

.landing-contact strong {
  font-size: .76rem;
}

.landing-contact small {
  color: var(--ink-500);
  font-size: .63rem;
}

.landing-contact b {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 50%;
  font-size: .65rem;
}

.landing-phone {
  position: absolute;
  right: 0;
  bottom: -15px;
  display: flex;
  width: 178px;
  min-height: 300px;
  align-items: center;
  padding: 28px 17px;
  flex-direction: column;
  color: white;
  background: linear-gradient(170deg, #1b2945, #0a1020);
  border: 6px solid #273451;
  border-radius: 28px;
  box-shadow: 0 25px 55px rgb(11 18 32 / 32%);
  text-align: center;
  transform: rotate(4deg);
}

.landing-phone-speaker {
  width: 45px;
  height: 5px;
  margin: -15px 0 38px;
  background: #3d4a65;
  border-radius: 10px;
}

.landing-phone p {
  color: #98a6bf;
  font-size: .62rem;
}

.landing-phone strong {
  margin: 6px 0;
  font-size: .96rem;
}

.landing-phone small {
  color: #8e9ab1;
  font-size: .58rem;
}

.landing-phone-check {
  display: grid;
  width: 52px;
  height: 52px;
  margin-top: 35px;
  place-items: center;
  color: #6ee0b7;
  background: rgb(50 196 145 / 14%);
  border: 1px solid rgb(83 215 168 / 25%);
  border-radius: 50%;
  font-size: 1.2rem;
}

.landing-section {
  width: min(100% - 40px, 1100px);
  margin: 0 auto;
  padding: 94px 0;
}

.landing-section-heading {
  max-width: 680px;
  margin: 0 auto 42px;
  text-align: center;
}

.landing-section-heading h2,
.landing-security h2,
.landing-pricing h2,
.landing-final h2 {
  margin-bottom: 13px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -.045em;
}

.landing-section-heading > p:last-child,
.landing-security > div > p:last-child,
.landing-pricing > div > p:last-child,
.landing-final p {
  color: var(--ink-600);
  font-size: .94rem;
  line-height: 1.65;
}

.landing-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.landing-step-grid article {
  padding: 28px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.landing-step-grid article > span {
  color: var(--brand-600);
  font-size: .68rem;
  font-weight: 780;
  letter-spacing: .09em;
}

.landing-step-grid h3 {
  margin: 20px 0 8px;
  font-size: 1.08rem;
}

.landing-step-grid p {
  margin: 0;
  color: var(--ink-600);
  font-size: .78rem;
  line-height: 1.65;
}

.landing-security {
  display: grid;
  width: min(100% - 40px, 1100px);
  padding: 65px;
  color: white;
  background:
    radial-gradient(circle at 88% 20%, rgb(90 124 242 / 23%), transparent 32%),
    linear-gradient(155deg, #131f39, #0a1221);
  border-radius: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr);
  gap: 65px;
}

.landing-security h2 {
  color: white;
}

.landing-security > div > p:last-child {
  color: #adb9ce;
}

.landing-security ul {
  display: grid;
  align-content: center;
  margin: 0;
  padding: 0;
  gap: 14px;
  list-style: none;
}

.landing-security li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dfe6f5;
  font-size: .8rem;
}

.landing-security li span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: #69d5ad;
  background: rgb(61 201 150 / 12%);
  border-radius: 7px;
  font-size: .68rem;
}

.landing-pricing {
  display: grid;
  width: min(100% - 40px, 820px);
  margin: 100px auto;
  padding: 43px;
  align-items: center;
  background: white;
  border: 1px solid #d4dcf2;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgb(27 43 76 / 10%);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px 45px;
}

.landing-pricing > div:first-child p {
  margin-bottom: 0;
}

.landing-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.landing-price strong {
  color: var(--ink-950);
  font-size: 2.6rem;
  letter-spacing: -.05em;
}

.landing-price span {
  color: var(--ink-500);
  font-size: .73rem;
}

.landing-pricing ul {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.landing-pricing li {
  color: var(--ink-700);
  font-size: .76rem;
}

.landing-pricing li::before {
  margin-right: 7px;
  color: var(--teal-600);
  content: "✓";
  font-weight: 800;
}

.landing-pricing > .button {
  min-width: 160px;
}

.landing-pricing > small {
  color: var(--ink-400);
  font-size: .63rem;
  grid-column: 1 / -1;
  text-align: right;
}

.landing-final {
  display: flex;
  width: min(100% - 40px, 1100px);
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin: 0 auto 90px;
  padding: 42px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 18px;
}

.landing-final h2 {
  margin-bottom: 6px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.landing-final p {
  margin: 0;
}

.landing-final .button {
  flex: 0 0 auto;
}

.landing-footer {
  display: grid;
  width: min(100% - 40px, 1180px);
  min-height: 110px;
  align-items: center;
  margin: 0 auto;
  border-top: 1px solid var(--ink-200);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
}

.landing-footer p {
  margin: 0;
  color: var(--ink-500);
  font-size: .7rem;
}

.legal-shell {
  display: block;
  padding: 42px 20px 80px;
  background: #f8f9fc;
}

.legal-page {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 42px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 58px;
}

.legal-page > h1 {
  margin-bottom: 7px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.legal-updated {
  margin-bottom: 45px;
  color: var(--ink-500);
  font-size: .7rem;
}

.legal-page section {
  margin-top: 32px;
}

.legal-page section h2 {
  font-size: 1.05rem;
}

.legal-page section p {
  margin-bottom: 0;
  color: var(--ink-600);
  font-size: .82rem;
  line-height: 1.75;
}

.legal-warning {
  margin-top: 16px;
  padding: 11px 13px;
  color: var(--amber-700);
  background: #fffaf0;
  border: 1px solid var(--amber-100);
  border-radius: 9px;
  font-size: .72rem;
}

@media (max-width: 980px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-hero-copy {
    min-width: 0;
    text-align: center;
  }

  .landing-pill,
  .landing-actions {
    margin-right: auto;
    margin-left: auto;
  }

  .landing-proof {
    justify-content: center;
  }

  .landing-visual {
    width: min(100%, 650px);
    margin: 0 auto;
  }

  .landing-security {
    padding: 45px;
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 700px) {
  .landing,
  .landing-body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .landing-header {
    width: calc(100% - 28px);
    height: 66px;
    gap: 12px;
  }

  .landing-header nav {
    flex: 0 0 auto;
    gap: 0;
  }

  .landing-header nav > a:not(.button) {
    display: none;
  }

  .landing-hero {
    width: min(100% - 28px, 1180px);
    padding: 50px 0 72px;
  }

  .landing-hero h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 11.5vw, 3rem);
    overflow-wrap: anywhere;
  }

  .landing-lead {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .landing-visual {
    min-height: 370px;
  }

  .landing-window {
    right: 12px;
  }

  .landing-window-body {
    grid-template-columns: 55px minmax(0, 1fr);
  }

  .landing-mini-sidebar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .landing-directory {
    padding: 20px 15px;
  }

  .landing-phone {
    width: 145px;
    min-height: 255px;
  }

  .landing-step-grid {
    grid-template-columns: 1fr;
  }

  .landing-section {
    padding: 70px 0;
  }

  .landing-security {
    width: min(100% - 28px, 1100px);
    padding: 32px 24px;
  }

  .landing-pricing {
    width: min(100% - 28px, 820px);
    margin: 75px auto;
    padding: 28px 22px;
    grid-template-columns: 1fr;
  }

  .landing-pricing ul {
    grid-template-columns: 1fr;
  }

  .landing-pricing > small {
    text-align: left;
  }

  .landing-final {
    width: min(100% - 28px, 1100px);
    align-items: stretch;
    padding: 30px 24px;
    flex-direction: column;
  }

  .landing-footer {
    padding: 28px 0;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .landing-footer nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .legal-shell {
    padding: 14px 10px 40px;
  }

  .legal-page {
    padding: 28px 20px;
    border-radius: 13px;
  }

  .legal-header {
    margin-bottom: 42px;
  }

  .totp-setup-grid {
    grid-template-columns: 1fr;
  }

  .totp-qr {
    width: min(100%, 230px);
    margin: 0 auto;
  }

  .recovery-code-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .landing-brand {
    gap: 8px;
    font-size: .86rem;
  }

  .landing-header .button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: .7rem;
  }

  .landing-hero {
    width: calc(100% - 28px);
    padding-top: 38px;
  }

  .landing-pill {
    max-width: 100%;
    font-size: .64rem;
    text-align: center;
  }

  .landing-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .landing-actions .button {
    width: 100%;
  }

  .landing-proof {
    align-items: center;
    flex-direction: column;
    gap: 7px;
  }
}
