:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #243342;
  background: #f6f8fa;
  font-synthesis: none;
  --blue: #3390ec;
  --blue-dark: #237acb;
  --muted: #84919e;
  --line: #eaf0f4;
  --red: #d5525b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button,
input,
textarea,
select {
  outline-offset: 3px;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #90c6f5;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:hover {
  background: #f0f5f9;
}
button:disabled:hover {
  background: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
svg {
  width: 23px;
  height: 23px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[hidden] {
  display: none !important;
}
.muted,
.subtle {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 9px;
}
.danger {
  color: var(--red) !important;
}
.primary {
  background: var(--blue);
  color: white;
  padding: 13px 20px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}
.primary:hover {
  background: var(--blue-dark);
}
.primary.danger-button {
  background: var(--red);
}
.secondary {
  border: 1px solid #dce6ed;
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 500;
  background: #fff;
}
.text-button {
  color: var(--blue);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.icon-button.blue {
  color: var(--blue);
  background: #edf6ff;
}
.brand-mark {
  width: 68px;
  height: 68px;
  border-radius: 23px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -3px;
}
.brand-mark.small {
  width: 43px;
  height: 43px;
  border-radius: 15px;
  font-size: 25px;
  letter-spacing: -2px;
}
.login-screen {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  background: radial-gradient(ellipse at 25% 20%, #eef7ff, transparent 55%),
    #fafcfd;
}
.login-card {
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-card .brand-mark {
  margin-bottom: 14px;
}
.login-card .eyebrow {
  margin: 0;
}
.login-card h1 {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1.2px;
}
.login-card > .muted {
  line-height: 1.65;
  margin-bottom: 10px;
}
.login-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
  margin-top: 5px;
}
.login-footer {
  position: absolute;
  bottom: 24px;
  font-size: 11px;
  color: #9da9b4;
}
.login-card .primary {
  width: 100%;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  font-size: 13px;
}
input,
textarea,
select {
  border: 1px solid #dfe7ed;
  border-radius: 9px;
  padding: 12px 13px;
  width: 100%;
  background: #fff;
  color: #243342;
}
input::placeholder,
textarea::placeholder {
  color: #a5b0b9;
}
textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.7;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  padding: 0;
}
.form-error {
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
  min-height: 0;
}
.form-error:empty {
  display: none;
}
.workspace {
  height: 100dvh;
  display: grid;
  grid-template-columns: 80px 356px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}
.rail {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 8px 16px;
  background: #f8fafc;
  gap: 32px;
}
.navigation {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
}
.navigation > button {
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  gap: 5px;
  color: #8594a2;
  position: relative;
}
.navigation > button.active {
  color: var(--blue);
  background: #e9f3fe;
}
.rail-label {
  font-size: 10px;
  font-weight: 500;
}
.nav-badge {
  position: absolute;
  top: 3px;
  right: 6px;
  background: var(--blue);
  color: white;
  border-radius: 10px;
  min-width: 16px;
  padding: 1px 4px;
  font-size: 10px;
}
.rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 19px;
}
.rail-bottom button {
  padding: 8px;
  border-radius: 10px;
  color: #93a0ac;
}
.rail-bottom button.active {
  color: var(--blue);
}
.admin-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e1ebf4;
  color: #7c96ad;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}
.list-panel {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 29px 24px 22px;
}
.list-header .eyebrow {
  margin-bottom: 7px;
}
.list-tools {
  padding: 0 18px 12px;
}
.search {
  position: relative;
  font-weight: 400;
}
.search > span {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #9ba9b5;
}
.search svg {
  width: 18px;
  height: 18px;
}
.search input {
  background: #f3f6f8;
  border-color: transparent;
  padding: 12px 12px 12px 38px;
  font-size: 12px;
  border-radius: 11px;
}
.list-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 41px;
  padding: 8px 3px 0;
  font-size: 11px;
}
.tabs {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}
.tabs button {
  font-size: 12px;
  flex: 1;
  padding: 8px 4px;
  color: #8997a4;
  border-radius: 7px;
}
.tabs button.active {
  background: #ecf5fe;
  color: var(--blue);
  font-weight: 600;
}
.entity-list {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 3px 9px;
}
.entity-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
}
.entity-row > input {
  margin-left: 7px;
  flex-shrink: 0;
}
.entity-button {
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  min-height: 78px;
}
.entity-button.selected {
  background: #edf5fd;
}
.entity-copy {
  min-width: 0;
  flex: 1;
}
.entity-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-subtitle {
  margin-top: 5px;
  color: #8d9aa6;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entity-tail {
  font-size: 10px;
  color: #9cabb7;
  align-self: flex-start;
  margin-top: 4px;
  text-align: right;
  white-space: nowrap;
}
.avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 500;
  background: #dfeefb;
  color: #5887b4;
}
.avatar.large {
  width: 76px;
  height: 76px;
  font-size: 26px;
}
.avatar.c1 {
  background: #e6e5fb;
  color: #9290c1;
}
.avatar.c2 {
  background: #dcf1e9;
  color: #64a08b;
}
.avatar.c3 {
  background: #f9eadf;
  color: #c49a78;
}
.avatar.c4 {
  background: #f4e4ec;
  color: #b887a0;
}
.avatar.c0 {
  background: #dfeefb;
  color: #5887b4;
}
.avatar.square {
  border-radius: 14px;
  background: #edf3f8;
}
.avatar svg {
  width: 23px;
  height: 23px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: #9aabb7;
}
.connection {
  border-top: 1px solid var(--line);
  padding: 15px 18px;
  font-size: 10px;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #9aa7b3;
}
.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #efc16c;
  flex-shrink: 0;
}
.connection-dot.online {
  background: #72bd9b;
}
.lock-label {
  margin-left: auto;
  color: #b1bac3;
}
.network-error {
  margin: 0 18px 10px;
  padding: 10px;
  border-radius: 8px;
  background: #fff3ef;
  color: #bc7762;
  font-size: 12px;
}
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f2f7fc;
  padding: 7px 20px;
  font-size: 12px;
}
.detail-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fbfcfe;
}
.detail-topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 33px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  gap: 12px;
}
.detail-topbar .subtle {
  font-size: 11px;
  font-weight: 400;
}
.detail-content {
  padding: 46px 50px;
  overflow: auto;
  flex: 1;
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  min-height: 70vh;
  color: #96a6b5;
  gap: 18px;
}
.empty-state h2 {
  color: #526576;
  font-size: 21px;
  font-weight: 500;
}
.empty-state p {
  font-size: 13px;
  line-height: 1.85;
}
.empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: #edf4fa;
  color: #a6bfd4;
  margin-bottom: 5px;
}
.empty-icon svg {
  width: 36px;
  height: 36px;
}
.hint-pill {
  font-size: 10px;
  border: 1px solid #e8eef4;
  border-radius: 20px;
  padding: 8px 13px;
  margin-top: 8px;
}
.list-empty {
  padding: 60px 25px;
  text-align: center;
  color: #9aa9b5;
  line-height: 1.8;
  font-size: 12px;
}
.list-empty strong {
  display: block;
  color: #667b8f;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.profile {
  max-width: 700px;
  margin: 0 auto;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
}
.profile-head h2 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.profile-head p {
  font-size: 13px;
  color: #8d9dab;
}
.badges {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 11px;
}
.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 500;
  background: #eef3f7;
  color: #8b9ba9;
}
.badge.active,
.badge.approved {
  background: #eaf7f0;
  color: #599878;
}
.badge.pending {
  background: #fff4df;
  color: #b7954c;
}
.badge.revoked,
.badge.disabled {
  background: #f9ebec;
  color: #bd8186;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 28px 0;
}
.profile-actions .primary,
.profile-actions .secondary {
  font-size: 12px;
}
.info-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 23px 24px;
  margin-bottom: 20px;
}
.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.section-heading > span {
  font-size: 11px;
  color: #9ba9b4;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px 32px;
}
.info-label {
  display: block;
  font-size: 11px;
  color: #93a2af;
  margin-bottom: 7px;
}
.info-value {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.notice {
  font-size: 12px;
  color: #94a3b0;
  line-height: 1.8;
  padding: 1px 4px;
}
.notice strong {
  font-weight: 500;
  color: #718697;
}
.compact-session {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #f0f4f7;
  padding: 15px 0;
}
.compact-session:first-of-type {
  border-top: 0;
}
.compact-session .entity-copy {
  flex: 1;
}
.compact-session .text-button {
  font-size: 11px;
}
.danger-zone {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.danger-zone p {
  font-size: 11px;
  color: #9ca9b5;
  line-height: 1.7;
  margin-top: 6px;
}
.danger-zone h3 {
  color: #8c9ba8;
  font-size: 12px;
  font-weight: 500;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--blue);
  margin-top: 16px;
}
.audit-event {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.mobile-only {
  display: none;
}
dialog {
  border: 1px solid #e6edf2;
  border-radius: 17px;
  padding: 0;
  width: min(500px, calc(100vw - 32px));
  max-height: 90dvh;
  color: #243342;
  box-shadow: 0 25px 90px #24334225;
}
dialog::backdrop {
  background: #1b33474d;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-size: 19px;
  font-weight: 600;
}
#modal-body {
  padding: 24px;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.modal-form .primary {
  margin-top: 5px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-help {
  font-size: 12px;
  color: #91a0ad;
  line-height: 1.75;
}
.check-label {
  flex-direction: row;
  align-items: center;
}
.qr-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 20px auto;
  max-width: 270px;
}
.qr-preview svg {
  width: 100%;
  height: auto;
  stroke: none;
  fill: initial;
}
.secret {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  background: #f4f7fa;
  padding: 13px;
  border-radius: 9px;
  line-height: 1.7;
}
.approval-code {
  font-family: ui-monospace, monospace;
  font-size: 39px;
  letter-spacing: 9px;
  text-align: center;
  padding: 20px;
  color: var(--blue);
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}
.batch-result {
  max-height: 270px;
  overflow: auto;
  margin-top: 15px;
}
.batch-result > div {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.batch-result .success {
  color: #5d9b80;
}
.toasts {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  background: #263f52;
  color: #fff;
  border-radius: 11px;
  padding: 14px 19px;
  font-size: 13px;
  box-shadow: 0 6px 20px #1d34451a;
  line-height: 1.5;
  animation: appear 0.18s ease-out;
  overflow-wrap: anywhere;
}
.toast.error {
  background: #a34e58;
}
@keyframes appear {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 84px 400px minmax(0, 1fr);
  }
  .detail-content {
    padding-top: 66px;
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 72px 310px minmax(0, 1fr);
  }
  .detail-content {
    padding: 32px 25px;
  }
  .detail-topbar {
    padding: 0 25px;
  }
  .detail-topbar .subtle {
    display: none;
  }
  .list-header {
    padding-left: 20px;
    padding-right: 20px;
  }
  .profile-head {
    gap: 15px;
  }
  .profile-head h2 {
    font-size: 21px;
  }
  .info-section {
    padding: 20px;
  }
  .info-grid {
    gap: 22px;
  }
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .rail {
    padding: 20px 4px 12px;
    gap: 25px;
  }
  .brand-mark.small {
    width: 37px;
    height: 37px;
    border-radius: 13px;
  }
  .rail-label {
    font-size: 9px;
  }
  .list-panel {
    border-right: 0;
  }
  .detail-panel {
    display: none;
  }
  .workspace.show-detail .list-panel {
    display: none;
  }
  .workspace.show-detail .detail-panel {
    display: flex;
  }
  .mobile-only {
    display: inline-flex;
  }
  .detail-topbar {
    height: 67px;
    justify-content: flex-start;
    padding: 0 14px;
  }
  .detail-content {
    padding: 28px 20px;
  }
  .profile-head {
    align-items: flex-start;
  }
  .avatar.large {
    width: 57px;
    height: 57px;
    font-size: 22px;
  }
  .profile-head h2 {
    font-size: 21px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .profile-actions {
    gap: 7px;
  }
  .profile-actions > button {
    flex: 1;
  }
  .profile-actions .primary,
  .profile-actions .secondary {
    padding: 11px 10px;
  }
  .info-section {
    padding: 20px 17px;
  }
  .toasts {
    right: 16px;
    bottom: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .login-footer {
    position: static;
    margin-top: 50px;
  }
  .login-screen {
    flex-direction: column;
  }
  .login-card h1 {
    font-size: 32px;
  }
  .connection .lock-label {
    display: none;
  }
}
