:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
  color: #24334a;
  background: #f3f5f9;
  font-size: 14px;
  line-height: 1.6;
  --primary: #2463eb;
  --border: #e4e8ef;
  --muted: #78859a;
  --danger: #dc3545;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 17px;
  font-weight: 500;
  background: var(--primary);
  color: #fff;
  white-space: nowrap;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.secondary {
  background: #fff;
  border-color: #dce1e9;
  color: #45536a;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--primary);
  padding: 4px 7px;
}
.danger-text {
  color: var(--danger);
}
.danger {
  background: var(--danger);
}
.small {
  padding: 5px 11px;
  font-size: 13px;
}
.icon-button {
  background: transparent;
  color: #66758a;
  font-size: 26px;
  padding: 0 8px;
  line-height: 1.2;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8dfe8;
  border-radius: 5px;
  background: #fff;
  color: #24334a;
  padding: 9px 11px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 2px solid #2463eb16;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f3f5f8;
  color: #748198;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 0;
}
h2 {
  font-size: 18px;
  margin-bottom: 0;
}
h3 {
  font-size: 15px;
}
p {
  margin-bottom: 12px;
}
a {
  color: var(--primary);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 25% 20%, #dfeaff 0, transparent 55%), #f2f5fb;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  padding: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 15px 60px #253b6410;
}
.login-card > .logo-mark {
  margin-bottom: 20px;
}
.login-card h1 {
  font-size: 25px;
}
.login-card p {
  color: var(--muted);
  margin: 8px 0 24px;
}
.login-card label {
  margin: 16px 0 7px;
}
.login-card button {
  width: 100%;
  margin-top: 24px;
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 700;
}
aside {
  width: 220px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 27px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #20324e;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  padding: 0 11px;
}
.brand small {
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 2px;
}
.brand .logo-mark {
  width: 34px;
  height: 34px;
  font-size: 20px;
}
nav {
  display: grid;
  gap: 5px;
  margin-top: 34px;
}
nav a {
  padding: 10px 16px;
  color: #59677d;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
}
nav a:hover {
  background: #f6f8fc;
}
nav a.active {
  background: #eaf1ff;
  color: #2463eb;
  font-weight: 600;
}
footer {
  margin-top: auto;
  padding: 18px 12px 0;
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #97a1b1;
}
footer a {
  text-decoration: none;
}
main {
  margin-left: 220px;
  padding: 30px 32px 44px;
  max-width: 2000px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  gap: 16px;
}
#breadcrumb {
  font-size: 12px;
  color: #8c97a9;
  margin-bottom: 4px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #6c7a90;
}
#identity {
  padding-right: 10px;
  border-right: 1px solid var(--border);
}
.notice {
  padding: 12px 16px;
  border: 1px solid #bfdfd2;
  border-radius: 6px;
  background: #edfaf4;
  color: #247858;
  margin-bottom: 20px;
}
.notice.error,
.form-error {
  background: #fff1f1;
  border: 1px solid #f4cdcd;
  color: #ad3442;
  padding: 10px 14px;
  border-radius: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 10px #1c355504;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
  gap: 20px;
}
.list-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0 0;
}
.button-group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
}
.search-field {
  min-width: 180px;
  width: 300px;
}
.filters select {
  width: 150px;
}
.filters #refresh {
  margin-left: auto;
}
#list-error {
  margin: 0 24px 16px;
}
.table-wrap {
  overflow: auto;
  min-height: 160px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
  font-size: 13px;
}
th {
  background: #f7f9fc;
  color: #708096;
  font-weight: 500;
}
td,
th {
  padding: 13px 20px;
  border-top: 1px solid #edf0f5;
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tbody tr:hover {
  background: #fafcff;
}
.actions-heading,
.row-actions {
  position: sticky;
  right: 0;
  background: #fff;
  border-left: 1px solid #f0f2f6;
  max-width: none;
}
.actions-heading {
  background: #f7f9fc;
}
.row-actions {
  font-size: 12px;
}
.row-actions .text-button {
  font-size: 12px;
  padding: 2px 5px;
}
.empty-state {
  text-align: center !important;
  color: #98a3b4;
  padding: 60px 20px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 17px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.pagination select {
  width: 68px;
  padding: 4px 6px;
}
.badge {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  background: #f0f2f6;
  color: #66748a;
  font-size: 12px;
}
.status-active,
.status-published {
  background: #e9f7ef;
  color: #2b8c5b;
}
.status-validated,
.status-verified {
  background: #eaf2ff;
  color: #346cce;
}
.status-revoked,
.status-disabled {
  background: #fff0f1;
  color: #c15864;
}
.status-pending,
.status-expired {
  background: #fff5e6;
  color: #b5812c;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  padding: 22px 26px;
  border-radius: 8px;
}
.stat span {
  display: block;
  color: var(--muted);
}
.stat strong {
  font-size: 34px;
  display: block;
  margin-top: 8px;
  font-weight: 600;
}
.dashboard-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.shortcut-card {
  background: #fff;
  color: #354763;
  border: 1px solid var(--border);
  padding: 22px;
  text-align: left;
  white-space: normal;
}
.shortcut-card strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 14px;
}
.shortcut-card span {
  font-size: 12px;
  color: #8090a6;
}
.dashboard-links > p {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 12px;
}
.modal {
  width: min(760px, calc(100vw - 40px));
  max-height: 90vh;
  padding: 0;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  box-shadow: 0 18px 80px #152b5140;
  color: #24334a;
  background: #fff;
  overflow: auto;
}
.modal.wide {
  width: min(960px, calc(100vw - 40px));
}
.modal::backdrop {
  background: #17263e77;
  backdrop-filter: blur(2px);
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 23px 27px;
  border-bottom: 1px solid var(--border);
}
.modal-header p {
  font-size: 12px;
  color: #8995a7;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.modal-body {
  padding: 24px 27px;
}
.modal-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 17px 27px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  z-index: 2;
}
#modal-error {
  margin: 0 27px 20px;
}
.form-fields {
  display: grid;
  gap: 20px;
}
.field {
  min-width: 0;
}
.field > label {
  margin-bottom: 7px;
}
.field > small {
  margin-top: 6px;
}
.field > input[type="file"] {
  margin-top: 10px;
  font-size: 12px;
}
.field > input + select {
  margin-top: 8px;
}
.nested-fields {
  border: 1px solid var(--border);
  padding: 17px;
  border-radius: 6px;
  margin: 0;
  min-width: 0;
}
.nested-fields legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0 6px;
}
.nested-fields > .check-label {
  margin: 0 0 15px;
}
.check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.check-label,
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.check-label input,
.checkbox input {
  width: auto;
  margin: 0;
}
.repeat-list {
  display: grid;
  gap: 16px;
}
.repeat-row {
  position: relative;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  padding: 18px;
  background: #fafbfd;
}
.repeat-row > .text-button {
  display: block;
  margin: 10px 0 0 auto;
}
.repeat-list + .secondary {
  margin-top: 14px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  margin: 0;
  font-size: 13px;
}
.detail-grid > dt {
  color: #8190a5;
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid #edf0f4;
}
.detail-grid > dd {
  margin: 0;
  padding: 11px 0;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #edf0f4;
  white-space: pre-wrap;
}
.detail-grid .detail-grid {
  grid-template-columns: 120px minmax(0, 1fr);
  background: #f8fafd;
  border: 1px solid #edf0f5;
  border-radius: 5px;
  padding: 8px 14px;
  margin: 5px 0 10px;
}
.long-value {
  font:
    11px/1.7 ui-monospace,
    monospace;
  max-height: 260px;
  overflow: auto;
}
.detail-list {
  display: grid;
  gap: 22px;
}
.info-box,
.warning-box {
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 13px;
  background: #edf4ff;
  color: #51729e;
}
.warning-box {
  background: #fff4e9;
  color: #a06b30;
}
.approval-box {
  padding: 18px;
  background: #f8faff;
  border: 1px solid #dce7fa;
  border-radius: 6px;
  margin-top: 22px;
}
.approval-box p {
  font-size: 12px;
  color: #77869c;
}
.approval-box input {
  margin: 7px 0 12px;
}
.provisioning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.formrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.formrow label input,
.formrow label textarea {
  margin-top: 7px;
}
.checkbox {
  margin: 18px 0;
}
#provisioning-status {
  font-size: 13px;
  margin: 18px 0 0;
  color: #667d97;
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  aside {
    width: 190px;
  }
  main {
    margin-left: 190px;
    padding: 24px 20px;
  }
  .account {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .row-actions {
    max-width: 270px;
    white-space: normal;
  }
  .stats {
    gap: 12px;
  }
  .dashboard-links {
    grid-template-columns: repeat(2, 1fr);
  }
  .list-heading {
    align-items: flex-start;
  }
  .filters {
    flex-wrap: wrap;
  }
  .search-field {
    flex: 1;
  }
}
@media (max-width: 700px) {
  aside {
    position: static;
    width: auto;
    padding: 14px;
  }
  .brand {
    font-size: 19px;
  }
  .brand small,
  footer {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 14px;
    padding-bottom: 3px;
  }
  nav a {
    white-space: nowrap;
    padding: 7px 10px;
  }
  main {
    margin: 0;
    padding: 20px 14px;
  }
  header {
    align-items: flex-start;
  }
  .account {
    max-width: 180px;
    gap: 0;
  }
  #identity {
    border: 0;
    font-size: 11px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 28px;
  }
  .list-heading {
    padding: 18px 16px 0;
    flex-direction: column;
    gap: 12px;
  }
  .filters {
    padding: 16px;
  }
  .filters select {
    width: 120px;
  }
  .pagination {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
  }
  .modal {
    width: calc(100vw - 20px);
    max-height: 94vh;
  }
  .modal-header,
  .modal-body {
    padding: 19px;
  }
  .modal-footer {
    padding: 14px 19px;
  }
  .formrow {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 95px minmax(0, 1fr);
  }
  .detail-grid .detail-grid {
    grid-template-columns: 80px minmax(0, 1fr);
    padding: 6px;
  }
  .dashboard-links {
    gap: 10px;
  }
  .shortcut-card {
    padding: 15px;
  }
  .row-actions,
  .actions-heading {
    position: static;
  }
}

.fieldset-content {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

nav {
  min-height: 0;
  overflow-y: auto;
}
.action-menu {
  position: fixed;
  z-index: 50;
  min-width: 190px;
  max-height: 360px;
  overflow: auto;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 7px 25px #192c4b26;
}
.menu-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  text-align: left;
  background: transparent;
  color: #475a75;
  border: 0;
  font-size: 13px;
}
.menu-item:hover,
.menu-item:focus {
  background: #f0f5ff;
}
.menu-item.danger-text {
  color: var(--danger);
}
